diff --git a/include/bg_palette_buffer.h b/include/bg_palette_buffer.h index e2db2993b..8a940289b 100644 --- a/include/bg_palette_buffer.h +++ b/include/bg_palette_buffer.h @@ -4,10 +4,10 @@ #include "structs/rgb.h" void InitBGPaletteBuffer(void); -void nullsub_4(s32 index, const RGB *color, s32 brightness, const RGB *ramp); -void nullsub_5(s32 index, const RGB *color); -void SetBGPaletteBufferColorArray(s32 index, const RGB *color); -void SetBGPaletteBufferColorRGB(s32 index, const RGB *color, s32 brightness, const RGB *ramp); +void nullsub_4(s32 index, const RGB_Struct *color, s32 brightness, const RGB_Struct *ramp); +void nullsub_5(s32 index, const RGB_Struct *color); +void SetBGPaletteBufferColorArray(s32 index, const RGB_Struct *color); +void SetBGPaletteBufferColorRGB(s32 index, const RGB_Struct *color, s32 brightness, const RGB_Struct *ramp); void SetBGPaletteBufferColor(s32 index, u16 *color); void TransferBGPaletteBuffer(void); diff --git a/include/code_8004AA0.h b/include/code_8004AA0.h index ea28b2846..50fe50a62 100644 --- a/include/code_8004AA0.h +++ b/include/code_8004AA0.h @@ -12,12 +12,12 @@ typedef struct unkDataFor8004AA4 { /* 0x0 */ s16 colorCount; s16 unk2; - /* 0x4 */ RGB colors[0]; + /* 0x4 */ RGB_Struct colors[0]; } unkDataFor8004AA4; void nullsub_6(void); void sub_8004AA4(unkStruct_202EE8C *, OpenedFile *, s32); -bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, const RGB *); +bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, const RGB_Struct *); bool8 sub_8004D14(unkStruct_202EE8C *, s32); bool8 sub_8004D40(unkStruct_202EE8C *, s32); diff --git a/include/code_801D014.h b/include/code_801D014.h index a68229345..c10df25e0 100644 --- a/include/code_801D014.h +++ b/include/code_801D014.h @@ -24,13 +24,6 @@ struct unk_203B250 WindowTemplates windows; }; -// size: 0x8 -struct TeamBadgeData -{ - /* 0x0 */ u8 *pics; // probably a pointer to an arrays of pixels? - /* 0x4 */ RGB *palette; // Pics share common palette -}; - bool8 sub_801D014(Pokemon *); u32 sub_801D0DC(void); u32 sub_801D178(void); diff --git a/include/code_80A26CC.h b/include/code_80A26CC.h index 48293736b..4c2334020 100644 --- a/include/code_80A26CC.h +++ b/include/code_80A26CC.h @@ -1,24 +1,27 @@ #ifndef GUARD_CODE_80A26CC_H #define GUARD_CODE_80A26CC_H +#include "constants/ground_map.h" +#include "constants/script_dungeon_id.h" +#include "constants/script_id.h" + // size: 0x14 typedef struct DungeonInfo { - /* 0x0 */ s16 unk0; - /* 0x2 */ s16 unk2; - /* 0x4 */ s16 unk4; - /* 0x6 */ s16 unk6; - /* 0x8 */ s16 unk8; - /* 0xA */ s16 unkA; - /* 0xC */ u8 dungeonIndex; - /* 0xD */ u8 unkD; - /* 0xE */ s16 unkE; - /* 0x10 */ u8 unk10; - /* 0x11 */ u8 unk11; + /* 0x0 */ s16 mapID1; // See enum "GroundMapID". -1 if nothing + /* 0x2 */ s16 mapID2; // See enum "GroundMapID". -1 if nothing + /* 0x4 */ s16 mapID3; // See enum "GroundMapID". -1 if nothing + /* 0x6 */ s16 scriptID1; // See enum "ScriptID". -1 if nothing + /* 0x8 */ s16 scriptID2; // See enum "ScriptID". -1 if nothing + /* 0xA */ s16 scriptID3; // See enum "ScriptID" + /* 0xC */ u8 dungeonID; // See enum "DungeonID" + /* 0xE */ s16 rescueDungeonID; // See enum "RescueDungeonId" + /* 0x10 */ u8 unk10; // Always 1 + /* 0x11 */ bool8 unk11; } DungeonInfo; -const DungeonInfo *GetDungeonInfo_80A2608(s32 index); -s16 sub_80A2654(s16 index); +const DungeonInfo *GetScriptDungeonInfo(s32 scriptDungeon_); +s16 ScriptDungeonIDToRescueDungeonID(s16 scriptDungeonID); s16 sub_80A2668(s16); s16 sub_80A2688(u8); s16 RescueDungeonToScriptDungeonId(s16); @@ -26,10 +29,10 @@ s16 sub_80A26CC(s16); u8 RescueDungeonToDungeonId(s16 index); u8 sub_80A2728(s16 index); u8 ScriptDungeonIdToDungeonId(s16 index); -s16 sub_80A2750(s16); +s16 sub_80A2750(s16 scriptDungeon); bool8 IsRescueDungeonAvailable(s16 _rescueDungeonId); -bool8 sub_80A2824(u8 index); -bool8 sub_80A28F0(u8 index); +bool8 sub_80A2824(u8 dungeonID); +bool8 sub_80A28F0(u8 dungeonID); s32 sub_80A29B0(u8 *); #endif // GUARD_CODE_80A26CC_H diff --git a/include/constants/bg_music.h b/include/constants/bg_music.h index feeaa04db..53e3073ce 100644 --- a/include/constants/bg_music.h +++ b/include/constants/bg_music.h @@ -50,7 +50,8 @@ enum MusicID MUS_TIME_OF_REUNION, MUS_OPENING_TITLE, // 47 - 50 are blank/empty slots for BG Music - MUS_DUNGEON_FAIL = 51, + MUS_BLANK_50 = 50, + MUS_DUNGEON_FAIL, MUS_DUNGEON_COMPLETE, // 53 - 99 are blank/empty slots for BG Music MUS_FRIEND_AREA_UNUSED_1 = 100, diff --git a/include/constants/cutscenes.h b/include/constants/cutscenes.h new file mode 100644 index 000000000..b2c36aebb --- /dev/null +++ b/include/constants/cutscenes.h @@ -0,0 +1,123 @@ +#ifndef GUARD_CONSTANTS_CUTSCENES_H +#define GUARD_CONSTANTS_CUTSCENES_H + +enum CutsceneKind +{ + CUTSCENE_NONE, + CUTSCENE_MT_STEEL_ATTEMPT1, + CUTSCENE_MT_STEEL_ATTEMPT2, + CUTSCENE_MT_STEEL_POSTSTORY, + CUTSCENE_SINISTER_WOODS_ATTEMPT1, + CUTSCENE_SINISTER_WOODS_ATTEMPT2, + CUTSCENE_SINISTER_WOODS_POSTSTORY, + CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1, + CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2, + CUTSCENE_MT_THUNDER_PEAK_POSTSTORY, + CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1, + CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2, + CUTSCENE_MT_BLAZE_PEAK_POSTSTORY, + CUTSCENE_FROSTY_GROTTO_ATTEMPT1, + CUTSCENE_FROSTY_GROTTO_ATTEMPT2, + CUTSCENE_FROSTY_GROTTO_POSTSTORY, + CUTSCENE_MT_FREEZE_PEAK, + CUTSCENE_MT_FREEZE_PEAK_POSTSTORY, + CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1, + CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2, + CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY, + CUTSCENE_MAGMA_CAVERN_MID, + CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY, + CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1, + CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2, + CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY, + CUTSCENE_UPROAR_FOREST_ATTEMPT1, + CUTSCENE_UPROAR_FOREST_ATTEMPT2, + CUTSCENE_UPROAR_FOREST_POSTSTORY, + CUTSCENE_WESTERN_CAVE_ATTEMPT1, + CUTSCENE_WESTERN_CAVE_ATTEMPT2, + CUTSCENE_WESTERN_CAVE_POSTSTORY, + CUTSCENE_FIERY_FIELD_ATTEMPT1, + CUTSCENE_FIERY_FIELD_ATTEMPT2, + CUTSCENE_FIERY_FIELD_POSTSTORY, + CUTSCENE_LIGHTNING_FIELD_ATTEMPT1, + CUTSCENE_LIGHTNING_FIELD_ATTEMPT2, + CUTSCENE_LIGHTNING_FIELD_POSTSTORY, + CUTSCENE_NORTHWIND_FIELD_ATTEMPT1, + CUTSCENE_NORTHWIND_FIELD_ATTEMPT2, + CUTSCENE_NORTHWIND_FIELD_POSTSTORY, + CUTSCENE_MT_FARAWAY, + CUTSCENE_MT_FARAWAY_POSTSTORY, + CUTSCENE_NORTHERN_RANGE_ATTEMPT1, + CUTSCENE_NORTHERN_RANGE_ATTEMPT2, + CUTSCENE_NORTHERN_RANGE_POSTSTORY, + CUTSCENE_REGIROCK, + CUTSCENE_REGICE, + CUTSCENE_REGISTEEL, + CUTSCENE_JIRACHI, + CUTSCENE_JIRACHI_POSTSTORY, + CUTSCENE_SILVER_TRENCH, + CUTSCENE_STORMY_SEA, + CUTSCENE_METEOR_CAVE, + CUTSCENE_PURITY_FOREST, + CUTSCENE_MAZE_BOSS, + CUTSCENE_MEDICHAM, + CUTSCENE_MEDICHAM_POSTSTORY, + CUTSCENE_HOWLING_FOREST, + CUTSCENE_HOWLING_FOREST_POSTSTORY, + + NUM_CUTSCENES +}; + +enum CutsceneFlagID +{ + CUTSCENE_FLAG_MT_STEEL_REACHED, + CUTSCENE_FLAG_MT_STEEL_COMPLETE, + CUTSCENE_FLAG_SINISTER_WOODS_REACHED, + CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE, + CUTSCENE_FLAG_MT_THUNDER_PEAK_REACHED, + CUTSCENE_FLAG_MT_THUNDER_PEAK_COMPLETE, + CUTSCENE_FLAG_MT_BLAZE_PEAK_REACHED, + CUTSCENE_FLAG_MT_BLAZE_PEAK_COMPLETE, + CUTSCENE_FLAG_FROSTY_GROTTO_REACHED, + CUTSCENE_FLAG_FROSTY_GROTTO_COMPLETE, + CUTSCENE_FLAG_MT_FREEZE_PEAK_COMPLETE, + CUTSCENE_FLAG_MAGMA_CAVERN_PIT_REACHED, + CUTSCENE_FLAG_MAGMA_CAVERN_PIT_COMPLETE, + CUTSCENE_FLAG_MAGMA_CAVERN_MID_REACHED, + CUTSCENE_FLAG_SKY_TOWER_SUMMIT_REACHED, + CUTSCENE_FLAG_SKY_TOWER_SUMMIT_COMPLETE, + CUTSCENE_FLAG_UPROAR_FOREST_REACHED, + CUTSCENE_FLAG_UPROAR_FOREST_COMPLETE, + CUTSCENE_FLAG_WESTERN_CAVE_REACHED, + CUTSCENE_FLAG_WESTERN_CAVE_COMPLETE, + CUTSCENE_FLAG_FIERY_FIELD_REACHED, + CUTSCENE_FLAG_FIERY_FIELD_COMPLETE, + CUTSCENE_FLAG_LIGHTNING_FIELD_REACHED, + CUTSCENE_FLAG_LIGHTNING_FIELD_COMPLETE, + CUTSCENE_FLAG_NORTHWIND_FIELD_REACHED, + CUTSCENE_FLAG_NORTHWIND_FIELD_COMPLETE, + CUTSCENE_FLAG_MT_FARAWAY_COMPLETE, + CUTSCENE_FLAG_NORTHERN_RANGE_REACHED, + CUTSCENE_FLAG_NORTHERN_RANGE_COMPLETE, + // Written to when entering a Regi room: + // If the Regi was recruited before, this is set to TRUE. + // If the Regi "Part" or Music Box is in the inventory or held, this is set to TRUE. + // Otherwise, this is set to FALSE. + // If this is TRUE and the Regi is present, the Regi can be recruited. + CUTSCENE_FLAG_REGI_ITEM_OBTAINED, + CUTSCENE_FLAG_JIRACHI_COMPLETE, + CUTSCENE_FLAG_FROSTY_FOREST_INTRUDED, + CUTSCENE_FLAG_MEDICHAM_COMPLETE, + CUTSCENE_FLAG_HOWLING_FOREST_COMPLETE, + // Written to when entering a Regi room. + // If the Regi was recruited before, this is set to TRUE. + // Otherwise, this is set to FALSE. + CUTSCENE_FLAG_REGI_RECRUITED, + + NUM_CUTSCENE_FLAGS = 64, + + CUTSCENE_FLAG_INVALID = 0xFF, +}; + +#define CUTSCENE_FLAGS_U32STORAGE 3 // No idea why this is larger than necessary + +#endif // GUARD_CONSTANTS_CUTSCENES_H diff --git a/include/constants/direction.h b/include/constants/direction.h index 2e3d5abb1..c2a1d19f6 100644 --- a/include/constants/direction.h +++ b/include/constants/direction.h @@ -14,7 +14,24 @@ enum Direction DIRECTION_NORTHWEST, DIRECTION_WEST, DIRECTION_SOUTHWEST, + NUM_DIRECTIONS }; -#endif +enum DirectionTransformation +{ + DIR_TRANS_NONE, + DIR_TRANS_SPINRIGHT1, // Spin right 1 (example: South -> SouthWest) + DIR_TRANS_SPINLEFT1, // Spin left 1 (example: South -> SouthEast) + DIR_TRANS_SPINRIGHT2, // Spin right 2 (example: South -> West) + DIR_TRANS_SPINLEFT2, // Spin left 2 (example: South -> East) + DIR_TRANS_FLIP, // Flip (example: South -> North) + DIR_TRANS_RAND_OFFSET_SOFT_CARDINAL, // Like DIR_TRANS_RAND_OFFSET_SOFT but only results in cardinal directions + DIR_TRANS_RAND_OFFSET_SOFT, // SpinLeft1 or Nothing or SpinRight1 + DIR_TRANS_RAND_CARDINAL, // Random non-diagonal + DIR_TRANS_RAND, // Fully random + DIR_TRANS_10, + DIR_TRANS_11, +}; + +#endif // GUARD_CONSTANTS_DIRECTION_H diff --git a/include/constants/dungeon.h b/include/constants/dungeon.h index 2451d872e..48e4a9256 100644 --- a/include/constants/dungeon.h +++ b/include/constants/dungeon.h @@ -1,6 +1,8 @@ #ifndef GUARD_CONSTANTS_DUNGEON_H #define GUARD_CONSTANTS_DUNGEON_H +#include "constants/cutscenes.h" + enum DungeonID { DUNGEON_TINY_WOODS = 0, @@ -66,6 +68,7 @@ enum DungeonID DUNGEON_MT_FARAWAY = 60, DUNGEON_D61 = 61, DUNGEON_PURITY_FOREST = 62, + DUNGEON_OUT_ON_RESCUE = 63, DUNGEON_JOIN_LOCATION_LEADER = 64, // Displays as "???". DUNGEON_JOIN_LOCATION_PARTNER = 65, // Displays as "Tiny Woods". diff --git a/include/constants/event_flag.h b/include/constants/event_flag.h index 93cd1c0aa..3229300c8 100644 --- a/include/constants/event_flag.h +++ b/include/constants/event_flag.h @@ -1,7 +1,68 @@ #ifndef GUARD_CONSTANTS_EVENT_FLAG_H #define GUARD_CONSTANTS_EVENT_FLAG_H -enum FlagCalcOperation { +enum MainQuest +{ + // SCENARIO_MAIN: + + QUEST_SET_TEAM_NAME, + QUEST_UNK1, // Rescue dungeon related. For some reason it scans all rescue dungeons. + QUEST_CAN_ACCESS_JOBS, + QUEST_CAN_RECRUIT, + QUEST_SQUARE_ASLEEP, + QUEST_UNK5, // Run away related? It disallows "friend rescue" features. + QUEST_REACHED_POSTGAME, + QUEST_UNLOCKED_EVOLUTIONS, + QUEST_CAN_CHANGE_LEADER, + QUEST_CAN_DEPOSIT_PARTNER, + QUEST_UNK10, // Dojo-related + QUEST_UNK11, + QUEST_UNK12, // Music-related + QUEST_IN_WORLD_CALAMITY, + QUEST_MAZE_14, + QUEST_MAZE_15, + QUEST_LEGEND_ZAPDOS, + QUEST_LEGEND_MOLTRES, + QUEST_LEGEND_ARTICUNO, + QUEST_LEGEND_GROUDON, + QUEST_LEGEND_RAYQUAZA, + + // SCENARIO_SUB2: + + QUEST_LEGEND_KYOGRE, + QUEST_LEGEND_LUGIA, + + // SCENARIO_SUB3: + + QUEST_LEGEND_DEOXYS, + + // SCENARIO_SUB4: + + QUEST_LEGEND_HO_OH, + + // SCENARIO_SUB5: + + QUEST_LEGEND_MEWTWO, + + // SCENARIO_SUB7: + + QUEST_LEGEND_MEW, + + // RESCUE_SCENARIO_CONQUEST_LIST: + + QUEST_LEGEND_CELEBI, + + // Special check: + + QUEST_LUCARIO_RANK, + + // TRAINING_CONQUEST_LIST: + + QUEST_COMPLETED_ALL_MAZES, +}; + +enum FlagCalcOperation +{ CALC_SET, CALC_SUB, CALC_ADD, @@ -16,7 +77,8 @@ enum FlagCalcOperation { CALC_RANDOM, }; -enum FlagJudgeOperation { +enum FlagJudgeOperation +{ JUDGE_TRUE, JUDGE_FALSE, JUDGE_EQ, @@ -30,7 +92,245 @@ enum FlagJudgeOperation { JUDGE_BIT_SET, }; -enum ScriptVarId { +enum StartModeVal +{ + STARTMODE_NEW_GAME, + STARTMODE_CONTINUE_GAME, + STARTMODE_GROUND, // Overworld + STARTMODE_3, + STARTMODE_FRIEND_AREAS, + STARTMODE_DUNGEON_FROM_WORLD_MAP, + STARTMODE_6, + STARTMODE_CONTINUE_QUICKSAVE, + STARTMODE_8, + STARTMODE_DUNGEON_WON, + STARTMODE_10, + STARTMODE_11, + STARTMODE_DUNGEON_LOST, +}; + +// SCENARIO_MAIN: +// 0, 0 = New game +// 1, 0 = ??? +// 2, 0 = ??? +// 2, 1 = ??? +// 2, 2 = ??? Set upon exiting Tiny Woods. +// 3, 0 = Chose team name. See QUEST_SET_TEAM_NAME. Set in EVENT_M01E01A_L003 +// 3, 1 = ??? +// 3, 2 = ??? +// 3, 3 = ??? Bed tutorial related. +// 3, 4 = ??? See QUEST_UNK1 also +// 3, 5 = ??? +// 3, 6 = ??? Thunderwave cave related +// 4, 0 = ??? Set upon exiting Thunderwave Cave. +// 4, 1 = ??? +// 4, 2 = ??? +// 4, 3 = ??? +// 4, 4 = ??? See QUEST_CAN_ACCESS_JOBS also +// 4, 5 = ??? Mt Steel related +// 4, 6 = ??? +// 4, 7 = ??? +// 4, 8 = ??? +// 5, 0 = ??? +// 5, 1 = ??? See QUEST_CAN_RECRUIT also +// 5, 2 = ??? +// 5, 3 = ??? +// 5, 4 = ??? +// 5, 5 = ??? See QUEST_UNK10 and QUEST_UNK11 also +// 5, 6 = ??? +// 5, 7 = ??? See QUEST_MAZE_14 also +// 5, 8 = ??? +// 5, 9 = ??? Sinister Woods related +// 5, 10 = ??? +// 5, 11 = ??? +// 6, 0 = ??? +// 6, 1 = ??? +// 6, 2 = ??? +// 6, 3 = ??? Silent Chasm related +// 7, 0 = ??? +// 7, 1 = ??? +// 7, 2 = ??? +// 7, 3 = ??? Mt Thunder related +// 7, 4 = ??? +// 7, 5 = ??? +// 8, 0 = ??? See QUEST_LEGEND_ZAPDOS also +// 8, 1 = ??? +// 8, 2 = ??? +// 8, 3 = ??? Great Canyon related +// 8, 4 = ??? +// 9, 0 = ??? +// 9, 1 = ??? +// 9, 2 = ??? +// 9, 3 = ??? +// 9, 4 = ??? +// 9, 5 = ??? +// 10, 0 = ??? +// 10, 1 = ??? +// 10, 2 = ??? +// 10, 3 = ??? +// 11, 0 = Fugitive story begins. See QUEST_SQUARE_ASLEEP also +// 11, 1 = ??? +// 11, 2 = ??? See QUEST_UNK12 also +// 11, 3 = ??? See QUEST_UNK12 also +// 11, 4 = ??? See QUEST_UNK5 also +// 11, 5 = ??? +// 12, 0 = Lapis Cave completed? Mt Blaze story begins? +// 12, 1 = ??? +// 12, 2 = ??? +// 12, 3 = ??? +// 12, 4 = ??? +// 13, 0 = Mt Blaze completed. Frosty Grotto story begins. See QUEST_SQUARE_ASLEEP and QUEST_LEGEND_MOLTRES also +// 13, 1 = ??? +// 13, 2 = ??? +// 13, 3 = ??? +// 13, 4 = ??? +// 14, 0 = Frosty Grotto completed. Mt Freeze story begins? See QUEST_LEGEND_ARTICUNO also +// 14, 1 = ??? +// 14, 2 = ??? +// 14, 3 = ??? +// 15, 0 = Mt Freeze completed? See QUEST_UNK5 and QUEST_MAZE_14 also +// 15, 1 = ??? +// 15, 2 = ??? +// 15, 3 = ??? +// 15, 4 = ??? +// 15, 5 = ??? Uproar Forest related +// 15, 6 = ??? +// 15, 7 = ??? +// 15, 8 = ??? +// 15, 9 = ??? +// 15, 10 = ??? Magma Cavern related +// 15, 11 = ??? Magma Cavern related +// 15, 12 = ??? +// 16, 0 = Magma Cavern completed. Sky Tower story begins. See QUEST_LEGEND_GROUDON also +// 16, 1 = ??? +// 16, 2 = World calamity music is forced. Partner awaits in Pokémon Square for you to confirm you're ready for Sky Tower. You begin dreaming with Gardevoir and Gengar is there. See QUEST_IN_WORLD_CALAMITY +// 16, 3 = ??? +// 16, 4 = ??? Sky Tower related +// 16, 5 = ??? +// 16, 6 = ??? +// 17, 0 = Sky Tower completed. See QUEST_LEGEND_RAYQUAZA also +// 17, 1 = ??? +// 18, 0 = ??? See QUEST_REACHED_POSTGAME also +// 18, 1 = ??? +// 18, 2 = ??? See QUEST_UNLOCKED_EVOLUTIONS also +// 18, 3 = ??? See QUEST_CAN_CHANGE_LEADER also +// 18, 4 = ??? +// 19, 0 = ??? See QUEST_CAN_DEPOSIT_PARTNER also +// 19, 1 = ??? +// 19, 2 = ??? +// 20, 1 = ??? +// 20, 2 = ??? +// 21, 1 = ??? +// 21, 2 = ??? +// 22, 1 = ??? +// 22, 2 = ??? +// 23, 1 = ??? +// 23, 2 = ??? +// 24, 1 = ??? +// 24, 2 = ??? +// 25, 1 = ??? +// 25, 2 = ??? +// 26, 1 = ??? +// 26, 2 = ??? +// 27, 1 = ??? Set from EVENT_DIVIDE_AFTER +// 27, 2 = ??? +// 58, 1 = ??? + +// SCENARIO_SUB1: +// 29, 1 = Mankey Quest activated. +// 29, 2 = ??? Uproar Forest related +// 29, 3 = ??? Uproar Forest related +// 30, 0 = Mankey gang brought to base? +// 30, 2 = Enough chestnuts collected to complete team base renovation. +// 31, 0 = ??? Uproar Forest related +// 31, 1 = ??? Howling Forest related +// 31, 2 = ??? Howling Forest related +// 31, 3 = ??? +// 32, 0 = ??? Howling Forest related +// 32, 2 = Smeargle cannot join because its friend area is full. +// 32, 3 = Smeargle joined. + +// SCENARIO_SUB2: +// 33, 1 = Stormy Sea story activated. +// 33, 2 = Heard Lombre's story about the Stormy Sea. +// 33, 3 = Ready to speak to Whiscash about Stormy Sea. +// 33, 4 = Stormy Sea unlocked from Whiscash. +// 33, 5 = ??? +// 34, 0 = Stormy Sea completed. See QUEST_LEGEND_KYOGRE +// 34, 1 = ??? +// 34, 2 = ??? Legendary Island friend area related +// 34, 3 = ??? Silver Trench related +// 34, 5 = ??? +// 35, 0 = Silver Trench completed. See QUEST_LEGEND_LUGIA + +// SCENARIO_SUB3: +// 36, 1 = Meteor Cave story activated. +// 36, 2 = ??? Meteor Cave related +// 36, 3 = ??? +// 37, 0 = Meteor Cave completed. See QUEST_LEGEND_DEOXYS + +// SCENARIO_SUB4: +// 38, 1 = Ho-Oh story activated. +// 38, 2 = Xatu awaits for Ho-Oh story. +// 39, 0 = Xatu met for Ho-Oh story. Fiery Field opens. +// 39, 3 = ??? +// 40, 0 = Fiery Field completed. Lightning Field opens. +// 40, 3 = ??? +// 41, 0 = Lightning Field completed. Northwind Field opens. +// 41, 3 = ??? +// 42, 0 = Northwind Field completed. Mt Faraway opens. +// 42, 3 = ??? +// 43, 0 = Mt Faraway completed. See QUEST_LEGEND_HO_OH +// 43, 2 = ??? RESCUE_DUNGEON_GREAT_CANYON_2 and Fields/MtFaraway related + +// SCENARIO_SUB5: +// 44, 1 = Western Cave story activated. +// 44, 2 = Western Cave opens. +// 44, 3 = ??? +// 45, 0 = Western Cave completed. See QUEST_LEGEND_MEWTWO + +// SCENARIO_SUB6: +// 46, 1 = Latios/Latias story activated. +// 46, 2 = Northern Range opens. +// 46, 3 = ??? +// 47, 2 = Pitfall Valley opens. +// 47, 3 = ??? +// 48, 0 = Latios/Latias story completed. + +// SCENARIO_SUB7: +// 49, 1 = Buried Relic story activated. +// 49, 2 = Read Buried Relic news +// 49, 3 = Buried Relic opens. +// 49, 4 = ??? +// 50, 0 = Buried Relic completed. See QUEST_LEGEND_MEW + +// SCENARIO_SUB8: +// 51, 1 = Wish Cave story activated. +// 51, 2 = ??? +// 51, 3 = ??? +// 51, 4 = ??? +// 51, 5 = ??? +// 51, 6 = ??? +// 51, 7 = ??? Wish Cave related +// 51, 8 = ??? Wish Cave related +// 51, 9 = ??? Set upon exiting Wish Cave. +// 52, 0 = Wish Cave completed. + +// SCENARIO_SUB9: +// 53, 1 = Curse lifting story activated. +// 53, 2 = ??? +// 53, 3 = ??? +// 53, 4 = ??? Genger Mt Freeze related +// 53, 5 = ??? +// 53, 6 = ??? RESCUE_DUNGEON_MT_FREEZE_2 related +// 54, 0 = ??? RESCUE_DUNGEON_MT_FREEZE_2 related +// 54, 2 = ??? Murky Cave related (EVENT_S09E01B_L001) +// 54, 4 = ??? Set upon exiting Murky Cave. +// 55, 2 = ??? RESCUE_DUNGEON_MT_FREEZE_2 and Murky Cave related +// 55, 3 = Gardevoir recruited + +enum ScriptVarId +{ /* 0x00 */ VERSION, /* 0x01 */ CONDITION, /* 0x02 */ SCENARIO_SELECT, @@ -55,7 +355,7 @@ enum ScriptVarId { /* 0x15 */ DUNGEON_ENTER_FREQUENCY, /* 0x16 */ DUNGEON_RESULT, /* 0x17 */ SCRIPT_MODE, - /* 0x18 */ START_MODE, + /* 0x18 */ START_MODE, // See enum "StartModeVal" /* 0x19 */ CLEAR_COUNT, /* 0x1a */ CONDITION_KIND, /* 0x1b */ WEATHER_KIND, diff --git a/include/constants/fixed_rooms.h b/include/constants/fixed_rooms.h index 42dfbeef2..525f4b4b1 100644 --- a/include/constants/fixed_rooms.h +++ b/include/constants/fixed_rooms.h @@ -3,8 +3,10 @@ enum FixedRoomID { - // floorwide fixed rooms - FIXED_ROOM_MT_STEEL_SKARMORY = 1, + // Floorwide fixed rooms + + FIXED_ROOM_NONE, + FIXED_ROOM_MT_STEEL_SKARMORY, FIXED_ROOM_SINISTER_WOODS_TEAM_MEANIES, FIXED_ROOM_MT_THUNDER_PEAK_ZAPDOS, FIXED_ROOM_MT_BLAZE_PEAK_MOLTRES, @@ -30,6 +32,9 @@ enum FixedRoomID FIXED_ROOM_HOWLING_FOREST_SMEARGLE, FIXED_ROOM_PURITY_FOREST_CELEBI, FIXED_ROOM_WISH_CAVE_MEDICHAM, + + // Mazes + FIXED_ROOM_NORMAL_MAZE_BOSS, FIXED_ROOM_FIRE_MAZE_BOSS, FIXED_ROOM_WATER_MAZE_BOSS, @@ -53,7 +58,9 @@ enum FixedRoomID FIXED_ROOM_TEAM_RUMBLEROCK_BOSS, FIXED_ROOM_RESCUE_TEAM_2_BOSS, FIXED_ROOM_RESCUE_TEAM_MAZE_BOSS, - // non-floorwide fixed rooms + + // Non-floorwide fixed rooms + FIXED_ROOM_WYVERN_HILL_HM_FLY, FIXED_ROOM_SOLAR_CAVE_HM_DIVE, FIXED_ROOM_SOLAR_CAVE_HM_WATERFALL, @@ -75,8 +82,7 @@ enum FixedRoomID #define FIRST_DOJO_MAZE_BOSS_ROOM FIXED_ROOM_NORMAL_MAZE_BOSS #define LAST_DOJO_MAZE_BOSS_ROOM FIXED_ROOM_RESCUE_TEAM_MAZE_BOSS -#define NUM_MAZE_BOSS_ROOMS LAST_DOJO_MAZE_BOSS_ROOM - FIRST_DOJO_MAZE_BOSS_ROOM #define LAST_FLOORWIDE_FIXED_ROOM FIXED_ROOM_RESCUE_TEAM_MAZE_BOSS #define FIRST_NON_FLOORWIDE_FIXED_ROOM LAST_FLOORWIDE_FIXED_ROOM + 1 -#endif \ No newline at end of file +#endif // GUARD_CONSTANTS_FIXED_ROOMS_H diff --git a/include/constants/ground_map.h b/include/constants/ground_map.h index 387ff99bb..fc1b2db25 100644 --- a/include/constants/ground_map.h +++ b/include/constants/ground_map.h @@ -1,7 +1,8 @@ #ifndef GUARD_CONSTANTS_GROUND_MAP_H #define GUARD_CONSTANTS_GROUND_MAP_H -enum { +enum GroundMapID +{ MAP_SQUARE, MAP_POKEMON_SQUARE, MAP_WHISCASH_POND, diff --git a/include/constants/monster.h b/include/constants/monster.h index be843c196..4b37b07b1 100644 --- a/include/constants/monster.h +++ b/include/constants/monster.h @@ -430,6 +430,8 @@ #define NUM_MONSTERS MONSTER_JIRACHI #define MONSTER_MAX (MONSTER_RAYQUAZA_CUTSCENE + 1) +#define MONSTER_FLAGS_U32STORAGE 14 + #define IS_CASTFORM_FORM_MONSTER(id)((id == MONSTER_CASTFORM_SNOWY || id == MONSTER_CASTFORM_SUNNY || id == MONSTER_CASTFORM_RAINY)) #define IS_DEOXYS_FORM_MONSTER(id)((id == MONSTER_DEOXYS_ATTACK || id == MONSTER_DEOXYS_DEFENSE || id == MONSTER_DEOXYS_SPEED)) diff --git a/include/constants/rescue_dungeon_id.h b/include/constants/rescue_dungeon_id.h index b167089d3..fb603de26 100644 --- a/include/constants/rescue_dungeon_id.h +++ b/include/constants/rescue_dungeon_id.h @@ -3,6 +3,8 @@ enum RescueDungeonId { + RESCUE_DUNGEON_INVALID = -1, + RESCUE_DUNGEON_TINY_WOODS, RESCUE_DUNGEON_THUNDERWAVE_CAVE, RESCUE_DUNGEON_MT_STEEL, @@ -34,6 +36,9 @@ enum RescueDungeonId RESCUE_DUNGEON_WISH_CAVE, RESCUE_DUNGEON_MT_FREEZE_2, RESCUE_DUNGEON_MURKY_CAVE, + + // Non-story rescues: + RESCUE_DUNGEON_DESERT_REGION, RESCUE_DUNGEON_SOUTHERN_CAVERN, RESCUE_DUNGEON_WYVERN_HILL, @@ -49,7 +54,11 @@ enum RescueDungeonId RESCUE_DUNGEON_REMAINS_ISLAND, RESCUE_DUNGEON_MARVELOUS_SEA, RESCUE_DUNGEON_FANTASY_STRAIT, + RESCUE_DUNGEON_COUNT, }; +#define MAX_STORY_MISSION RESCUE_DUNGEON_MURKY_CAVE +#define NUM_STORY_MISSIONS (MAX_STORY_MISSION + 1) + #endif // GUARD_CONSTANTS_RESCUE_DUNGEON_ID_H diff --git a/include/constants/script_cmd.h b/include/constants/script_cmd.h new file mode 100644 index 000000000..b8a83678a --- /dev/null +++ b/include/constants/script_cmd.h @@ -0,0 +1,306 @@ +#ifndef GUARD_CONSTANTS_SCRIPT_CMD_H +#define GUARD_CONSTANTS_SCRIPT_CMD_H + +enum ScriptOpID +{ + CMD_BYTE_00, // Corresponds to "None" + CMD_BYTE_01, + CMD_BYTE_02, + CMD_BYTE_03, + CMD_BYTE_04, + CMD_BYTE_05, + CMD_BYTE_06, + CMD_BYTE_07, + CMD_BYTE_08, + CMD_BYTE_09, + CMD_BYTE_0A, + CMD_BYTE_0B, + CMD_BYTE_0C, + CMD_BYTE_0D, + CMD_BYTE_0E, + CMD_BYTE_0F, + CMD_BYTE_10, + CMD_BYTE_11, + CMD_BYTE_12, + CMD_BYTE_13, + CMD_BYTE_14, + CMD_BYTE_15, + CMD_BYTE_16, + CMD_BYTE_17, + CMD_BYTE_18, + CMD_BYTE_19, + CMD_BYTE_1A, + CMD_BYTE_1B, + CMD_BYTE_1C, + CMD_BYTE_1D, + CMD_BYTE_1E, + CMD_BYTE_1F, + CMD_BYTE_20, + CMD_BYTE_21, + CMD_BYTE_22, + CMD_BYTE_23, + CMD_BYTE_24, + CMD_BYTE_25, + CMD_BYTE_26, + CMD_BYTE_27, + CMD_BYTE_28, + CMD_BYTE_29, + CMD_BYTE_2A, + CMD_BYTE_2B, + CMD_BYTE_2C, + CMD_BYTE_2D, + CMD_BYTE_2E, + CMD_BYTE_2F, + CMD_BYTE_30, + CMD_BYTE_31, + CMD_BYTE_32, + CMD_BYTE_33, + CMD_BYTE_34, + CMD_BYTE_35, + CMD_BYTE_36, + CMD_BYTE_37, + CMD_BYTE_38, + CMD_BYTE_39, + CMD_BYTE_3A, + CMD_BYTE_3B, + CMD_BYTE_3C, + CMD_BYTE_3D, + CMD_BYTE_3E, + CMD_BYTE_3F, + CMD_BYTE_40, + CMD_BYTE_41, + CMD_BYTE_42, + CMD_BYTE_43, + CMD_BYTE_44, + CMD_BYTE_45, + CMD_BYTE_46, + CMD_BYTE_47, + CMD_BYTE_48, + CMD_BYTE_49, + CMD_BYTE_4A, + CMD_BYTE_4B, + CMD_BYTE_4C, + CMD_BYTE_4D, + CMD_BYTE_4E, + CMD_BYTE_4F, + CMD_BYTE_50, + CMD_BYTE_51, + CMD_BYTE_52, + CMD_BYTE_53, + CMD_BYTE_54, + CMD_BYTE_55, + CMD_BYTE_56, + CMD_BYTE_57, + CMD_BYTE_58, + CMD_BYTE_59, + CMD_BYTE_5A, + CMD_BYTE_5B, + CMD_BYTE_5C, + CMD_BYTE_5D, + CMD_BYTE_5E, + CMD_BYTE_5F, + CMD_BYTE_60, + CMD_BYTE_61, + CMD_BYTE_62, + CMD_BYTE_63, + CMD_BYTE_64, + CMD_BYTE_65, + CMD_BYTE_66, + CMD_BYTE_67, + CMD_BYTE_68, + CMD_BYTE_69, + CMD_BYTE_6A, + CMD_BYTE_6B, + CMD_BYTE_6C, + CMD_BYTE_6D, + CMD_BYTE_6E, + CMD_BYTE_6F, + CMD_BYTE_70, + CMD_BYTE_71, + CMD_BYTE_72, + CMD_BYTE_73, + CMD_BYTE_74, + CMD_BYTE_75, + CMD_BYTE_76, + CMD_BYTE_77, + CMD_BYTE_78, + CMD_BYTE_79, + CMD_BYTE_7A, + CMD_BYTE_7B, + CMD_BYTE_7C, + CMD_BYTE_7D, + CMD_BYTE_7E, + CMD_BYTE_7F, + CMD_BYTE_80, + CMD_BYTE_81, + CMD_BYTE_82, + CMD_BYTE_83, + CMD_BYTE_84, + CMD_BYTE_85, + CMD_BYTE_86, + CMD_BYTE_87, + CMD_BYTE_88, + CMD_BYTE_89, + CMD_BYTE_8A, + CMD_BYTE_8B, + CMD_BYTE_8C, + CMD_BYTE_8D, + CMD_BYTE_8E, + CMD_BYTE_8F, + CMD_BYTE_90, + CMD_BYTE_91, + CMD_BYTE_92, + CMD_BYTE_93, + CMD_BYTE_94, + CMD_BYTE_95, + CMD_BYTE_96, + CMD_BYTE_97, + CMD_BYTE_98, + CMD_BYTE_99, + CMD_BYTE_9A, + CMD_BYTE_9B, + CMD_BYTE_9C, + CMD_BYTE_9D, + CMD_BYTE_9E, + CMD_BYTE_9F, + CMD_BYTE_A0, + CMD_BYTE_A1, + CMD_BYTE_A2, + CMD_BYTE_A3, + CMD_BYTE_A4, + CMD_BYTE_A5, + CMD_BYTE_A6, + CMD_BYTE_A7, + CMD_BYTE_A8, + CMD_BYTE_A9, + CMD_BYTE_AA, + CMD_BYTE_AB, + CMD_BYTE_AC, + CMD_BYTE_AD, + CMD_BYTE_AE, + CMD_BYTE_AF, + CMD_BYTE_B0, + CMD_BYTE_B1, + CMD_BYTE_B2, + CMD_BYTE_B3, + CMD_BYTE_B4, + CMD_BYTE_B5, + CMD_BYTE_B6, + CMD_BYTE_B7, + CMD_BYTE_B8, + CMD_BYTE_B9, + CMD_BYTE_BA, + CMD_BYTE_BB, + CMD_BYTE_BC, + CMD_BYTE_BD, + CMD_BYTE_BE, + CMD_BYTE_BF, + CMD_BYTE_C0, + CMD_BYTE_C1, + CMD_BYTE_C2, + CMD_BYTE_C3, + CMD_BYTE_C4, + CMD_BYTE_C5, + CMD_BYTE_C6, + CMD_BYTE_C7, + CMD_BYTE_C8, + CMD_BYTE_C9, + CMD_BYTE_CA, + CMD_BYTE_CB, + CMD_BYTE_CC, + CMD_BYTE_CD, + CMD_BYTE_CE, + CMD_BYTE_CF, + CMD_BYTE_D0, + CMD_BYTE_D1, + CMD_BYTE_D2, + CMD_BYTE_D3, + CMD_BYTE_D4, + CMD_BYTE_D5, + CMD_BYTE_D6, + CMD_BYTE_D7, + CMD_BYTE_D8, + CMD_BYTE_D9, + CMD_BYTE_DA, + CMD_BYTE_DB, + CMD_BYTE_DC, + CMD_BYTE_DD, + CMD_BYTE_DE, + CMD_BYTE_DF, + CMD_BYTE_E0, + CMD_BYTE_E1, + CMD_BYTE_E2, + CMD_BYTE_E3, + CMD_BYTE_E4, + CMD_BYTE_E5, + CMD_BYTE_E6, + CMD_BYTE_E7, + CMD_BYTE_E8, + CMD_BYTE_E9, + CMD_BYTE_EA, + CMD_BYTE_EB, + CMD_BYTE_EC, + CMD_BYTE_ED, + CMD_BYTE_EE, + CMD_BYTE_EF, + CMD_BYTE_F0, + CMD_BYTE_F1, + CMD_BYTE_F2, + CMD_BYTE_F3, + CMD_BYTE_F4, + CMD_BYTE_F5, + CMD_BYTE_F6, +}; + +enum SpecialTextKind +{ + SPECIAL_TEXT_UNK_0, + SPECIAL_TEXT_UNK_1, + SPECIAL_TEXT_WAITING, + SPECIAL_TEXT_UNK_3, + SPECIAL_TEXT_PLAYER_NAME_INPUT, + SPECIAL_TEXT_TEAM_NAME_INPUT, + SPECIAL_TEXT_PASSWORD_INPUT, + SPECIAL_TEXT_FRIEND_MENU, + SPECIAL_TEXT_MENU, + SPECIAL_TEXT_YES_NO_WITH_LARGE_BOX, + SPECIAL_TEXT_LARGE_TEXT_BOX, + SPECIAL_TEXT_BUY_FRIEND_AREAS, + SPECIAL_TEXT_DUNGEON_LIST, + SPECIAL_TEXT_DOJO_LIST, + SPECIAL_TEXT_SAVE_1, + SPECIAL_TEXT_SAVE_2, + SPECIAL_TEXT_STORAGE_WITH_DIALOG, + SPECIAL_TEXT_STORAGE, + SPECIAL_TEXT_UNK_12, + SPECIAL_TEXT_BANK, + SPECIAL_TEXT_UNK_14, + SPECIAL_TEXT_UNK_15, + SPECIAL_TEXT_FRIEND_AREA_SELECT, + SPECIAL_TEXT_GREEN_KECLEON_SHOP, + SPECIAL_TEXT_PURPLE_KECLEON_SHOP, + SPECIAL_TEXT_LINK_SHOP, + SPECIAL_TEXT_LUMINOUS_CAVE, + SPECIAL_TEXT_FRIEND_SHOP, + SPECIAL_TEXT_FRIEND_RESCUE, + SPECIAL_TEXT_UNK_1D, + SPECIAL_TEXT_THANK_YOU_MAIL, + SPECIAL_TEXT_PPO_HELP_COUNTER, + SPECIAL_TEXT_BULLETIN_BOARD_JOBS, + SPECIAL_TEXT_BULLETIN_BOARD, + SPECIAL_TEXT_UNK_22, + SPECIAL_TEXT_UNK_23, + SPECIAL_TEXT_DOJO_ENTER, + SPECIAL_TEXT_DOJO_SUCCESS, + SPECIAL_TEXT_DOJO_FAILURE, + SPECIAL_TEXT_DOJO_ALL_CLEARED, + SPECIAL_TEXT_PERSONALITY_QUIZ, + SPECIAL_TEXT_UNK_29, + SPECIAL_TEXT_SCRIPTING_MENU, + SPECIAL_TEXT_ITEM_REWARD, + SPECIAL_TEXT_UNK_2C, + SPECIAL_TEXT_TOOL_BOX, + SPECIAL_TEXT_CREDITS_NAME, +}; + +#endif // GUARD_CONSTANTS_SCRIPT_CMD_H diff --git a/include/constants/script_dungeon_id.h b/include/constants/script_dungeon_id.h index 1651eeb31..a8ceeca76 100644 --- a/include/constants/script_dungeon_id.h +++ b/include/constants/script_dungeon_id.h @@ -24,7 +24,7 @@ enum ScriptDungeonId SCRIPT_DUNGEON_MAGMA_CAVERN_PIT, SCRIPT_DUNGEON_SKY_TOWER, SCRIPT_DUNGEON_SKY_TOWER_SUMMIT, - SCRIPT_DUNGEON_21, + SCRIPT_DUNGEON_DUMMY, SCRIPT_DUNGEON_UPROAR_FOREST, SCRIPT_DUNGEON_HOWLING_FOREST, SCRIPT_DUNGEON_STORMY_SEA, @@ -43,6 +43,7 @@ enum ScriptDungeonId SCRIPT_DUNGEON_MT_FREEZE_2, SCRIPT_DUNGEON_MT_FREEZE_PEAK_2, SCRIPT_DUNGEON_MURKY_CAVE, + SCRIPT_DUNGEON_DESERT_REGION, SCRIPT_DUNGEON_SOUTHERN_CAVERN, SCRIPT_DUNGEON_WYVERN_HILL, @@ -58,6 +59,7 @@ enum ScriptDungeonId SCRIPT_DUNGEON_REMAINS_ISLAND, SCRIPT_DUNGEON_MARVELOUS_SEA, SCRIPT_DUNGEON_FANTASY_STRAIT, + SCRIPT_DUNGEON_NORMAL_MAZE_2, SCRIPT_DUNGEON_FIRE_MAZE, SCRIPT_DUNGEON_WATER_MAZE, @@ -83,6 +85,9 @@ enum ScriptDungeonId SCRIPT_DUNGEON_RESCUE_TEAM_MAZE, SCRIPT_DUNGEON_ROCK_PATH, SCRIPT_DUNGEON_SNOW_PATH, + + // OutOnRescue dungeons + SCRIPT_DUNGEON_80, SCRIPT_DUNGEON_81, SCRIPT_DUNGEON_82, diff --git a/include/constants/script_id.h b/include/constants/script_id.h new file mode 100644 index 000000000..ba3c14f78 --- /dev/null +++ b/include/constants/script_id.h @@ -0,0 +1,484 @@ +#ifndef GUARD_CONSTANTS_SCRIPT_ID_H +#define GUARD_CONSTANTS_SCRIPT_ID_H + +enum ScriptID +{ + END_TALK, + WAIT_END_TALK_FUNC, + WAIT_END_EVENT_FUNC, + WAIT_START_FUNC, + INCOMPLETE_TALK, + NORMAL_WAIT_END_TALK, + LIVES_REPLY_NORMAL, + LIVES_REPLY, + OBJECT_REPLY_NORMAL, + EXAMINE_MISS, + ENTER_WAIT_FUNC, + UNIT_TALK, + HABITAT_TALK, + HABITAT_TALK_S01E02A, + HABITAT_MOVE1, + HABITAT_MOVE2, + HABITAT_MOVE_PAUSE, + HABITAT_MOVE_STAY_FIX, + HABITAT_MOVE_STAY_TURN, + LIVES_MOVE_NORMAL, + LIVES_MOVE_CHANGE, + OBJECT_MOVE_NORMAL, + OBJECT_MOVE_CHANGE, + EFFECT_MOVE_NORMAL, + EFFECT_MOVE_CHANGE, + MOVE_INIT, + MOVE_PAUSE, + MOVE_STAY, + MOVE_SLEEP, + MOVE_RANDOM, + MOVE_BOY, + MOVE_GIRL, + WAKEUP_FUNC, + LOOK_AROUND_FUNC, + LOOK_AROUND_DOWN_FUNC, + LOOK_AROUND_RIGHT_FUNC, + LOOK_AROUND_LEFT_FUNC, + JUMP_HAPPY_FUNC, + JUMP_SURPRISE_FUNC, + JUMP_ANGRY_FUNC, + NOTICE_FUNC, + QUESTION_FUNC, + SWEAT_FUNC, + SHOCK_FUNC, + SPREE_START_FUNC, + SPREE_END_FUNC, + SMILE_START_FUNC, + SMILE_END_FUNC, + ANGRY_START_FUNC, + ANGRY_END_FUNC, + MOVE_PLAZA_SLEEP, + INIT_PLAZA_SLEEP_STAY_FUNC, + INIT_PLAZA_SLEEP_TALK_FUNC, + INIT_SLEEP_FUNC, + INIT_BASE_FUNC, + INIT_DEBUG_HABITAT, + + NORMAL_MESSAGE, + NORMAL_EVENT, + + NORMAL_CAMERA, + // Disperses team members to their friend areas and alerts the player. + DISMISSAL_SALLY_MEMBER_FUNC, + // Seems identical to DISMISSAL_SALLY_MEMBER_FUNC + DISMISSAL_SALLY_MEMBER2_FUNC, + // Seems identical to DISMISSAL_SALLY_MEMBER_FUNC + DISMISSAL_SALLY_MEMBER3_FUNC, + // Seems identical to DISMISSAL_SALLY_MEMBER_FUNC + DISMISSAL_SALLY_MEMBER4_FUNC, + // Save prompt followed by SPECIAL_TEXT_SAVE_1 + NEXT_SAVE_FUNC, + // Save prompt followed by SPECIAL_TEXT_SAVE_2 + NEXT_SAVE2_FUNC, + SAVE_POINT, + WAREHOUSE_POINT, + // Save and storage statue before fugitive dungeons. + SAVE_AND_WAREHOUSE_POINT, + WORLD_MAP_POINT, + FORMATION_HERO, + EVOLUTION_HERO, + WARP_LIVES_START, + WARP_LIVES_START2, + WARP_LIVES_START3, + WARP_LIVES_ARRIVE, + WARP_LIVES_ARRIVE2, + WARP_LIVES_ARRIVE3, + LIVES_WARP_START_FUNC, + LIVES_WARP_START2_FUNC, + LIVES_WARP_START3_FUNC, + LIVES_WARP_START_SUB, + LIVES_WARP_ARRIVE_FUNC, + LIVES_WARP_ARRIVE2_FUNC, + LIVES_WARP_ARRIVE3_FUNC, + LIVES_WARP_ARRIVE_SUB, + GET_ITEM_FUNC, + GET_ITEM_WAIT_FUNC, + GET_ITEM2_FUNC, + GET_ITEM2_WAIT_FUNC, + JOIN_FUNC, + LODGE_START_FUNC, + LODGE_WAIT_FUNC, + LODGE_END_FUNC, + LODGE_SOUND_FUNC, + SAVE_START_FUNC, + SAVE_WAIT_FUNC, + SAVE_END_FUNC, + SAVE_SOUND_FUNC, + EFFECT_TEST1, + EFFECT_TEST2, + EFFECT_MOVE_DIVE, + EFFECT_MOVE_WAVE, + // Some general purpose script helper. + EVENT_DIVIDE, + EVENT_DIVIDE_NEXT, + EVENT_DIVIDE_INIT_FUNC, + EVENT_DIVIDE_NEXT_DAY_FUNC, + EVENT_DIVIDE_NEXT_DAY2_FUNC, + EVENT_DIVIDE_FIRST, + EVENT_DIVIDE_SECOND, + EVENT_DIVIDE_AFTER, + EVENT_DIVIDE_WARP_LOCK_FUNC, + EVENT_RESCUE_ENTER_CHECK, + EVENT_RESCUE, + DEBUG_SCRIPT, + DEMO_CANCEL, + DEMO_01, + DEMO_02, + DEMO_03, + DEMO_04, + EVENT_M00E01A_L001, + EVENT_M01E01A_L001, + EVENT_M01E01A_L002, + EVENT_M01E01A_L003, + EVENT_M01E02A_L001, + EVENT_M01E02A_L001B, + EVENT_M01E02A_L001C, + EVENT_M01E02A_L002, + EVENT_M01E02A_L003, + EVENT_M01E02A_L004, + EVENT_M01E02A_L005, + // Completes the Thunderwave Cave Magnemite story. + EVENT_M01E02A_L006, + EVENT_M01E02B_L001, + EVENT_M01E02B_L002, + EVENT_M01E02B_L003, + EVENT_M01E02B_L004, + EVENT_M01E02B_L004B, + EVENT_M01E02B_L005, + EVENT_M01E02B_L006, + EVENT_M01E02B_L007, + EVENT_M01E02B_L008, + EVENT_M01E03A_L000, + EVENT_M01E03A_L001, + EVENT_M01E03A_L002, + EVENT_M01E03A_L003, + EVENT_M01E03A_L004, + EVENT_M01E03A_L005, + EVENT_M01E03A_L006, + EVENT_M01E03A_L007, + EVENT_M01E03A_L008, + EVENT_M01E03A_L009, + EVENT_M01E03A_L010, + EVENT_M01E03A_L011, + EVENT_M01E04A_L000, + EVENT_M01E04A_L001, + EVENT_M01E04A_L002, + EVENT_M01E04A_L003, + EVENT_M01E04A_L004, + EVENT_M01E04A_L005, + EVENT_M01E04A_L006, + EVENT_M01E04B_L000, + EVENT_M01E04B_L001, + EVENT_M01E04B_L002, + EVENT_M01E04B_L003, + EVENT_M01E04B_L004, + EVENT_M01E04B_L005, + EVENT_M01E04B_L006, + EVENT_M01E04B_L007, + EVENT_M01E05A_L000, + EVENT_M01E05A_L001, + EVENT_M01E05A_L002, + EVENT_M01E05A_L003, + EVENT_M01E05A_L004, + EVENT_M01E05A_L005, + EVENT_M01E05A_L006, + EVENT_M01E05B_L000, + EVENT_M01E05B_L001, + EVENT_M01E05B_L002, + EVENT_M01E05B_L003, + EVENT_M01E05B_L004, + EVENT_M01E05B_L005, + EVENT_M01E06A_L001, + EVENT_M01E06A_L002, + EVENT_M01E06A_L003, + EVENT_M01E07A_L001, + EVENT_M01E07A_L002, + EVENT_M01E07A_L003, + EVENT_M01E07A_L004, + EVENT_M01E07A_L005, + EVENT_M01E07A_T001, + EVENT_M01E07A_T002, + EVENT_M01E07B_L001, + EVENT_M01E07B_L002, + EVENT_M01E07B_L003, + EVENT_M01E07B_L004, + EVENT_M01E07B_L005, + EVENT_M01E07B_T001, + EVENT_M01E07B_T002, + EVENT_M01E08A_L001, + EVENT_M01E08A_L002, + EVENT_M01E08A_L003, + EVENT_M01E08A_L004, + EVENT_M01E08A_L005, + EVENT_M01E08A_T001, + EVENT_M01E08A_T002, + EVENT_M01E08B_L001, + EVENT_M01E08B_L002, + EVENT_M01E08B_L003, + EVENT_M01E08B_L004, + EVENT_M01E08B_L005, + EVENT_M01E08B_L006, + EVENT_M01E08B_T001, + EVENT_M01E08B_T002, + EVENT_M01E09A_L001, + EVENT_M01E09A_L002, + EVENT_M01E09A_L003, + EVENT_M01E09A_L004, + EVENT_M01E09A_L005, + EVENT_M01E09A_L006, + EVENT_M01E09A_L007, + EVENT_M01E09A_L008, + EVENT_M01E09A_L009, + EVENT_M01E09A_L010, + EVENT_M01E09A_L011, + EVENT_M01E09A_L012, + EVENT_M01E09A_L013, + EVENT_M01E09A_L014, + EVENT_M01E09A_L015, + EVENT_M01E10A_L001, + EVENT_M01E10A_L002, + EVENT_M01E10A_L003, + EVENT_M01E10A_L004, + EVENT_M01E10A_L005, + EVENT_M01E10A_L006, + EVENT_M01E10A_L007, + EVENT_M01E10A_L008, + EVENT_M01END_L001, + EVENT_M01END_L002, + EVENT_M02E01A_L001, + EVENT_M02E01A_L002, + EVENT_M02E01A_L003, + EVENT_M02E02A_L001, + EVENT_M02E02B_L001, + EVENT_M02E02C_L001, + EVENT_M02E02D_L001, + EVENT_M02E02E_L001, + EVENT_M02E02F_L001, + EVENT_M02E02G_L001, + EVENT_M02E02H_L001, + EVENT_M02END_L001, + EVENT_S00E01A_L001, + EVENT_S00E01A_L002, + EVENT_S00E01A_L003, + EVENT_S00E01A_L004, + EVENT_S01E01A_START, + EVENT_S01E01A_CONTINUE, + EVENT_S01E01A_END, + EVENT_S01E01A_L001, + EVENT_S01E01A_L002, + EVENT_S01E01A_L003, + EVENT_S01E01B_L001, + EVENT_S01E01B_L001L, + EVENT_S01E01C_L001, + EVENT_S01E02A_START, + EVENT_S01E02A_END, + EVENT_S01E02A_L001, + EVENT_S01E02A_L002, + EVENT_S01E02A_L002L, + EVENT_S01E02B_L001, + EVENT_S01E02B_L002, + EVENT_S02E01A_START, + EVENT_S02E01A_END, + EVENT_S02E01A_L001, + EVENT_S02E01A_L002, + EVENT_S02E01A_L003, + EVENT_S02E01A_L004, + EVENT_S02E01A_L004L, + EVENT_S02E02A_START, + EVENT_S02E02A_END, + EVENT_S02E02A_L001, + EVENT_S02E02A_L002, + EVENT_S02E02A_L003, + EVENT_S02E02A_L003L, + EVENT_S03E01A_START, + EVENT_S03E01A_CONTINUE, + EVENT_S03E01A_END, + EVENT_S03E01A_L001, + EVENT_S03E01A_L002, + EVENT_S03E01A_L002L, + EVENT_S04E01A_START, + EVENT_S04E01A_LAST, + EVENT_S04E01A_END, + EVENT_S04E01A_L001, + EVENT_S04E01A_L002, + EVENT_S04E01A_L002L, + EVENT_S04E01B_L001, + EVENT_S04E01B_L001L, + EVENT_S04E01C_L001, + EVENT_S04E01C_L001L, + EVENT_S04E01D_L001, + EVENT_S04E01D_L001L, + EVENT_S04E01E_L001, + EVENT_S04E01E_L001L, + EVENT_S04E01F_L001, + EVENT_S05E01A_START, + EVENT_S05E01A_CONTINUE, + EVENT_S05E01A_END, + EVENT_S05E01A_L001, + EVENT_S05E01A_L002, + EVENT_S05E01A_L002L, + EVENT_S06E01A_START, + EVENT_S06E01A_CONTINUE, + EVENT_S06E01A_END, + EVENT_S06E01A_L001, + EVENT_S06E01A_L002, + EVENT_S06E01A_L002L, + EVENT_S06E01B_L001, + EVENT_S06E01B_L002, + EVENT_S06E01B_L002L, + // Activates the Buried Relic story. + EVENT_S07E01A_START, + // Jumped from EVENT_DIVIDE_AFTER. Completes the Buried Relic story. + EVENT_S07E01A_END, + // Debug script. Advances the Buried Relic story as if we learned the news. + EVENT_S07E01A_L001, + // Debug script. Opens the Buried Relic as if we talked to Lombre. + EVENT_S07E01A_L002, + // Debug script. Completes the Buried Relic story and prompts a save at home. + EVENT_S07E01A_L003, + // Jumped from EVENT_DIVIDE. Buried Relic related, next day? + EVENT_S07E01A_L003L, + EVENT_S08E01A_START, + EVENT_S08E01A_END, + EVENT_S08E01A_L001, + EVENT_S08E01A_L002, + EVENT_S08E01A_L003, + EVENT_S08E01A_L004, + EVENT_S08E01A_L005, + EVENT_S08E01A_L005B, + EVENT_S08E01A_L006, + EVENT_S08E01A_L006L, + EVENT_S08E01A_L007, + EVENT_S08E01A_L008, + EVENT_S08E01A_L008L, + EVENT_S08E01A_L008A, + EVENT_S08E01A_L008B, + EVENT_S08E01A_L008C, + EVENT_S09E01A_START, + EVENT_S09E01A_END, + EVENT_S09E01A_L001, + EVENT_S09E01A_L002, + EVENT_S09E01A_L003, + EVENT_S09E01A_L004, + EVENT_S09E01A_L004B, + EVENT_S09E01A_L005, + EVENT_S09E01A_L005L, + // Sets the "GO" icon for Murky Cave. + EVENT_S09E01B_L001, + // Sets up the Murky Cave dungeon. + EVENT_S09E01B_L001B, + EVENT_S09E01B_L002, + EVENT_S09E01B_L002L, + EVENT_S09E01C_L001, + EVENT_R00E01A_L001, + // Helper script + COMMON_ENTER, + DEBUG_ENTER, + + // Exit script, not sure how it works though. + GETOUT_NORMAL, + + // Exit script for friend areas. + GETOUT_HABITAT, + // Exit script for Tiny Woods. + GETOUT_M01E01A, + // Exit script for Thunderwave Cave. + GETOUT_M01E02A, + // Exit script for Mt Steel and Dungeon 3. + GETOUT_M01E02B, + // Exit script for Sinister Woods and Dungeon 5. + GETOUT_M01E03A, + // Exit script for Silent Chasm. + GETOUT_M01E04A, + // Exit script for Mt Thunder and Mt Thunder Peak. + GETOUT_M01E04B, + // Exit script for Great Canyon. + GETOUT_M01E05A, + // Exit script for Lapis Cave. + GETOUT_M01E07A, + // Exit script for Mt Blaze and Mt Blaze Peak. + GETOUT_M01E07B, + // Exit script for Frosty Forest and Frosty Grotto. + GETOUT_M01E08A, + // Exit script for Mt Freeze and Mt Freeze Peak. + GETOUT_M01E08B, + // Exit script for Magma Cavern and Magma Cavern Pit. + GETOUT_M01E09A, + // Exit script for Sky Tower and Sky Tower Summit. + GETOUT_M01E10A, + // Exit script for the Dummy dungeon. + GETOUT_S00E01A, + // Exit script for Uproar Forest. + GETOUT_S01E01A, + // Exit script for Howling Forest. + GETOUT_S01E02A, + // Exit script for Stormy Sea. + GETOUT_S02E01A, + // Exit script for Silver Trench. + GETOUT_S02E02A, + // Exit script for Meteor Cave. + GETOUT_S03E01A, + // Exit script for Great Canyon 2. + GETOUT_S04E01A, + // Exit script for Fiery Field. + GETOUT_S04E01B, + // Exit script for Lightning Field. + GETOUT_S04E01C, + // Exit script for Northwind Field. + GETOUT_S04E01D, + // Exit script for Mt Faraway. + GETOUT_S04E01E, + // Exit script for Western Cave. + GETOUT_S05E01A, + // Exit script for Northern Range. + GETOUT_S06E01A, + // Exit script for Pitfall Valley. + GETOUT_S06E01B, + // Exit script for Buried Relic. + GETOUT_S07E01A, + // Exit script for Wish Cave. + GETOUT_S08E01A, + // Exit script for Mt Freeze 2 and Mt Freeze Peak 2. + GETOUT_S09E01A, + // Exit script for Murky Cave. + GETOUT_S09E01B, + // Exit script for Purity Forest. + GETOUT_D62E01A, + // Exit script for Oddity Cave. + GETOUT_D43E01A, + // Exit script for Remains Island. + GETOUT_D44E01A, + // Exit script for Marvelous Sea. + GETOUT_D45E01A, + // Exit script for Fantasy Strait. + GETOUT_D46E01A, + // Exit script for Dungeon 80. + GETOUT_U00E01A, + // Some kind of general exit script helper. + GETOUT_R00E01A, + // Exit script for the maze dungeons and Dungeon 82. + GETOUT_T00E01A, + // Exit script for Rock Path. + GETOUT_M01E07T, + // Exit script for Snow Path. + GETOUT_M01E08T, + + EVENT_CONTROL, + EVENT_WAKEUP, + EVENT_STATION, + STATION_CONTROL, + ENTER_CONTROL, + + SETUP_DEBUG_CAMERA, + MOVE_DEBUG_CAMERA, + + NUM_SCRIPT_IDS +}; + +#endif // GUARD_CONSTANTS_SCRIPT_ID_H diff --git a/include/constants/tutorial_id.h b/include/constants/tutorial_id.h new file mode 100644 index 000000000..960881216 --- /dev/null +++ b/include/constants/tutorial_id.h @@ -0,0 +1,28 @@ +#ifndef GUARD_CONSTANTS_TUTORIAL_ID_H +#define GUARD_CONSTANTS_TUTORIAL_ID_H + +enum TutorialFlagID +{ + TUTORIAL_FLAG_STAIRS_AND_SURVIVE, + TUTORIAL_FLAG_OPEN_MENU, + TUTORIAL_FLAG_REGAIN_HP, + TUTORIAL_FLAG_MANAGE_BELLY1, + TUTORIAL_FLAG_ORAN_BERRY, + TUTORIAL_FLAG_CHERI_BERRY, + TUTORIAL_FLAG_BLAST_SEED, + TUTORIAL_FLAG_GRAVELEROCK, + TUTORIAL_FLAG_UNK8, + TUTORIAL_FLAG_PECHA_BERRY, + TUTORIAL_FLAG_SLEEP_SEED, + TUTORIAL_FLAG_MONEY, + TUTORIAL_FLAG_MOVES, + TUTORIAL_FLAG_TEAM_MANAGEMENT, + TUTORIAL_FLAG_MOVEMENT, + TUTORIAL_FLAG_MANAGE_BELLY2, + + NUM_TUTORIAL_FLAGS = 31 +}; + +#define TUTORIAL_FLAGS_U32STORAGE 1 + +#endif // GUARD_CONSTANTS_TUTORIAL_ID_H diff --git a/include/data_script.h b/include/data_script.h index bc6285330..76652d1ca 100644 --- a/include/data_script.h +++ b/include/data_script.h @@ -1,10 +1,19 @@ +//#ifndef GUARD_DATA_SCRIPT_H +//#define GUARD_DATA_SCRIPT_H + +#include "constants/bg_music.h" +#include "constants/cutscenes.h" #include "constants/direction.h" #include "constants/event_flag.h" -#include "constants/item.h" #include "constants/ground_map.h" +#include "constants/item.h" +#include "constants/rescue_dungeon_id.h" #include "constants/script_dungeon_id.h" -#include "portrait_placement.h" +#include "constants/script_cmd.h" +#include "constants/script_id.h" #include "structs/str_ground_script.h" +#include "ground_place.h" +#include "portrait_placement.h" #define LPARRAY(x) (ARRAY_COUNT(x)), x @@ -12,622 +21,559 @@ #define CPOS_CURRENT 0x4 // 01..07: complex map/dungeon selection/check commands -#define NEXT_DUNGEON(u, d) { 0x02, 0, u, d, 0, NULL } // Seems to be a general command for setting up which dungeon to enter next. First argument is unknown. The second argument is script dungeon id(not the one in dungeon/constants.h). There's a different ordering and a table with the proper dungeon id. -#define SELECT_MAP(m) { 0x08, 0, 0, m, 0, NULL } -#define SELECT_GROUND(m) { 0x09, 0, 0, m, 0, NULL } -#define SELECT_DUNGEON(m,d,f,b) { 0x0A, b, f, d, m, NULL } -#define SELECT_WEATHER(w) { 0x0B, 0, 0, w, 0, NULL } -#define SELECT_ENTITIES(g,s) { 0x0C, s, g, 0, 0, NULL } -#define SELECT_LIVES(g,s) { 0x0D, s, g, 0, 0, NULL } -#define SELECT_OBJECTS(g,s) { 0x0E, s, g, 0, 0, NULL } -#define SELECT_EFFECTS(g,s) { 0x0F, s, g, 0, 0, NULL } -#define SELECT_EVENTS(g,s) { 0x10, s, g, 0, 0, NULL } -#define CANCEL_ENTITIES(g,s) { 0x11, s, g, 0, 0, NULL } -#define CANCEL_LIVES(g,s) { 0x12, s, g, 0, 0, NULL } -#define CANCEL_OBJECTS(g,s) { 0x13, s, g, 0, 0, NULL } -#define CANCEL_EFFECTS(g,s) { 0x14, s, g, 0, 0, NULL } -#define CANCEL_EVENTS(g,s) { 0x15, s, g, 0, 0, NULL } -#define CANCEL_OFFSCREEN_LIVES { 0x16, 0, 0, 0, 0, NULL } -#define CANCEL_OFFSCREEN_OBJECTS { 0x17, 0, 0, 0, 0, NULL } -#define CANCEL_OFFSCREEN_EFFECTS { 0x18, 0, 0, 0, 0, NULL } -#define SPAWN_OBJECT(k,d,g,s) { 0x19, s, g, d, k, NULL } -#define SPAWN_EFFECT(k,d,g,s) { 0x1A, s, g, d, k, NULL } -#define EXECUTE_FUNCTION(f) { 0x1B, 0, f, 0, 0, NULL } -#define EXECUTE_SUBROUTINE(f) { 0x1C, 0, f, 0, 0, NULL } -#define EXECUTE_STATION(m,g,s) { 0x1D, s, g, m, 0, NULL } -#define EXECUTE_SUBSTATION(m,g,s) { 0x1E, s, g, m, 0, NULL } -#define RESCUE_SELECT { 0x1F, 0, 0, 0, 0, NULL } -// 20: execute script as parented object, maybe? Unused in ROM -// 21: follow object/make object follow/get parented? -// 22..2f: ??? -#define TEXTBOX_AUTO_PRESS(endF, midF) { 0x2b, 0, 0, endF, midF, NULL} // Waits specified number of frames, then automatically does a button press without waiting for player's input. -1 disables it. +// TODO: CMD_BYTE_01 -// Note for the spriteId: first 4 bits(0xF) are the actual spriteId, but sometimes a 0x40 flag is attached to it, but it has no practical use. Could be different in Blue? -#define PORTRAIT(place, id, sprite) { 0x2e, place, id, sprite, 0, NULL } // Sets up portrait data for the specified speaker -#define PORTRAIT_REP(id, sprite) { 0x2e, PLACEMENT_COUNT, id, sprite, 0, NULL } // Same as the above, but it assumes the last used placement for the speaker. Useful in long scripts, where you don't need to remember all the placements. +// Seems to be a general command for setting up which dungeon to enter next. +// u: Unknown. +// d: enum "ScriptDungeonId". +#define NEXT_DUNGEON(u, d) { CMD_BYTE_02, 0, u, d, 0, NULL } + +// TODO: CMD_BYTE_03 + +// TODO: CMD_BYTE_04 + +// TODO: CMD_BYTE_05 + +// TODO: CMD_BYTE_06 + +// TODO: CMD_BYTE_07 + +// m: enum "GroundMapID". +#define SELECT_MAP(m) { CMD_BYTE_08, 0, 0, m, 0, NULL } + +#define SELECT_GROUND(m) { CMD_BYTE_09, 0, 0, m, 0, NULL } + +#define SELECT_DUNGEON(m, d, f, b) { CMD_BYTE_0A, b, f, d, m, NULL } + +#define SELECT_WEATHER(w) { CMD_BYTE_0B, 0, 0, w, 0, NULL } + +// Uses the map from SELECT_MAP. +// Does GroundLives_Select(), GroundObject_Select(), GroundEffect_Select(), and GroundEvent_Select(). +// g: Group. -1 will use the ScriptInfo group. +// s: Sector. -1 will use the ScriptInfo sector. +#define SELECT_ENTITIES(g, s) { CMD_BYTE_0C, s, g, 0, 0, NULL } + +#define SELECT_LIVES(g,s) { CMD_BYTE_0D, s, g, 0, 0, NULL } + +#define SELECT_OBJECTS(g,s) { CMD_BYTE_0E, s, g, 0, 0, NULL } + +#define SELECT_EFFECTS(g,s) { CMD_BYTE_0F, s, g, 0, 0, NULL } + +#define SELECT_EVENTS(g,s) { CMD_BYTE_10, s, g, 0, 0, NULL } + +#define CANCEL_ENTITIES(g,s) { CMD_BYTE_11, s, g, 0, 0, NULL } + +#define CANCEL_LIVES(g,s) { CMD_BYTE_12, s, g, 0, 0, NULL } + +#define CANCEL_OBJECTS(g,s) { CMD_BYTE_13, s, g, 0, 0, NULL } + +#define CANCEL_EFFECTS(g,s) { CMD_BYTE_14, s, g, 0, 0, NULL } + +#define CANCEL_EVENTS(g,s) { CMD_BYTE_15, s, g, 0, 0, NULL } + +#define CANCEL_OFFSCREEN_LIVES { CMD_BYTE_16, 0, 0, 0, 0, NULL } + +#define CANCEL_OFFSCREEN_OBJECTS { CMD_BYTE_17, 0, 0, 0, 0, NULL } + +#define CANCEL_OFFSCREEN_EFFECTS { CMD_BYTE_18, 0, 0, 0, 0, NULL } + +#define SPAWN_OBJECT(k,d,g,s) { CMD_BYTE_19, s, g, d, k, NULL } + +#define SPAWN_EFFECT(k,d,g,s) { CMD_BYTE_1A, s, g, d, k, NULL } + +// f: enum "ScriptID". +#define EXECUTE_FUNCTION(f) { CMD_BYTE_1B, 0, f, 0, 0, NULL } + +// f: enum "ScriptID". +#define EXECUTE_SUBROUTINE(f) { CMD_BYTE_1C, 0, f, 0, 0, NULL } + +#define EXECUTE_STATION(m,g,s) { CMD_BYTE_1D, s, g, m, 0, NULL } + +#define EXECUTE_SUBSTATION(m,g,s) { CMD_BYTE_1E, s, g, m, 0, NULL } + +#define RESCUE_SELECT { CMD_BYTE_1F, 0, 0, 0, 0, NULL } + +// TODO: CMD_BYTE_20: execute script as parented object, maybe? Unused in ROM + +// TODO: CMD_BYTE_21: follow object/make object follow/get parented? + +// TODO: CMD_BYTE_22 + +// TODO: CMD_BYTE_23 + +// TODO: CMD_BYTE_24 + +// TODO: CMD_BYTE_25 + +// TODO: CMD_BYTE_26 + +// TODO: CMD_BYTE_27 + +// TODO: CMD_BYTE_28 + +// TODO: CMD_BYTE_29 + +// TODO: CMD_BYTE_2A + +// Waits specified number of frames, then automatically does a button press without waiting for player's input. +// -1 disables it. +#define TEXTBOX_AUTO_PRESS(endF, midF) { CMD_BYTE_2B, 0, 0, endF, midF, NULL} + +// TODO: CMD_BYTE_2C + +// TODO: CMD_BYTE_2D + +// Sets up portrait data for the specified speaker +// Note for the spriteId: first 4 bits(0xF) are the actual spriteId, but sometimes a 0x40 flag is attached to it, but it has no practical use. +// Could be different in Blue? +#define PORTRAIT(place, id, sprite) { CMD_BYTE_2E, place, id, sprite, 0, NULL } + +// Same as the above, but it assumes the last used placement for the speaker. +// Useful in long scripts, where you don't need to remember all the placements. +#define PORTRAIT_REP(id, sprite) { CMD_BYTE_2E, PLACEMENT_COUNT, id, sprite, 0, NULL } + +// Sets portrait delta position, which modifies the portrait's position on the screen. +#define PORTRAIT_POS(id, x, y) { CMD_BYTE_2F, 0, id, x, y, NULL } + +#define TEXTBOX_CLEAR { CMD_BYTE_30, 0, 0, 0, 0, NULL } + +// Used rarely. I don't think there's a functional difference from TEXTBOX_CLEAR. +#define TEXTBOX_CLEAR2 { CMD_BYTE_31, 0, 0, 0, 0, NULL } + +#define MSG_INSTANT(msg) { CMD_BYTE_32, 0, -1, 0, 0, msg } + +// Used for messages that don't make a sound while printing characters. +// The player hero, Munchlax munching, and the voice in Murky Cave use this. +// id: Speaker ID. -1 for no portrait. +#define MSG_QUIET(id, msg) { CMD_BYTE_33, 0, id, 0, 0, msg } + +// id: Speaker ID. -1 for no portrait. +#define MSG_NPC(id, msg) { CMD_BYTE_34, 0, id, 0, 0, msg } + +#define MSG_LETTER(msg) { CMD_BYTE_35, 0, -1, 0, 0, msg } + +// Used for sounds or dialogue the player hears from the background such as flapping, boss cries, and NPCs conversing. +#define MSG_OVERHEARD(msg) { CMD_BYTE_36, 0, -1, 0, 0, msg } + +// Prints raw text on bg without any windows. +// Used for the intro portal messages. +// To advance the text, the player needs to press a button. +#define MSG_ON_BG(msg) { CMD_BYTE_37, 0, -1, 0, 0, msg } + +// Identical to the above, used literally once for just a newline. +#define MSG_ON_BG2(msg) { CMD_BYTE_38, 0, -1, 0, 0, msg } + +// Similar to the above, but the message appears and fades automatically, without any player's input. +// Used for narration text. +// The short argument isn't really used, but needs to be greater than 0. +#define MSG_ON_BG_AUTO(u, msg) { CMD_BYTE_39, 0, u, 0, 0, msg } + +// TODO: CMD_BYTE_3A: yes/no choice (only used for saving) + +// TODO: CMD_BYTE_3B: uber command (conditional jump) +// k=0x30 checks if gardevoir has space to join by checking its friend area +// k=0x31 names gardevoir? +// k=0x32 tries to recruit Gardevoir + +// k: See enum "SpecialTextKind" +// i: ??? +// t: ??? +#define SPECIAL_TEXT(k, i, t) { CMD_BYTE_3C, k, 0, i, t, NULL } + +#define RENAME_ALLY(id) { CMD_BYTE_3D, 0, 0, id, 0, NULL } + +#define RENAME_TEAM { CMD_BYTE_3E, 0, 0, 0, 0, NULL } + +// TODO: CMD_BYTE_3F: input box? + +// TODO: CMD_BYTE_40: unused? + +#define REMOVE_ITEMSTACK(i) { CMD_BYTE_41, 0, i, 0, 0, NULL } + +#define MUSIC_STOP_ALL { CMD_BYTE_42, 0, 0, 0, 0, NULL } + +#define MUSIC_FADEOUT_ALL(f) { CMD_BYTE_43, 0, f, 0, 0, NULL } + +#define BGM_SWITCH(i) { CMD_BYTE_44, 0, 0, i, 0, NULL } + +#define BGM_FADEIN(f,i) { CMD_BYTE_45, 0, f, i, 0, NULL } + +#define BGM_QUEUE(i) { CMD_BYTE_46, 0, 0, i, 0, NULL } + +#define BGM_STOP { CMD_BYTE_47, 0, 0, 0, 0, NULL } + +#define BGM_FADEOUT(f) { CMD_BYTE_48, 0, f, 0, 0, NULL } + +#define FANFARE_PLAY(i) { CMD_BYTE_49, 0, 0, i, 0, NULL } + +#define FANFARE_STOP(i) { CMD_BYTE_4A, 0, 0, i, 0, NULL } + +#define FANFARE_FADEOUT(f,i) { CMD_BYTE_4B, 0, f, i, 0, NULL } + +#define FANFARE_PLAY2(i) { CMD_BYTE_4C, 0, 0, i, 0, NULL } + +#define FANFARE_STOP2(i) { CMD_BYTE_4D, 0, 0, i, 0, NULL } + +#define FANFARE_FADEOUT2(f,i) { CMD_BYTE_4E, 0, f, i, 0, NULL } + +// TODO: CMD_BYTE_4F + +// TODO: CMD_BYTE_50 + +// TODO: CMD_BYTE_51 + +// TODO: CMD_BYTE_52 + +// TODO: CMD_BYTE_53 + +#define SELECT_ANIMATION(id) { CMD_BYTE_54, 0, id, 0, 0, NULL } + +// TODO: CMD_BYTE_55 + +// TODO: CMD_BYTE_56 + +// TODO: CMD_BYTE_57 + +// TODO: CMD_BYTE_58 + +// TODO: CMD_BYTE_59 + +// TODO: CMD_BYTE_5A -#define PORTRAIT_POS(id, x, y) { 0x2f, 0, id, x, y, NULL } // Sets portrait delta position, which modifies the portrait's position on the screen. -// 30..39: various text printing -#define TEXTBOX_CLEAR { 0x30, 0, 0, 0, 0, NULL } -#define TEXTBOX_CLEAR2 { 0x31, 0, 0, 0, 0, NULL } // Used rarely, I don't think there's a functional difference between 0x30 and 0x31. -#define MSG_INSTANT(msg) { 0x32, 0, -1, 0, 0, msg } -#define MSG_NPC(id, msg) { 0x34, 0, id, 0, 0, msg } // ID is portrait id of the npc. -1 means no portrait -#define MSG_LETTER(msg) { 0x35, 0, -1, 0, 0, msg } -#define MSG_ON_BG(msg) { 0x37, 0, -1, 0, 0, msg } // Prints raw text on bg without any windows. Used for the intro portal messages. To advance the text player needs to press a button. -#define MSG_ON_BG2(msg) { 0x38, 0, -1, 0, 0, msg } // Identical to the above, used literally once for just a newline. -#define MSG_ON_BG_AUTO(u, msg) { 0x39, 0, u, 0, 0, msg } // Similar to the above, but the message appears and fades automatically, without any player's input. Used for narration text. The short argument isn't really used, but needs to be greater than 0. -// 3a: yes/no choice (only used for saving) -// 3b: uber command (conditional jump) -#define SPECIAL_TEXT(k, i, t) { 0x3C, k, 0, i, t, NULL } -#define RENAME_ALLY(id) { 0x3D, 0, 0, id, 0, NULL } -#define RENAME_TEAM { 0x3E, 0, 0, 0, 0, NULL } -// 3f: input box? -// 40: unused? -#define REMOVE_ITEMSTACK(i) { 0x41, 0, i, 0, 0, NULL } -#define MUSIC_STOP_ALL { 0x42, 0, 0, 0, 0, NULL } -#define MUSIC_FADEOUT_ALL(f) { 0x43, 0, f, 0, 0, NULL } -#define BGM_SWITCH(i) { 0x44, 0, 0, i, 0, NULL } -#define BGM_FADEIN(f,i) { 0x45, 0, f, i, 0, NULL } -#define BGM_QUEUE(i) { 0x46, 0, 0, i, 0, NULL } -#define BGM_STOP { 0x47, 0, 0, 0, 0, NULL } -#define BGM_FADEOUT(f) { 0x48, 0, f, 0, 0, NULL } -#define FANFARE_PLAY(i) { 0x49, 0, 0, i, 0, NULL } -#define FANFARE_STOP(i) { 0x4a, 0, 0, i, 0, NULL } -#define FANFARE_FADEOUT(f,i) { 0x4b, 0, f, i, 0, NULL } -#define FANFARE_PLAY2(i) { 0x4c, 0, 0, i, 0, NULL } -#define FANFARE_STOP2(i) { 0x4d, 0, 0, i, 0, NULL } -#define FANFARE_FADEOUT2(f,i) { 0x4e, 0, f, i, 0, NULL } -// 4f..57: more movement/position? Some sprite stuff? -#define SELECT_ANIMATION(id) { 0x54, 0, id, 0, 0, NULL } -// 58..95: position and movement-related // For WARP/WALK, every map has a list of predefined locations. -#define WARP_WAYPOINT(u, w) { 0x5B, u, 0, w, 0, NULL } -#define WALK_RELATIVE(spd, h, v) { 0x6A, 0, spd, h, v, NULL } -#define WALK_GRID(spd, w) { 0x6B, 0, spd, w, 0, NULL } -#define WALK_DIRECT(spd, w) { 0x7A, 0, spd, w, 0, NULL } -#define CAMERA_PAN(u1, u2) { 0x86, 0, u1, u2, 0, NULL } -#define ROTATE(spd, d, o) { 0x91, spd, d, o, 0, NULL } // d=cw/ccw/shortest, o=final orientation -// 96: unused? -// 97: ??? (maybe more camera?) -#define CAMERA_INIT_PAN { 0x98, 0, 0, 0, 0, NULL } -#define CAMERA_END_PAN { 0x99, 0, 0, 0, 0, NULL } -// 9a: ??? (maybe more camera?) -// 9b..a3: camera-related -#define RESET_ARRAY(v) { 0xA4, 0, v, 0, 0, NULL } -#define CLEAR_ARRAY(v) { 0xA5, 0, v, 0, 0, NULL } -#define UPDATE_VARINT(o,v,i) { 0xA6, o, v, i, 0, NULL } -#define UPDATE_VARVAR(o,a,b) { 0xA7, o, a, b, 0, NULL } -#define SET_ARRAYVAL(v,i,x) { 0xA8, 0, v, i, x, NULL } -#define SCENARIO_CALC(v,a,b) { 0xA9, 0, v, a, b, NULL } -#define SCENARIO_ADVANCE(v,a) { 0xAA, 0, v, a, 0, NULL } -#define SET_DUNGEON_RES(r,e) { 0xAB, 0, r, e, 0, NULL } -#define SET_PLAYER_KIND(k) { 0xAC, 0, k, 0, 0, NULL } -// ad..b2: opaque functions -#define JUMPIF_EQUAL(v,i,l) { 0xB3, l, v, i, 0, NULL } -#define JUMPIF(o,v,i,l) { 0xB4, o, l, v, i, NULL } -#define JUMPIF_2(o,a,b,l) { 0xB5, o, l, a, b, NULL } -#define JUMPIF_ARRAY(v,i,l) { 0xB6, 0, l, v, i, NULL } -#define JUMPIF_SUM(o,v,i,l) { 0xB7, o, l, v, i, NULL } -#define JUMPIF_SCENE_LT(v,a,b,l) { 0xB8, l, v, a, b, NULL } -#define JUMPIF_SCENE_EQ(v,a,b,l) { 0xB9, l, v, a, b, NULL } -#define JUMPIF_SCENE_GT(v,a,b,l) { 0xBA, l, v, a, b, NULL } -#define JUMPIF_SCENARIOCHECK(i,l) { 0xBB, l, i, 0, 0, NULL } -// functions need reversing -#define JUMPIF_UNK_BC(i,l) { 0xBC, l, i, 0, 0, NULL } -#define JUMPIF_UNK_BD(i,l) { 0xBD, l, 0, i, 0, NULL } -#define JUMPIF_UNK_BE(l) { 0xBE, l, 0, 0, 0, NULL } -#define JUMPIF_HASITEM(i,l) { 0xBF, l, i, 0, 0, NULL } -#define CJUMP_VAR(v) { 0xC0, 0, v, 0, 0, NULL } -#define CJUMP_CALC_VI(o,v,i) { 0xC1, o, v, i, 0, NULL } -#define CJUMP_CALC_VV(o,a,b) { 0xC2, o, a, b, 0, NULL } -#define CJUMP_RANDOM(h) { 0xC3, 0, h, 0, 0, NULL } -#define CJUMP_SCENARIO_0(v) { 0xC4, 0, v, 0, 0, NULL } -#define CJUMP_SCENARIO_1(v) { 0xC5, 0, v, 0, 0, NULL } -// wtf is c6 -#define CJUMP_UNK_C6(a) { 0xC6, 0, 0, a, 0, NULL } -#define CJUMP_DIRECTION { 0xC7, 0, 0, 0, 0, NULL } +#define WARP_WAYPOINT(u,w) { CMD_BYTE_5B, u, 0, w, 0, NULL } + +// TODO: CMD_BYTE_5C + +// TODO: CMD_BYTE_5D + +// TODO: CMD_BYTE_5E + +// TODO: CMD_BYTE_5F + +// TODO: CMD_BYTE_60 + +// TODO: CMD_BYTE_61 + +// TODO: CMD_BYTE_62 + +// TODO: CMD_BYTE_63 + +// TODO: CMD_BYTE_64 + +// TODO: CMD_BYTE_65 + +// TODO: CMD_BYTE_66 + +// TODO: CMD_BYTE_67 + +// TODO: CMD_BYTE_68 + +// TODO: CMD_BYTE_69 + +#define WALK_RELATIVE(spd,h,v) { CMD_BYTE_6A, 0, spd, h, v, NULL } + +#define WALK_GRID(spd,w) { CMD_BYTE_6B, 0, spd, w, 0, NULL } + +// TODO: CMD_BYTE_6C + +// TODO: CMD_BYTE_6D + +// TODO: CMD_BYTE_6E + +// TODO: CMD_BYTE_6F + +// TODO: CMD_BYTE_70 + +// TODO: CMD_BYTE_71 + +// TODO: CMD_BYTE_72 + +// TODO: CMD_BYTE_73 + +// TODO: CMD_BYTE_74 + +// TODO: CMD_BYTE_75 + +// TODO: CMD_BYTE_76 + +// TODO: CMD_BYTE_77 + +// TODO: CMD_BYTE_78 + +// TODO: CMD_BYTE_79 + +#define WALK_DIRECT(spd,w) { CMD_BYTE_7A, 0, spd, w, 0, NULL } + +// TODO: CMD_BYTE_7B + +// TODO: CMD_BYTE_7C + +// TODO: CMD_BYTE_7D + +// TODO: CMD_BYTE_7E + +// TODO: CMD_BYTE_7F + +// TODO: CMD_BYTE_80 + +// TODO: CMD_BYTE_81 + +// TODO: CMD_BYTE_82 + +// TODO: CMD_BYTE_83 + +// TODO: CMD_BYTE_84 + +// TODO: CMD_BYTE_85 + +#define CAMERA_PAN(u1,u2) { CMD_BYTE_86, 0, u1, u2, 0, NULL } + +// TODO: CMD_BYTE_87 + +// TODO: CMD_BYTE_88 + +// TODO: CMD_BYTE_89 + +#define CMD_UNK_8A(a,b,t) { CMD_BYTE_8A, a, b, t, 0, NULL } + +// Sets the parent object's direction then waits the specified number of frames. +// d: Direction to set. Can be -1 also, which doesn't set the object's direction, but is still stored in the action script data. +// f: Amount of frames to wait afterwards. +#define SET_DIR_WAIT(d, f) { CMD_BYTE_8B, f, d, 0, 0, NULL } + +#define CMD_UNK_8C(a,t,c) { CMD_BYTE_8C, a, t, c, 0, NULL } + +#define CMD_UNK_8D(a,t) { CMD_BYTE_8D, a, t, 0, 0, NULL } + +#define CMD_UNK_8E(a,t,c) { CMD_BYTE_8E, a, t, c, 0, NULL } + +#define CMD_UNK_8F(a,t,c) { CMD_BYTE_8F, a, t, c, 0, NULL } + +#define CMD_UNK_90(a,t,c) { CMD_BYTE_90, a, t, c, 0, NULL } + +// o: Final orientation +#define ROTATE_TO(spd,t,o) { CMD_BYTE_91, spd, t, o, 0, NULL } + +#define CMD_UNK_92(a,b,t) { CMD_BYTE_92, a, b, t, 0, NULL } + +#define CMD_UNK_93(a,t,c) { CMD_BYTE_93, a, t, c, 0, NULL } + +#define CMD_UNK_94(a,t,c) { CMD_BYTE_94, a, t, c, 0, NULL } + +#define CMD_UNK_95(a,t,c) { CMD_BYTE_95, a, t, c, 0, NULL } + +// TODO: CMD_BYTE_96 + +// TODO: CMD_BYTE_97 + +#define CAMERA_INIT_PAN { CMD_BYTE_98, 0, 0, 0, 0, NULL } + +#define CAMERA_END_PAN { CMD_BYTE_99, 0, 0, 0, 0, NULL } + +// TODO: CMD_BYTE_9A + +// TODO: CMD_BYTE_9B + +// TODO: CMD_BYTE_9C + +// TODO: CMD_BYTE_9D + +// TODO: CMD_BYTE_9E + +// TODO: CMD_BYTE_9F + +// TODO: CMD_BYTE_A0 + +// TODO: CMD_BYTE_A1 + +// TODO: CMD_BYTE_A2 + +// TODO: CMD_BYTE_A3 + +#define RESET_ARRAY(v) { CMD_BYTE_A4, 0, v, 0, 0, NULL } + +#define CLEAR_ARRAY(v) { CMD_BYTE_A5, 0, v, 0, 0, NULL } + +#define UPDATE_VARINT(o,v,i) { CMD_BYTE_A6, o, v, i, 0, NULL } + +#define UPDATE_VARVAR(o,a,b) { CMD_BYTE_A7, o, a, b, 0, NULL } + +#define SET_ARRAYVAL(v,i,x) { CMD_BYTE_A8, 0, v, i, x, NULL } + +#define SCENARIO_CALC(v,a,b) { CMD_BYTE_A9, 0, v, a, b, NULL } + +#define SCENARIO_ADVANCE(v,a) { CMD_BYTE_AA, 0, v, a, 0, NULL } + +// r is the value to put in DUNGEON_RESULT. +// e is the value to put in DUNGEON_ENTER. +#define SET_DUNGEON_RES(r,e) { CMD_BYTE_AB, 0, r, e, 0, NULL } + +#define SET_PLAYER_KIND(k) { CMD_BYTE_AC, 0, k, 0, 0, NULL } + +#define UNLOCK_FRIEND_AREA(a) { CMD_BYTE_AD, TRUE, a, 0, 0, NULL } + +#define CMD_UNK_AE(r) { CMD_BYTE_AE, TRUE, r, 0, 0, NULL } + +#define CMD_UNK_AF(r, b) { CMD_BYTE_AF, b, r, 0, 0, NULL } + +#define SET_RESCUE_CONQUERED(s) { CMD_BYTE_B0, TRUE, s, 0, 0, NULL } + +// TODO: CMD_BYTE_B1 + +// TODO: CMD_BYTE_B2 + +#define JUMPIF_EQUAL(v,i,l) { CMD_BYTE_B3, l, v, i, 0, NULL } + +#define JUMPIF(o,v,i,l) { CMD_BYTE_B4, o, l, v, i, NULL } + +#define JUMPIF_2(o,a,b,l) { CMD_BYTE_B5, o, l, a, b, NULL } + +#define JUMPIF_ARRAY(v,i,l) { CMD_BYTE_B6, 0, l, v, i, NULL } + +#define JUMPIF_SUM(o,v,i,l) { CMD_BYTE_B7, o, l, v, i, NULL } + +#define JUMPIF_SCENE_LT(v,a,b,l) { CMD_BYTE_B8, l, v, a, b, NULL } + +#define JUMPIF_SCENE_EQ(v,a,b,l) { CMD_BYTE_B9, l, v, a, b, NULL } + +#define JUMPIF_SCENE_GT(v,a,b,l) { CMD_BYTE_BA, l, v, a, b, NULL } + +// Jumps to a label if `CheckQuest(i)` returns TRUE. +// i: The quest to check. See enum "MainQuest". +// l: The label to jump to. +#define JUMPIF_SCENARIOCHECK(i,l) { CMD_BYTE_BB, l, i, 0, 0, NULL } + +#define JUMPIF_CUTSCENE_FLAG(f,l) { CMD_BYTE_BC, l, f, 0, 0, NULL } + +#define JUMPIF_UNK_BD(i,l) { CMD_BYTE_BD, l, 0, i, 0, NULL } + +#define JUMPIF_UNK_BE(l) { CMD_BYTE_BE, l, 0, 0, 0, NULL } + +#define JUMPIF_HASITEM(i,l) { CMD_BYTE_BF, l, i, 0, 0, NULL } + +#define CJUMP_VAR(v) { CMD_BYTE_C0, 0, v, 0, 0, NULL } + +#define CJUMP_CALC_VI(o,v,i) { CMD_BYTE_C1, o, v, i, 0, NULL } + +#define CJUMP_CALC_VV(o,a,b) { CMD_BYTE_C2, o, a, b, 0, NULL } + +#define CJUMP_RANDOM(h) { CMD_BYTE_C3, 0, h, 0, 0, NULL } + +#define CJUMP_SCENARIO_0(v) { CMD_BYTE_C4, 0, v, 0, 0, NULL } + +#define CJUMP_SCENARIO_1(v) { CMD_BYTE_C5, 0, v, 0, 0, NULL } + +#define CJUMP_UNK_C6(a) { CMD_BYTE_C6, 0, 0, a, 0, NULL } + +#define CJUMP_DIRECTION { CMD_BYTE_C7, 0, 0, 0, 0, NULL } + // C8: distance calculation with that weird 80A7AE8 -#define CJUMP_UNK_C8(a) { 0xC8, 0, 0, a, 0, NULL } +#define CJUMP_UNK_C8(a) { CMD_BYTE_C8, 0, 0, a, 0, NULL } + // C9: ditto, but with one hardcoded pos of four -#define CJUMP_UNK_C9(a) { 0xC9, 0, 0, a, 0, NULL } -#define CJUMP_DIR_TO_LINK(l) { 0xCA, 0, 0, l, 0, NULL } -// wtf is cb -#define CJUMP_UNK_CB(h) { 0xCB, 0, h, 0, 0, NULL } -#define COND_EQUAL(v,t) { 0xCC, 0, t, v, 0, NULL } -#define COND(o,v,t) { 0xCD, o, t, v, 0, NULL } -#define COND_VAR(o,v,t) { 0xCE, o, t, v, 0, NULL } -#define MSG_VAR(b,v,a) { 0xCF, b, v, a, 0, NULL } -#define VARIANT(c,s) { 0xD0, 0, c, 0, 0, s } -#define VARIANT_DEFAULT(s) { 0xD1, 0, 0, 0, 0, s } -#define ASK_DEBUG(b,h,a,s) { 0xD2, b, h, a, 0, s } -#define ASK1(b,h,a,s) { 0xD3, b, h, a, 0, s } -#define ASK2(b,h,a,s) { 0xD4, b, h, a, 0, s } -#define ASK3(b,h,a,s) { 0xD5, b, h, a, 0, s } -#define ASK1_VAR(b,h,a,v) { 0xD6, b, h, a, v, NULL } -#define ASK2_VAR(b,h,a,v) { 0xD7, b, h, a, v, NULL } -#define ASK3_VAR(b,h,a,v) { 0xD8, b, h, a, v, NULL } -#define CHOICE(h,s) { 0xD9, 0, h, 0, 0, s } -#define WAIT(f) { 0xDB, 0, f, 0, 0, NULL } -#define WAIT_RANDOM(a,b) { 0xDC, 0, a, b, 0, NULL } -#define STOP_ANIMATION_ON_CURRENT_FRAME { 0xDD, 0, 0, 0, 0, NULL } -// de..e2 - various HandleAction commands -// e3..e5 - locking/condvar commands -#define AWAIT_CUE(id) { 0xE3, 0, id, 0, 0, NULL } -#define ALERT_CUE(id) { 0xE4, 0, id, 0, 0, NULL } -#define CALL_LABEL(x) { 0xE6, 0, x, 0, 0, NULL } -#define JUMP_LABEL(x) { 0xE7, 0, x, 0, 0, NULL } -#define CALL_SCRIPT(x) { 0xE8, 0, x, 0, 0, NULL } -#define JUMP_SCRIPT(x) { 0xE9, 0, x, 0, 0, NULL } -#define CALL_STATION(g,s) { 0xEA, s, g,-1, 0, NULL } -#define JUMP_STATION(g,s) { 0xEB, s, g,-1, 0, NULL } -#define EXECUTE_MAP_VAR(v) { 0xEC, 0, v, 0, 0, NULL } -#define RESET_CALLER { 0xED, 0, 0, 0, 0, NULL } -#define RET_DIRECT { 0xEE, 0, 0, 0, 0, NULL } -#define RET { 0xEF, 0, 0, 0, 0, NULL } -#define HALT { 0xF0, 0, 0, 0, 0, NULL } -#define END_DELETE { 0xF1, 0, 0, 0, 0, NULL } -#define LABEL(x) { 0xF4, 0, x, 0, 0, NULL } +#define CJUMP_UNK_C9(a) { CMD_BYTE_C9, 0, 0, a, 0, NULL } + +#define CJUMP_DIR_TO_LINK(l) { CMD_BYTE_CA, 0, 0, l, 0, NULL } + +#define CJUMP_UNK_CB(h) { CMD_BYTE_CB, 0, h, 0, 0, NULL } + +#define COND_EQUAL(v,t) { CMD_BYTE_CC, 0, t, v, 0, NULL } + +#define COND(o,v,t) { CMD_BYTE_CD, o, t, v, 0, NULL } + +#define COND_VAR(o,v,t) { CMD_BYTE_CE, o, t, v, 0, NULL } + +#define MSG_VAR(b,v,a) { CMD_BYTE_CF, b, v, a, 0, NULL } + +#define VARIANT(c,s) { CMD_BYTE_D0, 0, c, 0, 0, s } + +#define VARIANT_DEFAULT(s) { CMD_BYTE_D1, 0, 0, 0, 0, s } + +#define ASK_DEBUG(b,h,a,s) { CMD_BYTE_D2, b, h, a, 0, s } + +#define ASK1(b,h,a,s) { CMD_BYTE_D3, b, h, a, 0, s } + +#define ASK2(b,h,a,s) { CMD_BYTE_D4, b, h, a, 0, s } + +#define ASK3(b,h,a,s) { CMD_BYTE_D5, b, h, a, 0, s } + +#define ASK1_VAR(b,h,a,v) { CMD_BYTE_D6, b, h, a, v, NULL } + +#define ASK2_VAR(b,h,a,v) { CMD_BYTE_D7, b, h, a, v, NULL } + +#define ASK3_VAR(b,h,a,v) { CMD_BYTE_D8, b, h, a, v, NULL } + +#define CHOICE(h,s) { CMD_BYTE_D9, 0, h, 0, 0, s } + +// TODO: CMD_BYTE_DA + +#define WAIT(f) { CMD_BYTE_DB, 0, f, 0, 0, NULL } + +#define WAIT_RANDOM(a,b) { CMD_BYTE_DC, 0, a, b, 0, NULL } + +#define STOP_ANIMATION_ON_CURRENT_FRAME { CMD_BYTE_DD, 0, 0, 0, 0, NULL } + +// TODO: CMD_BYTE_DE + +// TODO: CMD_BYTE_DF + +// TODO: CMD_BYTE_E0 + +#define WAIT_FANFARE1(id) { CMD_BYTE_E1, 0, id, 0, 0, NULL } + +#define WAIT_FANFARE2(id) { CMD_BYTE_E2, 0, id, 0, 0, NULL } + +#define AWAIT_CUE(id) { CMD_BYTE_E3, 0, id, 0, 0, NULL } + +#define ALERT_CUE(id) { CMD_BYTE_E4, 0, id, 0, 0, NULL } + +// a: Value to place in script's `branchDiscriminant`. +// b: Value to place in `gUnlockBranchLabels[a]`. +#define CMD_UNK_E5(a, b) { CMD_BYTE_E5, b, a, 0, 0, NULL } + +#define CALL_LABEL(x) { CMD_BYTE_E6, 0, x, 0, 0, NULL } + +#define JUMP_LABEL(x) { CMD_BYTE_E7, 0, x, 0, 0, NULL } + +#define CALL_SCRIPT(x) { CMD_BYTE_E8, 0, x, 0, 0, NULL } + +#define JUMP_SCRIPT(x) { CMD_BYTE_E9, 0, x, 0, 0, NULL } + +#define CALL_STATION(g,s) { CMD_BYTE_EA, s, g,-1, 0, NULL } + +#define JUMP_STATION(g,s) { CMD_BYTE_EB, s, g,-1, 0, NULL } + +#define EXECUTE_MAP_VAR(v) { CMD_BYTE_EC, 0, v, 0, 0, NULL } + +#define RESET_CALLER { CMD_BYTE_ED, 0, 0, 0, 0, NULL } + +#define RET_DIRECT { CMD_BYTE_EE, 0, 0, 0, 0, NULL } + +#define RET { CMD_BYTE_EF, 0, 0, 0, 0, NULL } + +#define HALT { CMD_BYTE_F0, 0, 0, 0, 0, NULL } + +#define END_DELETE { CMD_BYTE_F1, 0, 0, 0, 0, NULL } + +// Unused +#define CMD_F2 { CMD_BYTE_F2, 0, 0, 0, 0, NULL } + +// Unused +#define CMD_F3 { CMD_BYTE_F3, 0, 0, 0, 0, NULL } + +// Serves as an offset which the script can reference for jumps. +#define LABEL(x) { CMD_BYTE_F4, 0, x, 0, 0, NULL } + +// Unused +#define CMD_F5 { CMD_BYTE_F5, 0, 0, 0, 0, NULL } + #ifdef NONMATCHING -#define DEBUGINFO { 0xF6, 0, __LINE__, 0, 0, __FILE__ } +#define DEBUGINFO { CMD_BYTE_F6, 0, __LINE__, 0, 0, __FILE__ } #define DEBUGINFO_O(originalLineNum) DEBUGINFO #else -#define DEBUGINFO_O(originalLineNum) { 0xF6, 0, originalLineNum, 0, 0, FAKE_FILENAME } +#define DEBUGINFO_O(originalLineNum) { CMD_BYTE_F6, 0, originalLineNum, 0, 0, FAKE_FILENAME } #endif -// function/trigger/script names -#define END_TALK 0 -#define WAIT_END_TALK_FUNC 1 -#define WAIT_END_EVENT_FUNC 2 -#define WAIT_START_FUNC 3 -#define INCOMPLETE_TALK 4 -#define NORMAL_WAIT_END_TALK 5 -#define LIVES_REPLY_NORMAL 6 -#define LIVES_REPLY 7 -#define OBJECT_REPLY_NORMAL 8 -#define EXAMINE_MISS 9 -#define ENTER_WAIT_FUNC 10 -#define UNIT_TALK 11 -#define HABITAT_TALK 12 -#define HABITAT_TALK_S01E02A 13 -#define HABITAT_MOVE1 14 -#define HABITAT_MOVE2 15 -#define HABITAT_MOVE_PAUSE 16 -#define HABITAT_MOVE_STAY_FIX 17 -#define HABITAT_MOVE_STAY_TURN 18 -#define LIVES_MOVE_NORMAL 19 -#define LIVES_MOVE_CHANGE 20 -#define OBJECT_MOVE_NORMAL 21 -#define OBJECT_MOVE_CHANGE 22 -#define EFFECT_MOVE_NORMAL 23 -#define EFFECT_MOVE_CHANGE 24 -#define MOVE_INIT 25 -#define MOVE_PAUSE 26 -#define MOVE_STAY 27 -#define MOVE_SLEEP 28 -#define MOVE_RANDOM 29 -#define MOVE_BOY 30 -#define MOVE_GIRL 31 -#define WAKEUP_FUNC 32 -#define LOOK_AROUND_FUNC 33 -#define LOOK_AROUND_DOWN_FUNC 34 -#define LOOK_AROUND_RIGHT_FUNC 35 -#define LOOK_AROUND_LEFT_FUNC 36 -#define JUMP_HAPPY_FUNC 37 -#define JUMP_SURPRISE_FUNC 38 -#define JUMP_ANGRY_FUNC 39 -#define NOTICE_FUNC 40 -#define QUESTION_FUNC 41 -#define SWEAT_FUNC 42 -#define SHOCK_FUNC 43 -#define SPREE_START_FUNC 44 -#define SPREE_END_FUNC 45 -#define SMILE_START_FUNC 46 -#define SMILE_END_FUNC 47 -#define ANGRY_START_FUNC 48 -#define ANGRY_END_FUNC 49 -#define MOVE_PLAZA_SLEEP 50 -#define INIT_PLAZA_SLEEP_STAY_FUNC 51 -#define INIT_PLAZA_SLEEP_TALK_FUNC 52 -#define INIT_SLEEP_FUNC 53 -#define INIT_BASE_FUNC 54 -#define INIT_DEBUG_HABITAT 55 -#define NORMAL_MESSAGE 56 -#define NORMAL_EVENT 57 -#define NORMAL_CAMERA 58 -#define DISMISSAL_SALLY_MEMBER_FUNC 59 -#define DISMISSAL_SALLY_MEMBER2_FUNC 60 -#define DISMISSAL_SALLY_MEMBER3_FUNC 61 -#define DISMISSAL_SALLY_MEMBER4_FUNC 62 -#define NEXT_SAVE_FUNC 63 -#define NEXT_SAVE2_FUNC 64 -#define SAVE_POINT 65 -#define WAREHOUSE_POINT 66 -#define SAVE_AND_WAREHOUSE_POINT 67 -#define WORLD_MAP_POINT 68 -#define FORMATION_HERO 69 -#define EVOLUTION_HERO 70 -#define WARP_LIVES_START 71 -#define WARP_LIVES_START2 72 -#define WARP_LIVES_START3 73 -#define WARP_LIVES_ARRIVE 74 -#define WARP_LIVES_ARRIVE2 75 -#define WARP_LIVES_ARRIVE3 76 -#define LIVES_WARP_START_FUNC 77 -#define LIVES_WARP_START2_FUNC 78 -#define LIVES_WARP_START3_FUNC 79 -#define LIVES_WARP_START_SUB 80 -#define LIVES_WARP_ARRIVE_FUNC 81 -#define LIVES_WARP_ARRIVE2_FUNC 82 -#define LIVES_WARP_ARRIVE3_FUNC 83 -#define LIVES_WARP_ARRIVE_SUB 84 -#define GET_ITEM_FUNC 85 -#define GET_ITEM_WAIT_FUNC 86 -#define GET_ITEM2_FUNC 87 -#define GET_ITEM2_WAIT_FUNC 88 -#define JOIN_FUNC 89 -#define LODGE_START_FUNC 90 -#define LODGE_WAIT_FUNC 91 -#define LODGE_END_FUNC 92 -#define LODGE_SOUND_FUNC 93 -#define SAVE_START_FUNC 94 -#define SAVE_WAIT_FUNC 95 -#define SAVE_END_FUNC 96 -#define SAVE_SOUND_FUNC 97 -#define EFFECT_TEST1 98 -#define EFFECT_TEST2 99 -#define EFFECT_MOVE_DIVE 100 -#define EFFECT_MOVE_WAVE 101 -#define EVENT_DIVIDE 102 -#define EVENT_DIVIDE_NEXT 103 -#define EVENT_DIVIDE_INIT_FUNC 104 -#define EVENT_DIVIDE_NEXT_DAY_FUNC 105 -#define EVENT_DIVIDE_NEXT_DAY2_FUNC 106 -#define EVENT_DIVIDE_FIRST 107 -#define EVENT_DIVIDE_SECOND 108 -#define EVENT_DIVIDE_AFTER 109 -#define EVENT_DIVIDE_WARP_LOCK_FUNC 110 -#define EVENT_RESCUE_ENTER_CHECK 111 -#define EVENT_RESCUE 112 -#define DEBUG_SCRIPT 113 -#define DEMO_CANCEL 114 -#define DEMO_01 115 -#define DEMO_02 116 -#define DEMO_03 117 -#define DEMO_04 118 -#define EVENT_M00E01A_L001 119 -#define EVENT_M01E01A_L001 120 -#define EVENT_M01E01A_L002 121 -#define EVENT_M01E01A_L003 122 -#define EVENT_M01E02A_L001 123 -#define EVENT_M01E02A_L001B 124 -#define EVENT_M01E02A_L001C 125 -#define EVENT_M01E02A_L002 126 -#define EVENT_M01E02A_L003 127 -#define EVENT_M01E02A_L004 128 -#define EVENT_M01E02A_L005 129 -#define EVENT_M01E02A_L006 130 -#define EVENT_M01E02B_L001 131 -#define EVENT_M01E02B_L002 132 -#define EVENT_M01E02B_L003 133 -#define EVENT_M01E02B_L004 134 -#define EVENT_M01E02B_L004B 135 -#define EVENT_M01E02B_L005 136 -#define EVENT_M01E02B_L006 137 -#define EVENT_M01E02B_L007 138 -#define EVENT_M01E02B_L008 139 -#define EVENT_M01E03A_L000 140 -#define EVENT_M01E03A_L001 141 -#define EVENT_M01E03A_L002 142 -#define EVENT_M01E03A_L003 143 -#define EVENT_M01E03A_L004 144 -#define EVENT_M01E03A_L005 145 -#define EVENT_M01E03A_L006 146 -#define EVENT_M01E03A_L007 147 -#define EVENT_M01E03A_L008 148 -#define EVENT_M01E03A_L009 149 -#define EVENT_M01E03A_L010 150 -#define EVENT_M01E03A_L011 151 -#define EVENT_M01E04A_L000 152 -#define EVENT_M01E04A_L001 153 -#define EVENT_M01E04A_L002 154 -#define EVENT_M01E04A_L003 155 -#define EVENT_M01E04A_L004 156 -#define EVENT_M01E04A_L005 157 -#define EVENT_M01E04A_L006 158 -#define EVENT_M01E04B_L000 159 -#define EVENT_M01E04B_L001 160 -#define EVENT_M01E04B_L002 161 -#define EVENT_M01E04B_L003 162 -#define EVENT_M01E04B_L004 163 -#define EVENT_M01E04B_L005 164 -#define EVENT_M01E04B_L006 165 -#define EVENT_M01E04B_L007 166 -#define EVENT_M01E05A_L000 167 -#define EVENT_M01E05A_L001 168 -#define EVENT_M01E05A_L002 169 -#define EVENT_M01E05A_L003 170 -#define EVENT_M01E05A_L004 171 -#define EVENT_M01E05A_L005 172 -#define EVENT_M01E05A_L006 173 -#define EVENT_M01E05B_L000 174 -#define EVENT_M01E05B_L001 175 -#define EVENT_M01E05B_L002 176 -#define EVENT_M01E05B_L003 177 -#define EVENT_M01E05B_L004 178 -#define EVENT_M01E05B_L005 179 -#define EVENT_M01E06A_L001 180 -#define EVENT_M01E06A_L002 181 -#define EVENT_M01E06A_L003 182 -#define EVENT_M01E07A_L001 183 -#define EVENT_M01E07A_L002 184 -#define EVENT_M01E07A_L003 185 -#define EVENT_M01E07A_L004 186 -#define EVENT_M01E07A_L005 187 -#define EVENT_M01E07A_T001 188 -#define EVENT_M01E07A_T002 189 -#define EVENT_M01E07B_L001 190 -#define EVENT_M01E07B_L002 191 -#define EVENT_M01E07B_L003 192 -#define EVENT_M01E07B_L004 193 -#define EVENT_M01E07B_L005 194 -#define EVENT_M01E07B_T001 195 -#define EVENT_M01E07B_T002 196 -#define EVENT_M01E08A_L001 197 -#define EVENT_M01E08A_L002 198 -#define EVENT_M01E08A_L003 199 -#define EVENT_M01E08A_L004 200 -#define EVENT_M01E08A_L005 201 -#define EVENT_M01E08A_T001 202 -#define EVENT_M01E08A_T002 203 -#define EVENT_M01E08B_L001 204 -#define EVENT_M01E08B_L002 205 -#define EVENT_M01E08B_L003 206 -#define EVENT_M01E08B_L004 207 -#define EVENT_M01E08B_L005 208 -#define EVENT_M01E08B_L006 209 -#define EVENT_M01E08B_T001 210 -#define EVENT_M01E08B_T002 211 -#define EVENT_M01E09A_L001 212 -#define EVENT_M01E09A_L002 213 -#define EVENT_M01E09A_L003 214 -#define EVENT_M01E09A_L004 215 -#define EVENT_M01E09A_L005 216 -#define EVENT_M01E09A_L006 217 -#define EVENT_M01E09A_L007 218 -#define EVENT_M01E09A_L008 219 -#define EVENT_M01E09A_L009 220 -#define EVENT_M01E09A_L010 221 -#define EVENT_M01E09A_L011 222 -#define EVENT_M01E09A_L012 223 -#define EVENT_M01E09A_L013 224 -#define EVENT_M01E09A_L014 225 -#define EVENT_M01E09A_L015 226 -#define EVENT_M01E10A_L001 227 -#define EVENT_M01E10A_L002 228 -#define EVENT_M01E10A_L003 229 -#define EVENT_M01E10A_L004 230 -#define EVENT_M01E10A_L005 231 -#define EVENT_M01E10A_L006 232 -#define EVENT_M01E10A_L007 233 -#define EVENT_M01E10A_L008 234 -#define EVENT_M01END_L001 235 -#define EVENT_M01END_L002 236 -#define EVENT_M02E01A_L001 237 -#define EVENT_M02E01A_L002 238 -#define EVENT_M02E01A_L003 239 -#define EVENT_M02E02A_L001 240 -#define EVENT_M02E02B_L001 241 -#define EVENT_M02E02C_L001 242 -#define EVENT_M02E02D_L001 243 -#define EVENT_M02E02E_L001 244 -#define EVENT_M02E02F_L001 245 -#define EVENT_M02E02G_L001 246 -#define EVENT_M02E02H_L001 247 -#define EVENT_M02END_L001 248 -#define EVENT_S00E01A_L001 249 -#define EVENT_S00E01A_L002 250 -#define EVENT_S00E01A_L003 251 -#define EVENT_S00E01A_L004 252 -#define EVENT_S01E01A_START 253 -#define EVENT_S01E01A_CONTINUE 254 -#define EVENT_S01E01A_END 255 -#define EVENT_S01E01A_L001 256 -#define EVENT_S01E01A_L002 257 -#define EVENT_S01E01A_L003 258 -#define EVENT_S01E01B_L001 259 -#define EVENT_S01E01B_L001L 260 -#define EVENT_S01E01C_L001 261 -#define EVENT_S01E02A_START 262 -#define EVENT_S01E02A_END 263 -#define EVENT_S01E02A_L001 264 -#define EVENT_S01E02A_L002 265 -#define EVENT_S01E02A_L002L 266 -#define EVENT_S01E02B_L001 267 -#define EVENT_S01E02B_L002 268 -#define EVENT_S02E01A_START 269 -#define EVENT_S02E01A_END 270 -#define EVENT_S02E01A_L001 271 -#define EVENT_S02E01A_L002 272 -#define EVENT_S02E01A_L003 273 -#define EVENT_S02E01A_L004 274 -#define EVENT_S02E01A_L004L 275 -#define EVENT_S02E02A_START 276 -#define EVENT_S02E02A_END 277 -#define EVENT_S02E02A_L001 278 -#define EVENT_S02E02A_L002 279 -#define EVENT_S02E02A_L003 280 -#define EVENT_S02E02A_L003L 281 -#define EVENT_S03E01A_START 282 -#define EVENT_S03E01A_CONTINUE 283 -#define EVENT_S03E01A_END 284 -#define EVENT_S03E01A_L001 285 -#define EVENT_S03E01A_L002 286 -#define EVENT_S03E01A_L002L 287 -#define EVENT_S04E01A_START 288 -#define EVENT_S04E01A_LAST 289 -#define EVENT_S04E01A_END 290 -#define EVENT_S04E01A_L001 291 -#define EVENT_S04E01A_L002 292 -#define EVENT_S04E01A_L002L 293 -#define EVENT_S04E01B_L001 294 -#define EVENT_S04E01B_L001L 295 -#define EVENT_S04E01C_L001 296 -#define EVENT_S04E01C_L001L 297 -#define EVENT_S04E01D_L001 298 -#define EVENT_S04E01D_L001L 299 -#define EVENT_S04E01E_L001 300 -#define EVENT_S04E01E_L001L 301 -#define EVENT_S04E01F_L001 302 -#define EVENT_S05E01A_START 303 -#define EVENT_S05E01A_CONTINUE 304 -#define EVENT_S05E01A_END 305 -#define EVENT_S05E01A_L001 306 -#define EVENT_S05E01A_L002 307 -#define EVENT_S05E01A_L002L 308 -#define EVENT_S06E01A_START 309 -#define EVENT_S06E01A_CONTINUE 310 -#define EVENT_S06E01A_END 311 -#define EVENT_S06E01A_L001 312 -#define EVENT_S06E01A_L002 313 -#define EVENT_S06E01A_L002L 314 -#define EVENT_S06E01B_L001 315 -#define EVENT_S06E01B_L002 316 -#define EVENT_S06E01B_L002L 317 -#define EVENT_S07E01A_START 318 -#define EVENT_S07E01A_END 319 -#define EVENT_S07E01A_L001 320 -#define EVENT_S07E01A_L002 321 -#define EVENT_S07E01A_L003 322 -#define EVENT_S07E01A_L003L 323 -#define EVENT_S08E01A_START 324 -#define EVENT_S08E01A_END 325 -#define EVENT_S08E01A_L001 326 -#define EVENT_S08E01A_L002 327 -#define EVENT_S08E01A_L003 328 -#define EVENT_S08E01A_L004 329 -#define EVENT_S08E01A_L005 330 -#define EVENT_S08E01A_L005B 331 -#define EVENT_S08E01A_L006 332 -#define EVENT_S08E01A_L006L 333 -#define EVENT_S08E01A_L007 334 -#define EVENT_S08E01A_L008 335 -#define EVENT_S08E01A_L008L 336 -#define EVENT_S08E01A_L008A 337 -#define EVENT_S08E01A_L008B 338 -#define EVENT_S08E01A_L008C 339 -#define EVENT_S09E01A_START 340 -#define EVENT_S09E01A_END 341 -#define EVENT_S09E01A_L001 342 -#define EVENT_S09E01A_L002 343 -#define EVENT_S09E01A_L003 344 -#define EVENT_S09E01A_L004 345 -#define EVENT_S09E01A_L004B 346 -#define EVENT_S09E01A_L005 347 -#define EVENT_S09E01A_L005L 348 -#define EVENT_S09E01B_L001 349 -#define EVENT_S09E01B_L001B 350 -#define EVENT_S09E01B_L002 351 -#define EVENT_S09E01B_L002L 352 -#define EVENT_S09E01C_L001 353 -#define EVENT_R00E01A_L001 354 -#define COMMON_ENTER 355 -#define DEBUG_ENTER 356 -#define GETOUT_NORMAL 357 -#define GETOUT_HABITAT 358 -#define GETOUT_M01E01A 359 -#define GETOUT_M01E02A 360 -#define GETOUT_M01E02B 361 -#define GETOUT_M01E03A 362 -#define GETOUT_M01E04A 363 -#define GETOUT_M01E04B 364 -#define GETOUT_M01E05A 365 -#define GETOUT_M01E07A 366 -#define GETOUT_M01E07B 367 -#define GETOUT_M01E08A 368 -#define GETOUT_M01E08B 369 -#define GETOUT_M01E09A 370 -#define GETOUT_M01E10A 371 -#define GETOUT_S00E01A 372 -#define GETOUT_S01E01A 373 -#define GETOUT_S01E02A 374 -#define GETOUT_S02E01A 375 -#define GETOUT_S02E02A 376 -#define GETOUT_S03E01A 377 -#define GETOUT_S04E01A 378 -#define GETOUT_S04E01B 379 -#define GETOUT_S04E01C 380 -#define GETOUT_S04E01D 381 -#define GETOUT_S04E01E 382 -#define GETOUT_S05E01A 383 -#define GETOUT_S06E01A 384 -#define GETOUT_S06E01B 385 -#define GETOUT_S07E01A 386 -#define GETOUT_S08E01A 387 -#define GETOUT_S09E01A 388 -#define GETOUT_S09E01B 389 -#define GETOUT_D62E01A 390 -#define GETOUT_D43E01A 391 -#define GETOUT_D44E01A 392 -#define GETOUT_D45E01A 393 -#define GETOUT_D46E01A 394 -#define GETOUT_U00E01A 395 -#define GETOUT_R00E01A 396 -#define GETOUT_T00E01A 397 -#define GETOUT_M01E07T 398 -#define GETOUT_M01E08T 399 -#define EVENT_CONTROL 400 -#define EVENT_WAKEUP 401 -#define EVENT_STATION 402 -#define STATION_CONTROL 403 -#define ENTER_CONTROL 404 -#define SETUP_DEBUG_CAMERA 405 -#define MOVE_DEBUG_CAMERA 406 - -#define SPECIAL_TEXT_UNK_0 0x0 -#define SPECIAL_TEXT_UNK_1 0x1 -#define SPECIAL_TEXT_WAITING 0x2 -#define SPECIAL_TEXT_UNK_3 0x3 -#define SPECIAL_TEXT_PLAYER_NAME_INPUT 0x4 -#define SPECIAL_TEXT_TEAM_NAME_INPUT 0x5 -#define SPECIAL_TEXT_PASSWORD_INPUT 0x6 -#define SPECIAL_TEXT_FRIEND_MENU 0x7 -#define SPECIAL_TEXT_MENU 0x8 -#define SPECIAL_TEXT_YES_NO_WITH_LARGE_BOX 0x9 -#define SPECIAL_TEXT_LARGE_TEXT_BOX 0xA -#define SPECIAL_TEXT_BUY_FRIEND_AREAS 0xB -#define SPECIAL_TEXT_DUNGEON_LIST 0xC -#define SPECIAL_TEXT_DOJO_LIST 0xD -#define SPECIAL_TEXT_SAVE_1 0xE -#define SPECIAL_TEXT_SAVE_2 0xF -#define SPECIAL_TEXT_STORAGE_WITH_DIALOG 0x10 -#define SPECIAL_TEXT_STORAGE 0x11 -#define SPECIAL_TEXT_UNK_12 0x12 -#define SPECIAL_TEXT_BANK 0x13 -#define SPECIAL_TEXT_UNK_14 0x14 -#define SPECIAL_TEXT_UNK_15 0x15 -#define SPECIAL_TEXT_FRIEND_AREA_SELECT 0x16 -#define SPECIAL_TEXT_GREEN_KECLEON_SHOP 0x17 -#define SPECIAL_TEXT_PURPLE_KECLEON_SHOP 0x18 -#define SPECIAL_TEXT_LINK_SHOP 0x19 -#define SPECIAL_TEXT_LUMINOUS_CAVE 0x1A -#define SPECIAL_TEXT_FRIEND_SHOP 0x1B -#define SPECIAL_TEXT_FRIEND_RESCUE 0x1C -#define SPECIAL_TEXT_UNK_1D 0x1D -#define SPECIAL_TEXT_THANK_YOU_MAIL 0x1E -#define SPECIAL_TEXT_PPO_HELP_COUNTER 0x1F -#define SPECIAL_TEXT_BULLETIN_BOARD_JOBS 0x20 -#define SPECIAL_TEXT_BULLETIN_BOARD 0x21 -#define SPECIAL_TEXT_UNK_22 0x22 -#define SPECIAL_TEXT_UNK_23 0x23 -#define SPECIAL_TEXT_DOJO_ENTER 0x24 -#define SPECIAL_TEXT_DOJO_SUCCESS 0x25 -#define SPECIAL_TEXT_DOJO_FAILURE 0x26 -#define SPECIAL_TEXT_DOJO_ALL_CLEARED 0x27 -#define SPECIAL_TEXT_PERSONALITY_QUIZ 0x28 -#define SPECIAL_TEXT_UNK_29 0x29 -#define SPECIAL_TEXT_SCRIPTING_MENU 0x2A -#define SPECIAL_TEXT_ITEM_REWARD 0x2B -#define SPECIAL_TEXT_UNK_2C 0x2C -#define SPECIAL_TEXT_TOOL_BOX 0x2D -#define SPECIAL_TEXT_CREDITS_NAME 0x2E \ No newline at end of file +//#endif // GUARD_DATA_SCRIPT_H diff --git a/include/direction_util.h b/include/direction_util.h index a96f0f5a4..54b4f86c1 100644 --- a/include/direction_util.h +++ b/include/direction_util.h @@ -1,10 +1,12 @@ #ifndef GUARD_DIRECTION_UTIL_H #define GUARD_DIRECTION_UTIL_H +#include "constants/direction.h" #include "structs/str_position.h" -s32 sub_8002984(s32 _direction1, u32 caseID); -s32 sub_8002A70(s32 _direction1, s32 _direction2, s32 _caseId); +// See enum "DirectionTransformation" +s32 TransformDirection1(s32 _direction1, u32 caseID); +s32 TransformDirection2(s32 _direction1, s32 _direction2, s32 _caseId); s32 sub_8002B04(s32 _direction1, s32 _direction2); PixelPos SetVecFromDirectionSpeed(s32 _dir, u32 speed); s32 VecDirection8Radial(PixelPos *pixelPos); diff --git a/include/dungeon_8041AD0.h b/include/dungeon_8041AD0.h index 4361dbffd..40db90ff8 100644 --- a/include/dungeon_8041AD0.h +++ b/include/dungeon_8041AD0.h @@ -6,7 +6,7 @@ #include "structs/str_stat_index.h" s32 sub_80416E0(PixelPos *pos, u32 param_2, bool8 param_3); -void sub_804178C(u8 param_1); +void sub_804178C_Async(u8 param_1); u32 EntityGetStatusSprites(Entity *entity); void sub_8041888(u8 param_1); void UpdateStatusIconFlags(Entity *entity); diff --git a/include/dungeon_action_execution.h b/include/dungeon_action_execution.h index 7963bd522..a780e2ca2 100644 --- a/include/dungeon_action_execution.h +++ b/include/dungeon_action_execution.h @@ -6,6 +6,6 @@ extern u8 gUnknown_202F32C; extern u8 gUnknown_202F32D; -bool8 ExecuteEntityDungeonAction(Entity *entity); +bool8 ExecuteEntityDungeonAction_Async(Entity *entity); #endif diff --git a/include/dungeon_action_handler.h b/include/dungeon_action_handler.h index 9816b3de8..af0fe0dd7 100644 --- a/include/dungeon_action_handler.h +++ b/include/dungeon_action_handler.h @@ -3,14 +3,14 @@ #include "structs/dungeon_entity.h" -void HandlePickUpPlayerAction(Entity *entity); -void HandleSetItemAction(Entity *param_1, bool8 param_2); -void HandleUnsetItemAction(Entity *entity, bool8 enableMessage); -void HandleGiveItemAction(Entity *param_1); -void HandleTakeItemAction(Entity *param_1); -void sub_8066BD4(Entity *param_1); +void HandlePickUpPlayerAction_Async(Entity *entity); +void HandleSetItemAction_Async(Entity *param_1, bool8 param_2); +void HandleUnsetItemAction_Async(Entity *entity, bool8 enableMessage); +void HandleGiveItemAction_Async(Entity *param_1); +void HandleTakeItemAction_Async(Entity *param_1); +void sub_8066BD4_Async(Entity *param_1); void HandleUseItemAction(Entity *param_1); -void HandlePlaceItemAction(Entity *entity); +void HandlePlaceItemAction_Async(Entity *entity); void sub_8066E14(Entity *entity); void sub_8066FA4(Entity *entity); void sub_8067110(Entity *entity); diff --git a/include/dungeon_ai_attack.h b/include/dungeon_ai_attack.h index 99e9d5ac4..3b0c05d76 100644 --- a/include/dungeon_ai_attack.h +++ b/include/dungeon_ai_attack.h @@ -17,7 +17,7 @@ void ChooseAIMove(Entity *pokemon); s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move); bool8 IsTargetInRange(Entity *pokemon, Entity *targetPokemon, s32 direction, s32 maxRange); void HandleUseMoveAIAction(Entity *target); -void HandleUseOrbAction(Entity *pokemon); +void HandleUseOrbAction_Async(Entity *pokemon); s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, Move *move, bool32 isAI); #endif diff --git a/include/dungeon_cleared_window.h b/include/dungeon_cleared_window.h index c5648873b..db9d6a4e1 100644 --- a/include/dungeon_cleared_window.h +++ b/include/dungeon_cleared_window.h @@ -1,6 +1,6 @@ #ifndef GUARD_CLEARED_WINDOW_H #define GUARD_CLEARED_WINDOW_H -void ShowDungeonClearedWindow(void); +void ShowDungeonClearedWindow_Async(void); #endif // GUARD_CLEARED_WINDOW_H diff --git a/include/dungeon_cutscene.h b/include/dungeon_cutscene.h index 6fc6af005..a400be9ba 100644 --- a/include/dungeon_cutscene.h +++ b/include/dungeon_cutscene.h @@ -17,9 +17,9 @@ void sub_80847D4(void); bool8 ShouldShowDungeonBanner(void); void sub_80848F0(void); void DisplayPreFightDialogue(void); -void sub_8084E00(Entity *entity, u8 param_2, bool8 param_3); -void sub_8085140(void); -bool8 sub_808529C(s32 speciesId_); +void HandleBossFaint_Async(Entity *entity, u8 monsterBehavior, bool8 transformedIntoFriend); +void sub_8085140_Async(void); +bool8 MonCutsceneCompleted(s32 speciesId_); void sub_8085374(void); Entity *CutsceneGetLeader(void); Entity *CutsceneGetPartner(void); @@ -42,8 +42,8 @@ void sub_8085EB0(void); u32 sub_8085EC8(s16 param_1,u32 param_2,u32 param_3,DungeonPos *param_4, bool32 param_5); void sub_8085F44(s32 param_1); void sub_8085F78(void); -bool8 sub_80860A8(u8 id); -void sub_8086130(void); +bool8 ItemInInventoryOrHeld(u8 id); +void FrostyForestIntrusionCutscene_Async(void); void sub_80861A8(Entity *a0); void sub_80861B8(Entity *a0, u8 r1, s32 direction); void sub_80861D4(Entity *a0, u8 r1, s32 direction); @@ -69,12 +69,12 @@ void sub_8086854(void); void sub_80868F4(Entity *entity); void sub_8086910(Entity *entity); void sub_808692C(void); -void SpriteLookAroundEffect(Entity *entity); -void sub_80869E4(struct Entity *entity, s32 a1, u8 a2, s32 _someDirection); +void CutsceneLookAroundEffect_Async(Entity *entity); +void CutsceneLookDir_Async(struct Entity *entity, s32 numFrames, u8 dirTrans, s32 _someDirection); void sub_8086A3C(Entity *pokemon); void sub_8086A54(Entity *pokemon); void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex); void sub_8086AC0(void); -u8 sub_8086AE4(s16 _index); +bool8 sub_8086AE4(s16 _index); -#endif +#endif // GUARD_DUNGEON_CUTSCENE_H diff --git a/include/dungeon_cutscenes.h b/include/dungeon_cutscenes.h index 175306b38..cdc484278 100644 --- a/include/dungeon_cutscenes.h +++ b/include/dungeon_cutscenes.h @@ -52,25 +52,25 @@ void TeamMeaniesReFightDialogue(void); void ZapdosPostStoryPreFightDialogue(void); void ZapdosPreFightDialogue(void); void ZapdosReFightDialogue(void); -void nullsub_100(u8, u8, u8); +void HandleCelebiBossFaint(u8, u8, u8); void sub_8086B14(void); void sub_8086B94(void); -void sub_8086BDC(u8, u8); +void HandleSkarmoryBossFaint(u8, u8); void sub_8086E40(void); void sub_8086E9C(void); void sub_8086F00(void); -void sub_8086F54(u8, u8); +void HandleMeaniesBossFaint(u8, u8); void sub_8087130(void); void sub_8087230(void); void sub_808729C(void); -void sub_8087334(u8, u8); +void HandleZapdosBossFaint(u8, u8); void sub_80877E8(void); void sub_8087848(void); -void sub_80878F4(u8, u8); +void HandleMoltresBossFaint(u8, u8); void sub_8087F54(void); void sub_8087FB4(void); void sub_8087FF8(void); -void sub_8088088(u8, u8); +void HandleArticunoBossFaint(u8, u8); void sub_80885A0(void); void sub_80885C4(void); void sub_8088608(void); @@ -78,62 +78,62 @@ void sub_8088618(void); void sub_808862C(void); void sub_80886C4(void); void sub_808875C(void); -void sub_8088818(u8, u8); +void HandleGroudonBossFaint(u8, u8); void sub_8088DC0(void); void sub_8088E5C(void); void sub_8089168(void); void sub_80892C8(void); void sub_8089328(void); -void sub_80893B4(u8, u8); +void HandleRayquazaBossFaint(u8, u8); void sub_808970C(void); void sub_808974C(void); -void sub_8089788(Entity *entity, u8, u8); +void HandleMankeyBossFaint(Entity *entity, u8, u8); void sub_80897F0(void); void sub_8089878(void); void sub_80898E4(void); void sub_8089914(void); void sub_8089978(void); -void sub_8089A00(u8, u8); +void HandleMewtwoBossFaint(u8, u8); void sub_8089C44(void); void sub_8089C90(void); -void sub_8089CFC(u8, u8); +void HandleEnteiBossFaint(u8, u8); void sub_8089EFC(void); void sub_8089F44(void); void sub_8089F8C(void); -void sub_8089FF0(u8, u8); +void HandleRaikouBossFaint(u8, u8); void sub_808A264(void); void sub_808A2C0(void); void sub_808A308(void); -void sub_808A36C(u8, u8); +void HandleSuicuneBossFaint(u8, u8); void sub_808A608(void); void sub_808A668(void); -void sub_808A6E8(u8, u8); +void HandleHoOhBossFaint(u8, u8); void sub_808A9E4(void); void sub_808AA3C(void); void sub_808AA94(void); -void sub_808AAF0(u8, u8); +void HandleLatiosBossFaint(u8, u8); void sub_808AC3C(void); void sub_808ACC0(void); void sub_808AD48(void); void sub_808ADCC(void); -void sub_808AE54(u8, u8, DungeonPos *pos); -void sub_808AEC8(u8, u8, DungeonPos *pos); -void sub_808AF3C(u8, u8, DungeonPos *pos); -void sub_808AFB0(u8); -void sub_808B030(u8); -void sub_808B0B0(u8); +void HandleRegirockBossFaint_Async(u8, u8, DungeonPos *pos); +void HandleRegiceBossFaint_Async(u8, u8, DungeonPos *pos); +void HandleRegisteelBossFaint_Async(u8, u8, DungeonPos *pos); +void sub_808AFB0_Async(u8); +void sub_808B030_Async(u8); +void sub_808B0B0_Async(u8); void sub_808B2F4(void); void sub_808B35C(void); -void sub_808B3E4(u8, u8, u8); +void HandleJirachiBossFaint_Async(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend); void sub_808BDEC(void); -void sub_808BE70(u8, u8, u8); +void HandleLugiaBossFaint(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend); void sub_808C10C(void); -void sub_808C1A4(u8, u8, u8); +void HandleKyogreBossFaint(u8, u8, u8); void sub_808C3A0(void); -void sub_808C414(u8, u8, u8); +void HandleDeoxysNormalBossFaint(u8, u8, u8); void sub_808C5C0(void); void sub_808C938(void); -void sub_808C948(Entity *entity, u8); +void HandleMazeBossFaint(Entity *entity, u8); void sub_808C998(void); void sub_808C9C4(void); void sub_808CB5C(void); diff --git a/include/dungeon_damage.h b/include/dungeon_damage.h index 94a7c7df1..96598e315 100644 --- a/include/dungeon_damage.h +++ b/include/dungeon_damage.h @@ -4,12 +4,12 @@ #include "structs/dungeon_entity.h" #include "structs/str_damage.h" -void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason, bool32 arg8, s32 argC); +void HandleDealingDamage_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason, bool32 arg8, s32 argC); s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType); void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s32 critChance, struct DamageStruct *dmgStruct, s24_8 arg8, u16 moveId, bool8 arg_10); void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct DamageStruct *dmgStruct); -void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason); -void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason, s32 residualDmgType, s32 arg_10, s32 arg_14); +void DealDamageToEntity_Async(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason); +void sub_806F370_Async(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason, s32 residualDmgType, s32 arg_10, s32 arg_14); void SetShopkeeperAggression(Entity *pokemon, Entity *target); void sub_806F480(Entity *pokemon, bool8 attackEnemies); u8 sub_806F4A4(Entity *pokemon, u8 type); diff --git a/include/dungeon_engine.h b/include/dungeon_engine.h index cc3efbe1d..b4367a529 100644 --- a/include/dungeon_engine.h +++ b/include/dungeon_engine.h @@ -7,8 +7,8 @@ extern const s16 gSpeedTurns[NUM_SPEED_COUNTERS][25]; -void RunFractionalTurn(bool8 param_1); -void sub_80444F4(Entity *pokemon); +void RunFractionalTurn_Async(bool8 param_1); +void sub_80444F4_Async(Entity *pokemon); bool8 IsFloorOver(void); bool8 sub_8044B84(void); diff --git a/include/dungeon_entity_movement.h b/include/dungeon_entity_movement.h index 2efe13bc8..444a2e114 100644 --- a/include/dungeon_entity_movement.h +++ b/include/dungeon_entity_movement.h @@ -5,9 +5,9 @@ #include "structs/str_position.h" void sub_8074FB0(Entity *entity, s32 a1, DungeonPos *pos); -bool8 DisplayActions(Entity *a0); +bool8 DisplayActions_Async(Entity *a0); void sub_8075680(bool8 unused); bool8 CheckEntityTileForInteraction(Entity *entity); -void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse); +void TryTriggerMonsterHouseWithMsg_Async(Entity *pokemon, bool8 forcedMonsterHouse); #endif diff --git a/include/dungeon_exit.h b/include/dungeon_exit.h index 62a472113..1cd17bc7a 100644 --- a/include/dungeon_exit.h +++ b/include/dungeon_exit.h @@ -6,6 +6,6 @@ void SetUpDungeonExitData(s16 dungeonExitReason, Entity *target, Entity *entity); bool8 IsUnsuccessfulDungeonExit(void); bool8 sub_8083C50(void); -bool8 sub_8083C88(u8 param_1); +bool8 sub_8083C88(u8 dungeonMissionKind); #endif // GUARD_DUNGEON_EXIT_H diff --git a/include/dungeon_items.h b/include/dungeon_items.h index 0c1ca3f11..43c9bc08d 100644 --- a/include/dungeon_items.h +++ b/include/dungeon_items.h @@ -13,7 +13,7 @@ void sub_8045C18(u8 *buffer, Item *item); #define FORCE_STICKY_NEVER 2 void CreateItemWithStickyChance(Item *item, u8 itemID, u32 forceSticky); void CreateFloorItems(void); -void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg); +void TryLeaderItemPickUp_Async(struct DungeonPos *pos, bool8 printMsg); bool8 SpawnItem(DungeonPos *pos, Item *item, bool8 a2); bool8 RemoveGroundItem(DungeonPos *pos, bool8 a2); bool8 sub_80462AC(Entity * entity, u8 hallucinating, u8 a2, u8 a3, u8 a4); @@ -23,7 +23,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du void sub_8046860(Entity *entity, DungeonPos *pos, Item *item, s32 a4); void sub_804687C(Entity *entity, DungeonPos *pos1, DungeonPos *pos2, Item *item, s32 count); bool8 HasHeldItem(Entity *pokemon, u8 id); -void sub_8046D20(void); +void PotentiallyCreateMusicBox_Async(void); bool8 sub_8046F00(Item *item); void ClearAllItemsWithFlag(s32 itemFlag); void AllItemsToPlainSeed(void); diff --git a/include/dungeon_message.h b/include/dungeon_message.h index a69b2da2e..a6c39f33e 100644 --- a/include/dungeon_message.h +++ b/include/dungeon_message.h @@ -34,25 +34,24 @@ void sub_8052210(bool8 a0); void sub_805229C(void); // These functions display the string if certain conditions are met. The conditions differ depending on the function. The string is then saved to the message log. -void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str); -void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str); -void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str); -void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str); -void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, const u8 *str); +void LogMessageByIdWithPopupCheckUser_Async(Entity *pokemon, const u8 *str); +void TryDisplayDungeonLoggableMessage3_Async(Entity *attacker, Entity *target, const u8 *str); +void TryDisplayDungeonLoggableMessage4_Async(Entity *attacker, Entity *target, const u8 *str); +void LogMessageByIdWithPopupCheckUserUnknown_Async(Entity *pokemon, DungeonPos *pos, const u8 *str); // As opposed to the above - these always display the string and save it in the message log. False/True stand for an unknown argument. Not sure what the practical difference is between these. void DisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str); -void DisplayDungeonLoggableMessageFalse(Entity *pokemon, const u8 *str); -void DisplayDungeonLoggableMessageTrue(Entity *pokemon, const u8 *str); +void DisplayDungeonLoggableMessageFalse_Async(Entity *pokemon, const u8 *str); +void DisplayDungeonLoggableMessageTrue_Async(Entity *pokemon, const u8 *str); void xxx_draw_string_80524F0(void); void sub_80526D0(s32 r0); void sub_8052740(s32 a0); -void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2); -void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo); -bool32 DisplayDungeonYesNoMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool32 defaultYes); +void DisplayDungeonMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2); +void DisplayDungeonDialogue_Async(const struct DungeonDialogueStruct *dialogueInfo); +bool32 DisplayDungeonYesNoMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool32 defaultYes); s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, const MenuItem *menuItems, u16 unkArg); -void sub_8052D44(s16 *ids, Entity *leader, Entity *partner); +void BufferCutsceneProtagonists(s16 destIDs[2], Entity *leader, Entity *partner); void TryDisplayGeneralTutorialMessage(void); void DisplayItemTip(u8 itemId); void DisplayYouReachedDestFloorStr(void); diff --git a/include/dungeon_misc.h b/include/dungeon_misc.h index 1ce00a21b..66eb306d2 100644 --- a/include/dungeon_misc.h +++ b/include/dungeon_misc.h @@ -35,7 +35,7 @@ void sub_8068A84(Pokemon *pokemon); void sub_8068BDC(bool8 a0); void sub_8068F28(void); void sub_8068F80(void); -void HandleFaint(Entity *entity, s32 dungeonExitReason, Entity *param_3); +void HandleFaint_Async(Entity *entity, s32 dungeonExitReason, Entity *param_3); void sub_80694C0(Entity *target,s32 x,s32 y,u8 param_4); void sub_80695EC(Entity *param_1,int x,int y); Entity * sub_8069660(Entity *target); diff --git a/include/dungeon_mon_recruit.h b/include/dungeon_mon_recruit.h index 6d6585cc7..37c8504e4 100644 --- a/include/dungeon_mon_recruit.h +++ b/include/dungeon_mon_recruit.h @@ -6,7 +6,7 @@ bool8 TryRecruitMonster(Entity *attacker, Entity *target); bool8 IsMonsterRecruitable(s32 species); -bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3); +bool8 MonsterJoinSequence_Async(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3); // These two functions are only used for Celebi's scene for some reason. bool8 CanEntityBeRecruited(Entity *param_1); bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **entityPtr); diff --git a/include/dungeon_monster_house.h b/include/dungeon_monster_house.h index 78e008549..c8d0d9833 100644 --- a/include/dungeon_monster_house.h +++ b/include/dungeon_monster_house.h @@ -4,6 +4,6 @@ #include "structs/dungeon_entity.h" void TryWakeSleepingWildPokemon(void); -void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse); +void TriggerMonsterHouse_Async(Entity *entity, bool8 forcedMonsterHouse); #endif // GUARD_DUNGEON_MONSTER_HOUSE_H diff --git a/include/dungeon_move.h b/include/dungeon_move.h index 8da10c6f8..237ebce82 100644 --- a/include/dungeon_move.h +++ b/include/dungeon_move.h @@ -25,7 +25,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, bool8 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId); s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modifier, s32 itemId); s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId); -s32 sub_8055864(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId); +s32 sub_8055864_Async(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId); bool8 sub_8055988(Entity *r2, Entity *r4); void sub_80559DC(Entity *entity1, Entity *entity2); diff --git a/include/dungeon_strings.h b/include/dungeon_strings.h index 85ef200e1..985f7edf1 100644 --- a/include/dungeon_strings.h +++ b/include/dungeon_strings.h @@ -4,6 +4,7 @@ #include "structs/str_item_text.h" #include "constants/residual_damage.h" #include "constants/trap.h" +#include "constants/tutorial_id.h" #include "constants/weather.h" struct Struct_80F7C50 @@ -12,11 +13,11 @@ struct Struct_80F7C50 s32 val; }; -struct TutorialFlagMsg +typedef struct TutorialFlagMsg { - s32 flagId; + s32 flagId; // See enum "TutorialFlagID" const u8 *str; -}; +} TutorialFlagMsg; extern const ItemText gActions[]; extern const struct Struct_80F7C50 gUnknown_80F7C50[]; @@ -778,21 +779,21 @@ extern const u8 *const gUnknown_80FEF98; extern const u8 *const gUnknown_80FEFD0; extern const u8 *const gUnknown_80FEFF4; extern const u8 *const gUnknown_80FF01C; -extern const struct TutorialFlagMsg gUnknown_80FF020; -extern const struct TutorialFlagMsg gUnknown_80FF080; -extern const struct TutorialFlagMsg gUnknown_80FF0D8; -extern const struct TutorialFlagMsg gUnknown_80FF13C; -extern const struct TutorialFlagMsg gUnknown_80FF1B4; -extern const struct TutorialFlagMsg gMovementTutorial; -extern const struct TutorialFlagMsg gHungerTutorial; -extern const struct TutorialFlagMsg gFoodTutorial; -extern const struct TutorialFlagMsg gOranTutorial; -extern const struct TutorialFlagMsg gCheriTutorial; -extern const struct TutorialFlagMsg gBlastSeedTutorial; -extern const struct TutorialFlagMsg gUnknown_80FF4A0; -extern const struct TutorialFlagMsg gPechaTutorial; -extern const struct TutorialFlagMsg gSleepSeedTutorial; -extern const struct TutorialFlagMsg gMoneyTutorial; +extern const TutorialFlagMsg gUnknown_80FF020; +extern const TutorialFlagMsg gUnknown_80FF080; +extern const TutorialFlagMsg gUnknown_80FF0D8; +extern const TutorialFlagMsg gUnknown_80FF13C; +extern const TutorialFlagMsg gUnknown_80FF1B4; +extern const TutorialFlagMsg gMovementTutorial; +extern const TutorialFlagMsg gHungerTutorial; +extern const TutorialFlagMsg gFoodTutorial; +extern const TutorialFlagMsg gOranTutorial; +extern const TutorialFlagMsg gCheriTutorial; +extern const TutorialFlagMsg gBlastSeedTutorial; +extern const TutorialFlagMsg gUnknown_80FF4A0; +extern const TutorialFlagMsg gPechaTutorial; +extern const TutorialFlagMsg gSleepSeedTutorial; +extern const TutorialFlagMsg gMoneyTutorial; extern const u8 *const gUnknown_80FF674; extern const u8 *const gUnknown_80FF678; extern const u8 *const gUnknown_80FF6A4; diff --git a/include/dungeon_turn_effects.h b/include/dungeon_turn_effects.h index 157701e88..6f37813d4 100644 --- a/include/dungeon_turn_effects.h +++ b/include/dungeon_turn_effects.h @@ -3,7 +3,7 @@ #include "structs/dungeon_entity.h" -void ApplyEndOfTurnEffects(Entity *entity); +void DoEndOfTurnEffects_Async(Entity *entity); void TickStatusAndHealthRegen(Entity *entity); #endif diff --git a/include/dungeon_util.h b/include/dungeon_util.h index 1a31a9e94..649d7cf92 100644 --- a/include/dungeon_util.h +++ b/include/dungeon_util.h @@ -1,6 +1,7 @@ #ifndef GUARD_DUNGEON_UTIL_H #define GUARD_DUNGEON_UTIL_H +#include "constants/colors.h" #include "constants/direction.h" #include "structs/dungeon_entity.h" #include "structs/str_position.h" @@ -38,7 +39,7 @@ bool8 CanTargetEntity(Entity *entity, Entity *targetEntity); bool8 sub_8045A70(Entity *entity, Entity *targetEntity); bool8 sub_8045AAC(Entity *entity, DungeonPos *pos); bool8 CanTargetPosition(Entity *entity, DungeonPos *pos); -void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 param_3); +void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 monsterColorNum); void sub_8045ACC(void); s32 GetTeamMemberEntityIndex(Entity *pokemon); diff --git a/include/dungeon_vram.h b/include/dungeon_vram.h index f1d86d487..2eab902c5 100644 --- a/include/dungeon_vram.h +++ b/include/dungeon_vram.h @@ -9,7 +9,7 @@ void sub_803E250(void); void DungeonRunFrameActions(u32 a0); void sub_803E668(u32 unused); -void sub_803E708(s32 numFrames, u32 a1); +void DungeonWaitFrames_Async(s32 numFrames, u32 a1); void sub_803E724(s32 r0); void sub_803E748(void); void sub_803E7C8(void); diff --git a/include/event_flag.h b/include/event_flag.h index 249a24cca..404bc80d0 100644 --- a/include/event_flag.h +++ b/include/event_flag.h @@ -20,7 +20,7 @@ s32 GetScriptVarArrayValue(u8 *localVarBuf, s32 varId, s32 idx); void SetScriptVarValue(u8 *localVarBuf, s32 varId, s32 val); void SetScriptVarArrayValue(u8 *localVarBuf, s32 varId, s32 idx, s32 val); s32 GetScriptVarArraySum(u8 *localVarBuf, s16 varId); -void GetScriptVarScenario(s32 varId,u32 *outMain,u32 *outSub); +void GetScriptVarScenario(s32 varID, u32 *outMain, u32 *outSub); void ScenarioCalc(s16 varId, s32 main, s32 sub); bool8 ScriptVarScenarioBefore(s16 varId, u32 main, s32 sub); bool8 ScriptVarScenarioEqual(s16 varId, u32 main, s32 sub); @@ -34,11 +34,12 @@ void UpdateScriptVarWithVar(u8 *localVarBuf, s16 dstVarId, s16 srcVarId, enum Fl bool8 FlagJudge(s32 r0, s32 r1, enum FlagJudgeOperation operation); bool8 JudgeVarWithImmediate(u8 *localVarBuf, s16 varId, s32 val, enum FlagJudgeOperation operation); bool8 JudgeVarWithVar(u8 *localVarBuf, s16 varId1, s16 varId2, enum FlagJudgeOperation operation); -bool8 sub_80023E4(u32 param_1); // some kind of helper for predefined scenario checks +// See enum "MainQuest" +bool8 CheckQuest(s32 questID); u8 MapIdToFriendAreaId(s16 mapId_); // map -> friend area lookup s16 FriendAreaIdToMapId(u8 friendAreaId); // friend area -> map lookup bool8 sub_80026CC(s16 r0); -void sub_80026E8(s16 r0, bool8 r1); +void ScriptUnlockFriendArea(s16 r0, bool8 r1); bool8 SaveGlobalScriptVars(void *dest); bool8 RestoreGlobalScriptVars(u8 *src); diff --git a/include/exclusive_pokemon.h b/include/exclusive_pokemon.h index 7705b2b2a..72ec472db 100644 --- a/include/exclusive_pokemon.h +++ b/include/exclusive_pokemon.h @@ -1,29 +1,29 @@ #ifndef GUARD_EXCLUSIVE_POKEMON_H #define GUARD_EXCLUSIVE_POKEMON_H +#include "constants/cutscenes.h" +#include "constants/tutorial_id.h" #include "data_serializer.h" - #define NUM_EXCLUSIVE_POKEMON 12 +// Size: 0x4 struct ExclusivePokemon { - s16 poke_id; - bool8 in_rrt; // red rescue team - bool8 in_brt; // blue rescue team + /* 0x0 */ s16 poke_id; + /* 0x2 */ bool8 in_rrt; // red rescue team + /* 0x3 */ bool8 in_brt; // blue rescue team }; -struct ExclusivePokemonData +typedef struct ExclusivePokemonData { - u8 unk0; - u32 unk4[1]; - u8 fill8[0x3C - 8]; - u32 unk3C[1]; - u8 fill40[8]; - u32 unk48[3]; - u32 unk54[1]; - /* 0x58 */ bool8 Exclusives[NUM_EXCLUSIVE_POKEMON]; -}; + /* 0x00 */ bool8 unk0; // Initialized? + /* 0x04 */ u32 monSeenFlags[MONSTER_FLAGS_U32STORAGE]; + /* 0x3C */ u32 cutsceneFlags[CUTSCENE_FLAGS_U32STORAGE]; + /* 0x48 */ u32 tempCutsceneFlags[CUTSCENE_FLAGS_U32STORAGE]; + /* 0x54 */ u32 tutorialFlags[TUTORIAL_FLAGS_U32STORAGE]; + /* 0x58 */ bool8 exclusives[NUM_EXCLUSIVE_POKEMON]; +} ExclusivePokemonData; #define RED_EXCLUSIVE(species) \ { \ @@ -39,22 +39,22 @@ struct ExclusivePokemonData .in_brt = TRUE, \ } -extern struct ExclusivePokemonData *gUnknown_203B498; +extern ExclusivePokemonData *gExclusiveMonPtr; void LoadExclusivePokemon(void); -struct ExclusivePokemonData *GetExclusivePokemon(void); +ExclusivePokemonData *GetExclusivePokemon(void); void InitializeExclusivePokemon(void); -void sub_8097FA8(u8 param_1); -void sub_8097FD0(u8 param_1); -void sub_8097FF8(void); -void sub_8098044(u8 param_1); -void sub_8098080(void); -u8 sub_80980A4(void); -void sub_80980B4(s16 pokeID); -bool8 sub_8098100(u8 param_1); -bool8 sub_8098134(s16 pokeID); -void SetTutorialFlag(s32 param_1); -bool32 GetTutorialFlag(s32 param_1); +void SetTempCutsceneFlag(u8 flag); +void SetCutsceneFlag(u8 flag); +void FlushTempCutsceneFlags(void); +void UnsetCutsceneFlag(u8 flag); +void ClearTempCutsceneFlags(void); +bool8 sub_80980A4(void); +void SetMonSeenFlag(s16 monID); +bool8 GetCutsceneFlag(u8 flag); +bool8 GetMonSeenFlag(s16 monID); +void SetTutorialFlag(s32 flag); +bool8 GetTutorialFlag(s32 flag); bool8 IsExclusivePokemonUnlocked(s32 pokeID); void UnlockExclusivePokemon(s16 pokeID); void WriteExclusivePokemon(DataSerializer *r0); diff --git a/include/graphics_memory.h b/include/graphics_memory.h index 33ead71ea..9e2ad8a80 100644 --- a/include/graphics_memory.h +++ b/include/graphics_memory.h @@ -3,7 +3,7 @@ #include "structs/axdata.h" -extern RGB gFontPalette[128]; +extern RGB_Struct gFontPalette[128]; struct unkStruct_8009A1C_ptr { @@ -19,7 +19,7 @@ void ScheduleMemCopy(u32 *, const u32 *, u32); void ScheduleBgTilemapCopy(u32); void DoScheduledMemCopies(void); void CopyBgTilemaps0And1(void); -void SetFontsBaseColor(RGB); +void SetFontsBaseColor(RGB_Struct); bool8 sub_8009A7C(struct EfbFileData *a0, s32 a1, s32 a2, s32 a3, bool8 a4, s32 *a5, s16 *a6); #endif // GUARD_GRAPHICS_MEMORY_H diff --git a/include/ground_lives.h b/include/ground_lives.h index ff91636fe..74f11a48d 100644 --- a/include/ground_lives.h +++ b/include/ground_lives.h @@ -10,7 +10,7 @@ void AllocGroundLives(void); void DeleteGroundLives(void); void FreeGroundLives(void); -void GroundLives_Select(s32 scriptID, s32 group, s32 sector); +void GroundLives_Select(s32 mapID, s32 group, s32 sector); void GroundLives_Cancel(s32 scriptID, s32 sector); void GroundLives_CancelBlank_1(void); void GroundLives_CancelBlank_2(void); diff --git a/include/ground_main.h b/include/ground_main.h index bac7c1713..3152f03b1 100644 --- a/include/ground_main.h +++ b/include/ground_main.h @@ -1,6 +1,7 @@ #ifndef GUARD_GROUND_MAIN_H #define GUARD_GROUND_MAIN_H +#include "constants/rescue_dungeon_id.h" #include "structs/str_dungeon_setup.h" u32 xxx_script_related_8098468(s32 param_1); @@ -19,7 +20,8 @@ u8 sub_80990EC(struct DungeonSetupInfo *param_1, s32 param_2); u8 sub_80991E0(struct DungeonSetupInfo *param_1, s16 *param_2); void sub_8099220(struct DungeonSetupInfo *param_1, s32 param_2); void sub_809927C(u8 param_1); -bool8 sub_80992E0(s16 *param_1, s16 *param_2); +// See enum "RescueDungeonId" +bool8 sub_80992E0(s16 *param_1, s16 *rescueDungeonId); bool8 sub_8099328(u8 *dungeonId); bool8 sub_8099360(u8 *dungeonId); bool8 sub_8099394(u8 *param); diff --git a/include/ground_map.h b/include/ground_map.h index 1286a32e4..73d65a2af 100644 --- a/include/ground_map.h +++ b/include/ground_map.h @@ -1,6 +1,7 @@ #ifndef GUARD_GROUND_MAP_H #define GUARD_GROUND_MAP_H +#include "constants/script_id.h" #include "structs/str_position.h" #include "structs/str_ground_script.h" #include "structs/str_dungeon_location.h" @@ -11,7 +12,8 @@ void GroundMap_Reset(void); void sub_80A4B38(void); void sub_80A4B54(void); void GroundMap_GetStationScript(ScriptInfoSmall *r0, s32 _groundScriptId, s32 _groupId, s32 _sectorId); -void GroundMap_ExecuteEvent(s16 scriptIndex, u32 param_2); +// See enum "ScriptID" +void GroundMap_ExecuteEvent(s16 scriptIndex, bool32 param_2); void GroundMap_ExecuteStation(s32 _map, s32 _group, s32 _sector, bool32 _setScriptState); void GroundMap_ExecuteEnter(s16 param_1); bool8 GroundMapNotifyAll(s16 param_1); diff --git a/include/ground_script.h b/include/ground_script.h index 9a742ad6c..29cb8461d 100644 --- a/include/ground_script.h +++ b/include/ground_script.h @@ -34,7 +34,7 @@ bool8 sub_809D678(Action *action); bool8 sub_809D684(Action *action, ScriptInfoSmall *scriptInfo); void SetPredefinedScript(Action *param_1, s16 index, const ScriptCommand *param_3); bool8 GetPredefinedScript(Action *param_1, ScriptInfoSmall *script, s32 _index); -void GetFunctionScript(Action *param_1, ScriptInfoSmall *script, s16 index); +void GetFunctionScript(Action *param_1, ScriptInfoSmall *script, s16 scriptID); bool8 ActionResetScriptData(Action *param_1, const DebugLocation *unused); bool8 GroundScript_ExecutePP(Action *action, ActionUnkIds *param_2, ScriptInfoSmall *param_3, const DebugLocation *unused); bool8 ExecutePredefinedScript(Action *param_1, ActionUnkIds *param_2, s16 index, const DebugLocation *debug); diff --git a/include/main_loops.h b/include/main_loops.h index 8dddfde99..05278b037 100644 --- a/include/main_loops.h +++ b/include/main_loops.h @@ -3,7 +3,7 @@ #include "personality_test1.h" -void GameLoop(void); +void GameLoop_Async(void); void nullsub_3(s32 yPos, s32 a1); s32 sub_8000728(void); void ReadTeamBasicInfo(TeamBasicInfo *dst); diff --git a/include/ornament_gfx.h b/include/ornament_gfx.h index 1c9aaa21b..80ccbbb28 100644 --- a/include/ornament_gfx.h +++ b/include/ornament_gfx.h @@ -6,80 +6,80 @@ #include "structs/sprite_oam.h" #include "structs/rgb.h" -extern const RGB gFlag00Pal[]; +extern const RGB_Struct gFlag00Pal[]; extern const SiroArchive gAxFlag00; -extern const RGB gFlag01Pal[]; +extern const RGB_Struct gFlag01Pal[]; extern const SiroArchive gAxFlag01; -extern const RGB gFlag02Pal[]; +extern const RGB_Struct gFlag02Pal[]; extern const SiroArchive gAxFlag02; -extern const RGB gFlag03Pal[]; +extern const RGB_Struct gFlag03Pal[]; extern const SiroArchive gAxFlag03; -extern const RGB gFlag04Pal[]; +extern const RGB_Struct gFlag04Pal[]; extern const SiroArchive gAxFlag04; -extern const RGB gFlag05Pal[]; +extern const RGB_Struct gFlag05Pal[]; extern const SiroArchive gAxFlag05; -extern const RGB gFlag06Pal[]; +extern const RGB_Struct gFlag06Pal[]; extern const SiroArchive gAxFlag06; -extern const RGB gFlag07Pal[]; +extern const RGB_Struct gFlag07Pal[]; extern const SiroArchive gAxFlag07; -extern const RGB gFlag08Pal[]; +extern const RGB_Struct gFlag08Pal[]; extern const SiroArchive gAxFlag08; -extern const RGB gFlag09Pal[]; +extern const RGB_Struct gFlag09Pal[]; extern const SiroArchive gAxFlag09; -extern const RGB gFlag100Pal[]; +extern const RGB_Struct gFlag100Pal[]; extern const SiroArchive gAxFlag100; -extern const RGB gFlag101Pal[]; +extern const RGB_Struct gFlag101Pal[]; extern const SiroArchive gAxFlag101; -extern const RGB gFlag102Pal[]; +extern const RGB_Struct gFlag102Pal[]; extern const SiroArchive gAxFlag102; -extern const RGB gFlag103Pal[]; +extern const RGB_Struct gFlag103Pal[]; extern const SiroArchive gAxFlag103; -extern const RGB gFlag104Pal[]; +extern const RGB_Struct gFlag104Pal[]; extern const SiroArchive gAxFlag104; -extern const RGB gFlag105Pal[]; +extern const RGB_Struct gFlag105Pal[]; extern const SiroArchive gAxFlag105; -extern const RGB gFlag106Pal[]; +extern const RGB_Struct gFlag106Pal[]; extern const SiroArchive gAxFlag106; -extern const RGB gFlag107Pal[]; +extern const RGB_Struct gFlag107Pal[]; extern const SiroArchive gAxFlag107; -extern const RGB gFlag108Pal[]; +extern const RGB_Struct gFlag108Pal[]; extern const SiroArchive gAxFlag108; -extern const RGB gFlag109Pal[]; +extern const RGB_Struct gFlag109Pal[]; extern const SiroArchive gAxFlag109; -extern const RGB gFlag10Pal[]; +extern const RGB_Struct gFlag10Pal[]; extern const SiroArchive gAxFlag10; -extern const RGB gFlag110Pal[]; +extern const RGB_Struct gFlag110Pal[]; extern const SiroArchive gAxFlag110; -extern const RGB gFlag111Pal[]; +extern const RGB_Struct gFlag111Pal[]; extern const SiroArchive gAxFlag111; -extern const RGB gFlag112Pal[]; +extern const RGB_Struct gFlag112Pal[]; extern const SiroArchive gAxFlag112; -extern const RGB gFlag113Pal[]; +extern const RGB_Struct gFlag113Pal[]; extern const SiroArchive gAxFlag113; -extern const RGB gFlag114Pal[]; +extern const RGB_Struct gFlag114Pal[]; extern const SiroArchive gAxFlag114; -extern const RGB gFlag11Pal[]; +extern const RGB_Struct gFlag11Pal[]; extern const SiroArchive gAxFlag11; -extern const RGB gFlag12Pal[]; +extern const RGB_Struct gFlag12Pal[]; extern const SiroArchive gAxFlag12; -extern const RGB gFlag13Pal[]; +extern const RGB_Struct gFlag13Pal[]; extern const SiroArchive gAxFlag13; -extern const RGB gFlag14Pal[]; +extern const RGB_Struct gFlag14Pal[]; extern const SiroArchive gAxFlag14; -extern const RGB gFlag15Pal[]; +extern const RGB_Struct gFlag15Pal[]; extern const SiroArchive gAxFlag15; -extern const RGB gFlag16Pal[]; +extern const RGB_Struct gFlag16Pal[]; extern const SiroArchive gAxFlag16; extern const SiroArchive gAxItem01; extern const SiroArchive gAxNpc01; extern const SiroArchive gAxNpc02; extern const SiroArchive gAxNpc03; extern const SiroArchive gAxNpc04; -extern const RGB gStoneimPal[]; +extern const RGB_Struct gStoneimPal[]; extern const SiroArchive gAxTitlebg1; -extern const RGB gTitlebgPal[]; +extern const RGB_Struct gTitlebgPal[]; extern const SiroArchive gAxTitleop1; extern const SiroArchive gAxTitleop2; -extern const RGB gTitleopPal[]; +extern const RGB_Struct gTitleopPal[]; #endif diff --git a/include/other_random.h b/include/other_random.h index 1b0b992f0..cceebaac9 100644 --- a/include/other_random.h +++ b/include/other_random.h @@ -1,7 +1,7 @@ #ifndef GUARD_OTHER_RANDOM_H #define GUARD_OTHER_RANDOM_H -s32 OtherRandInt(s32 cap); +s32 OtherRandInt(s32 exclusiveMax); s32 OtherRandRange(s32 a, s32 b); #endif // GUARD_OTHER_RANDOM_H diff --git a/include/pokemon.h b/include/pokemon.h index 183b1d9c9..5f39324e8 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -45,10 +45,10 @@ Pokemon *TryAddPokemonToRecruited(Pokemon*); Pokemon *sub_808D278(s32 species); Pokemon *TryAddLevel1PokemonToRecruited(s32 species, u8 *name, u32 _itemID, const DungeonLocation *location, u16 *moveID); void TryResetPokemonFlags(Pokemon *pokemon); -Pokemon *GetPlayerPokemonStruct(void); -Pokemon *GetPartnerPokemonStruct(void); -Pokemon *sub_808D3BC(void); -Pokemon *sub_808D3F8(void); +Pokemon *GetLeaderMon1(void); +Pokemon *GetPartnerMon(void); +Pokemon *GetLeaderMon2(void); +Pokemon *GetPartnerMon2(void); Pokemon *GetRecruitedMonBySpecies(s16 species_, s32 sameSpeciesCounter); s32 GetFriendSum_808D480(void); bool8 sub_808D4B0(void); diff --git a/include/pokemon_summary_window.h b/include/pokemon_summary_window.h index 89f45cd5b..b6d9a6035 100644 --- a/include/pokemon_summary_window.h +++ b/include/pokemon_summary_window.h @@ -14,6 +14,8 @@ enum SUB_WINDOW_INFO, }; +#define MON_SUMMARY_UNK58_COUNT 12 + struct MonSummaryInfo { // size: 0x64 @@ -45,7 +47,7 @@ struct MonSummaryInfo u8 tactic; u8 fill55[1]; s16 unk56; - u8 unk58[12]; + u8 unk58[MON_SUMMARY_UNK58_COUNT]; }; struct UnkInfoTabStruct @@ -55,6 +57,6 @@ struct UnkInfoTabStruct }; void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, struct MonSummaryInfo *monInfo, struct UnkInfoTabStruct *param_4, u32 windowId); -void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 param_3); +void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 unlockedEvolutions); #endif // GUARD_POKEMON_SUMMARY_WINDOW_H diff --git a/include/post_office_guide2.h b/include/post_office_guide2.h index 41f947314..f028b922a 100644 --- a/include/post_office_guide2.h +++ b/include/post_office_guide2.h @@ -8,14 +8,14 @@ typedef struct unkStruct_203B330 { /* 0x0 */ TouchScreenMenuInput input; - u8 unkC; + u8 dungeonMissionKind; // See enum "DungeonMissionKind" /* 0xD */ u8 dungeonIndex; u32 unk10; WindowTemplate *unk14; WindowTemplates unk18; } unkStruct_203B330; -bool8 sub_80319A4(u8, u8 dungeon, s32); +bool8 sub_80319A4(u8 dungeonMissionKind, u8 dungeon, s32); u32 sub_80319F8(void); void sub_8031A3C(void); diff --git a/include/rescue_scenario.h b/include/rescue_scenario.h index df71f2175..363b31395 100644 --- a/include/rescue_scenario.h +++ b/include/rescue_scenario.h @@ -1,17 +1,20 @@ #ifndef GUARD_RESCUE_SCENARIO_H #define GUARD_RESCUE_SCENARIO_H +#include "constants/rescue_dungeon_id.h" #include "structs/str_wonder_mail.h" void sub_80972F4(void); void nullsub_128(void); bool8 sub_8097318(s16 param_1); -void sub_809733C(s16 param_1, u32 param_2); -bool8 sub_8097384(s32 param_1); -void sub_80973A8(s32 param_1, u32 param_2); -bool8 RescueScenarioConquered(s32 param_1); -void sub_8097418(s32 index, bool32); +void sub_809733C(s32 _rescueDungId, bool32 param_2); +bool8 sub_8097384(s32 rescueDungeon); +void sub_80973A8(s32 _rescueDungId, bool32 param_2); +bool8 RescueScenarioConquered(s32 rescueDungeonID_); +// See enum "RescueDungeonId" +void SetRescueScenarioConquered(s32 rescueDungeonID_, bool32 conquered); const u8 *GetRescueDungeonName(s16 rescueDungeonId); -const u8 *GetCurrentMissionText(s16 index); +// See enum "RescueDungeonId" +const u8 *GetCurrentMissionText(s16 rescueDungeonId); #endif // GUARD_RESCUE_SCENARIO_H diff --git a/include/run_dungeon.h b/include/run_dungeon.h index c6f8e90ac..21da7ad24 100644 --- a/include/run_dungeon.h +++ b/include/run_dungeon.h @@ -17,12 +17,12 @@ struct UnkStruct_203B414 extern struct UnkStruct_203B414 *gUnknown_203B414; extern Dungeon *gDungeon; -void RunDungeon_Async(DungeonSetupStruct *r8); +void RunDungeon_Async(DungeonSetupStruct *setupPtr); bool8 sub_8043CE4(s32 dungeonId); u8 GetFloorType(void); void sub_8043D50(s32 *a0, s32 *a1); void sub_8043D60(void); -bool8 TryForcedLoss(bool8 a0); +bool8 TryForcedLoss_Async(bool8 a0); void EnforceMaxItemsAndMoney(void); bool8 IsFloorwideFixedRoom(void); bool8 IsCurrentFixedRoomBossFight(void); diff --git a/include/save.h b/include/save.h index bdae6ffc4..0a45a4287 100644 --- a/include/save.h +++ b/include/save.h @@ -50,7 +50,7 @@ struct UnkStruct_sub_8011DAC // size: 0x5C // This is most likely a debug savestate -struct UnkStruct_203B184 +typedef struct UnkStruct_203B184 { /* 0x0 */ TeamInventory *MoneyItems; /* 0x4 */ RecruitedMon *recruitedPokemon; @@ -61,7 +61,7 @@ struct UnkStruct_203B184 /* 0x18 */ unkStruct_203B490 *mailInfo; /* 0x1C */ struct RescueTeamData *RescueTeamInfo; /* 0x20 */ struct unkStruct_203B494 *unk20; - /* 0x24 */ struct ExclusivePokemonData *ExclusivePokemon; + /* 0x24 */ ExclusivePokemonData *exclusivePokemon; /* 0x28 */ bool8 *BoughtFriendAreas; /* 0x2C */ GameOptions *gameOptions; /* 0x30 */ struct PlayTimeStruct *playTime; @@ -75,7 +75,7 @@ struct UnkStruct_203B184 u32 unk050; u32 unk054; u32 RngState; -}; +} UnkStruct_203B184; void nullsub_33(void); u32 sub_8011C1C(void); diff --git a/include/sprite.h b/include/sprite.h index 58e4b77bb..d47af2bd1 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -51,11 +51,11 @@ void SetSavingIconCoords(DungeonPos *pos); void sub_8004E8C(unkStruct_2039DB0 *); void sub_8005180(void); void sub_8005304(void); -void sub_8005610(OpenedFile *, s32 vramIdx, s32 brightness, const RGB *ramp); -const RGB *sub_8005674(const EfoFileData *, s32 vramIdx); +void sub_8005610(OpenedFile *, s32 vramIdx, s32 brightness, const RGB_Struct *ramp); +const RGB_Struct *sub_8005674(const EfoFileData *, s32 vramIdx); void sub_800569C(DungeonPos *, axdata *, u8); void sub_8005700(DungeonPos *dstPos, axdata *axData); -void sub_8005770(s32, const RGB *color, s32 brightness, const RGB *ramp); +void sub_8005770(s32, const RGB_Struct *color, s32 brightness, const RGB_Struct *ramp); static inline bool8 AxFlag8000(axdata *ax) { diff --git a/include/string_format.h b/include/string_format.h index 583eade84..311d4a8e2 100644 --- a/include/string_format.h +++ b/include/string_format.h @@ -25,7 +25,7 @@ void CreateYesNoDialogueBoxAndPortrait_DefaultNo(const u8 *text, MonPortraitMsg void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const MenuItem *menuItems, void *arg_0, u32 a5, u32 unknownUnused, MonPortraitMsg *monPortraitPtr, u16 flags); void sub_8014490(void); s32 sub_80144A4(s32 *a0); -void DrawDialogueBoxString(void); +void DrawDialogueBoxString_Async(void); const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags); void PrintFormattedStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr); void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing); @@ -39,5 +39,6 @@ void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u3 #define STR_FORMAT_FLAG_INSTANT_TEXT_ON_AB_PRESS 0x40 #define STR_FORMAT_FLAG_NEW_LINE_TERMINATES 0x80 #define STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS 0x100 +#define STR_FORMAT_FLAG_x200 0x200 #endif // GUARD_STRING_FORMAT_H diff --git a/include/structs/axdata.h b/include/structs/axdata.h index 654219207..dce011676 100644 --- a/include/structs/axdata.h +++ b/include/structs/axdata.h @@ -128,7 +128,7 @@ typedef struct axObject typedef struct Palette256 { - RGB pal[256]; + RGB_Struct pal[256]; } Palette256; // size: 0x20 @@ -140,7 +140,7 @@ typedef struct EfoFileData /* 0xC */ void *spriteData; // ? /* 0x10 */ Palette256 *unk10; // ? /* 0x14 */ const u32 *tiles; - /* 0x18 */ const RGB *pal; + /* 0x18 */ const RGB_Struct *pal; /* 0x1C */ s32 tileCount; } EfoFileData; @@ -150,7 +150,7 @@ typedef struct EfbFileData const u16 *const *frames; s32 tileCount; const u32 *tiles; - const RGB *pal; + const RGB_Struct *pal; } EfbFileData; #endif // GUARD_AXDATA_H diff --git a/include/structs/dungeon_entity.h b/include/structs/dungeon_entity.h index 6231b5bc9..d2b9d6cdc 100644 --- a/include/structs/dungeon_entity.h +++ b/include/structs/dungeon_entity.h @@ -438,7 +438,7 @@ enum MonsterBehavior BEHAVIOR_JIRACHI, BEHAVIOR_LUGIA, BEHAVIOR_KYOGRE, - BEHAVIOR_29, + BEHAVIOR_DEOXYS_NORMAL, BEHAVIOR_CELEBI, BEHAVIOR_SMEARGLE, BEHAVIOR_32, diff --git a/include/structs/menu.h b/include/structs/menu.h index 259aba18a..6c172ebcb 100644 --- a/include/structs/menu.h +++ b/include/structs/menu.h @@ -5,7 +5,7 @@ #include "structs/str_text.h" #include "structs/str_position.h" -// size: R=0xC | NDS=0xA? +// size: R=0xC | NDS=0xA typedef struct TouchScreenMenuInput { /* R=0x0 | B=0x0 */ u8 unk0; @@ -20,24 +20,24 @@ typedef struct TouchScreenMenuInput #define DEFAULT_MENU_ENTRY_HEIGHT 12 #define TWO_LINES_MENU_ENTRY_HEIGHT 24 -// size: R=0x34 | NDS=0x32? +// size: R=0x34 | B=0x30 typedef struct MenuInputStruct { - /* 0x0 */ s32 windowId; - /* 0x4 */ u16 unk4; - /* 0x6 */ s16 firstEntryY; - /* 0x8 */ DungeonPos cursorArrowPos; - /* 0xC */ DungeonPos leftRightArrowsPos; - /* 0x10 */ s32 entryHeight; // Either 12, or 24 when each entry has text on two lines. - /* 0x14 */ DungeonPos unk14; - /* 0x18 */ s16 menuIndex; - /* 0x1A */ s16 currPageEntries; - /* 0x1C */ s16 entriesPerPage; - /* 0x1E */ s16 currPage; - /* 0x20 */ s16 pagesCount; - /* 0x22 */ s16 totalEntriesCount; - /* 0x24 */ u16 unk24; - /* 0x28 */ TouchScreenMenuInput touchScreen; // For obvious reason unused on GBA + /* 0x00 | B=0x00 */ s32 windowId; + /* 0x04 | B=0x04 */ u16 unk4; + /* 0x06 | B=0x06 */ s16 firstEntryY; + /* 0x08 | B=0x08 */ DungeonPos cursorArrowPos; + /* 0x0C | B=0x0C */ DungeonPos leftRightArrowsPos; + /* 0x10 | B=0x10 */ s32 entryHeight; // Either 12, or 24 when each entry has text on two lines. + /* 0x14 | B=0x14 */ DungeonPos unk14; + /* 0x18 | B=0x18 */ s16 menuIndex; + /* 0x1A | B=0x1A */ s16 currPageEntries; + /* 0x1C | B=0x1C */ s16 entriesPerPage; + /* 0x1E | B=0x1E */ s16 currPage; + /* 0x20 | B=0x20 */ s16 pagesCount; + /* 0x22 | B=0x22 */ s16 totalEntriesCount; + /* 0x24 | B=0x24 */ u16 unk24; + /* 0x28 | B=0x26 */ TouchScreenMenuInput touchScreen; // For obvious reason unused on GBA } MenuInputStruct; // size: 0x8 @@ -81,66 +81,67 @@ typedef struct unkStructFor8013AA0 } unkStructFor8013AA0; // Used for creating windows with an input menu. -// size: R=0x9C | B=? +// size: R=0x9C | B=0x98 typedef struct MenuWindow { - /* 0x0 */ MenuInputStruct input; - /* 0x34 */ u32 menuWinId; - /* 0x38 */ WindowTemplate *menuWindow; - /* 0x3C */ WindowTemplates windows; + /* R=0x00 | B=0x00 */ MenuInputStruct input; + /* R=0x34 | B=0x30 */ u32 menuWinId; + /* R=0x38 | B=0x34 */ WindowTemplate *menuWindow; + /* R=0x3C | B=0x38 */ WindowTemplates windows; } MenuWindow; -// Same as above, but has one additional WindowHeader field. -// size: R=0xA0 | B=0x9C? +// Same as MenuWindow, but has one additional WindowHeader field. +// size: R=0xA0 | B=0x9C typedef struct MenuHeaderWindow { - /* 0x0 */ MenuWindow m; // short name so it's easier to write. 'm' standing for 'menu' or 'menuWindow' - /* 0x9C */ WindowHeader header; + /* R=0x00 | B=0x00 */ MenuWindow m; // short name so it's easier to write. 'm' standing for 'menu' or 'menuWindow' + /* R=0x9C | B=0x98 */ WindowHeader header; } MenuHeaderWindow; +// I think the `+ 2`s below are actually `+ WINDOW_HEADER_HEIGHT`... + // These macros are used for updating menu windows, as the last page can have less entries than other pages, so the window's height needs to reflect that. // Note: In order to get matching ASM, this macro had to be created. // It's probable the code below is not exactly how it was originally written, but it generates the same asm. -#define UPDATE_MENU_WINDOW_HEIGHT_INTERNAL(ptr, _newHeight) \ -{ \ - UNUSED s32 new10; \ - s16 newHeight; \ - s16 newHeightVal = (_newHeight); \ - UNUSED s32 dummyMatch = newHeightVal; \ - UNUSED s16 oldHeight = (ptr).windows.id[(ptr).menuWinId].height; \ - dummyMatch = 0; \ - new10 = newHeightVal + 2; \ - newHeight = newHeightVal; \ - \ - (ptr).windows.id[(ptr).menuWinId].height = newHeight; \ - (ptr).windows.id[(ptr).menuWinId].unk10 = newHeightVal + 2; \ - \ - ResetUnusedInputStruct(); \ - ShowWindows(&(ptr).windows, TRUE, TRUE); \ +#define UPDATE_MENU_WINDOW_HEIGHT_INTERNAL(ptr, _newHeight) \ +{ \ + UNUSED s32 newtotalHeight; \ + s16 newHeight; \ + s16 newHeightVal = (_newHeight); \ + UNUSED s32 dummyMatch = newHeightVal; \ + UNUSED s16 oldHeight = (ptr).windows.id[(ptr).menuWinId].height; \ + dummyMatch = 0; \ + newtotalHeight = newHeightVal + 2; \ + newHeight = newHeightVal; \ + \ + (ptr).windows.id[(ptr).menuWinId].height = newHeight; \ + (ptr).windows.id[(ptr).menuWinId].totalHeight = newHeightVal + 2; \ + \ + ResetUnusedInputStruct(); \ + ShowWindows(&(ptr).windows, TRUE, TRUE); \ } -#define UPDATE_MENU_WINDOW_HEIGHT(ptr) \ -{ \ +#define UPDATE_MENU_WINDOW_HEIGHT(ptr) \ +{ \ UPDATE_MENU_WINDOW_HEIGHT_INTERNAL(ptr, CalcEntriesTotalHeight((ptr).input.currPageEntries, DEFAULT_MENU_ENTRY_HEIGHT) + 2) \ } -// For Windows where height is the same as unk10. -#define UPDATE_MENU_WINDOW_HEIGHT_2(ptr) \ -{ \ - s32 newHeightVal = CalcEntriesTotalHeight((ptr).input.currPageEntries, DEFAULT_MENU_ENTRY_HEIGHT) + 2; \ - UNUSED s16 oldHeight = (ptr).windows.id[(ptr).menuWinId].height; \ - s16 newHeight = newHeightVal; \ - \ - (ptr).windows.id[(ptr).menuWinId].height = newHeight; \ - (ptr).windows.id[(ptr).menuWinId].unk10 = newHeight; \ - \ - ResetUnusedInputStruct(); \ - ShowWindows(&(ptr).windows, TRUE, TRUE); \ +#define UPDATE_MENU_WINDOW_HEIGHT_2(ptr) \ +{ \ + s32 newHeightVal = CalcEntriesTotalHeight((ptr).input.currPageEntries, DEFAULT_MENU_ENTRY_HEIGHT) + 2; \ + UNUSED s16 oldHeight = (ptr).windows.id[(ptr).menuWinId].height; \ + s16 newHeight = newHeightVal; \ + \ + (ptr).windows.id[(ptr).menuWinId].height = newHeight; \ + (ptr).windows.id[(ptr).menuWinId].totalHeight = newHeight; \ + \ + ResetUnusedInputStruct(); \ + ShowWindows(&(ptr).windows, TRUE, TRUE); \ } // For menu windows with two lines entries(for example job mail) -#define UPDATE_TWO_LINES_MENU_WINDOW_HEIGHT(ptr) \ -{ \ +#define UPDATE_TWO_LINES_MENU_WINDOW_HEIGHT(ptr) \ +{ \ UPDATE_MENU_WINDOW_HEIGHT_INTERNAL(ptr, CalcTwoLinesEntriesTotalHeight((ptr).input.currPageEntries, TWO_LINES_MENU_ENTRY_HEIGHT) + 2) \ } diff --git a/include/structs/rgb.h b/include/structs/rgb.h index 56afc1153..2d1ff45c8 100644 --- a/include/structs/rgb.h +++ b/include/structs/rgb.h @@ -1,13 +1,14 @@ #ifndef GUARD_RGB_H #define GUARD_RGB_H -typedef struct RGB +// Size: 0x4 +typedef struct RGB_Struct { u8 r; u8 g; u8 b; u8 unk4; // Never read, always 0x80. Unused transparency/alpha flag? -} RGB; +} RGB_Struct; #define RGB_R 0 #define RGB_G 1 @@ -15,17 +16,25 @@ typedef struct RGB #define RGB_UNK 3 #define RGB_FIELDS_COUNT 4 +// Size: 0x4 typedef struct RGB_Array { u8 c[RGB_FIELDS_COUNT]; } RGB_Array; +// Size: 0x4 typedef union RGB_Union { RGB_Array asArr; - RGB separate; + RGB_Struct separate; } RGB_Union; +// Size: 0x40 +typedef struct RGB_Palette +{ + /* 0x0 */ RGB_Struct colors[16]; +} RGB_Palette; + #define RGB_TO_GBA(r, g, b) RGB2(((u32)(r) & 0xF8) >> 3, ((g) & 0xF8) >> 3, ((b) & 0xF8) >> 3) // Needed to match, functionally equivalent to the above. #define RGB_TO_GBA2(r, g, b)(((u32)((b) & 0xF8) >> 2 << 9) | (((u32)(g) & 0xF8) >> 3 << 5) | (((u32)(r) & 0xF8) >> 3)) diff --git a/include/structs/str_202EE8C.h b/include/structs/str_202EE8C.h index b12cea000..68db0eaa4 100644 --- a/include/structs/str_202EE8C.h +++ b/include/structs/str_202EE8C.h @@ -9,10 +9,10 @@ typedef struct unkStruct_202EE8C u32 unk0; u16 unk4; s16 unk6; - RGB *unk8; - RGB *unkC; - RGB *unk10; - RGB unk14; + RGB_Struct *unk8; + RGB_Struct *unkC; + RGB_Struct *unk10; + RGB_Struct unk14; } unkStruct_202EE8C; #endif // GUARD_STR_202EE8C_H diff --git a/include/structs/str_dungeon.h b/include/structs/str_dungeon.h index d81270463..5d04d0934 100644 --- a/include/structs/str_dungeon.h +++ b/include/structs/str_dungeon.h @@ -238,6 +238,14 @@ struct MinMaxPosition s32 maxY; }; +enum DungeonMissionKind +{ + DUNGEON_MISSION_UNK0, + DUNGEON_MISSION_OUTONRESCUE, + DUNGEON_MISSION_ACCEPTEDJOB_RELATED, + DUNGEON_MISSION_UNK3, +}; + // size: 0x58 typedef struct unkDungeon644 { @@ -247,10 +255,10 @@ typedef struct unkDungeon644 /* 0x10 */ u8 unk10; /* 0x11 */ u8 fill11[3]; /* 0x14 */ bool8 canRecruit; - /* 0x15 */ u8 unk15; - /* 0x16 */ u8 unk16; + /* 0x15 */ bool8 canRecruitRescueTeamMazeBosses; + /* 0x16 */ bool8 unlockedEvolutions; /* 0x17 */ bool8 hasInventory; - /* 0x18 */ u8 unk18; + /* 0x18 */ bool8 canChangeLeader; /* 0x19 */ u8 unk19; /* 0x1A */ u8 fill1A[2]; /* 0x1C */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds. @@ -271,7 +279,7 @@ typedef struct unkDungeon644 /* 0x31 */ u8 unk31; /* 0x32 */ bool8 itemHoldersIdentified; /* 0x33 */ u8 unk33; - /* 0x34 */ u8 unk34; + /* 0x34 */ u8 missionKind; // See enum "DungeonMissionKind" /* 0x35 */ u8 emptyBellyAlert; // which alert message to show when belly gets empty. /* 0x36 */ u8 windPhase; /* 0x37 */ s8 unk37; @@ -360,18 +368,25 @@ struct DungeonMap #define MONSTER_SPAWNS_ARR_COUNT 32 +enum DungeonUnk2Kind +{ + DUNGEON_UNK2_0, + DUNGEON_UNK2_1, + DUNGEON_UNK2_PITFALL_TRAP, +}; + // size: 0x1CEDC typedef struct Dungeon { u8 unk0; u8 unk1; - u8 unk2; + u8 unk2; // Cutscene-related. See enum "DungeonUnk2Kind" u8 unk3; u8 unk4; u8 unk5; u8 unk6; u8 unk7; - u8 unk8; + bool8 unk8; // Related to a yes/no prompt for the Music Box creation u8 unk9; u8 unkA; u8 unkB; @@ -379,7 +394,7 @@ typedef struct Dungeon u8 unkD; u8 unkE; /* 0xF */ bool8 noActionInProgress; // Whether the game is currently accepting input. Set to false while action animations play. - u8 unk10; + u8 unk10; // Forced-loss reason? 0 = partner felled ... 1 = failed to protect client ... 2 = failed to protect client u8 unk11; s16 unk12; s16 startFloorId; // It's always 0 by default(see sDungeonStartingFloor table). If changed, it would be possible for the first entered floor to be displayed as not B1, but the specified number. @@ -389,7 +404,7 @@ typedef struct Dungeon Entity *unkBC; Entity unkC0; struct unkStruct_Dungeon134_sub unk134; - /* 0x17C */ RGB colorRamp[COLOR_RAMP_COUNT]; + /* 0x17C */ RGB_Struct colorRamp[COLOR_RAMP_COUNT]; /* 0x57C */ unkDungeon57C unk57C; /* 0x5C0 */ s32 unk5C0; /* 0x5C4 */ struct unkStruct_Dungeon5C4_sub unk5C4[3]; @@ -422,7 +437,7 @@ typedef struct Dungeon /* 0x3A0A */ bool8 unk3A0A; /* 0x3A0B */ bool8 unk3A0B; /* 0x3A0C */ u8 monsterHouseRoom; // room index of monster house - /* 0x3A0D */ u8 unk3A0D; + /* 0x3A0D */ u8 cutscene; // See enum "CutsceneKind" /* 0x3A0E */ s16 tileset; /* 0x3A10 */ s16 unk3A10; /* 0x3A12 */ s16 unk3A12; @@ -449,7 +464,7 @@ typedef struct Dungeon u8 ALIGNED(4) unk12C24[0x930]; u16 unk13554[10]; OpenedFile *unk13568; - u8 unk1356C; + bool8 unk1356C; // Cutscene-related u8 fill1356D[0x13570 - 0x1356D]; /* 0x13570 */ u8 unk13570; /* 0x13574 */ DungeonPos trapPos; diff --git a/include/structs/str_dungeon_setup.h b/include/structs/str_dungeon_setup.h index 78bd6559e..ef11e61ff 100644 --- a/include/structs/str_dungeon_setup.h +++ b/include/structs/str_dungeon_setup.h @@ -12,13 +12,13 @@ typedef struct DungeonSetupSubstruct { DungeonLocation unk0; u8 unk4; - u8 unk5; - u8 unk6; - u8 unk7; - u8 unk8; - u8 unk9; + /* 0x5 */ bool8 canChangeLeader; + /* 0x6 */ bool8 canRecruit; + /* 0x7 */ bool8 canRecruitRescueTeamMazeBosses; + /* 0x8 */ bool8 unlockedEvolutions; + /* 0x9 */ bool8 hasInventory; u8 unkA; - u8 unkB; + /* 0xB */ u8 missionKind; // See enum "DungeonMissionKind" u8 unkC; u8 unkD; } DungeonSetupSubstruct; @@ -30,7 +30,7 @@ typedef struct DungeonSetupInfo Pokemon mon; u8 *unk74; Dungeon *dungeon; - s16 unk7C; // Set to 5 if the dungeon was skipped (quicksave read failed) + s16 unk7C; // 4 = OutOnRescue related ... 5 = dungeon was skipped (quicksave read failed) u8 unk7E; DungeonLocation unk80; DungeonMailSeed unk84; diff --git a/include/structs/str_ground_script.h b/include/structs/str_ground_script.h index a31a5f6ac..359d11bee 100644 --- a/include/structs/str_ground_script.h +++ b/include/structs/str_ground_script.h @@ -1,12 +1,14 @@ #ifndef GUARD_STR_GROUND_SCRIPT_H #define GUARD_STR_GROUND_SCRIPT_H +#include "constants/script_id.h" +#include "constants/script_cmd.h" #include "structs/str_position.h" // size: 0x10 typedef struct ScriptCommand { - /* 0x0 */ u8 op; + /* 0x0 */ u8 op; // See enum "ScriptOpID" /* 0x1 */ u8 argByte; /* 0x2 */ s16 argShort; /* 0x4 */ s32 arg1; @@ -46,13 +48,13 @@ typedef struct ScriptData /* 0x04 */ ScriptInfo script; /* 0x10 */ ScriptInfo savedScript; /* 0x1C */ const ScriptCommand *curPtr; - /* 0x20 */ u8 curScriptOp; + /* 0x20 */ u8 curScriptOp; // See enum "ScriptOpID" /* 0x22 */ s16 unk22; /* 0x24 */ u16 unk24; - /* 0x26 */ s8 unk26; + /* 0x26 */ s8 storedDir; // Can be -1. /* 0x28 */ s16 branchDiscriminant; - /* 0x2A */ s16 unk2A; - /* 0x2C */ s16 unk2C; + /* 0x2A */ s16 unk2A; // Seems to be a frame counter for async script commands + /* 0x2C */ s16 unk2C; // Another counter for async script commands /* 0x30 */ s32 unk30; /* 0x34 */ PixelPos pos1; /* 0x3C */ PixelPos pos2; @@ -127,15 +129,16 @@ typedef struct GroundMapAction u32 unk10C; } GroundMapAction; +// Size: 0xC typedef struct ScriptRef { - s16 id; - s16 type; - u8 *name; - const ScriptCommand *script; + /* 0x0 */ s16 id; // See enum "ScriptID" + /* 0x2 */ s16 type; + /* 0x4 */ const u8 *name; + /* 0x8 */ const ScriptCommand *script; } ScriptRef; -extern const ScriptRef gFunctionScriptTable[]; +extern const ScriptRef gFunctionScriptTable[NUM_SCRIPT_IDS]; struct GroundLink { CompactPos pos; @@ -193,10 +196,10 @@ struct GroundScriptGroup { u32 nSectors; const struct GroundScriptSector *sectors; }; -struct GroundScriptHeader { +typedef struct GroundScriptHeader { u32 nGroups; const struct GroundScriptGroup *groups; const struct GroundLink *links; -}; +} GroundScriptHeader; #endif // GUARD_STR_GROUND_SCRIPT_H diff --git a/include/structs/str_mon_portrait.h b/include/structs/str_mon_portrait.h index dc92df3fd..99518235a 100644 --- a/include/structs/str_mon_portrait.h +++ b/include/structs/str_mon_portrait.h @@ -8,7 +8,7 @@ // size: 0x8 typedef struct PortraitGfxSub { - /* 0x0 */ const RGB *pal; + /* 0x0 */ const RGB_Struct *pal; /* 0x4 */ const u8 *gfx; } PortraitGfxSub; diff --git a/include/structs/str_pokemon.h b/include/structs/str_pokemon.h index 39a9054db..51b868b46 100644 --- a/include/structs/str_pokemon.h +++ b/include/structs/str_pokemon.h @@ -113,7 +113,7 @@ typedef struct MonsterDataEntry /* 0x9 */ u8 bodySize; /* 0xC */ s32 movementSpeed; /* 0x10 */ u16 dialogueSprites; // Bitwise flags for whether a dialogue sprite/portrait is available for each emotion. - bool8 unk12; + bool8 unk12; // Appears to control whether the "has friend area" check is skipped /* 0x13 */ u8 types[2]; /* 0x15 */ u8 movementType; /* 0x16 */ u8 friendArea; diff --git a/include/structs/str_text.h b/include/structs/str_text.h index 319ec052c..b0d67c4d9 100644 --- a/include/structs/str_text.h +++ b/include/structs/str_text.h @@ -3,6 +3,16 @@ #include "structs/str_position.h" +#define WINDOW_HEADER_HEIGHT 2 + +enum WinTemplateFlag +{ + WINTEMPLATE_FLAG_NONE = 0, + WINTEMPLATE_FLAG_x20 = (1 << 5), + WINTEMPLATE_FLAG_x40 = (1 << 6), + WINTEMPLATE_FLAG_x80 = (1 << 7), // Appears to skip the border and preparation in `AddWindow()` +}; + // size: 0xC typedef struct unkChar { @@ -21,25 +31,25 @@ typedef struct Window /* 0x0 */ s16 x; /* 0x2 */ s16 y; /* 0x4 */ s16 width; - /* 0x6 */ s16 height; - /* 0x8 */ s16 unk8; + /* 0x6 */ s16 height; // Inner height + /* 0x8 */ s16 totalHeight; // Including header /* 0xC */ s32 type; - /* 0x10 */ u32 unk10; - /* 0x14 */ u32 unk14; - /* 0x18 */ u32 *unk18; - /* 0x1C */ u32 *unk1C; - /* 0x20 */ s32 unk20; - /* 0x24 */ s32 unk24; + /* 0x10 */ u32 unk10; // winGFX start tile? + /* 0x14 */ u32 unk14; // unk1C start tile? + /* 0x18 */ u32 *winGFX; // 8 packed pixels. Each pixel is 4 bits wide. + /* 0x1C */ u32 *unk1C; // Similar to winGFX + /* 0x20 */ s32 unk20; // Some width relation to winGFX (stride?) + /* 0x24 */ s32 unk24; // Set from winTemplate unk12 /* 0x28 */ u32 *unk28; // Somewhere in VRAM - /* 0x2C */ s32 unk2C; - /* 0x30 */ u32 *unk30; // Somewhere in VRAM? - /* 0x34 */ u32 *unk34; - /* 0x38 */ s32 unk38; - /* 0x3C */ u32 *unk3C; - /* 0x40 */ u32 *unk40; - /* 0x44 */ u8 unk44; - /* 0x45 */ bool8 unk45; - /* 0x46 */ u8 unk46; + /* 0x2C */ s32 unk2C; // Related to unk38 + /* 0x30 */ u32 *unk30; // Somewhere in VRAM + /* 0x34 */ u32 *unk34; // Related to unk1C and unk3C + /* 0x38 */ s32 unk38; // Related to unk2C and unk44 + /* 0x3C */ u32 *unk3C; // Somewhere in winGFX or unk1C + /* 0x40 */ u32 *unk40; // Somewhere in winGFX or unk1C + /* 0x44 */ bool8 unk44; // Related to unk38 not being 0 + /* 0x45 */ bool8 isWinType0; + /* 0x46 */ bool8 unk46; } Window; // size: 0x4 @@ -54,14 +64,14 @@ typedef struct WindowHeader // size: 0x18 typedef struct WindowTemplate { - u8 unk0; - /* 0x4 */ s32 type; - /* 0x8 */ DungeonPos pos; - /* 0xC */ s16 width; - /* 0xE */ s16 height; - s16 unk10; // In most cases it's the same as height. If it's smaller than height, the window may look glitchy. Maybe something with tile allocation/how the window is filled? - s16 unk12; - const WindowHeader *header; + /* 0x00 */ u8 flags; // See enum "WinTemplateFlag" + /* 0x04 */ s32 type; + /* 0x08 */ DungeonPos pos; + /* 0x0C */ s16 width; + /* 0x0E */ s16 height; // Inner height + /* 0x10 */ s16 totalHeight; // Including header + /* 0x12 */ s16 unk12; // Related to startTileNum and width + /* 0x14 */ const WindowHeader *header; } WindowTemplate; #define WINDOW_TYPE_0 0 @@ -76,7 +86,7 @@ typedef struct WindowTemplate #define MAX_WINDOWS 4 // All fields are zeroed out except for type which is set to WINDOW_TYPE_NORMAL. -#define WIN_TEMPLATE_DUMMY (WindowTemplate) { .unk0 = 0, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .header = NULL } +#define WIN_TEMPLATE_DUMMY (WindowTemplate) { .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .totalHeight = 0, .unk12 = 0, .header = NULL } // size: 0x60 typedef struct WindowTemplates diff --git a/include/text_2.h b/include/text_2.h index 942664179..86f7caca3 100644 --- a/include/text_2.h +++ b/include/text_2.h @@ -6,14 +6,15 @@ void AddDoubleUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color); void AddUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color); void CallPrepareTextbox_8008C54(u32 windowId); -void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2); -void DisplayMonPortraitSpriteFlipped(s32 a0, const u8 *compressedData, s32 a1); +void DisplayMonPortraitSprite(s32 winID, const u8 *compressedData, s32 palNum); +void DisplayMonPortraitSpriteFlipped(s32 winID, const u8 *compressedData, s32 palNum); const unkChar *GetCharacter(s32 chr); void PrepareTextbox_8008C6C(Window *windows, u32 windowId); void ResetWindowBgData(void); void sub_8007A78(u32 a0, s32 x, s32 y, s32 a3, u32 color); void sub_8007B7C(u32 a0, s32 x, s32 y, s32 a3, u32 color); -void sub_8007E20(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6); +// srcGFX: Each u32 is 8 packed pixels, 4 bits per pixel. +void WriteGFXToBG0Window(u32 winID, u32 x, u32 y, u32 w, u32 h, u32 *srcGFX, u32 palNum); void sub_80087EC(s32 a0, s32 a1, s32 a2, s32 a3, s32 a4); void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str); u32 DrawCharOnWindow(s32 x, s32 y, u32 chr, u32 color, u32 windowId); diff --git a/include/textbox.h b/include/textbox.h index 0328e8e36..6210785c0 100644 --- a/include/textbox.h +++ b/include/textbox.h @@ -1,18 +1,33 @@ #ifndef GUARD_TEXTBOX_H #define GUARD_TEXTBOX_H +#include "structs/str_pokemon.h" #include "structs/str_position.h" #include "structs/menu.h" enum { SCRIPT_TEXT_TYPE_INSTANT, // 0x32 Used for narration and signposts - SCRIPT_TEXT_TYPE_PLAYER, // 0x33 Used for player's thoughts, player's dialogue and Murky Cave's judge of darkness + SCRIPT_TEXT_TYPE_QUIET, // 0x33 Used for player's thoughts, player's dialogue and Murky Cave's judge of darkness SCRIPT_TEXT_TYPE_NPC, // 0x34 Used for all NPCs, has the speaker's name and dialogue sound SCRIPT_TEXT_TYPE_LETTER, // 0x35 Used for Mails/Letters. Has a dialogue sound when priting text, similarly to SCRIPT_TEXT_TYPE_NPC - SCRIPT_TEXT_TYPE_4, // 0x36 Used for sound-like texts such as "Flap-flap" or roars "Gyaaaaaaaah". It doesn't wait for button press, so the message just closes after printing unless WAIT command is used afterwards. + SCRIPT_TEXT_TYPE_OVERHEARD, // 0x36 Used for sound-like texts such as "Flap-flap" or roars "Gyaaaaaaaah". It doesn't wait for button press, so the message just closes after printing unless WAIT command is used afterwards. }; +typedef union MonOrStringPtr +{ + u8 *str; + Pokemon *mon; +} MonOrStringPtr; + +typedef void* MonOrStrPtr_Arg; + +#define NULL_MONORSTRPTR ((MonOrStrPtr_Arg)NULL) +#define MON_TO_MONORSTRPTR(m) ((MonOrStrPtr_Arg)m) +#define STR_TO_MONORSTRPTR(s) ((MonOrStrPtr_Arg)s) + +#define SET_MONORSTRPTR(d, m) (d).str = (m) + void TextboxInit(void); void TextboxFree(void); void TextboxResetAll(void); @@ -30,17 +45,19 @@ bool8 sub_809ABB4(s32 id_, s32 a1_); bool8 sub_809AC18(s32 a0_, s32 a1_); bool8 ScriptSetPortraitInfo(s32 portraitId_, s32 spriteId_, s32 placementId_); bool8 ScriptSetPortraitPosDelta(s32 portraitId_, PixelPos *newPosDelta); -bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const char *text); -bool8 ScriptPrintTextOnBg(const char *text); -bool8 ScriptPrintTextOnBg2(const char *text); -bool8 ScriptPrintTextOnBgAuto(s32 unused, const char *text); +bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const u8 *text); +bool8 ScriptPrintTextOnBg(const u8 *text); +bool8 ScriptPrintTextOnBg2(const u8 *text); +bool8 ScriptPrintTextOnBgAuto(s32 unused, const u8 *text); bool8 sub_809AFAC(void); -void sub_809AFC8(s32 a0_, s32 a1, s32 a2_, const char *text); +void sub_809AFC8(s32 a0_, s32 a1, s32 a2_, const u8 *text); bool8 sub_809AFFC(u8 *a0); -void sub_809B028(const MenuItem * menuItems, s32 a1_, s32 a2, s32 a3, s32 a4_, const char *text); +void sub_809B028(const MenuItem * menuItems, s32 a1_, s32 a2, s32 a3, s32 a4_, const u8 *text); bool8 sub_809B18C(s32 *sp); -bool8 sub_809B1C0(s32 a0, u32 kind, void *a2); -bool8 sub_809B1D4(s32 a0, u32 kind, s32 a2, void *a3); +// kind: See enum "SpecialTextKind" +bool8 ScriptSpecialTextHandler2(s32 kind, u32 a1, MonOrStrPtr_Arg monOrStr); +// kind: See enum "SpecialTextKind" +bool8 ScriptSpecialTextHandler(s32 kind, u32 a1, s32 a2, MonOrStrPtr_Arg monOrStr); bool8 sub_809B260(s32 *a0); void sub_809B474(void); void sub_809B57C(void); diff --git a/include/world_map.h b/include/world_map.h index 3c42be4ff..07079c768 100644 --- a/include/world_map.h +++ b/include/world_map.h @@ -40,10 +40,10 @@ struct WorldMap struct WorldMapInfo { - DungeonLocation startLocation; + /* 0x0 */ DungeonLocation startLocation; DungeonSetupSubstruct unk4; - Pokemon mon; - u8 unk6C; + /* 0x14 */ Pokemon mon; + /* 0x6C */ bool8 canChangeLeader; u8 unk6D[WORLD_MAP_UNK_6D_COUNT]; }; diff --git a/src/bg_palette_buffer.c b/src/bg_palette_buffer.c index 2e85296a7..9388b0d78 100644 --- a/src/bg_palette_buffer.c +++ b/src/bg_palette_buffer.c @@ -23,7 +23,7 @@ void InitBGPaletteBuffer(void) } // arm9.bin::020011A0 -void SetBGPaletteBufferColorRGB(s32 index, const RGB *color, s32 brightnessRaw, const RGB *ramp) +void SetBGPaletteBufferColorRGB(s32 index, const RGB_Struct *color, s32 brightnessRaw, const RGB_Struct *ramp) { s32 brightness = brightnessRaw; @@ -47,7 +47,7 @@ void SetBGPaletteBufferColorRGB(s32 index, const RGB *color, s32 brightnessRaw, } // arm9.bin::02001130 -void SetBGPaletteBufferColorArray(s32 index, const RGB *color32) +void SetBGPaletteBufferColorArray(s32 index, const RGB_Struct *color32) { sBGPaletteRowDirty[index / BG_PALETTE_ROW_SIZE] = TRUE; sBGPaletteBuffer[index] = RGB2(color32->r >> 3, color32->g >> 3, color32->b >> 3); @@ -61,12 +61,12 @@ void SetBGPaletteBufferColor(s32 index, u16 *color) } // arm9.bin::02000FC8 -void nullsub_4(s32 index, const RGB *colorArray, s32 brightness, const RGB *ramp) +void nullsub_4(s32 index, const RGB_Struct *colorArray, s32 brightness, const RGB_Struct *ramp) { } // arm9.bin::02000F58 -void nullsub_5(s32 index, const RGB *colorArray) +void nullsub_5(s32 index, const RGB_Struct *colorArray) { } diff --git a/src/blow_away.c b/src/blow_away.c index 086462acb..ab5360b9c 100644 --- a/src/blow_away.c +++ b/src/blow_away.c @@ -42,25 +42,25 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) counter = 10; if (IsCurrentFixedRoomBossFight()) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC9E8); // It couldn't be knocked flying! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC9E8); // It couldn't be knocked flying! return; } if (pokemon == target) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying! return; } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (AbilityIsActive(target,ABILITY_SUCTION_CUPS)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying! return; } GetEntInfo(target)->action.direction = (direction + 4) & DIRECTION_MASK; sub_806CDD4(target, 6, (direction + 4) & DIRECTION_MASK); sub_80421C0(target,0x1a3); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F8A0C); // {POKEMON_0} was blown away! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F8A0C); // {POKEMON_0} was blown away! flag = TRUE; entity = NULL; @@ -104,7 +104,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) if (!flag) { sub_807D068(target,&target->pos); - sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,RESIDUAL_DAMAGE_REGULAR,0,0); } if (IsFloorOver()) { return; @@ -115,7 +115,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) InitPokemonMove(&move, MOVE_REGULAR_ATTACK); if (!sub_80571F0(entity,&move)) { TrySendImmobilizeSleepEndMsg(pokemon,entity); - sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,entity,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,RESIDUAL_DAMAGE_REGULAR,0,0); } } if (IsFloorOver()) @@ -138,7 +138,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction) sub_807EC28(FALSE); } sub_806A5B8(target); - TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse); } void sub_807D068(Entity *pokemon, DungeonPos *pos) diff --git a/src/code_8004AA0.c b/src/code_8004AA0.c index 3940cd2e6..51fe3c253 100644 --- a/src/code_8004AA0.c +++ b/src/code_8004AA0.c @@ -33,7 +33,7 @@ void sub_8004AA4(unkStruct_202EE8C *a0, OpenedFile *a1, s32 a2) } } -bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB *a5) +bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB_Struct *a5) { bool8 bVar3; bool8 ret; @@ -65,7 +65,7 @@ bool8 sub_8004AF0(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const return ret; } -UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB *a5) +UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, s32 a4, const RGB_Struct *a5) { bool8 bVar3; bool8 ret; @@ -97,14 +97,14 @@ UNUSED static bool8 sub_8004B78(bool8 a0, unkStruct_202EE8C *a1, s32 a2, s32 a3, return ret; } -bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB *ramp, s16 *a5) +bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB_Struct *ramp, s16 *a5) { bool8 ret; s32 i; s32 r; s32 g; s32 b; - RGB color; + RGB_Struct color; ret = FALSE; diff --git a/src/code_800D090.c b/src/code_800D090.c index b9309b2a9..4d60ddfc1 100644 --- a/src/code_800D090.c +++ b/src/code_800D090.c @@ -5,7 +5,7 @@ void Hang(void) { - while(1) + while (TRUE) { asm("swi 0x2"); } diff --git a/src/code_801B60C.c b/src/code_801B60C.c index c66d00bb9..8cb8e113a 100644 --- a/src/code_801B60C.c +++ b/src/code_801B60C.c @@ -54,7 +54,7 @@ bool8 sub_801B60C(u32 r0, u8 id, u8 quantity) sUnknown_203B234->unk14.unk0 = 0; sUnknown_203B234->unk14.unk4 = 0; sUnknown_203B234->unk14.unk8 = 1; - PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0], GetPlayerPokemonStruct(), COLOR_YELLOW); + PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0], GetLeaderMon1(), COLOR_YELLOW); sub_8090E14(gFormatBuffer_Items[0], &sUnknown_203B234->unk10, &sUnknown_203B234->unk14); sub_801B748(0); return TRUE; diff --git a/src/code_801D014.c b/src/code_801D014.c index 2b26ac7d0..63ddc6a6b 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -32,12 +32,23 @@ #include "wonder_mail_802C4C8.h" #include "wonder_mail_802C860.h" +#define RANK_ICON_W 16 +#define RANK_ICON_H 16 +#define RANK_ICON_4BPP_LEN (RANK_ICON_W * RANK_ICON_H / 8) + +// size: 0x8 +struct TeamBadgeData +{ + /* 0x0 */ u32 *gfx; // Array of (MAX_TEAM_RANKS * RANK_ICON_4BPP_LEN) + /* 0x4 */ RGB_Struct *palette; // Array of 16 +}; + static EWRAM_INIT struct unk_203B250 *sUnknown_203B250 = {NULL}; static EWRAM_INIT u32 sUnknown_203B254 = {0}; #include "data/code_801D014.h" -static void LoadTeamRankBadge(u32, u32, u32); +static void LoadTeamRankBadge(u32 winID, u32 x, u32 y); static void sub_801D208(u32 newState); static void sub_801D220(void); @@ -85,7 +96,7 @@ bool8 sub_801D014(Pokemon *a0) sUnknown_203B250->currFriendAreaLocation = MapIdToFriendAreaId(GetGroundMapID()); sUnknown_203B250->unk8 = 0; sUnknown_203B250->unk9 = 0; - sUnknown_203B250->unkC = GetPlayerPokemonStruct(); + sUnknown_203B250->unkC = GetLeaderMon1(); sUnknown_203B250->unk7 = 0; if (sUnknown_203B250->pokeStruct != NULL) @@ -148,13 +159,13 @@ u32 sub_801D178(void) if (sUnknown_203B250->unk8 != 0) return 1; - if (sUnknown_203B250->unkC != GetPlayerPokemonStruct()) + if (sUnknown_203B250->unkC != GetLeaderMon1()) return 4; if ((s16) sub_80A7AE8(7) < 0) return 0; - if (PokemonIsOnTeam(sub_808D3F8())) + if (PokemonIsOnTeam(GetPartnerMon2())) return 0; return 4; @@ -304,7 +315,7 @@ static void sub_801D4C0(void) sUnknown_203B250->unk68[loopMax].menuAction = 4; loopMax++; - if (sub_80023E4(2)) { + if (CheckQuest(QUEST_CAN_ACCESS_JOBS)) { sUnknown_203B250->unk68[loopMax].text = sJobList; sUnknown_203B250->unk68[loopMax].menuAction = 9; if (HasNoAcceptedJobs()) @@ -588,25 +599,27 @@ static void sub_801D894(void) sub_80073E0(2); } -static void LoadTeamRankBadge(u32 a0, u32 a1, u32 a2) +static void LoadTeamRankBadge(u32 winID, u32 x, u32 y) { OpenedFile *teamBadgeFile; - s32 paletteIndex; - u8 rank; - RGB *colorArray; - u8 *teamBadgePic; + u32 *gfx; + RGB_Struct *pal; + s32 i; teamBadgeFile = OpenFileAndGetFileDataPtr(sTeamRankBadgeFileName, &gTitleMenuFileArchive); - teamBadgePic = ((struct TeamBadgeData *)(teamBadgeFile->data))->pics; - colorArray = ((struct TeamBadgeData *)(teamBadgeFile->data))->palette; +#define TMRKPAT_DATA ((struct TeamBadgeData *)teamBadgeFile->data) - for (paletteIndex = 0; paletteIndex < 16; paletteIndex++) { - SetBGPaletteBufferColorArray(paletteIndex + 224, colorArray); - colorArray++; + gfx = TMRKPAT_DATA->gfx; + pal = TMRKPAT_DATA->palette; + + for (i = 0; i < 16; i++) { + SetBGPaletteBufferColorArray(i + 0xE0, pal); + pal++; } - rank = GetRescueTeamRank(); - teamBadgePic = &teamBadgePic[rank * 128]; - sub_8007E20(a0, a1, a2, 16, 16, (void *) teamBadgePic, 14); + gfx = &gfx[GetRescueTeamRank() * RANK_ICON_4BPP_LEN]; + WriteGFXToBG0Window(winID, x, y, RANK_ICON_W, RANK_ICON_H, gfx, 14); + +#undef TMRKPAT_DATA CloseFile(teamBadgeFile); } diff --git a/src/code_8023144.c b/src/code_8023144.c index 7503d93b5..ff7117b00 100644 --- a/src/code_8023144.c +++ b/src/code_8023144.c @@ -201,7 +201,7 @@ static u32 sub_80236A4(void) gUnknown_3001B5C->unk8 = 0; for (index = 0; index < MONSTER_MAX; index++) { - if (sub_8098134(index) && (s16)index == GetBaseSpeciesNoUnown(index)) + if (GetMonSeenFlag(index) && (s16)index == GetBaseSpeciesNoUnown(index)) gUnknown_3001B5C->unkC[gUnknown_3001B5C->unk8++] = index; } @@ -211,10 +211,10 @@ static u32 sub_80236A4(void) static bool8 sub_8023704(u8 unused) { - s32 index; + s32 i; - for (index = 0; index < MONSTER_MAX; index++) { - if (sub_8098134(index)) + for (i = 0; i < MONSTER_MAX; i++) { + if (GetMonSeenFlag(i)) return FALSE; } diff --git a/src/code_8024458.c b/src/code_8024458.c index f265ff922..49189284f 100644 --- a/src/code_8024458.c +++ b/src/code_8024458.c @@ -98,5 +98,5 @@ static void sub_8024604(void) CreateMenuOnWindow(&sUnknown_203B2AC->input, 3, 1, sUnknown_203B2AC->unkE0); iVar3 = &sUnknown_203B2AC->unk4C; pokeStruct = &gRecruitedPokemonRef->pokemon[sUnknown_203B2AC->speciesNum]; - SetMonSummaryInfo(iVar3, pokeStruct, sub_80023E4(7)); + SetMonSummaryInfo(iVar3, pokeStruct, CheckQuest(QUEST_UNLOCKED_EVOLUTIONS)); } diff --git a/src/code_803B050.c b/src/code_803B050.c index aaf0c0354..99e20a0c7 100644 --- a/src/code_803B050.c +++ b/src/code_803B050.c @@ -9,124 +9,152 @@ #include "text_2.h" #include "text_3.h" -struct unkStruct_203B3FC +// Size: R=0x3D0 | B=0x3CC +typedef struct unkStruct_203B3FC { - // size: 0x3D0 - MenuHeaderWindow mh; - s16 unkA0[10]; -}; -EWRAM_INIT struct unkStruct_203B3FC *gUnknown_203B3FC = NULL; + /* R=0x00 | B=0x00 */ MenuHeaderWindow mh; + /* R=0xA0 | B=0x9C */ s16 scriptIDs[NUM_SCRIPT_IDS + 1]; // See enum "ScriptID" +} unkStruct_203B3FC; -const WindowTemplate gUnknown_80E7F3C = -{ - 0, - 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - NULL -}; +EWRAM_INIT unkStruct_203B3FC *gUnknown_203B3FC = NULL; // arm9.bin::020EAF84 -const WindowTemplate gUnknown_80E7F54 = -{ - 0, - 0x06, - 0x02, 0x02, - 0x18, 0x11, - 0x11, 0x00, - NULL +const WindowTemplate gUnknown_80E7F3C = WIN_TEMPLATE_DUMMY; + +const WindowTemplate gUnknown_80E7F54 = { + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_WITH_HEADER, + .pos = { 2, 2 }, + .width = 24, + .height = 17, + .totalHeight = 17, + .unk12 = 0, + .header = NULL }; static void sub_803B204(void); static void sub_803B284(void); -// https://decomp.me/scratch/xx1GB - 91.35% matched (Seth) +// https://decomp.me/scratch/Gyv2d - Red 90+% +// https://decomp.me/scratch/kQeVC - Blue 100% +#ifndef NONMATCHING NAKED bool8 sub_803B050(void) { asm_unified( - "\tpush {r4-r7,lr}\n" - "\tldr r4, _0803B0F4\n" - "\tmovs r0, 0xF4\n" - "\tlsls r0, 2\n" - "\tmovs r1, 0x8\n" - "\tbl MemoryAlloc\n" - "\tstr r0, [r4]\n" - "\tmovs r1, 0x3\n" - "\tstr r1, [r0, 0x34]\n" - "\tadds r1, r0, 0\n" - "\tadds r1, 0x84\n" - "\tstr r1, [r0, 0x38]\n" - "\tadds r0, 0x3C\n" - "\tbl RestoreSavedWindows\n" - "\tldr r1, [r4]\n" - "\tldr r2, [r1, 0x34]\n" - "\tlsls r0, r2, 1\n" - "\tadds r0, r2\n" - "\tlsls r0, 3\n" - "\tadds r1, r0\n" - "\tadds r1, 0x3C\n" - "\tldr r0, _0803B0F8\n" - "\tldm r0!, {r2,r3,r5}\n" - "\tstm r1!, {r2,r3,r5}\n" - "\tldm r0!, {r2,r3,r5}\n" - "\tstm r1!, {r2,r3,r5}\n" - "\tldr r0, [r4]\n" - "\tldr r1, [r0, 0x38]\n" - "\tadds r0, 0x9C\n" - "\tstr r0, [r1, 0x14]\n" - "\tbl ResetUnusedInputStruct\n" - "\tldr r0, [r4]\n" - "\tadds r0, 0x3C\n" - "\tmovs r1, 0x1\n" - "\tmovs r2, 0x1\n" - "\tbl ShowWindows\n" - "\tmovs r2, 0\n" - "\tmovs r3, 0\n" - "\tmovs r7, 0xCB\n" - "\tlsls r7, 1\n" - "\tmovs r6, 0x80\n" - "\tlsls r6, 9\n" - "\tmovs r5, 0\n" + "\tpush {r4-r7,lr}\n" + "\tldr r4, _0803B0F4\n" + "\tmovs r0, 0xF4\n" + "\tlsls r0, 2\n" + "\tmovs r1, 0x8\n" + "\tbl MemoryAlloc\n" + "\tstr r0, [r4]\n" + "\tmovs r1, 0x3\n" + "\tstr r1, [r0, 0x34]\n" + "\tadds r1, r0, 0\n" + "\tadds r1, 0x84\n" + "\tstr r1, [r0, 0x38]\n" + "\tadds r0, 0x3C\n" + "\tbl RestoreSavedWindows\n" + "\tldr r1, [r4]\n" + "\tldr r2, [r1, 0x34]\n" + "\tlsls r0, r2, 1\n" + "\tadds r0, r2\n" + "\tlsls r0, 3\n" + "\tadds r1, r0\n" + "\tadds r1, 0x3C\n" + "\tldr r0, _0803B0F8\n" + "\tldm r0!, {r2,r3,r5}\n" + "\tstm r1!, {r2,r3,r5}\n" + "\tldm r0!, {r2,r3,r5}\n" + "\tstm r1!, {r2,r3,r5}\n" + "\tldr r0, [r4]\n" + "\tldr r1, [r0, 0x38]\n" + "\tadds r0, 0x9C\n" + "\tstr r0, [r1, 0x14]\n" + "\tbl ResetUnusedInputStruct\n" + "\tldr r0, [r4]\n" + "\tadds r0, 0x3C\n" + "\tmovs r1, 0x1\n" + "\tmovs r2, 0x1\n" + "\tbl ShowWindows\n" + "\tmovs r2, 0\n" + "\tmovs r3, 0\n" + "\tmovs r7, 0xCB\n" + "\tlsls r7, 1\n" + "\tmovs r6, 0x80\n" + "\tlsls r6, 9\n" + "\tmovs r5, 0\n" "_0803B0AE:\n" - "\tldr r0, _0803B0FC\n" - "\tadds r0, r5, r0\n" - "\tmovs r1, 0x2\n" - "\tldrsh r0, [r0, r1]\n" - "\tldr r4, _0803B0F4\n" - "\tcmp r0, 0xA\n" - "\tbne _0803B0C8\n" - "\tldr r0, [r4]\n" - "\tlsls r1, r2, 1\n" - "\tadds r0, 0xA0\n" - "\tadds r0, r1\n" - "\tstrh r3, [r0]\n" - "\tadds r2, 0x1\n" + "\tldr r0, _0803B0FC\n" + "\tadds r0, r5, r0\n" + "\tmovs r1, 0x2\n" + "\tldrsh r0, [r0, r1]\n" + "\tldr r4, _0803B0F4\n" + "\tcmp r0, 0xA\n" + "\tbne _0803B0C8\n" + "\tldr r0, [r4]\n" + "\tlsls r1, r2, 1\n" + "\tadds r0, 0xA0\n" + "\tadds r0, r1\n" + "\tstrh r3, [r0]\n" + "\tadds r2, 0x1\n" "_0803B0C8:\n" - "\tadds r0, r6, 0\n" - "\tmovs r3, 0x80\n" - "\tlsls r3, 9\n" - "\tadds r6, r3\n" - "\tadds r5, 0xC\n" - "\tasrs r3, r0, 16\n" - "\tcmp r3, r7\n" - "\tble _0803B0AE\n" - "\tldr r0, [r4]\n" - "\tldr r3, [r0, 0x34]\n" - "\tadds r1, r2, 0\n" - "\tmovs r2, 0xA\n" - "\tbl CreateMenuOnWindow\n" - "\tbl sub_803B204\n" - "\tbl sub_803B284\n" - "\tmovs r0, 0x1\n" - "\tpop {r4-r7}\n" - "\tpop {r1}\n" - "\tbx r1\n" - "\t.align 2, 0\n" + "\tadds r0, r6, 0\n" + "\tmovs r3, 0x80\n" + "\tlsls r3, 9\n" + "\tadds r6, r3\n" + "\tadds r5, 0xC\n" + "\tasrs r3, r0, 16\n" + "\tcmp r3, r7\n" + "\tble _0803B0AE\n" + "\tldr r0, [r4]\n" + "\tldr r3, [r0, 0x34]\n" + "\tadds r1, r2, 0\n" + "\tmovs r2, 0xA\n" + "\tbl CreateMenuOnWindow\n" + "\tbl sub_803B204\n" + "\tbl sub_803B284\n" + "\tmovs r0, 0x1\n" + "\tpop {r4-r7}\n" + "\tpop {r1}\n" + "\tbx r1\n" + "\t.align 2, 0\n" "_0803B0F4: .4byte gUnknown_203B3FC\n" "_0803B0F8: .4byte gUnknown_80E7F54\n" "_0803B0FC: .4byte gFunctionScriptTable"); } +#else // NONMATCHING +// arm9.bin::020566EC +bool8 sub_803B050(void) +{ + s32 i; + s32 count; + s32 max; + + gUnknown_203B3FC = MemoryAlloc(sizeof(unkStruct_203B3FC), 8); + gUnknown_203B3FC->mh.m.menuWinId = 3; + gUnknown_203B3FC->mh.m.menuWindow = &gUnknown_203B3FC->mh.m.windows.id[gUnknown_203B3FC->mh.m.menuWinId]; + RestoreSavedWindows(&gUnknown_203B3FC->mh.m.windows); + gUnknown_203B3FC->mh.m.windows.id[gUnknown_203B3FC->mh.m.menuWinId] = gUnknown_80E7F54; + gUnknown_203B3FC->mh.m.menuWindow->header = &gUnknown_203B3FC->mh.header; + + ResetUnusedInputStruct(); + ShowWindows(&gUnknown_203B3FC->mh.m.windows, TRUE, TRUE); + count = 0; + + for (i = 0, max = NUM_SCRIPT_IDS - 1; i <= max; i = (s16)(i + 1)) { + const ScriptRef *info = &gFunctionScriptTable[i]; + if (info->type == 10) { + gUnknown_203B3FC->scriptIDs[count++] = i; + } + } + + CreateMenuOnWindow(&gUnknown_203B3FC->mh.m.input, count, 10, gUnknown_203B3FC->mh.m.menuWinId); + sub_803B204(); + sub_803B284(); + return TRUE; +} +#endif void sub_803B100(s32 _id) { @@ -139,8 +167,7 @@ void sub_803B100(s32 _id) u32 sub_803B120(void) { - switch(GetKeyPress(&gUnknown_203B3FC->mh.m.input)) - { + switch (GetKeyPress(&gUnknown_203B3FC->mh.m.input)) { case 2: PlayMenuSoundEffect(1); return 2; @@ -149,36 +176,35 @@ u32 sub_803B120(void) default: break; } - if((MenuCursorUpdate(&gUnknown_203B3FC->mh.m.input, TRUE) != FALSE)) - { + + if (MenuCursorUpdate(&gUnknown_203B3FC->mh.m.input, TRUE)) { sub_803B204(); sub_803B284(); return 1; } - else - return 0; + + return 0; } s16 sub_803B168(void) { - return gUnknown_203B3FC->unkA0[GET_CURRENT_MENU_ENTRY(gUnknown_203B3FC->mh.m.input)]; + return gUnknown_203B3FC->scriptIDs[GET_CURRENT_MENU_ENTRY(gUnknown_203B3FC->mh.m.input)]; } -UNUSED static void sub_803B18C(u8 r0) +UNUSED static void sub_803B18C(bool8 addSprite) { - gUnknown_203B3FC->mh.m.input.totalEntriesCount = 0xE5; + gUnknown_203B3FC->mh.m.input.totalEntriesCount = 229; MenuUpdatePagesData(&gUnknown_203B3FC->mh.m.input); sub_803B204(); sub_803B284(); - if(r0) + if (addSprite) AddMenuCursorSprite(&gUnknown_203B3FC->mh.m.input); } void sub_803B1BC(void) { - if(gUnknown_203B3FC) - { + if (gUnknown_203B3FC != NULL) { gUnknown_203B3FC->mh.m.windows.id[gUnknown_203B3FC->mh.m.menuWinId] = gUnknown_80E7F3C; ResetUnusedInputStruct(); ShowWindows(&gUnknown_203B3FC->mh.m.windows, TRUE, TRUE); @@ -187,7 +213,7 @@ void sub_803B1BC(void) } } -static void sub_803B204(void) +static void sub_803B204(void) { gUnknown_203B3FC->mh.header.count = 1; gUnknown_203B3FC->mh.header.currId = 0; @@ -198,28 +224,27 @@ static void sub_803B204(void) UPDATE_MENU_WINDOW_HEIGHT(gUnknown_203B3FC->mh.m); } -static void sub_803B284(void) +static void sub_803B284(void) { s32 x, y, i; s32 pageNum; - const ScriptRef *ptr; - + CallPrepareTextbox_8008C54(gUnknown_203B3FC->mh.m.menuWinId); sub_80073B8(gUnknown_203B3FC->mh.m.menuWinId); - PrintStringOnWindow(0xA, 0, "Script", gUnknown_203B3FC->mh.m.menuWinId, 0); - + PrintStringOnWindow(10, 0, "Script", gUnknown_203B3FC->mh.m.menuWinId, 0); + x = (gUnknown_203B3FC->mh.header.width * 8) - 2; pageNum = gUnknown_203B3FC->mh.m.input.currPage + 1; PrintNumOnWindow(x, 0, pageNum, 2, 7, gUnknown_203B3FC->mh.m.menuWinId); - + // This line has no real effect. It's a magic 'fakematch' to fool agb into generating the same asm. It can be removed if you don't care about matching. if (x) { i = 0; } - + for (i = 0; i < gUnknown_203B3FC->mh.m.input.currPageEntries; i++) { - ptr = &gFunctionScriptTable[gUnknown_203B3FC->unkA0[(gUnknown_203B3FC->mh.m.input.currPage * gUnknown_203B3FC->mh.m.input.entriesPerPage) + i]]; + const ScriptRef *info = &gFunctionScriptTable[gUnknown_203B3FC->scriptIDs[(gUnknown_203B3FC->mh.m.input.currPage * gUnknown_203B3FC->mh.m.input.entriesPerPage) + i]]; y = GetMenuEntryYCoord(&gUnknown_203B3FC->mh.m.input, i); - PrintStringOnWindow(8, y, ptr->name, gUnknown_203B3FC->mh.m.menuWinId, 0); + PrintStringOnWindow(8, y, info->name, gUnknown_203B3FC->mh.m.menuWinId, 0); } - + sub_80073E0(gUnknown_203B3FC->mh.m.menuWinId); } diff --git a/src/code_803C1B4.c b/src/code_803C1B4.c index 0fe615b57..2d3103d83 100644 --- a/src/code_803C1B4.c +++ b/src/code_803C1B4.c @@ -244,7 +244,7 @@ bool8 sub_803C580(WonderMail *param_1) counter = 0; ptr = gUnknown_80E8180; - if (!sub_80023E4(6)) + if (!CheckQuest(QUEST_REACHED_POSTGAME)) return FALSE; for (id = 0; id < ARRAY_COUNT_INT(gUnknown_80E8180); ptr++, id++) { diff --git a/src/code_803DA7C_2.c b/src/code_803DA7C_2.c index c56f0b9e7..095709e57 100644 --- a/src/code_803DA7C_2.c +++ b/src/code_803DA7C_2.c @@ -20,7 +20,7 @@ EWRAM_DATA OpenedFile *gUnknown_202EC94 = NULL; EWRAM_DATA OpenedFile *gUnknown_202EC98 = NULL; EWRAM_DATA OpenedFile *gUnknown_202EC9C = NULL; EWRAM_DATA OpenedFile *gUnknown_202ECA0 = NULL; -EWRAM_DATA RGB gUnknown_202ECA4[33] = {0}; +EWRAM_DATA RGB_Struct gUnknown_202ECA4[33] = {0}; struct FileStruct2 { @@ -121,7 +121,7 @@ void sub_803E02C(void) void sub_803E13C(void) { s32 i; - RGB *pal; + RGB_Struct *pal; SetWindowBGColor(); if (gGameOptionsRef->playerGender != 0) diff --git a/src/code_8040094_1.c b/src/code_8040094_1.c index c9f236d94..895b1fc80 100644 --- a/src/code_8040094_1.c +++ b/src/code_8040094_1.c @@ -95,7 +95,7 @@ static void sub_8040C4C(Entity *entity, Move *move, bool32 hasSpecialEffect) r4 = sub_800EA84(&sp); sub_8042DD4(r4, entity, 5); savedUnkVar = gUnknown_203B40D; - while (1) { + while (TRUE) { if (!sub_800E9A8(r4)) break; if (!r8) @@ -157,7 +157,7 @@ void sub_8040DA0(Entity *entity, Move *move) gUnknown_202F224 = DungeonRandInt(7); gDungeon->unk181e8.unk18204 = gDungeon->unk181e8.unk18200 = gUnknown_8106A8C[gUnknown_202F224]; gFormatArgs[0] = gUnknown_202F224 + 4; - LogMessageByIdWithPopupCheckUser(anotherEntity, gPtrMagnitudeMessage); + LogMessageByIdWithPopupCheckUser_Async(anotherEntity, gPtrMagnitudeMessage); sub_80421C0(anotherEntity, 0x1A4); } else if (move->id == MOVE_EARTHQUAKE) { @@ -178,7 +178,7 @@ void sub_8040DA0(Entity *entity, Move *move) direction--; direction &= DIRECTION_MASK; sub_806CDD4(entity, 0, direction); - sub_803E708(2, 0x15); + DungeonWaitFrames_Async(2, 0x15); } } } @@ -189,7 +189,7 @@ void sub_8040DA0(Entity *entity, Move *move) for (i = 0; i < NUM_DIRECTIONS + 1; i++) { direction &= DIRECTION_MASK; sub_806CDD4(entity, 0, direction); - sub_803E708(2, 0x15); + DungeonWaitFrames_Async(2, 0x15); direction++; } } @@ -323,7 +323,7 @@ void sub_8041168(Entity *entity, Entity *entity2, Move *move, DungeonPos *pos) var3 = sub_800EBC8(&sp); DungeonRunFrameActions(0x5B); sub_8042DD4(var3, entity2, 6); - while (1) { + while (TRUE) { if (!sub_800E9A8(var3)) break; DungeonRunFrameActions(0x28); diff --git a/src/code_8094F88.c b/src/code_8094F88.c index 9d54270b2..62f861f25 100644 --- a/src/code_8094F88.c +++ b/src/code_8094F88.c @@ -275,8 +275,8 @@ void sub_809542C(DungeonMailSeed *param_1) gUnknown_203B480->dungeonSeed = *param_1; MersenneTwister_InitializeState(Rand32Bit()); gUnknown_203B480->unk10.unk10 = Random32MersenneTwister(); - gUnknown_203B480->clientSpecies = GetPlayerPokemonStruct()->speciesNum; - PrintPokeNameToBuffer(buffer, GetPlayerPokemonStruct()); + gUnknown_203B480->clientSpecies = GetLeaderMon1()->speciesNum; + PrintPokeNameToBuffer(buffer, GetLeaderMon1()); CopyStringtoBuffer(gUnknown_203B480->playerName, buffer); gUnknown_203B480->unk24 = sub_8011C34(); gUnknown_203B480->rescuesAllowed = GetRescuesAllowed(gUnknown_203B480->dungeonSeed.location.id); diff --git a/src/code_80958E8.c b/src/code_80958E8.c index 4185a68b2..b291c62c9 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -574,7 +574,7 @@ bool8 sub_80961D8(void) if(!gUnknown_203B490->PKMNNewsReceived[0x35]) if(!sub_8096E80(0x35)) floor = 0x35; } - if(sub_80023E4(0xF)) + if(CheckQuest(QUEST_MAZE_15)) { if(!gUnknown_203B490->PKMNNewsReceived[0x34]) if(!sub_8096E80(0x34)) floor = 0x34; @@ -589,7 +589,7 @@ bool8 sub_80961D8(void) if(!gUnknown_203B490->PKMNNewsReceived[0x36]) if(!sub_8096E80(0x36)) floor = 0x36; } - if(sub_80023E4(6)) + if(CheckQuest(QUEST_REACHED_POSTGAME)) { if(!gUnknown_203B490->PKMNNewsReceived[0x37]) if(!sub_8096E80(0x37)) floor = 0x37; @@ -598,7 +598,7 @@ bool8 sub_80961D8(void) if(floor != 0x38) goto _slot; if(num > index) goto _08096392; floor = sub_8096E2C(); - if(!sub_80023E4(0xE) && (floor > 2)) goto _0809638E; + if(!CheckQuest(QUEST_MAZE_14) && (floor > 2)) goto _0809638E; if (floor > 0x31) goto _0809638E; _slot: slot = GetMailboxSlotInfo(num); @@ -653,7 +653,7 @@ bool8 sub_80963B4(void) floor = sub_8096E2C(); num = CountFilledMailboxSlots(); if(num >= NUM_MAILBOX_SLOTS) return FALSE; - if(sub_80023E4(0xE)) + if(CheckQuest(QUEST_MAZE_14)) { if(floor < 0x32) { diff --git a/src/code_8099360.c b/src/code_8099360.c index 7e5d53aed..e3abdfcc6 100644 --- a/src/code_8099360.c +++ b/src/code_8099360.c @@ -32,38 +32,40 @@ void sub_809965C(void) void sub_8099690(u32 param_1) { - OpenedFile *temp; - RGB *pal; - RGB *var2; + OpenedFile *file; + RGB_Struct *pal; + RGB_Struct *var2; u8 gender; s32 index; - temp = OpenFileAndGetFileDataPtr("fontpal", &gSystemFileArchive); + file = OpenFileAndGetFileDataPtr("fontpal", &gSystemFileArchive); - switch(param_1) - { - default: + switch (param_1) { + default: { gender = gGameOptionsRef->playerGender; - pal = &gFontPalette[0x10]; - if(gender != 0) + pal = &gFontPalette[0x10]; + if (gender != MALE) pal += 0x40; break; - case 1: + } + case 1: { pal = &gFontPalette[0x60]; break; - case 2: + } + case 2: { pal = &gFontPalette[0x70]; break; + } } sub_800388C(0xF0, (const RGB_Union *)pal, 0x10); var2 = pal; - for(index = 0; index < 0x10; index++) - { + for (index = 0; index < 0x10; index++) { nullsub_5(index + 0xF0, var2++); } - CloseFile(temp); + + CloseFile(file); } UNUSED static void sub_8099708(u16 a0, RGB_Array a1) diff --git a/src/code_80A26CC.c b/src/code_80A26CC.c index 828261598..73774a912 100644 --- a/src/code_80A26CC.c +++ b/src/code_80A26CC.c @@ -4,1088 +4,1004 @@ #include "code_80A26CC.h" #include "event_flag.h" #include "constants/dungeon.h" -#include "constants/script_dungeon_id.h" #include "constants/rescue_dungeon_id.h" -static const DungeonInfo gUnknown_81168A8[SCRIPT_DUNGEON_COUNT] = { +static const DungeonInfo sScriptDungeonData[SCRIPT_DUNGEON_COUNT] = { [SCRIPT_DUNGEON_TINY_WOODS] = { - .unk0 = 178, - .unk2 = 178, - .unk4 = 178, - .unk6 = -1, - .unk8 = -1, - .unkA = 359, - .dungeonIndex = DUNGEON_TINY_WOODS, - .unkD = 0, - .unkE = 0, + .mapID1 = MAP_TINY_WOODS_ENTRY, + .mapID2 = MAP_TINY_WOODS_ENTRY, + .mapID3 = MAP_TINY_WOODS_ENTRY, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E01A, + .dungeonID = DUNGEON_TINY_WOODS, + .rescueDungeonID = RESCUE_DUNGEON_TINY_WOODS, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_THUNDERWAVE_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 127, - .unk8 = 129, - .unkA = 360, - .dungeonIndex = DUNGEON_THUNDERWAVE_CAVE, - .unkD = 0, - .unkE = 1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E02A_L003, + .scriptID2 = EVENT_M01E02A_L005, + .scriptID3 = GETOUT_M01E02A, + .dungeonID = DUNGEON_THUNDERWAVE_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_THUNDERWAVE_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_STEEL] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 136, - .unk8 = 138, - .unkA = 361, - .dungeonIndex = DUNGEON_MT_STEEL, - .unkD = 0, - .unkE = 2, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E02B_L005, + .scriptID2 = EVENT_M01E02B_L007, + .scriptID3 = GETOUT_M01E02B, + .dungeonID = DUNGEON_MT_STEEL, + .rescueDungeonID = RESCUE_DUNGEON_MT_STEEL, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_3] = { - .unk0 = -1, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 361, - .dungeonIndex = DUNGEON_MT_STEEL, - .unkD = 0, - .unkE = 2, + .mapID1 = -1, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E02B, + .dungeonID = DUNGEON_MT_STEEL, + .rescueDungeonID = RESCUE_DUNGEON_MT_STEEL, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, [SCRIPT_DUNGEON_SINISTER_WOODS] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 148, - .unk8 = 150, - .unkA = 362, - .dungeonIndex = DUNGEON_SINISTER_WOODS, - .unkD = 0, - .unkE = 3, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E03A_L008, + .scriptID2 = EVENT_M01E03A_L010, + .scriptID3 = GETOUT_M01E03A, + .dungeonID = DUNGEON_SINISTER_WOODS, + .rescueDungeonID = RESCUE_DUNGEON_SINISTER_WOODS, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_5] = { - .unk0 = -1, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 362, - .dungeonIndex = DUNGEON_SINISTER_WOODS, - .unkD = 0, - .unkE = 3, + .mapID1 = -1, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E03A, + .dungeonID = DUNGEON_SINISTER_WOODS, + .rescueDungeonID = RESCUE_DUNGEON_SINISTER_WOODS, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, [SCRIPT_DUNGEON_SILENT_CHASM] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 155, - .unk8 = 157, - .unkA = 363, - .dungeonIndex = DUNGEON_SILENT_CHASM, - .unkD = 0, - .unkE = 4, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E04A_L003, + .scriptID2 = EVENT_M01E04A_L005, + .scriptID3 = GETOUT_M01E04A, + .dungeonID = DUNGEON_SILENT_CHASM, + .rescueDungeonID = RESCUE_DUNGEON_SILENT_CHASM, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_THUNDER] = { - .unk0 = 9, - .unk2 = 189, - .unk4 = 12, - .unk6 = 162, - .unk8 = 164, - .unkA = 364, - .dungeonIndex = DUNGEON_MT_THUNDER, - .unkD = 0, - .unkE = 5, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_MT_THUNDER_MID, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E04B_L003, + .scriptID2 = EVENT_M01E04B_L005, + .scriptID3 = GETOUT_M01E04B, + .dungeonID = DUNGEON_MT_THUNDER, + .rescueDungeonID = RESCUE_DUNGEON_MT_THUNDER, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_THUNDER_PEAK] = { - .unk0 = -1, - .unk2 = 12, - .unk4 = 189, - .unk6 = -1, - .unk8 = -1, - .unkA = 364, - .dungeonIndex = DUNGEON_MT_THUNDER_PEAK, - .unkD = 0, - .unkE = 5, + .mapID1 = -1, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_MT_THUNDER_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E04B, + .dungeonID = DUNGEON_MT_THUNDER_PEAK, + .rescueDungeonID = RESCUE_DUNGEON_MT_THUNDER, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GREAT_CANYON] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 170, - .unk8 = 172, - .unkA = 365, - .dungeonIndex = DUNGEON_GREAT_CANYON, - .unkD = 0, - .unkE = 6, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E05A_L003, + .scriptID2 = EVENT_M01E05A_L005, + .scriptID3 = GETOUT_M01E05A, + .dungeonID = DUNGEON_GREAT_CANYON, + .rescueDungeonID = RESCUE_DUNGEON_GREAT_CANYON, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_LAPIS_CAVE] = { - .unk0 = 193, - .unk2 = 194, - .unk4 = 193, - .unk6 = -1, - .unk8 = -1, - .unkA = 366, - .dungeonIndex = DUNGEON_LAPIS_CAVE, - .unkD = 0, - .unkE = 7, + .mapID1 = MAP_LAPIS_CAVE_ENTRY, + .mapID2 = MAP_LAPIS_CAVE_END, + .mapID3 = MAP_LAPIS_CAVE_ENTRY, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E07A, + .dungeonID = DUNGEON_LAPIS_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_LAPIS_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_BLAZE] = { - .unk0 = 195, - .unk2 = 196, - .unk4 = 195, - .unk6 = -1, - .unk8 = -1, - .unkA = 367, - .dungeonIndex = DUNGEON_MT_BLAZE, - .unkD = 0, - .unkE = 8, + .mapID1 = MAP_MT_BLAZE_ENTRY, + .mapID2 = MAP_MT_BLAZE_MID, + .mapID3 = MAP_MT_BLAZE_ENTRY, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E07B, + .dungeonID = DUNGEON_MT_BLAZE, + .rescueDungeonID = RESCUE_DUNGEON_MT_BLAZE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_BLAZE_PEAK] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 196, - .unk6 = -1, - .unk8 = -1, - .unkA = 367, - .dungeonIndex = DUNGEON_MT_BLAZE_PEAK, - .unkD = 0, - .unkE = 8, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_MT_BLAZE_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E07B, + .dungeonID = DUNGEON_MT_BLAZE_PEAK, + .rescueDungeonID = RESCUE_DUNGEON_MT_BLAZE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FROSTY_FOREST] = { - .unk0 = 198, - .unk2 = 199, - .unk4 = 198, - .unk6 = -1, - .unk8 = -1, - .unkA = 368, - .dungeonIndex = DUNGEON_FROSTY_FOREST, - .unkD = 0, - .unkE = 9, + .mapID1 = MAP_FROSTY_FOREST_ENTRY, + .mapID2 = MAP_FROSTY_FOREST_MID, + .mapID3 = MAP_FROSTY_FOREST_ENTRY, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E08A, + .dungeonID = DUNGEON_FROSTY_FOREST, + .rescueDungeonID = RESCUE_DUNGEON_FROSTY_FOREST, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FROSTY_GROTTO] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 199, - .unk6 = -1, - .unk8 = -1, - .unkA = 368, - .dungeonIndex = DUNGEON_FROSTY_GROTTO, - .unkD = 0, - .unkE = 9, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_FROSTY_FOREST_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E08A, + .dungeonID = DUNGEON_FROSTY_GROTTO, + .rescueDungeonID = RESCUE_DUNGEON_FROSTY_FOREST, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_FREEZE] = { - .unk0 = 201, - .unk2 = 202, - .unk4 = 201, - .unk6 = -1, - .unk8 = -1, - .unkA = 369, - .dungeonIndex = DUNGEON_MT_FREEZE, - .unkD = 0, - .unkE = 10, + .mapID1 = MAP_MT_FREEZE_ENTRY, + .mapID2 = MAP_MT_FREEZE_MID, + .mapID3 = MAP_MT_FREEZE_ENTRY, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E08B, + .dungeonID = DUNGEON_MT_FREEZE, + .rescueDungeonID = RESCUE_DUNGEON_MT_FREEZE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_FREEZE_PEAK] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 202, - .unk6 = -1, - .unk8 = -1, - .unkA = 369, - .dungeonIndex = DUNGEON_MT_FREEZE_PEAK, - .unkD = 0, - .unkE = 10, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_MT_FREEZE_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E08B, + .dungeonID = DUNGEON_MT_FREEZE_PEAK, + .rescueDungeonID = RESCUE_DUNGEON_MT_FREEZE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MAGMA_CAVERN] = { - .unk0 = 9, - .unk2 = 205, - .unk4 = 12, - .unk6 = 222, - .unk8 = 224, - .unkA = 370, - .dungeonIndex = DUNGEON_MAGMA_CAVERN, - .unkD = 0, - .unkE = 11, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_MAGMA_CAVERN_MID, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E09A_L011, + .scriptID2 = EVENT_M01E09A_L013, + .scriptID3 = GETOUT_M01E09A, + .dungeonID = DUNGEON_MAGMA_CAVERN, + .rescueDungeonID = RESCUE_DUNGEON_MAGMA_CAVERN, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MAGMA_CAVERN_PIT] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 205, - .unk6 = -1, - .unk8 = -1, - .unkA = 370, - .dungeonIndex = DUNGEON_MAGMA_CAVERN_PIT, - .unkD = 0, - .unkE = 11, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_MAGMA_CAVERN_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E09A, + .dungeonID = DUNGEON_MAGMA_CAVERN_PIT, + .rescueDungeonID = RESCUE_DUNGEON_MAGMA_CAVERN, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SKY_TOWER] = { - .unk0 = 9, - .unk2 = 208, - .unk4 = 12, - .unk6 = 230, - .unk8 = 232, - .unkA = 371, - .dungeonIndex = DUNGEON_SKY_TOWER, - .unkD = 0, - .unkE = 12, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_SKY_TOWER_MID, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_M01E10A_L004, + .scriptID2 = EVENT_M01E10A_L006, + .scriptID3 = GETOUT_M01E10A, + .dungeonID = DUNGEON_SKY_TOWER, + .rescueDungeonID = RESCUE_DUNGEON_SKY_TOWER, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SKY_TOWER_SUMMIT] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 208, - .unk6 = -1, - .unk8 = -1, - .unkA = 371, - .dungeonIndex = DUNGEON_SKY_TOWER_SUMMIT, - .unkD = 0, - .unkE = 12, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_SKY_TOWER_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E10A, + .dungeonID = DUNGEON_SKY_TOWER_SUMMIT, + .rescueDungeonID = RESCUE_DUNGEON_SKY_TOWER, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, - [SCRIPT_DUNGEON_21] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 372, - .dungeonIndex = DUNGEON_TINY_WOODS, - .unkD = 0, - .unkE = 13, + [SCRIPT_DUNGEON_DUMMY] = { + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S00E01A, + .dungeonID = DUNGEON_TINY_WOODS, + .rescueDungeonID = RESCUE_DUNGEON_DUMMY, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, [SCRIPT_DUNGEON_UPROAR_FOREST] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 373, - .dungeonIndex = DUNGEON_UPROAR_FOREST, - .unkD = 0, - .unkE = 14, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S01E01A, + .dungeonID = DUNGEON_UPROAR_FOREST, + .rescueDungeonID = RESCUE_DUNGEON_UPROAR_FOREST, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_HOWLING_FOREST] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 374, - .dungeonIndex = DUNGEON_HOWLING_FOREST, - .unkD = 0, - .unkE = 15, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S01E02A, + .dungeonID = DUNGEON_HOWLING_FOREST, + .rescueDungeonID = RESCUE_DUNGEON_HOWLING_FOREST, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_STORMY_SEA] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 375, - .dungeonIndex = DUNGEON_STORMY_SEA, - .unkD = 0, - .unkE = 16, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S02E01A, + .dungeonID = DUNGEON_STORMY_SEA, + .rescueDungeonID = RESCUE_DUNGEON_STORMY_SEA, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SILVER_TRENCH] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 376, - .dungeonIndex = DUNGEON_SILVER_TRENCH, - .unkD = 0, - .unkE = 17, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S02E02A, + .dungeonID = DUNGEON_SILVER_TRENCH, + .rescueDungeonID = RESCUE_DUNGEON_SILVER_TRENCH, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_METEOR_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 377, - .dungeonIndex = DUNGEON_METEOR_CAVE, - .unkD = 0, - .unkE = 18, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S03E01A, + .dungeonID = DUNGEON_METEOR_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_METEOR_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GREAT_CANYON_2] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 378, - .dungeonIndex = DUNGEON_GREAT_CANYON, - .unkD = 0, - .unkE = 19, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S04E01A, + .dungeonID = DUNGEON_GREAT_CANYON, + .rescueDungeonID = RESCUE_DUNGEON_GREAT_CANYON_2, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FIERY_FIELD] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 379, - .dungeonIndex = DUNGEON_FIERY_FIELD, - .unkD = 0, - .unkE = 20, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S04E01B, + .dungeonID = DUNGEON_FIERY_FIELD, + .rescueDungeonID = RESCUE_DUNGEON_FIERY_FIELD, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_LIGHTNING_FIELD] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 380, - .dungeonIndex = DUNGEON_LIGHTNING_FIELD, - .unkD = 0, - .unkE = 21, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S04E01C, + .dungeonID = DUNGEON_LIGHTNING_FIELD, + .rescueDungeonID = RESCUE_DUNGEON_LIGHTNING_FIELD, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_NORTHWIND_FIELD] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 381, - .dungeonIndex = DUNGEON_NORTHWIND_FIELD, - .unkD = 0, - .unkE = 22, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S04E01D, + .dungeonID = DUNGEON_NORTHWIND_FIELD, + .rescueDungeonID = RESCUE_DUNGEON_NORTHWIND_FIELD, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_FARAWAY] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 382, - .dungeonIndex = DUNGEON_MT_FARAWAY, - .unkD = 0, - .unkE = 23, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S04E01E, + .dungeonID = DUNGEON_MT_FARAWAY, + .rescueDungeonID = RESCUE_DUNGEON_MT_FARAWAY, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_WESTERN_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 383, - .dungeonIndex = DUNGEON_WESTERN_CAVE, - .unkD = 0, - .unkE = 24, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S05E01A, + .dungeonID = DUNGEON_WESTERN_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_WESTERN_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_NORTHERN_RANGE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 384, - .dungeonIndex = DUNGEON_NORTHERN_RANGE, - .unkD = 0, - .unkE = 25, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S06E01A, + .dungeonID = DUNGEON_NORTHERN_RANGE, + .rescueDungeonID = RESCUE_DUNGEON_NORTHERN_RANGE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_PITFALL_VALLEY] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 385, - .dungeonIndex = DUNGEON_PITFALL_VALLEY, - .unkD = 0, - .unkE = 26, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S06E01B, + .dungeonID = DUNGEON_PITFALL_VALLEY, + .rescueDungeonID = RESCUE_DUNGEON_PITFALL_VALLEY, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_BURIED_RELIC] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 386, - .dungeonIndex = DUNGEON_BURIED_RELIC, - .unkD = 0, - .unkE = 27, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S07E01A, + .dungeonID = DUNGEON_BURIED_RELIC, + .rescueDungeonID = RESCUE_DUNGEON_BURIED_RELIC, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_WISH_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 387, - .dungeonIndex = DUNGEON_WISH_CAVE, - .unkD = 0, - .unkE = 28, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S08E01A, + .dungeonID = DUNGEON_WISH_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_WISH_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_FREEZE_2] = { - .unk0 = 201, - .unk2 = 202, - .unk4 = 201, - .unk6 = 346, - .unk8 = 346, - .unkA = 388, - .dungeonIndex = DUNGEON_MT_FREEZE, - .unkD = 0, - .unkE = 29, + .mapID1 = MAP_MT_FREEZE_ENTRY, + .mapID2 = MAP_MT_FREEZE_MID, + .mapID3 = MAP_MT_FREEZE_ENTRY, + .scriptID1 = EVENT_S09E01A_L004B, + .scriptID2 = EVENT_S09E01A_L004B, + .scriptID3 = GETOUT_S09E01A, + .dungeonID = DUNGEON_MT_FREEZE, + .rescueDungeonID = RESCUE_DUNGEON_MT_FREEZE_2, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MT_FREEZE_PEAK_2] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = 202, - .unk6 = -1, - .unk8 = -1, - .unkA = 388, - .dungeonIndex = DUNGEON_MT_FREEZE_PEAK_2, - .unkD = 0, - .unkE = 29, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = MAP_MT_FREEZE_MID, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_S09E01A, + .dungeonID = DUNGEON_MT_FREEZE_PEAK_2, + .rescueDungeonID = RESCUE_DUNGEON_MT_FREEZE_2, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MURKY_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = 350, - .unk8 = 350, - .unkA = 389, - .dungeonIndex = DUNGEON_MURKY_CAVE, - .unkD = 0, - .unkE = 30, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = EVENT_S09E01B_L001B, + .scriptID2 = EVENT_S09E01B_L001B, + .scriptID3 = GETOUT_S09E01B, + .dungeonID = DUNGEON_MURKY_CAVE, + .rescueDungeonID = RESCUE_DUNGEON_MURKY_CAVE, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_DESERT_REGION] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_DESERT_REGION, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_DESERT_REGION, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SOUTHERN_CAVERN] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_SOUTHERN_CAVERN, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_SOUTHERN_CAVERN, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_WYVERN_HILL] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_WYVERN_HILL, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_WYVERN_HILL, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SOLAR_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_SOLAR_CAVE, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_SOLAR_CAVE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_DARKNIGHT_RELIC] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_DARKNIGHT_RELIC, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_DARKNIGHT_RELIC, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GRAND_SEA] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_GRAND_SEA, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_GRAND_SEA, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_WATERFALL_POND] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_WATERFALL_POND, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_WATERFALL_POND, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_UNOWN_RELIC] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_UNOWN_RELIC, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_UNOWN_RELIC, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_JOYOUS_TOWER] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_JOYOUS_TOWER, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_JOYOUS_TOWER, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FAR_OFF_SEA] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_FAR_OFF_SEA, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_FAR_OFF_SEA, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_PURITY_FOREST] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 390, - .dungeonIndex = DUNGEON_PURITY_FOREST, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_D62E01A, + .dungeonID = DUNGEON_PURITY_FOREST, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_ODDITY_CAVE] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 391, - .dungeonIndex = DUNGEON_ODDITY_CAVE, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_D43E01A, + .dungeonID = DUNGEON_ODDITY_CAVE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_REMAINS_ISLAND] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 392, - .dungeonIndex = DUNGEON_REMAINS_ISLAND, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_D44E01A, + .dungeonID = DUNGEON_REMAINS_ISLAND, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_MARVELOUS_SEA] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 393, - .dungeonIndex = DUNGEON_MARVELOUS_SEA, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_D45E01A, + .dungeonID = DUNGEON_MARVELOUS_SEA, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FANTASY_STRAIT] = { - .unk0 = 9, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 394, - .dungeonIndex = DUNGEON_FANTASY_STRAIT, - .unkD = 0, - .unkE = -1, + .mapID1 = MAP_TEAM_BASE, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_D46E01A, + .dungeonID = DUNGEON_FANTASY_STRAIT, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_NORMAL_MAZE_2] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_NORMAL_MAZE_2, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_NORMAL_MAZE_2, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FIRE_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_FIRE_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_FIRE_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_WATER_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_WATER_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_WATER_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GRASS_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_GRASS_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_GRASS_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_ELECTRIC_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_ELECTRIC_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_ELECTRIC_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_ICE_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_ICE_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_ICE_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FIGHTING_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_FIGHTING_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_FIGHTING_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GROUND_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_GROUND_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_GROUND_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_FLYING_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_FLYING_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_FLYING_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_PSYCHIC_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_PSYCHIC_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_PSYCHIC_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_POISON_MAZE_2] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_POISON_MAZE_2, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_POISON_MAZE_2, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_BUG_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_BUG_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_BUG_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_ROCK_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_ROCK_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_ROCK_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_GHOST_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_GHOST_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_GHOST_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_DRAGON_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_DRAGON_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_DRAGON_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_DARK_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_DARK_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_DARK_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_STEEL_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_STEEL_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_STEEL_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_TEAM_SHIFTY] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_TEAM_SHIFTY, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_TEAM_SHIFTY, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_TEAM_CONSTRICTOR] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_TEAM_CONSTRICTOR, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_TEAM_CONSTRICTOR, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_TEAM_HYDRO] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_TEAM_HYDRO, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_TEAM_HYDRO, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_TEAM_RUMBLEROCK] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_TEAM_RUMBLEROCK, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_TEAM_RUMBLEROCK, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_RESCUE_TEAM_2] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_RESCUE_TEAM_2, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_RESCUE_TEAM_2, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_RESCUE_TEAM_MAZE] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_RESCUE_TEAM_MAZE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_RESCUE_TEAM_MAZE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_ROCK_PATH] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 398, - .dungeonIndex = DUNGEON_ROCK_PATH, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E07T, + .dungeonID = DUNGEON_ROCK_PATH, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_SNOW_PATH] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 399, - .dungeonIndex = DUNGEON_SNOW_PATH, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_M01E08T, + .dungeonID = DUNGEON_SNOW_PATH, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 1, + .unk11 = TRUE, }, [SCRIPT_DUNGEON_80] = { - .unk0 = -1, - .unk2 = 5, - .unk4 = 5, - .unk6 = -1, - .unk8 = -1, - .unkA = 395, - .dungeonIndex = DUNGEON_OUT_ON_RESCUE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = MAP_PELIPPER_POST_OFFICE_INSIDE, + .mapID3 = MAP_PELIPPER_POST_OFFICE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_U00E01A, + .dungeonID = DUNGEON_OUT_ON_RESCUE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, [SCRIPT_DUNGEON_81] = { - .unk0 = -1, - .unk2 = 12, - .unk4 = 12, - .unk6 = -1, - .unk8 = -1, - .unkA = 396, - .dungeonIndex = DUNGEON_OUT_ON_RESCUE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = MAP_TEAM_BASE_INSIDE, + .mapID3 = MAP_TEAM_BASE_INSIDE, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_R00E01A, + .dungeonID = DUNGEON_OUT_ON_RESCUE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, [SCRIPT_DUNGEON_82] = { - .unk0 = -1, - .unk2 = -1, - .unk4 = -1, - .unk6 = -1, - .unk8 = -1, - .unkA = 397, - .dungeonIndex = DUNGEON_OUT_ON_RESCUE, - .unkD = 0, - .unkE = -1, + .mapID1 = -1, + .mapID2 = -1, + .mapID3 = -1, + .scriptID1 = -1, + .scriptID2 = -1, + .scriptID3 = GETOUT_T00E01A, + .dungeonID = DUNGEON_OUT_ON_RESCUE, + .rescueDungeonID = -1, .unk10 = 1, - .unk11 = 0, + .unk11 = FALSE, }, }; @@ -1112,7 +1028,7 @@ static const s16 sRescueToScriptDungeonIdTable[RESCUE_DUNGEON_COUNT] = { [RESCUE_DUNGEON_MT_FREEZE] = SCRIPT_DUNGEON_MT_FREEZE, [RESCUE_DUNGEON_MAGMA_CAVERN] = SCRIPT_DUNGEON_MAGMA_CAVERN, [RESCUE_DUNGEON_SKY_TOWER] = SCRIPT_DUNGEON_SKY_TOWER, - [RESCUE_DUNGEON_DUMMY] = SCRIPT_DUNGEON_21, + [RESCUE_DUNGEON_DUMMY] = SCRIPT_DUNGEON_DUMMY, [RESCUE_DUNGEON_UPROAR_FOREST] = SCRIPT_DUNGEON_UPROAR_FOREST, [RESCUE_DUNGEON_HOWLING_FOREST] = SCRIPT_DUNGEON_HOWLING_FOREST, [RESCUE_DUNGEON_STORMY_SEA] = SCRIPT_DUNGEON_STORMY_SEA, @@ -1147,15 +1063,15 @@ static const s16 sRescueToScriptDungeonIdTable[RESCUE_DUNGEON_COUNT] = { [RESCUE_DUNGEON_FANTASY_STRAIT] = SCRIPT_DUNGEON_FANTASY_STRAIT, }; -const DungeonInfo *GetDungeonInfo_80A2608(s32 _index) +const DungeonInfo *GetScriptDungeonInfo(s32 scriptDungeon_) { - s32 index = (s16) _index; - return &gUnknown_81168A8[index]; + s32 scriptDungeon = (s16)scriptDungeon_; + return &sScriptDungeonData[scriptDungeon]; } static const DungeonInfo *GetRescueDungeonInfo(s16 rescueDungeonId) { - return &gUnknown_81168A8[RescueDungeonToScriptDungeonId(rescueDungeonId)]; + return &sScriptDungeonData[RescueDungeonToScriptDungeonId(rescueDungeonId)]; } UNUSED static s16 sub_80A2644(u32 index) @@ -1163,12 +1079,10 @@ UNUSED static s16 sub_80A2644(u32 index) return gUnknown_8116F24[index]; } -s16 sub_80A2654(s16 index) +s16 ScriptDungeonIDToRescueDungeonID(s16 scriptDungeonID) { - const DungeonInfo *temp; - - temp = GetDungeonInfo_80A2608(index); - return temp->unkE; + const DungeonInfo *info = GetScriptDungeonInfo(scriptDungeonID); + return info->rescueDungeonID; } s16 sub_80A2668(s16 a0) @@ -1201,7 +1115,7 @@ s16 sub_80A26CC(s16 r0) return 55 + r0; } -UNUSED static s16 sub_80A26D8(u8 index) +UNUSED static s16 sub_80A26D8(u8 dungeonID) { s32 i; s16 counter2; @@ -1209,10 +1123,10 @@ UNUSED static s16 sub_80A26D8(u8 index) for (i = 0; i < 83; i++) { counter2 = i; - temp = GetDungeonInfo_80A2608(counter2); + temp = GetScriptDungeonInfo(counter2); - if (temp->unk11 != 0) { - if (temp->dungeonIndex == index) + if (temp->unk11) { + if (temp->dungeonID == dungeonID) return counter2; } } @@ -1222,56 +1136,56 @@ UNUSED static s16 sub_80A26D8(u8 index) u8 RescueDungeonToDungeonId(s16 _rescueDungeonId) { s32 rescueDungeonId = _rescueDungeonId; // forcing a shift before addressing - const DungeonInfo *info = GetDungeonInfo_80A2608(sRescueToScriptDungeonIdTable[rescueDungeonId]); + const DungeonInfo *info = GetScriptDungeonInfo(sRescueToScriptDungeonIdTable[rescueDungeonId]); - return info->dungeonIndex; + return info->dungeonID; } u8 sub_80A2728(s16 index) { const DungeonInfo *temp; - s16 temp_number = 55 + index; - temp = GetDungeonInfo_80A2608(temp_number); - return temp->dungeonIndex; + s16 temp_number = SCRIPT_DUNGEON_NORMAL_MAZE_2 + index; + temp = GetScriptDungeonInfo(temp_number); + return temp->dungeonID; } u8 ScriptDungeonIdToDungeonId(s16 scriptDungeonId_) { s32 scriptDungeonId = scriptDungeonId_; - const DungeonInfo *data = GetDungeonInfo_80A2608(scriptDungeonId); - return data->dungeonIndex; + const DungeonInfo *data = GetScriptDungeonInfo(scriptDungeonId); + return data->dungeonID; } -s16 sub_80A2750(s16 r0) +s16 sub_80A2750(s16 scriptDungeon) { const DungeonInfo *temp; s32 temp_32; s32 temp_2; // so dumb but it matches - temp_32 = r0; + temp_32 = scriptDungeon; temp_2 = temp_32; - if (r0 == 80) + if (scriptDungeon == SCRIPT_DUNGEON_80) return 3; - if (r0 == 81) + if (scriptDungeon == SCRIPT_DUNGEON_81) return 2; - if (r0 == 82) + if (scriptDungeon == SCRIPT_DUNGEON_82) return 4; - if ((u16)(r0 - 40) <= 14) + if (scriptDungeon >= SCRIPT_DUNGEON_DESERT_REGION && scriptDungeon <= SCRIPT_DUNGEON_FANTASY_STRAIT) return 2; - if ((u16)(r0 - 55) <= 24) + if (scriptDungeon >= SCRIPT_DUNGEON_NORMAL_MAZE_2 && scriptDungeon <= SCRIPT_DUNGEON_SNOW_PATH) return 4; - temp = GetDungeonInfo_80A2608(temp_2); - if (temp->unkE == -1) + temp = GetScriptDungeonInfo(temp_2); + if (temp->rescueDungeonID == -1) return 1; - if (sub_80023E4(5)) + if (CheckQuest(QUEST_UNK5)) return 1; - if (!RescueScenarioConquered((s16) temp->unkE)) + if (!RescueScenarioConquered((s16)temp->rescueDungeonID)) return 1; - if (!sub_80023E4(1)) + if (!CheckQuest(QUEST_UNK1)) return 1; return 2; } @@ -1282,33 +1196,33 @@ bool8 IsRescueDungeonAvailable(s16 _rescueDungeonId) s32 _rescueDungeonIdMatch = _rescueDungeonId; s32 rescueDungeonId = _rescueDungeonIdMatch; - if (GetRescueDungeonInfo(_rescueDungeonId)->unk0 == -1) + if (GetRescueDungeonInfo(_rescueDungeonId)->mapID1 == -1) return FALSE; - if (sub_80023E4(5)) + if (CheckQuest(QUEST_UNK5)) return FALSE; if (sub_8097384(_rescueDungeonId)) return TRUE; - if (!sub_80023E4(1)) + if (!CheckQuest(QUEST_UNK1)) return FALSE; if (!RescueScenarioConquered((s16) rescueDungeonId)) return FALSE; return TRUE; } -bool8 sub_80A2824(u8 index) +bool8 sub_80A2824(u8 dungeonID) { s32 i; const DungeonInfo *temp; - if (sub_80023E4(5)) + if (CheckQuest(QUEST_UNK5)) return FALSE; - if (sub_80023E4(1)) { + if (CheckQuest(QUEST_UNK1)) { for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { temp = GetRescueDungeonInfo(i); - if (temp->unk11 != 0) { - if (temp->dungeonIndex == index) { + if (temp->unk11) { + if (temp->dungeonID == dungeonID) { if (sub_8097384((s16) i)) return TRUE; if (RescueScenarioConquered((s16) i)) @@ -1321,8 +1235,8 @@ bool8 sub_80A2824(u8 index) for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { temp = GetRescueDungeonInfo(i); - if (temp->unk11 != 0) - if (temp->dungeonIndex == index) + if (temp->unk11) + if (temp->dungeonID == dungeonID) if (sub_8097384((s16) i)) return TRUE; } @@ -1331,14 +1245,14 @@ bool8 sub_80A2824(u8 index) return FALSE; } -UNUSED static bool8 sub_80A28B4(s16 r0) +UNUSED static bool8 sub_80A28B4(s16 rescueDungeon) { const DungeonInfo *temp; - temp = GetRescueDungeonInfo(r0); + temp = GetRescueDungeonInfo(rescueDungeon); - if (temp->unk0 != -1) { - if (!sub_8097384(r0) && !RescueScenarioConquered(r0)) + if (temp->mapID1 != -1) { + if (!sub_8097384(rescueDungeon) && !RescueScenarioConquered(rescueDungeon)) return FALSE; else return TRUE; @@ -1347,21 +1261,18 @@ UNUSED static bool8 sub_80A28B4(s16 r0) return FALSE; } -bool8 sub_80A28F0(u8 index) +bool8 sub_80A28F0(u8 dungeonID) { - s32 counter; - const DungeonInfo *temp; + s32 i; - for (counter = 0; counter < 0x2E; counter++) { - temp = GetRescueDungeonInfo(counter); + for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { + const DungeonInfo *info = GetRescueDungeonInfo(i); - if (temp->unk11 != 0) { - if (temp->dungeonIndex == index) { - if (sub_8097384((s16) counter)) - return TRUE; - if (RescueScenarioConquered((s16) counter)) - return TRUE; - } + if (info->unk11 && info->dungeonID == dungeonID) { + if (sub_8097384((s16)i)) + return TRUE; + if (RescueScenarioConquered((s16)i)) + return TRUE; } } @@ -1371,10 +1282,9 @@ bool8 sub_80A28F0(u8 index) UNUSED static s32 sub_80A293C(u8 *param_1) { u8 *pcVar2; - const DungeonInfo *iVar3; - s32 index; + s32 i; s32 counter; - u8 local_68[64]; + bool8 local_68[64]; u8 zero; counter = 0; @@ -1387,15 +1297,15 @@ UNUSED static s32 sub_80A293C(u8 *param_1) } while ((int)pcVar2 >= (int)local_68); - for (index = 0; index < RESCUE_DUNGEON_COUNT; index++) { - iVar3 = GetRescueDungeonInfo(index); - if (iVar3->unk11 != 0 && sub_8097384((s16) index)) - local_68[iVar3->dungeonIndex] = 1; + for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { + const DungeonInfo *info = GetRescueDungeonInfo(i); + if (info->unk11 && sub_8097384((s16)i)) + local_68[info->dungeonID] = TRUE; } - for (index = 0; index < 63; index++) { - if (local_68[index] != 0) { - param_1[counter] = index; + for (i = 0; i < 63; i++) { + if (local_68[i]) { + param_1[counter] = i; counter++; } } @@ -1405,7 +1315,7 @@ UNUSED static s32 sub_80A293C(u8 *param_1) s32 sub_80A29B0(u8 *param_1) { - u8 *pcVar2; + bool8 *pcVar2; const DungeonInfo *iVar3; s32 index; s32 counter; @@ -1413,29 +1323,29 @@ s32 sub_80A29B0(u8 *param_1) u8 *local2; u8 *local3; u8 *local4; - u8 local_68[0x40]; - u8 zero; + bool8 local_68[64]; + bool8 zero; counter = 0; local1 = &local_68[43]; local2 = &local_68[44]; local3 = &local_68[45]; local4 = &local_68[46]; - zero = 0; + zero = FALSE; pcVar2 = &local_68[62]; do { *pcVar2 = zero; - pcVar2 = pcVar2 + -1; + pcVar2--; } while ((int)pcVar2 >= (int)local_68); - if (sub_80023E4(1)) { + if (CheckQuest(QUEST_UNK1)) { for (index = 0; index < RESCUE_DUNGEON_COUNT; index++) { iVar3 = GetRescueDungeonInfo(index); - if (iVar3->unk11 != 0 && RescueScenarioConquered((s16) index)) - local_68[iVar3->dungeonIndex] = 1; + if (iVar3->unk11 && RescueScenarioConquered((s16) index)) + local_68[iVar3->dungeonID] = TRUE; } } @@ -1445,7 +1355,7 @@ s32 sub_80A29B0(u8 *param_1) *local4 = 0; for (index = 0; index < 63; index++) { - if (local_68[index] != 0) { + if (local_68[index]) { param_1[counter] = index; counter++; } @@ -1458,12 +1368,12 @@ UNUSED static s32 sub_80A2A5C(u8 *param_1) { u8 *pcVar2; const DungeonInfo *iVar3; - s32 index; - s32 counter; - u8 local_58[0x40]; + s32 i; + s32 count; + bool8 local_58[64]; u8 zero; - counter = 0; + count = 0; zero = 0; pcVar2 = &local_58[62]; @@ -1472,29 +1382,29 @@ UNUSED static s32 sub_80A2A5C(u8 *param_1) pcVar2--; } while ((s32)pcVar2 >= (s32)local_58); - if (sub_80023E4(1)) { - for (index = 0; index < RESCUE_DUNGEON_COUNT; index++) { - iVar3 = GetRescueDungeonInfo(index); + if (CheckQuest(QUEST_UNK1)) { + for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { + iVar3 = GetRescueDungeonInfo(i); - if (iVar3->unk11 != 0 && (sub_8097384((s16) index) || RescueScenarioConquered((s16) index))) - local_58[iVar3->dungeonIndex] = 1; + if (iVar3->unk11 && (sub_8097384((s16)i) || RescueScenarioConquered((s16)i))) + local_58[iVar3->dungeonID] = TRUE; } } else { - for (index = 0; index < RESCUE_DUNGEON_COUNT; index++) { - iVar3 = GetRescueDungeonInfo(index); + for (i = 0; i < RESCUE_DUNGEON_COUNT; i++) { + iVar3 = GetRescueDungeonInfo(i); - if (iVar3->unk11 != 0 && sub_8097384((s16) index)) - local_58[iVar3->dungeonIndex] = 1; + if (iVar3->unk11 && sub_8097384((s16)i)) + local_58[iVar3->dungeonID] = TRUE; } } - for (index = 0; index < 63; index++) { - if (local_58[index] != 0) { - param_1[counter] = index; - counter++; + for (i = 0; i < 63; i++) { + if (local_58[i]) { + param_1[count] = i; + count++; } } - return counter; + return count; } diff --git a/src/credits1.c b/src/credits1.c index 12b8fdf90..7f3d524e5 100644 --- a/src/credits1.c +++ b/src/credits1.c @@ -12,12 +12,12 @@ EWRAM_INIT static Credits1Work *sCredits1Work = {NULL}; static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY; static const WindowTemplate gUnknown_80E4A28 = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_ONLY_TEXT, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 26, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = NULL, }; diff --git a/src/data/effects/efbg000.c b/src/data/effects/efbg000.c index 38856615a..2208a47da 100644 --- a/src/data/effects/efbg000.c +++ b/src/data/effects/efbg000.c @@ -85,7 +85,7 @@ const u16 *const gUnknown_9747A00[] = { gUnknown_9746BEC, gUnknown_97472F6, }; -const RGB gUnknown_9747A40[] = INCBIN_U8("data/effects/efbg000.pmdpal"); +const RGB_Struct gUnknown_9747A40[] = INCBIN_U8("data/effects/efbg000.pmdpal"); const u32 gUnknown_9747E40[] = INCBIN_U32("data/effects/efbg000.4bpp"); const struct EfbFileData gUnknown_974BE40 = { ARRAY_COUNT(gUnknown_9747A00), // 16 diff --git a/src/data/effects/efbg001.c b/src/data/effects/efbg001.c index 26b75fa48..3c34869ce 100644 --- a/src/data/effects/efbg001.c +++ b/src/data/effects/efbg001.c @@ -85,7 +85,7 @@ const u16 *const gUnknown_9752F04[] = { gUnknown_97520F0, gUnknown_97527FA, }; -const RGB gUnknown_9752F44[] = INCBIN_U8("data/effects/efbg001.pmdpal"); +const RGB_Struct gUnknown_9752F44[] = INCBIN_U8("data/effects/efbg001.pmdpal"); const u32 gUnknown_9753344[] = INCBIN_U32("data/effects/efbg001.4bpp"); const struct EfbFileData gUnknown_97547C4 = { ARRAY_COUNT(gUnknown_9752F04), // 16 diff --git a/src/data/effects/efbg002.c b/src/data/effects/efbg002.c index 98848ab4d..eb4d6c41a 100644 --- a/src/data/effects/efbg002.c +++ b/src/data/effects/efbg002.c @@ -350,7 +350,7 @@ const u16 *const gUnknown_9755E2C[] = { gUnknown_9755DE0, gUnknown_9755E06, }; -const RGB gUnknown_9755F40[] = INCBIN_U8("data/effects/efbg002.pmdpal"); +const RGB_Struct gUnknown_9755F40[] = INCBIN_U8("data/effects/efbg002.pmdpal"); const u32 gUnknown_9756340[] = INCBIN_U32("data/effects/efbg002.4bpp"); const struct EfbFileData gUnknown_9756660 = { ARRAY_COUNT(gUnknown_9755E2C), // 69 diff --git a/src/data/effects/efbg003.c b/src/data/effects/efbg003.c index 1a9a709b7..d06cf574e 100644 --- a/src/data/effects/efbg003.c +++ b/src/data/effects/efbg003.c @@ -165,7 +165,7 @@ const u16 *const gUnknown_97647C4[] = { gUnknown_97639B0, gUnknown_97640BA, }; -const RGB gUnknown_9764844[] = INCBIN_U8("data/effects/efbg003.pmdpal"); +const RGB_Struct gUnknown_9764844[] = INCBIN_U8("data/effects/efbg003.pmdpal"); const u32 gUnknown_9764C44[] = INCBIN_U32("data/effects/efbg003.4bpp"); const struct EfbFileData gUnknown_9766A64 = { ARRAY_COUNT(gUnknown_97647C4), // 32 diff --git a/src/data/effects/efbg004.c b/src/data/effects/efbg004.c index 9a4411a59..286785ca8 100644 --- a/src/data/effects/efbg004.c +++ b/src/data/effects/efbg004.c @@ -320,7 +320,7 @@ const u16 *const gUnknown_97688F8[] = { gUnknown_97688CC, gUnknown_97688E2, }; -const RGB gUnknown_97689F4[] = INCBIN_U8("data/effects/efbg004.pmdpal"); +const RGB_Struct gUnknown_97689F4[] = INCBIN_U8("data/effects/efbg004.pmdpal"); const u32 gUnknown_9768DF4[] = INCBIN_U32("data/effects/efbg004.4bpp"); const struct EfbFileData gUnknown_9769074 = { ARRAY_COUNT(gUnknown_97688F8), // 63 diff --git a/src/data/effects/efbg005.c b/src/data/effects/efbg005.c index 487f8ed47..92ebc9715 100644 --- a/src/data/effects/efbg005.c +++ b/src/data/effects/efbg005.c @@ -115,7 +115,7 @@ const u16 *const gUnknown_9772B74[] = { gUnknown_9771D60, gUnknown_977246A, }; -const RGB gUnknown_9772BCC[] = INCBIN_U8("data/effects/efbg005.pmdpal"); +const RGB_Struct gUnknown_9772BCC[] = INCBIN_U8("data/effects/efbg005.pmdpal"); const u32 gUnknown_9772FCC[] = INCBIN_U32("data/effects/efbg005.4bpp"); const struct EfbFileData gUnknown_9773AEC = { ARRAY_COUNT(gUnknown_9772B74), // 22 diff --git a/src/data/effects/efbg006.c b/src/data/effects/efbg006.c index 014ccfa32..ff3c39ab3 100644 --- a/src/data/effects/efbg006.c +++ b/src/data/effects/efbg006.c @@ -165,7 +165,7 @@ const u16 *const gUnknown_9781C50[] = { gUnknown_9780E3C, gUnknown_9781546, }; -const RGB gUnknown_9781CD0[] = INCBIN_U8("data/effects/efbg006.pmdpal"); +const RGB_Struct gUnknown_9781CD0[] = INCBIN_U8("data/effects/efbg006.pmdpal"); const u32 gUnknown_97820D0[] = INCBIN_U32("data/effects/efbg006.4bpp"); const struct EfbFileData gUnknown_9783EF0 = { ARRAY_COUNT(gUnknown_9781C50), // 32 diff --git a/src/data/effects/efbg007.c b/src/data/effects/efbg007.c index 402fab97f..e8198b1f1 100644 --- a/src/data/effects/efbg007.c +++ b/src/data/effects/efbg007.c @@ -165,7 +165,7 @@ const u16 *const gUnknown_978BC8C[] = { gUnknown_978B2F4, gUnknown_978B830, }; -const RGB gUnknown_978BD0C[] = INCBIN_U8("data/effects/efbg007.pmdpal"); +const RGB_Struct gUnknown_978BD0C[] = INCBIN_U8("data/effects/efbg007.pmdpal"); const u32 gUnknown_978C10C[] = INCBIN_U32("data/effects/efbg007.4bpp"); const struct EfbFileData gUnknown_978C7AC = { ARRAY_COUNT(gUnknown_978BC8C), // 32 diff --git a/src/data/effects/efob000.c b/src/data/effects/efob000.c index 571131b8d..21cbf4823 100644 --- a/src/data/effects/efob000.c +++ b/src/data/effects/efob000.c @@ -6193,7 +6193,7 @@ const ax_anim gUnknown_9798AD8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9798B44[] = INCBIN_U32("data/effects/efob000.4bpp"); -const RGB gUnknown_979A6A4[] = INCBIN_U8("data/effects/efob000.pmdpal"); +const RGB_Struct gUnknown_979A6A4[] = INCBIN_U8("data/effects/efob000.pmdpal"); const ax_pose *const gUnknown_979A6E4[] = { gUnknown_978C7D0, gUnknown_978C802, diff --git a/src/data/effects/efob001.c b/src/data/effects/efob001.c index 0185f6fa2..070ff3e7f 100644 --- a/src/data/effects/efob001.c +++ b/src/data/effects/efob001.c @@ -332,7 +332,7 @@ const ax_anim gUnknown_979C054[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_979C084[] = INCBIN_U32("data/effects/efob001.4bpp"); -const RGB gUnknown_979DA44[] = INCBIN_U8("data/effects/efob001.pmdpal"); +const RGB_Struct gUnknown_979DA44[] = INCBIN_U8("data/effects/efob001.pmdpal"); const ax_pose *const gUnknown_979DA84[] = { gUnknown_979B740, gUnknown_979B754, diff --git a/src/data/effects/efob002.c b/src/data/effects/efob002.c index 94c2403de..6c4565701 100644 --- a/src/data/effects/efob002.c +++ b/src/data/effects/efob002.c @@ -76,7 +76,7 @@ const ax_anim gUnknown_979DEA4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_979DF1C[] = INCBIN_U32("data/effects/efob002.4bpp"); -const RGB gUnknown_979EC1C[] = INCBIN_U8("data/effects/efob002.pmdpal"); +const RGB_Struct gUnknown_979EC1C[] = INCBIN_U8("data/effects/efob002.pmdpal"); const ax_pose *const gUnknown_979EC5C[] = { gUnknown_979DD04, gUnknown_979DD22, diff --git a/src/data/effects/efob003.c b/src/data/effects/efob003.c index 5c4f76435..a94a83ff0 100644 --- a/src/data/effects/efob003.c +++ b/src/data/effects/efob003.c @@ -494,7 +494,7 @@ const ax_anim gUnknown_979FD9C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_979FF7C[] = INCBIN_U32("data/effects/efob003.4bpp"); -const RGB gUnknown_97A0D3C[] = INCBIN_U8("data/effects/efob003.pmdpal"); +const RGB_Struct gUnknown_97A0D3C[] = INCBIN_U8("data/effects/efob003.pmdpal"); const ax_pose *const gUnknown_97A0D7C[] = { gUnknown_979ECD4, gUnknown_979ECE8, diff --git a/src/data/effects/efob004.c b/src/data/effects/efob004.c index 139075dbb..004d9d298 100644 --- a/src/data/effects/efob004.c +++ b/src/data/effects/efob004.c @@ -304,7 +304,7 @@ const ax_anim gUnknown_97A16FC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97A18C4[] = INCBIN_U32("data/effects/efob004.4bpp"); -const RGB gUnknown_97A1FC4[] = INCBIN_U8("data/effects/efob004.pmdpal"); +const RGB_Struct gUnknown_97A1FC4[] = INCBIN_U8("data/effects/efob004.pmdpal"); const ax_pose *const gUnknown_97A2004[] = { gUnknown_97A0F44, gUnknown_97A0F58, diff --git a/src/data/effects/efob005.c b/src/data/effects/efob005.c index 8f305c174..ef3ffd2a5 100644 --- a/src/data/effects/efob005.c +++ b/src/data/effects/efob005.c @@ -292,7 +292,7 @@ const ax_anim gUnknown_97A2810[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97A287C[] = INCBIN_U32("data/effects/efob005.4bpp"); -const RGB gUnknown_97A37FC[] = INCBIN_U8("data/effects/efob005.pmdpal"); +const RGB_Struct gUnknown_97A37FC[] = INCBIN_U8("data/effects/efob005.pmdpal"); const ax_pose *const gUnknown_97A383C[] = { gUnknown_97A20D4, gUnknown_97A20F2, diff --git a/src/data/effects/efob006.c b/src/data/effects/efob006.c index 87aff2938..2350ff443 100644 --- a/src/data/effects/efob006.c +++ b/src/data/effects/efob006.c @@ -202,7 +202,7 @@ const ax_anim gUnknown_97A3F64[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97A4018[] = INCBIN_U32("data/effects/efob006.4bpp"); -const RGB gUnknown_97A4EB8[] = INCBIN_U8("data/effects/efob006.pmdpal"); +const RGB_Struct gUnknown_97A4EB8[] = INCBIN_U8("data/effects/efob006.pmdpal"); const ax_pose *const gUnknown_97A4EF8[] = { gUnknown_97A3998, gUnknown_97A39D4, diff --git a/src/data/effects/efob007.c b/src/data/effects/efob007.c index cda85538e..0e29f8cba 100644 --- a/src/data/effects/efob007.c +++ b/src/data/effects/efob007.c @@ -1363,7 +1363,7 @@ const ax_anim gUnknown_97A7910[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97A79DC[] = INCBIN_U32("data/effects/efob007.4bpp"); -const RGB gUnknown_97A883C[] = INCBIN_U8("data/effects/efob007.pmdpal"); +const RGB_Struct gUnknown_97A883C[] = INCBIN_U8("data/effects/efob007.pmdpal"); const ax_pose *const gUnknown_97A887C[] = { gUnknown_97A4FBC, gUnknown_97A4FD0, diff --git a/src/data/effects/efob008.c b/src/data/effects/efob008.c index 25d5c1e08..22b65721f 100644 --- a/src/data/effects/efob008.c +++ b/src/data/effects/efob008.c @@ -125,7 +125,7 @@ const ax_anim gUnknown_97A8F8C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97A9010[] = INCBIN_U32("data/effects/efob008.4bpp"); -const RGB gUnknown_97A9FB0[] = INCBIN_U8("data/effects/efob008.pmdpal"); +const RGB_Struct gUnknown_97A9FB0[] = INCBIN_U8("data/effects/efob008.pmdpal"); const ax_pose *const gUnknown_97A9FF0[] = { gUnknown_97A8C48, gUnknown_97A8C5C, diff --git a/src/data/effects/efob009.c b/src/data/effects/efob009.c index e1a2c6232..28dfa01fa 100644 --- a/src/data/effects/efob009.c +++ b/src/data/effects/efob009.c @@ -195,7 +195,7 @@ const ax_anim gUnknown_97AA620[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97AA704[] = INCBIN_U32("data/effects/efob009.4bpp"); -const RGB gUnknown_97AAAE4[] = INCBIN_U8("data/effects/efob009.pmdpal"); +const RGB_Struct gUnknown_97AAAE4[] = INCBIN_U8("data/effects/efob009.pmdpal"); const ax_pose *const gUnknown_97AAB24[] = { gUnknown_97AA0C0, gUnknown_97AA11A, diff --git a/src/data/effects/efob010.c b/src/data/effects/efob010.c index 778ba9f73..8be33a5c0 100644 --- a/src/data/effects/efob010.c +++ b/src/data/effects/efob010.c @@ -1494,7 +1494,7 @@ const ax_anim gUnknown_97ADF98[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97AE058[] = INCBIN_U32("data/effects/efob010.4bpp"); -const RGB gUnknown_97AF018[] = INCBIN_U8("data/effects/efob010.pmdpal"); +const RGB_Struct gUnknown_97AF018[] = INCBIN_U8("data/effects/efob010.pmdpal"); const ax_pose *const gUnknown_97AF058[] = { gUnknown_97AABB8, gUnknown_97AABCC, diff --git a/src/data/effects/efob011.c b/src/data/effects/efob011.c index d6115a84b..48e2f7b66 100644 --- a/src/data/effects/efob011.c +++ b/src/data/effects/efob011.c @@ -86,7 +86,7 @@ const ax_anim gUnknown_97AF3E0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97AF434[] = INCBIN_U32("data/effects/efob011.4bpp"); -const RGB gUnknown_97AFD74[] = INCBIN_U8("data/effects/efob011.pmdpal"); +const RGB_Struct gUnknown_97AFD74[] = INCBIN_U8("data/effects/efob011.pmdpal"); const ax_pose *const gUnknown_97AFDB4[] = { gUnknown_97AF224, gUnknown_97AF238, diff --git a/src/data/effects/efob012.c b/src/data/effects/efob012.c index 798804c03..7e8d13773 100644 --- a/src/data/effects/efob012.c +++ b/src/data/effects/efob012.c @@ -72,7 +72,7 @@ const ax_anim gUnknown_97AFFA0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B0030[] = INCBIN_U32("data/effects/efob012.4bpp"); -const RGB gUnknown_97B0850[] = INCBIN_U8("data/effects/efob012.pmdpal"); +const RGB_Struct gUnknown_97B0850[] = INCBIN_U8("data/effects/efob012.pmdpal"); const ax_pose *const gUnknown_97B0890[] = { gUnknown_97AFE64, gUnknown_97AFE78, diff --git a/src/data/effects/efob013.c b/src/data/effects/efob013.c index 115627809..c03d22ae3 100644 --- a/src/data/effects/efob013.c +++ b/src/data/effects/efob013.c @@ -1833,7 +1833,7 @@ const ax_anim gUnknown_97B41D8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B41FC[] = INCBIN_U32("data/effects/efob013.4bpp"); -const RGB gUnknown_97B4BDC[] = INCBIN_U8("data/effects/efob013.pmdpal"); +const RGB_Struct gUnknown_97B4BDC[] = INCBIN_U8("data/effects/efob013.pmdpal"); const ax_pose *const gUnknown_97B4C1C[] = { gUnknown_97B0910, gUnknown_97B0956, diff --git a/src/data/effects/efob014.c b/src/data/effects/efob014.c index 33fcf2b2e..f5a089fb4 100644 --- a/src/data/effects/efob014.c +++ b/src/data/effects/efob014.c @@ -87,7 +87,7 @@ const ax_anim gUnknown_97B5790[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B5910[] = INCBIN_U32("data/effects/efob014.4bpp"); -const RGB gUnknown_97B6870[] = INCBIN_U8("data/effects/efob014.pmdpal"); +const RGB_Struct gUnknown_97B6870[] = INCBIN_U8("data/effects/efob014.pmdpal"); const ax_pose *const gUnknown_97B68B0[] = { gUnknown_97B569C, gUnknown_97B56B0, diff --git a/src/data/effects/efob015.c b/src/data/effects/efob015.c index 5a358ed8d..c43744769 100644 --- a/src/data/effects/efob015.c +++ b/src/data/effects/efob015.c @@ -61,7 +61,7 @@ const ax_anim gUnknown_97B6A70[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B6AC4[] = INCBIN_U32("data/effects/efob015.4bpp"); -const RGB gUnknown_97B6E64[] = INCBIN_U8("data/effects/efob015.pmdpal"); +const RGB_Struct gUnknown_97B6E64[] = INCBIN_U8("data/effects/efob015.pmdpal"); const ax_pose *const gUnknown_97B6EA4[] = { gUnknown_97B6934, gUnknown_97B6948, diff --git a/src/data/effects/efob016.c b/src/data/effects/efob016.c index 3eeba25cf..81dfb54ac 100644 --- a/src/data/effects/efob016.c +++ b/src/data/effects/efob016.c @@ -341,7 +341,7 @@ const ax_anim gUnknown_97B79A4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B7BB4[] = INCBIN_U32("data/effects/efob016.4bpp"); -const RGB gUnknown_97B8AB4[] = INCBIN_U8("data/effects/efob016.pmdpal"); +const RGB_Struct gUnknown_97B8AB4[] = INCBIN_U8("data/effects/efob016.pmdpal"); const ax_pose *const gUnknown_97B8AF4[] = { gUnknown_97B6F3C, gUnknown_97B7086, diff --git a/src/data/effects/efob017.c b/src/data/effects/efob017.c index 107efff4d..0c2b772ea 100644 --- a/src/data/effects/efob017.c +++ b/src/data/effects/efob017.c @@ -61,7 +61,7 @@ const ax_anim gUnknown_97B8BC4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B8DC8[] = INCBIN_U32("data/effects/efob017.4bpp"); -const RGB gUnknown_97B8FE8[] = INCBIN_U8("data/effects/efob017.pmdpal"); +const RGB_Struct gUnknown_97B8FE8[] = INCBIN_U8("data/effects/efob017.pmdpal"); const ax_pose *const gUnknown_97B9028[] = { gUnknown_97B8B78, gUnknown_97B8BAA, diff --git a/src/data/effects/efob018.c b/src/data/effects/efob018.c index 141e8858e..1f940143b 100644 --- a/src/data/effects/efob018.c +++ b/src/data/effects/efob018.c @@ -249,7 +249,7 @@ const ax_anim gUnknown_97B96E4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97B9894[] = INCBIN_U32("data/effects/efob018.4bpp"); -const RGB gUnknown_97BA834[] = INCBIN_U8("data/effects/efob018.pmdpal"); +const RGB_Struct gUnknown_97BA834[] = INCBIN_U8("data/effects/efob018.pmdpal"); const ax_pose *const gUnknown_97BA874[] = { gUnknown_97B9084, gUnknown_97B9098, diff --git a/src/data/effects/efob019.c b/src/data/effects/efob019.c index eb7bb3a5f..e6474c831 100644 --- a/src/data/effects/efob019.c +++ b/src/data/effects/efob019.c @@ -33,7 +33,7 @@ const ax_anim gUnknown_97BA9DC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97BAA30[] = INCBIN_U32("data/effects/efob019.4bpp"); -const RGB gUnknown_97BAC30[] = INCBIN_U8("data/effects/efob019.pmdpal"); +const RGB_Struct gUnknown_97BAC30[] = INCBIN_U8("data/effects/efob019.pmdpal"); const ax_pose *const gUnknown_97BAC70[] = { gUnknown_97BA968, gUnknown_97BA97C, diff --git a/src/data/effects/efob020.c b/src/data/effects/efob020.c index 27d840a25..6dc400462 100644 --- a/src/data/effects/efob020.c +++ b/src/data/effects/efob020.c @@ -749,7 +749,7 @@ const ax_anim gUnknown_97BC5A8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97BC614[] = INCBIN_U32("data/effects/efob020.4bpp"); -const RGB gUnknown_97BD234[] = INCBIN_U8("data/effects/efob020.pmdpal"); +const RGB_Struct gUnknown_97BD234[] = INCBIN_U8("data/effects/efob020.pmdpal"); const ax_pose *const gUnknown_97BD274[] = { gUnknown_97BACD4, gUnknown_97BAD06, diff --git a/src/data/effects/efob021.c b/src/data/effects/efob021.c index 2a5b4c9ca..02b7445d0 100644 --- a/src/data/effects/efob021.c +++ b/src/data/effects/efob021.c @@ -87,7 +87,7 @@ const ax_anim gUnknown_97BD6C8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97BD6E0[] = INCBIN_U32("data/effects/efob021.4bpp"); -const RGB gUnknown_97BE540[] = INCBIN_U8("data/effects/efob021.pmdpal"); +const RGB_Struct gUnknown_97BE540[] = INCBIN_U8("data/effects/efob021.pmdpal"); const ax_pose *const gUnknown_97BE580[] = { gUnknown_97BD46C, gUnknown_97BD48A, diff --git a/src/data/effects/efob022.c b/src/data/effects/efob022.c index c64fd1c0c..294c74760 100644 --- a/src/data/effects/efob022.c +++ b/src/data/effects/efob022.c @@ -256,7 +256,7 @@ const ax_anim gUnknown_97BED7C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97BEDA0[] = INCBIN_U32("data/effects/efob022.4bpp"); -const RGB gUnknown_97BEF20[] = INCBIN_U8("data/effects/efob022.pmdpal"); +const RGB_Struct gUnknown_97BEF20[] = INCBIN_U8("data/effects/efob022.pmdpal"); const ax_pose *const gUnknown_97BEF60[] = { gUnknown_97BE624, gUnknown_97BE638, diff --git a/src/data/effects/efob023.c b/src/data/effects/efob023.c index 6fec72d43..5d2c71e85 100644 --- a/src/data/effects/efob023.c +++ b/src/data/effects/efob023.c @@ -684,7 +684,7 @@ const ax_anim gUnknown_97C0474[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C054C[] = INCBIN_U32("data/effects/efob023.4bpp"); -const RGB gUnknown_97C13AC[] = INCBIN_U8("data/effects/efob023.pmdpal"); +const RGB_Struct gUnknown_97C13AC[] = INCBIN_U8("data/effects/efob023.pmdpal"); const ax_pose *const gUnknown_97C13EC[] = { gUnknown_97BF09C, gUnknown_97BF0B0, diff --git a/src/data/effects/efob024.c b/src/data/effects/efob024.c index 61cf70381..11b5a70ec 100644 --- a/src/data/effects/efob024.c +++ b/src/data/effects/efob024.c @@ -48,7 +48,7 @@ const ax_anim gUnknown_97C1848[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C18E4[] = INCBIN_U32("data/effects/efob024.4bpp"); -const RGB gUnknown_97C26E4[] = INCBIN_U8("data/effects/efob024.pmdpal"); +const RGB_Struct gUnknown_97C26E4[] = INCBIN_U8("data/effects/efob024.pmdpal"); const ax_pose *const gUnknown_97C2724[] = { gUnknown_97C17B8, gUnknown_97C17CC, diff --git a/src/data/effects/efob025.c b/src/data/effects/efob025.c index 255c83c40..46663779d 100644 --- a/src/data/effects/efob025.c +++ b/src/data/effects/efob025.c @@ -226,7 +226,7 @@ const ax_anim gUnknown_97C2E74[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C2F28[] = INCBIN_U32("data/effects/efob025.4bpp"); -const RGB gUnknown_97C3D08[] = INCBIN_U8("data/effects/efob025.pmdpal"); +const RGB_Struct gUnknown_97C3D08[] = INCBIN_U8("data/effects/efob025.pmdpal"); const ax_pose *const gUnknown_97C3D48[] = { gUnknown_97C2794, gUnknown_97C27A8, diff --git a/src/data/effects/efob026.c b/src/data/effects/efob026.c index df29535d0..9c64cd2c4 100644 --- a/src/data/effects/efob026.c +++ b/src/data/effects/efob026.c @@ -892,7 +892,7 @@ const ax_anim gUnknown_97C5B68[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C5BBC[] = INCBIN_U32("data/effects/efob026.4bpp"); -const RGB gUnknown_97C677C[] = INCBIN_U8("data/effects/efob026.pmdpal"); +const RGB_Struct gUnknown_97C677C[] = INCBIN_U8("data/effects/efob026.pmdpal"); const ax_pose *const gUnknown_97C67BC[] = { gUnknown_97C3E2C, gUnknown_97C3E4A, diff --git a/src/data/effects/efob027.c b/src/data/effects/efob027.c index 7b4fd5c67..24d3ab576 100644 --- a/src/data/effects/efob027.c +++ b/src/data/effects/efob027.c @@ -185,7 +185,7 @@ const ax_anim gUnknown_97C6FA4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C70DC[] = INCBIN_U32("data/effects/efob027.4bpp"); -const RGB gUnknown_97C75DC[] = INCBIN_U8("data/effects/efob027.pmdpal"); +const RGB_Struct gUnknown_97C75DC[] = INCBIN_U8("data/effects/efob027.pmdpal"); const ax_pose *const gUnknown_97C761C[] = { gUnknown_97C6B18, gUnknown_97C6B36, diff --git a/src/data/effects/efob028.c b/src/data/effects/efob028.c index 2438e341d..7b04b0a79 100644 --- a/src/data/effects/efob028.c +++ b/src/data/effects/efob028.c @@ -823,7 +823,7 @@ const ax_anim gUnknown_97C8FC0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97C9014[] = INCBIN_U32("data/effects/efob028.4bpp"); -const RGB gUnknown_97C9FF4[] = INCBIN_U8("data/effects/efob028.pmdpal"); +const RGB_Struct gUnknown_97C9FF4[] = INCBIN_U8("data/effects/efob028.pmdpal"); const ax_pose *const gUnknown_97CA034[] = { gUnknown_97C76B8, gUnknown_97C76D6, diff --git a/src/data/effects/efob029.c b/src/data/effects/efob029.c index 5eefd5da4..a63ee68ad 100644 --- a/src/data/effects/efob029.c +++ b/src/data/effects/efob029.c @@ -302,7 +302,7 @@ const ax_anim gUnknown_97CABC8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97CAC94[] = INCBIN_U32("data/effects/efob029.4bpp"); -const RGB gUnknown_97CBC34[] = INCBIN_U8("data/effects/efob029.pmdpal"); +const RGB_Struct gUnknown_97CBC34[] = INCBIN_U8("data/effects/efob029.pmdpal"); const ax_pose *const gUnknown_97CBC74[] = { gUnknown_97CA2A0, gUnknown_97CA34A, diff --git a/src/data/effects/efob030.c b/src/data/effects/efob030.c index ba2405a94..d0aacb378 100644 --- a/src/data/effects/efob030.c +++ b/src/data/effects/efob030.c @@ -348,7 +348,7 @@ const ax_anim gUnknown_97CC7B4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97CC8C8[] = INCBIN_U32("data/effects/efob030.4bpp"); -const RGB gUnknown_97CD368[] = INCBIN_U8("data/effects/efob030.pmdpal"); +const RGB_Struct gUnknown_97CD368[] = INCBIN_U8("data/effects/efob030.pmdpal"); const ax_pose *const gUnknown_97CD3A8[] = { gUnknown_97CBD68, gUnknown_97CBD90, diff --git a/src/data/effects/efob031.c b/src/data/effects/efob031.c index 6d88622a0..0f1d27c58 100644 --- a/src/data/effects/efob031.c +++ b/src/data/effects/efob031.c @@ -65,7 +65,7 @@ const ax_anim gUnknown_97CD5BC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97CD664[] = INCBIN_U32("data/effects/efob031.4bpp"); -const RGB gUnknown_97CE584[] = INCBIN_U8("data/effects/efob031.pmdpal"); +const RGB_Struct gUnknown_97CE584[] = INCBIN_U8("data/effects/efob031.pmdpal"); const ax_pose *const gUnknown_97CE5C4[] = { gUnknown_97CD48C, gUnknown_97CD4AA, diff --git a/src/data/effects/efob032.c b/src/data/effects/efob032.c index 8d4e556c4..45b629f75 100644 --- a/src/data/effects/efob032.c +++ b/src/data/effects/efob032.c @@ -624,7 +624,7 @@ const ax_anim gUnknown_97CFB38[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97CFC7C[] = INCBIN_U32("data/effects/efob032.4bpp"); -const RGB gUnknown_97D057C[] = INCBIN_U8("data/effects/efob032.pmdpal"); +const RGB_Struct gUnknown_97D057C[] = INCBIN_U8("data/effects/efob032.pmdpal"); const ax_pose *const gUnknown_97D05BC[] = { gUnknown_97CE634, gUnknown_97CE648, diff --git a/src/data/effects/efob033.c b/src/data/effects/efob033.c index 9d8669fbb..218e6b810 100644 --- a/src/data/effects/efob033.c +++ b/src/data/effects/efob033.c @@ -790,7 +790,7 @@ const ax_anim gUnknown_97D1C1C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97D1EB0[] = INCBIN_U32("data/effects/efob033.4bpp"); -const RGB gUnknown_97D2B90[] = INCBIN_U8("data/effects/efob033.pmdpal"); +const RGB_Struct gUnknown_97D2B90[] = INCBIN_U8("data/effects/efob033.pmdpal"); const ax_pose *const gUnknown_97D2BD0[] = { gUnknown_97D06A4, gUnknown_97D06D6, diff --git a/src/data/effects/efob034.c b/src/data/effects/efob034.c index 8ec6069c5..a6d65efc2 100644 --- a/src/data/effects/efob034.c +++ b/src/data/effects/efob034.c @@ -48,7 +48,7 @@ const ax_anim gUnknown_97D2EAC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97D2F18[] = INCBIN_U32("data/effects/efob034.4bpp"); -const RGB gUnknown_97D3318[] = INCBIN_U8("data/effects/efob034.pmdpal"); +const RGB_Struct gUnknown_97D3318[] = INCBIN_U8("data/effects/efob034.pmdpal"); const ax_pose *const gUnknown_97D3358[] = { gUnknown_97D2E08, gUnknown_97D2E1C, diff --git a/src/data/effects/efob035.c b/src/data/effects/efob035.c index bcee14830..b42ecc04d 100644 --- a/src/data/effects/efob035.c +++ b/src/data/effects/efob035.c @@ -160,7 +160,7 @@ const ax_anim gUnknown_97D37F8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97D3858[] = INCBIN_U32("data/effects/efob035.4bpp"); -const RGB gUnknown_97D47B8[] = INCBIN_U8("data/effects/efob035.pmdpal"); +const RGB_Struct gUnknown_97D47B8[] = INCBIN_U8("data/effects/efob035.pmdpal"); const ax_pose *const gUnknown_97D47F8[] = { gUnknown_97D33CC, gUnknown_97D3430, diff --git a/src/data/effects/efob036.c b/src/data/effects/efob036.c index b8e8e453b..acbcb7ac6 100644 --- a/src/data/effects/efob036.c +++ b/src/data/effects/efob036.c @@ -511,7 +511,7 @@ const ax_anim gUnknown_97D57D8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97D59D0[] = INCBIN_U32("data/effects/efob036.4bpp"); -const RGB gUnknown_97D67F0[] = INCBIN_U8("data/effects/efob036.pmdpal"); +const RGB_Struct gUnknown_97D67F0[] = INCBIN_U8("data/effects/efob036.pmdpal"); const ax_pose *const gUnknown_97D6830[] = { gUnknown_97D48FC, gUnknown_97D4910, diff --git a/src/data/effects/efob037.c b/src/data/effects/efob037.c index 5410618b0..9def07d57 100644 --- a/src/data/effects/efob037.c +++ b/src/data/effects/efob037.c @@ -1896,7 +1896,7 @@ const ax_anim gUnknown_97DA290[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97DA2CC[] = INCBIN_U32("data/effects/efob037.4bpp"); -const RGB gUnknown_97DAF8C[] = INCBIN_U8("data/effects/efob037.pmdpal"); +const RGB_Struct gUnknown_97DAF8C[] = INCBIN_U8("data/effects/efob037.pmdpal"); const ax_pose *const gUnknown_97DAFCC[] = { gUnknown_97D6928, gUnknown_97D6964, diff --git a/src/data/effects/efob038.c b/src/data/effects/efob038.c index 209eabc76..6cf4aceb3 100644 --- a/src/data/effects/efob038.c +++ b/src/data/effects/efob038.c @@ -994,7 +994,7 @@ const ax_anim gUnknown_97DD160[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97DD2EC[] = INCBIN_U32("data/effects/efob038.4bpp"); -const RGB gUnknown_97DDFCC[] = INCBIN_U8("data/effects/efob038.pmdpal"); +const RGB_Struct gUnknown_97DDFCC[] = INCBIN_U8("data/effects/efob038.pmdpal"); const ax_pose *const gUnknown_97DE00C[] = { gUnknown_97DB4F0, gUnknown_97DB50E, diff --git a/src/data/effects/efob039.c b/src/data/effects/efob039.c index 5d96e101f..d6df5daed 100644 --- a/src/data/effects/efob039.c +++ b/src/data/effects/efob039.c @@ -383,7 +383,7 @@ const ax_anim gUnknown_97DEE00[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97DEF8C[] = INCBIN_U32("data/effects/efob039.4bpp"); -const RGB gUnknown_97DFE8C[] = INCBIN_U8("data/effects/efob039.pmdpal"); +const RGB_Struct gUnknown_97DFE8C[] = INCBIN_U8("data/effects/efob039.pmdpal"); const ax_pose *const gUnknown_97DFECC[] = { gUnknown_97DE2D0, gUnknown_97DE302, diff --git a/src/data/effects/efob040.c b/src/data/effects/efob040.c index 35ab40953..d02fc9daa 100644 --- a/src/data/effects/efob040.c +++ b/src/data/effects/efob040.c @@ -119,7 +119,7 @@ const ax_anim gUnknown_97E038C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97E03B0[] = INCBIN_U32("data/effects/efob040.4bpp"); -const RGB gUnknown_97E0A30[] = INCBIN_U8("data/effects/efob040.pmdpal"); +const RGB_Struct gUnknown_97E0A30[] = INCBIN_U8("data/effects/efob040.pmdpal"); const ax_pose *const gUnknown_97E0A70[] = { gUnknown_97DFFE8, gUnknown_97E001A, diff --git a/src/data/effects/efob041.c b/src/data/effects/efob041.c index cdebf14e7..0b34de65b 100644 --- a/src/data/effects/efob041.c +++ b/src/data/effects/efob041.c @@ -1156,7 +1156,7 @@ const ax_anim gUnknown_97E2AB8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97E2AD0[] = INCBIN_U32("data/effects/efob041.4bpp"); -const RGB gUnknown_97E39B0[] = INCBIN_U8("data/effects/efob041.pmdpal"); +const RGB_Struct gUnknown_97E39B0[] = INCBIN_U8("data/effects/efob041.pmdpal"); const ax_pose *const gUnknown_97E39F0[] = { gUnknown_97E0B28, gUnknown_97E0B3C, diff --git a/src/data/effects/efob042.c b/src/data/effects/efob042.c index 3876c6d53..a9903a422 100644 --- a/src/data/effects/efob042.c +++ b/src/data/effects/efob042.c @@ -239,7 +239,7 @@ const ax_anim gUnknown_97E4460[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97E4574[] = INCBIN_U32("data/effects/efob042.4bpp"); -const RGB gUnknown_97E5414[] = INCBIN_U8("data/effects/efob042.pmdpal"); +const RGB_Struct gUnknown_97E5414[] = INCBIN_U8("data/effects/efob042.pmdpal"); const ax_pose *const gUnknown_97E5454[] = { gUnknown_97E3E20, gUnknown_97E3E66, diff --git a/src/data/effects/efob043.c b/src/data/effects/efob043.c index 508d1e17e..751c73b36 100644 --- a/src/data/effects/efob043.c +++ b/src/data/effects/efob043.c @@ -2252,7 +2252,7 @@ const ax_anim gUnknown_97E96EC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97E989C[] = INCBIN_U32("data/effects/efob043.4bpp"); -const RGB gUnknown_97EA5DC[] = INCBIN_U8("data/effects/efob043.pmdpal"); +const RGB_Struct gUnknown_97EA5DC[] = INCBIN_U8("data/effects/efob043.pmdpal"); const ax_pose *const gUnknown_97EA61C[] = { gUnknown_97E5558, gUnknown_97E558A, diff --git a/src/data/effects/efob044.c b/src/data/effects/efob044.c index 270390502..39f74e8cc 100644 --- a/src/data/effects/efob044.c +++ b/src/data/effects/efob044.c @@ -152,7 +152,7 @@ const ax_anim gUnknown_97EAF68[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97EB0F4[] = INCBIN_U32("data/effects/efob044.4bpp"); -const RGB gUnknown_97EB394[] = INCBIN_U8("data/effects/efob044.pmdpal"); +const RGB_Struct gUnknown_97EB394[] = INCBIN_U8("data/effects/efob044.pmdpal"); const ax_pose *const gUnknown_97EB3D4[] = { gUnknown_97EAC44, gUnknown_97EAC76, diff --git a/src/data/effects/efob045.c b/src/data/effects/efob045.c index ade2a331d..a697c994a 100644 --- a/src/data/effects/efob045.c +++ b/src/data/effects/efob045.c @@ -113,7 +113,7 @@ const ax_anim gUnknown_97EB75C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97EB780[] = INCBIN_U32("data/effects/efob045.4bpp"); -const RGB gUnknown_97EC740[] = INCBIN_U8("data/effects/efob045.pmdpal"); +const RGB_Struct gUnknown_97EC740[] = INCBIN_U8("data/effects/efob045.pmdpal"); const ax_pose *const gUnknown_97EC780[] = { gUnknown_97EB468, gUnknown_97EB4C2, diff --git a/src/data/effects/efob046.c b/src/data/effects/efob046.c index 13a23f9f8..62d70602f 100644 --- a/src/data/effects/efob046.c +++ b/src/data/effects/efob046.c @@ -172,7 +172,7 @@ const ax_anim gUnknown_97ECCB0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97ECE48[] = INCBIN_U32("data/effects/efob046.4bpp"); -const RGB gUnknown_97EDDA8[] = INCBIN_U8("data/effects/efob046.pmdpal"); +const RGB_Struct gUnknown_97EDDA8[] = INCBIN_U8("data/effects/efob046.pmdpal"); const ax_pose *const gUnknown_97EDDE8[] = { gUnknown_97EC8F4, gUnknown_97EC912, diff --git a/src/data/effects/efob047.c b/src/data/effects/efob047.c index 4e2d39ef2..1e7356b47 100644 --- a/src/data/effects/efob047.c +++ b/src/data/effects/efob047.c @@ -68,7 +68,7 @@ const ax_anim gUnknown_97EE04C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97EE094[] = INCBIN_U32("data/effects/efob047.4bpp"); -const RGB gUnknown_97EE0D4[] = INCBIN_U8("data/effects/efob047.pmdpal"); +const RGB_Struct gUnknown_97EE0D4[] = INCBIN_U8("data/effects/efob047.pmdpal"); const ax_pose *const gUnknown_97EE114[] = { gUnknown_97EDE84, gUnknown_97EDEDE, diff --git a/src/data/effects/efob048.c b/src/data/effects/efob048.c index 74af1dd30..e7fe32cda 100644 --- a/src/data/effects/efob048.c +++ b/src/data/effects/efob048.c @@ -615,7 +615,7 @@ const ax_anim gUnknown_97EF264[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97EF5AC[] = INCBIN_U32("data/effects/efob048.4bpp"); -const RGB gUnknown_97F054C[] = INCBIN_U8("data/effects/efob048.pmdpal"); +const RGB_Struct gUnknown_97F054C[] = INCBIN_U8("data/effects/efob048.pmdpal"); const ax_pose *const gUnknown_97F058C[] = { gUnknown_97EE17C, gUnknown_97EE190, diff --git a/src/data/effects/efob049.c b/src/data/effects/efob049.c index 4ea7d03e9..396bccf69 100644 --- a/src/data/effects/efob049.c +++ b/src/data/effects/efob049.c @@ -286,7 +286,7 @@ const ax_anim gUnknown_97F0F00[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F0F90[] = INCBIN_U32("data/effects/efob049.4bpp"); -const RGB gUnknown_97F1F90[] = INCBIN_U8("data/effects/efob049.pmdpal"); +const RGB_Struct gUnknown_97F1F90[] = INCBIN_U8("data/effects/efob049.pmdpal"); const ax_pose *const gUnknown_97F1FD0[] = { gUnknown_97F06E8, gUnknown_97F0706, diff --git a/src/data/effects/efob050.c b/src/data/effects/efob050.c index 8d6945fa9..839581728 100644 --- a/src/data/effects/efob050.c +++ b/src/data/effects/efob050.c @@ -33,7 +33,7 @@ const ax_anim gUnknown_97F2130[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F2178[] = INCBIN_U32("data/effects/efob050.4bpp"); -const RGB gUnknown_97F2B78[] = INCBIN_U8("data/effects/efob050.pmdpal"); +const RGB_Struct gUnknown_97F2B78[] = INCBIN_U8("data/effects/efob050.pmdpal"); const ax_pose *const gUnknown_97F2BB8[] = { gUnknown_97F20C8, gUnknown_97F20DC, diff --git a/src/data/effects/efob051.c b/src/data/effects/efob051.c index 05498b8f5..f168d2fa3 100644 --- a/src/data/effects/efob051.c +++ b/src/data/effects/efob051.c @@ -643,7 +643,7 @@ const ax_anim gUnknown_97F3DA4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F3E10[] = INCBIN_U32("data/effects/efob051.4bpp"); -const RGB gUnknown_97F4D70[] = INCBIN_U8("data/effects/efob051.pmdpal"); +const RGB_Struct gUnknown_97F4D70[] = INCBIN_U8("data/effects/efob051.pmdpal"); const ax_pose *const gUnknown_97F4DB0[] = { gUnknown_97F2C20, gUnknown_97F2C34, diff --git a/src/data/effects/efob052.c b/src/data/effects/efob052.c index 40be0c299..9662a35c1 100644 --- a/src/data/effects/efob052.c +++ b/src/data/effects/efob052.c @@ -141,7 +141,7 @@ const ax_anim gUnknown_97F53C8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F53EC[] = INCBIN_U32("data/effects/efob052.4bpp"); -const RGB gUnknown_97F54EC[] = INCBIN_U8("data/effects/efob052.pmdpal"); +const RGB_Struct gUnknown_97F54EC[] = INCBIN_U8("data/effects/efob052.pmdpal"); const ax_pose *const gUnknown_97F552C[] = { gUnknown_97F5048, gUnknown_97F5070, diff --git a/src/data/effects/efob053.c b/src/data/effects/efob053.c index 99817cd43..dcdf37d4d 100644 --- a/src/data/effects/efob053.c +++ b/src/data/effects/efob053.c @@ -578,7 +578,7 @@ const ax_anim gUnknown_97F66C4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F673C[] = INCBIN_U32("data/effects/efob053.4bpp"); -const RGB gUnknown_97F74FC[] = INCBIN_U8("data/effects/efob053.pmdpal"); +const RGB_Struct gUnknown_97F74FC[] = INCBIN_U8("data/effects/efob053.pmdpal"); const ax_pose *const gUnknown_97F753C[] = { gUnknown_97F56BC, gUnknown_97F56D0, diff --git a/src/data/effects/efob054.c b/src/data/effects/efob054.c index 63ab141f7..ce3c4843a 100644 --- a/src/data/effects/efob054.c +++ b/src/data/effects/efob054.c @@ -43,7 +43,7 @@ const ax_anim gUnknown_97F77CC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F782C[] = INCBIN_U32("data/effects/efob054.4bpp"); -const RGB gUnknown_97F806C[] = INCBIN_U8("data/effects/efob054.pmdpal"); +const RGB_Struct gUnknown_97F806C[] = INCBIN_U8("data/effects/efob054.pmdpal"); const ax_pose *const gUnknown_97F80AC[] = { gUnknown_97F773C, gUnknown_97F7750, diff --git a/src/data/effects/efob055.c b/src/data/effects/efob055.c index 0349359fe..27303aec6 100644 --- a/src/data/effects/efob055.c +++ b/src/data/effects/efob055.c @@ -230,7 +230,7 @@ const ax_anim gUnknown_97F87D0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F8920[] = INCBIN_U32("data/effects/efob055.4bpp"); -const RGB gUnknown_97F8F40[] = INCBIN_U8("data/effects/efob055.pmdpal"); +const RGB_Struct gUnknown_97F8F40[] = INCBIN_U8("data/effects/efob055.pmdpal"); const ax_pose *const gUnknown_97F8F80[] = { gUnknown_97F811C, gUnknown_97F81C6, diff --git a/src/data/effects/efob056.c b/src/data/effects/efob056.c index 55484c00d..3b7c8b8e7 100644 --- a/src/data/effects/efob056.c +++ b/src/data/effects/efob056.c @@ -207,7 +207,7 @@ const ax_anim gUnknown_97F95AC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97F9654[] = INCBIN_U32("data/effects/efob056.4bpp"); -const RGB gUnknown_97F9FD4[] = INCBIN_U8("data/effects/efob056.pmdpal"); +const RGB_Struct gUnknown_97F9FD4[] = INCBIN_U8("data/effects/efob056.pmdpal"); const ax_pose *const gUnknown_97FA014[] = { gUnknown_97F9004, gUnknown_97F9036, diff --git a/src/data/effects/efob057.c b/src/data/effects/efob057.c index dbdd81bad..5da17ce08 100644 --- a/src/data/effects/efob057.c +++ b/src/data/effects/efob057.c @@ -673,7 +673,7 @@ const ax_anim gUnknown_97FB524[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97FB6F8[] = INCBIN_U32("data/effects/efob057.4bpp"); -const RGB gUnknown_97FBDB8[] = INCBIN_U8("data/effects/efob057.pmdpal"); +const RGB_Struct gUnknown_97FBDB8[] = INCBIN_U8("data/effects/efob057.pmdpal"); const ax_pose *const gUnknown_97FBDF8[] = { gUnknown_97FA100, gUnknown_97FA114, diff --git a/src/data/effects/efob058.c b/src/data/effects/efob058.c index 9872c7cf0..55b428ce9 100644 --- a/src/data/effects/efob058.c +++ b/src/data/effects/efob058.c @@ -83,7 +83,7 @@ const ax_anim gUnknown_97FC034[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97FC154[] = INCBIN_U32("data/effects/efob058.4bpp"); -const RGB gUnknown_97FCDF4[] = INCBIN_U8("data/effects/efob058.pmdpal"); +const RGB_Struct gUnknown_97FCDF4[] = INCBIN_U8("data/effects/efob058.pmdpal"); const ax_pose *const gUnknown_97FCE34[] = { gUnknown_97FBF2C, gUnknown_97FBF40, diff --git a/src/data/effects/efob059.c b/src/data/effects/efob059.c index 15b3ba3d9..723fa5e09 100644 --- a/src/data/effects/efob059.c +++ b/src/data/effects/efob059.c @@ -195,7 +195,7 @@ const ax_anim gUnknown_97FD398[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97FD3EC[] = INCBIN_U32("data/effects/efob059.4bpp"); -const RGB gUnknown_97FDD2C[] = INCBIN_U8("data/effects/efob059.pmdpal"); +const RGB_Struct gUnknown_97FDD2C[] = INCBIN_U8("data/effects/efob059.pmdpal"); const ax_pose *const gUnknown_97FDD6C[] = { gUnknown_97FCEBC, gUnknown_97FCED0, diff --git a/src/data/effects/efob060.c b/src/data/effects/efob060.c index 42190bb09..899f3cd5f 100644 --- a/src/data/effects/efob060.c +++ b/src/data/effects/efob060.c @@ -881,7 +881,7 @@ const ax_anim gUnknown_97FF780[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_97FF840[] = INCBIN_U32("data/effects/efob060.4bpp"); -const RGB gUnknown_98007A0[] = INCBIN_U8("data/effects/efob060.pmdpal"); +const RGB_Struct gUnknown_98007A0[] = INCBIN_U8("data/effects/efob060.pmdpal"); const ax_pose *const gUnknown_98007E0[] = { gUnknown_97FDF04, gUnknown_97FDF18, diff --git a/src/data/effects/efob061.c b/src/data/effects/efob061.c index 36f4c6732..9c43b8b2e 100644 --- a/src/data/effects/efob061.c +++ b/src/data/effects/efob061.c @@ -110,7 +110,7 @@ const ax_anim gUnknown_9800D6C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9800DFC[] = INCBIN_U32("data/effects/efob061.4bpp"); -const RGB gUnknown_9800F9C[] = INCBIN_U8("data/effects/efob061.pmdpal"); +const RGB_Struct gUnknown_9800F9C[] = INCBIN_U8("data/effects/efob061.pmdpal"); const ax_pose *const gUnknown_9800FDC[] = { gUnknown_9800B10, gUnknown_9800B24, diff --git a/src/data/effects/efob062.c b/src/data/effects/efob062.c index d8f9f09f5..6a7bbb25e 100644 --- a/src/data/effects/efob062.c +++ b/src/data/effects/efob062.c @@ -105,7 +105,7 @@ const ax_anim gUnknown_9801334[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9801358[] = INCBIN_U32("data/effects/efob062.4bpp"); -const RGB gUnknown_9801458[] = INCBIN_U8("data/effects/efob062.pmdpal"); +const RGB_Struct gUnknown_9801458[] = INCBIN_U8("data/effects/efob062.pmdpal"); const ax_pose *const gUnknown_9801498[] = { gUnknown_9801090, gUnknown_98010C2, diff --git a/src/data/effects/efob063.c b/src/data/effects/efob063.c index de5f384a6..b2ec1bcf9 100644 --- a/src/data/effects/efob063.c +++ b/src/data/effects/efob063.c @@ -163,7 +163,7 @@ const ax_anim gUnknown_980195C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9801B24[] = INCBIN_U32("data/effects/efob063.4bpp"); -const RGB gUnknown_9802344[] = INCBIN_U8("data/effects/efob063.pmdpal"); +const RGB_Struct gUnknown_9802344[] = INCBIN_U8("data/effects/efob063.pmdpal"); const ax_pose *const gUnknown_9802384[] = { gUnknown_980160C, gUnknown_9801620, diff --git a/src/data/effects/efob064.c b/src/data/effects/efob064.c index fa8a8f6f5..337306058 100644 --- a/src/data/effects/efob064.c +++ b/src/data/effects/efob064.c @@ -99,7 +99,7 @@ const ax_anim gUnknown_98026D8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9802750[] = INCBIN_U32("data/effects/efob064.4bpp"); -const RGB gUnknown_98030B0[] = INCBIN_U8("data/effects/efob064.pmdpal"); +const RGB_Struct gUnknown_98030B0[] = INCBIN_U8("data/effects/efob064.pmdpal"); const ax_pose *const gUnknown_98030F0[] = { gUnknown_9802448, gUnknown_980245C, diff --git a/src/data/effects/efob065.c b/src/data/effects/efob065.c index 19a02c58b..dab752064 100644 --- a/src/data/effects/efob065.c +++ b/src/data/effects/efob065.c @@ -116,7 +116,7 @@ const ax_anim gUnknown_98032B0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980352C[] = INCBIN_U32("data/effects/efob065.4bpp"); -const RGB gUnknown_980452C[] = INCBIN_U8("data/effects/efob065.pmdpal"); +const RGB_Struct gUnknown_980452C[] = INCBIN_U8("data/effects/efob065.pmdpal"); const ax_pose *const gUnknown_980456C[] = { gUnknown_9803194, gUnknown_98031A8, diff --git a/src/data/effects/efob066.c b/src/data/effects/efob066.c index 5322af701..dcaa47c9c 100644 --- a/src/data/effects/efob066.c +++ b/src/data/effects/efob066.c @@ -277,7 +277,7 @@ const ax_anim gUnknown_9804CB4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9804E34[] = INCBIN_U32("data/effects/efob066.4bpp"); -const RGB gUnknown_9805094[] = INCBIN_U8("data/effects/efob066.pmdpal"); +const RGB_Struct gUnknown_9805094[] = INCBIN_U8("data/effects/efob066.pmdpal"); const ax_pose *const gUnknown_98050D4[] = { gUnknown_98045F8, gUnknown_980460C, diff --git a/src/data/effects/efob067.c b/src/data/effects/efob067.c index 7873b71fd..9a93cd411 100644 --- a/src/data/effects/efob067.c +++ b/src/data/effects/efob067.c @@ -51,7 +51,7 @@ const ax_anim gUnknown_980525C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9805340[] = INCBIN_U32("data/effects/efob067.4bpp"); -const RGB gUnknown_9805F60[] = INCBIN_U8("data/effects/efob067.pmdpal"); +const RGB_Struct gUnknown_9805F60[] = INCBIN_U8("data/effects/efob067.pmdpal"); const ax_pose *const gUnknown_9805FA0[] = { gUnknown_98051AC, gUnknown_98051DE, diff --git a/src/data/effects/efob068.c b/src/data/effects/efob068.c index 99f89b183..cf49b152e 100644 --- a/src/data/effects/efob068.c +++ b/src/data/effects/efob068.c @@ -63,7 +63,7 @@ const ax_anim gUnknown_98060F8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98061B8[] = INCBIN_U32("data/effects/efob068.4bpp"); -const RGB gUnknown_9806738[] = INCBIN_U8("data/effects/efob068.pmdpal"); +const RGB_Struct gUnknown_9806738[] = INCBIN_U8("data/effects/efob068.pmdpal"); const ax_pose *const gUnknown_9806778[] = { gUnknown_9806004, gUnknown_980602C, diff --git a/src/data/effects/efob069.c b/src/data/effects/efob069.c index 2e750296e..6fc98609a 100644 --- a/src/data/effects/efob069.c +++ b/src/data/effects/efob069.c @@ -117,7 +117,7 @@ const ax_anim gUnknown_9806A7C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9806AA0[] = INCBIN_U32("data/effects/efob069.4bpp"); -const RGB gUnknown_9806CA0[] = INCBIN_U8("data/effects/efob069.pmdpal"); +const RGB_Struct gUnknown_9806CA0[] = INCBIN_U8("data/effects/efob069.pmdpal"); const ax_pose *const gUnknown_9806CE0[] = { gUnknown_98067EC, gUnknown_980680A, diff --git a/src/data/effects/efob070.c b/src/data/effects/efob070.c index 89dbdcdd3..67e807871 100644 --- a/src/data/effects/efob070.c +++ b/src/data/effects/efob070.c @@ -48,7 +48,7 @@ const ax_anim gUnknown_9806F14[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9806F80[] = INCBIN_U32("data/effects/efob070.4bpp"); -const RGB gUnknown_9807400[] = INCBIN_U8("data/effects/efob070.pmdpal"); +const RGB_Struct gUnknown_9807400[] = INCBIN_U8("data/effects/efob070.pmdpal"); const ax_pose *const gUnknown_9807440[] = { gUnknown_9806E70, gUnknown_9806E84, diff --git a/src/data/effects/efob071.c b/src/data/effects/efob071.c index 948949030..5b0def48c 100644 --- a/src/data/effects/efob071.c +++ b/src/data/effects/efob071.c @@ -38,7 +38,7 @@ const ax_anim gUnknown_98074E0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98075F4[] = INCBIN_U32("data/effects/efob071.4bpp"); -const RGB gUnknown_9807814[] = INCBIN_U8("data/effects/efob071.pmdpal"); +const RGB_Struct gUnknown_9807814[] = INCBIN_U8("data/effects/efob071.pmdpal"); const ax_pose *const gUnknown_9807854[] = { gUnknown_98074B4, gUnknown_98074C8, diff --git a/src/data/effects/efob072.c b/src/data/effects/efob072.c index 7a061e4ac..00313241a 100644 --- a/src/data/effects/efob072.c +++ b/src/data/effects/efob072.c @@ -54,7 +54,7 @@ const ax_anim gUnknown_98078DC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9807AB0[] = INCBIN_U32("data/effects/efob072.4bpp"); -const RGB gUnknown_9807B50[] = INCBIN_U8("data/effects/efob072.pmdpal"); +const RGB_Struct gUnknown_9807B50[] = INCBIN_U8("data/effects/efob072.pmdpal"); const ax_pose *const gUnknown_9807B90[] = { gUnknown_98078B0, gUnknown_98078C4, diff --git a/src/data/effects/efob073.c b/src/data/effects/efob073.c index da4d60152..dbdbd2ff7 100644 --- a/src/data/effects/efob073.c +++ b/src/data/effects/efob073.c @@ -247,7 +247,7 @@ const ax_anim gUnknown_98083E0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980847C[] = INCBIN_U32("data/effects/efob073.4bpp"); -const RGB gUnknown_98087DC[] = INCBIN_U8("data/effects/efob073.pmdpal"); +const RGB_Struct gUnknown_98087DC[] = INCBIN_U8("data/effects/efob073.pmdpal"); const ax_pose *const gUnknown_980881C[] = { gUnknown_9807BEC, gUnknown_9807C00, diff --git a/src/data/effects/efob074.c b/src/data/effects/efob074.c index dffa89793..4b9945b2b 100644 --- a/src/data/effects/efob074.c +++ b/src/data/effects/efob074.c @@ -308,7 +308,7 @@ const ax_anim gUnknown_9809240[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9809324[] = INCBIN_U32("data/effects/efob074.4bpp"); -const RGB gUnknown_980A284[] = INCBIN_U8("data/effects/efob074.pmdpal"); +const RGB_Struct gUnknown_980A284[] = INCBIN_U8("data/effects/efob074.pmdpal"); const ax_pose *const gUnknown_980A2C4[] = { gUnknown_98088A0, gUnknown_98088C8, diff --git a/src/data/effects/efob075.c b/src/data/effects/efob075.c index 0269a1f49..aaba994c0 100644 --- a/src/data/effects/efob075.c +++ b/src/data/effects/efob075.c @@ -51,7 +51,7 @@ const ax_anim gUnknown_980A490[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980A4F0[] = INCBIN_U32("data/effects/efob075.4bpp"); -const RGB gUnknown_980B4F0[] = INCBIN_U8("data/effects/efob075.pmdpal"); +const RGB_Struct gUnknown_980B4F0[] = INCBIN_U8("data/effects/efob075.pmdpal"); const ax_pose *const gUnknown_980B530[] = { gUnknown_980A360, gUnknown_980A3F6, diff --git a/src/data/effects/efob076.c b/src/data/effects/efob076.c index bb907c6f8..99c3e4f4c 100644 --- a/src/data/effects/efob076.c +++ b/src/data/effects/efob076.c @@ -335,7 +335,7 @@ const ax_anim gUnknown_980BEF0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980BFF8[] = INCBIN_U32("data/effects/efob076.4bpp"); -const RGB gUnknown_980C1D8[] = INCBIN_U8("data/effects/efob076.pmdpal"); +const RGB_Struct gUnknown_980C1D8[] = INCBIN_U8("data/effects/efob076.pmdpal"); const ax_pose *const gUnknown_980C218[] = { gUnknown_980B590, gUnknown_980B5AE, diff --git a/src/data/effects/efob077.c b/src/data/effects/efob077.c index 4df46fd25..df061bdf5 100644 --- a/src/data/effects/efob077.c +++ b/src/data/effects/efob077.c @@ -122,7 +122,7 @@ const ax_anim gUnknown_980C5D0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980C690[] = INCBIN_U32("data/effects/efob077.4bpp"); -const RGB gUnknown_980C770[] = INCBIN_U8("data/effects/efob077.pmdpal"); +const RGB_Struct gUnknown_980C770[] = INCBIN_U8("data/effects/efob077.pmdpal"); const ax_pose *const gUnknown_980C7B0[] = { gUnknown_980C318, gUnknown_980C32C, diff --git a/src/data/effects/efob078.c b/src/data/effects/efob078.c index 1ea1945af..f738ba19c 100644 --- a/src/data/effects/efob078.c +++ b/src/data/effects/efob078.c @@ -164,7 +164,7 @@ const ax_anim gUnknown_980CC94[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980CCB8[] = INCBIN_U32("data/effects/efob078.4bpp"); -const RGB gUnknown_980D978[] = INCBIN_U8("data/effects/efob078.pmdpal"); +const RGB_Struct gUnknown_980D978[] = INCBIN_U8("data/effects/efob078.pmdpal"); const ax_pose *const gUnknown_980D9B8[] = { gUnknown_980C840, gUnknown_980C868, diff --git a/src/data/effects/efob079.c b/src/data/effects/efob079.c index 223b24255..5e4c6011e 100644 --- a/src/data/effects/efob079.c +++ b/src/data/effects/efob079.c @@ -36,7 +36,7 @@ const ax_anim gUnknown_980DBC0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980DC38[] = INCBIN_U32("data/effects/efob079.4bpp"); -const RGB gUnknown_980DFF8[] = INCBIN_U8("data/effects/efob079.pmdpal"); +const RGB_Struct gUnknown_980DFF8[] = INCBIN_U8("data/effects/efob079.pmdpal"); const ax_pose *const gUnknown_980E038[] = { gUnknown_980DB4C, gUnknown_980DB60, diff --git a/src/data/effects/efob080.c b/src/data/effects/efob080.c index cf5867c8a..2b3d2c73b 100644 --- a/src/data/effects/efob080.c +++ b/src/data/effects/efob080.c @@ -254,7 +254,7 @@ const ax_anim gUnknown_980E778[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_980E82C[] = INCBIN_U32("data/effects/efob080.4bpp"); -const RGB gUnknown_980EACC[] = INCBIN_U8("data/effects/efob080.pmdpal"); +const RGB_Struct gUnknown_980EACC[] = INCBIN_U8("data/effects/efob080.pmdpal"); const ax_pose *const gUnknown_980EB0C[] = { gUnknown_980E09C, gUnknown_980E0B0, diff --git a/src/data/effects/efob081.c b/src/data/effects/efob081.c index 715fc455a..694a86e46 100644 --- a/src/data/effects/efob081.c +++ b/src/data/effects/efob081.c @@ -1555,7 +1555,7 @@ const ax_anim gUnknown_981185C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98118EC[] = INCBIN_U32("data/effects/efob081.4bpp"); -const RGB gUnknown_981284C[] = INCBIN_U8("data/effects/efob081.pmdpal"); +const RGB_Struct gUnknown_981284C[] = INCBIN_U8("data/effects/efob081.pmdpal"); const ax_pose *const gUnknown_981288C[] = { gUnknown_980EBFC, gUnknown_980EC10, diff --git a/src/data/effects/efob082.c b/src/data/effects/efob082.c index d63ce2576..970943629 100644 --- a/src/data/effects/efob082.c +++ b/src/data/effects/efob082.c @@ -217,7 +217,7 @@ const ax_anim gUnknown_98134F4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9813614[] = INCBIN_U32("data/effects/efob082.4bpp"); -const RGB gUnknown_9813634[] = INCBIN_U8("data/effects/efob082.pmdpal"); +const RGB_Struct gUnknown_9813634[] = INCBIN_U8("data/effects/efob082.pmdpal"); const ax_pose *const gUnknown_9813674[] = { gUnknown_9812F64, gUnknown_9812F78, diff --git a/src/data/effects/efob083.c b/src/data/effects/efob083.c index eaec37035..9fe1c0043 100644 --- a/src/data/effects/efob083.c +++ b/src/data/effects/efob083.c @@ -81,7 +81,7 @@ const ax_anim gUnknown_98138A0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981396C[] = INCBIN_U32("data/effects/efob083.4bpp"); -const RGB gUnknown_98143AC[] = INCBIN_U8("data/effects/efob083.pmdpal"); +const RGB_Struct gUnknown_98143AC[] = INCBIN_U8("data/effects/efob083.pmdpal"); const ax_pose *const gUnknown_98143EC[] = { gUnknown_9813720, gUnknown_9813734, diff --git a/src/data/effects/efob084.c b/src/data/effects/efob084.c index ebb773e05..acb1e566d 100644 --- a/src/data/effects/efob084.c +++ b/src/data/effects/efob084.c @@ -141,7 +141,7 @@ const ax_anim gUnknown_981483C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98148E4[] = INCBIN_U32("data/effects/efob084.4bpp"); -const RGB gUnknown_9814BE4[] = INCBIN_U8("data/effects/efob084.pmdpal"); +const RGB_Struct gUnknown_9814BE4[] = INCBIN_U8("data/effects/efob084.pmdpal"); const ax_pose *const gUnknown_9814C24[] = { gUnknown_981448C, gUnknown_98144C8, diff --git a/src/data/effects/efob085.c b/src/data/effects/efob085.c index 5f20fa151..e31d6a88a 100644 --- a/src/data/effects/efob085.c +++ b/src/data/effects/efob085.c @@ -170,7 +170,7 @@ const ax_anim gUnknown_981519C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9815238[] = INCBIN_U32("data/effects/efob085.4bpp"); -const RGB gUnknown_9815B58[] = INCBIN_U8("data/effects/efob085.pmdpal"); +const RGB_Struct gUnknown_9815B58[] = INCBIN_U8("data/effects/efob085.pmdpal"); const ax_pose *const gUnknown_9815B98[] = { gUnknown_9814CAC, gUnknown_9814CCA, diff --git a/src/data/effects/efob086.c b/src/data/effects/efob086.c index 615398428..1d8165c9a 100644 --- a/src/data/effects/efob086.c +++ b/src/data/effects/efob086.c @@ -23,7 +23,7 @@ const ax_anim gUnknown_9815C5C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9815C8C[] = INCBIN_U32("data/effects/efob086.4bpp"); -const RGB gUnknown_9815E0C[] = INCBIN_U8("data/effects/efob086.pmdpal"); +const RGB_Struct gUnknown_9815E0C[] = INCBIN_U8("data/effects/efob086.pmdpal"); const ax_pose *const gUnknown_9815E4C[] = { gUnknown_9815C1C, gUnknown_9815C30, diff --git a/src/data/effects/efob087.c b/src/data/effects/efob087.c index 43e5f6b5c..37cfddf0a 100644 --- a/src/data/effects/efob087.c +++ b/src/data/effects/efob087.c @@ -131,7 +131,7 @@ const ax_anim gUnknown_9816208[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98162BC[] = INCBIN_U32("data/effects/efob087.4bpp"); -const RGB gUnknown_9816FDC[] = INCBIN_U8("data/effects/efob087.pmdpal"); +const RGB_Struct gUnknown_9816FDC[] = INCBIN_U8("data/effects/efob087.pmdpal"); const ax_pose *const gUnknown_981701C[] = { gUnknown_9815EAC, gUnknown_9815EDE, diff --git a/src/data/effects/efob088.c b/src/data/effects/efob088.c index 8d048b392..652d224ae 100644 --- a/src/data/effects/efob088.c +++ b/src/data/effects/efob088.c @@ -38,7 +38,7 @@ const ax_anim gUnknown_9817140[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9817194[] = INCBIN_U32("data/effects/efob088.4bpp"); -const RGB gUnknown_98174B4[] = INCBIN_U8("data/effects/efob088.pmdpal"); +const RGB_Struct gUnknown_98174B4[] = INCBIN_U8("data/effects/efob088.pmdpal"); const ax_pose *const gUnknown_98174F4[] = { gUnknown_98170C4, gUnknown_98170D8, diff --git a/src/data/effects/efob089.c b/src/data/effects/efob089.c index 5fa56af99..59faeec03 100644 --- a/src/data/effects/efob089.c +++ b/src/data/effects/efob089.c @@ -141,7 +141,7 @@ const ax_anim gUnknown_98179E4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9817A14[] = INCBIN_U32("data/effects/efob089.4bpp"); -const RGB gUnknown_9817A74[] = INCBIN_U8("data/effects/efob089.pmdpal"); +const RGB_Struct gUnknown_9817A74[] = INCBIN_U8("data/effects/efob089.pmdpal"); const ax_pose *const gUnknown_9817AB4[] = { gUnknown_9817560, gUnknown_981760A, diff --git a/src/data/effects/efob090.c b/src/data/effects/efob090.c index 7d423850d..941e0bdd4 100644 --- a/src/data/effects/efob090.c +++ b/src/data/effects/efob090.c @@ -391,7 +391,7 @@ const ax_anim gUnknown_981860C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98186B4[] = INCBIN_U32("data/effects/efob090.4bpp"); -const RGB gUnknown_9819554[] = INCBIN_U8("data/effects/efob090.pmdpal"); +const RGB_Struct gUnknown_9819554[] = INCBIN_U8("data/effects/efob090.pmdpal"); const ax_pose *const gUnknown_9819594[] = { gUnknown_9817B4C, gUnknown_9817B7E, diff --git a/src/data/effects/efob091.c b/src/data/effects/efob091.c index df4d33a62..e2c9833b9 100644 --- a/src/data/effects/efob091.c +++ b/src/data/effects/efob091.c @@ -218,7 +218,7 @@ const ax_anim gUnknown_9819C70[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9819D84[] = INCBIN_U32("data/effects/efob091.4bpp"); -const RGB gUnknown_981AB84[] = INCBIN_U8("data/effects/efob091.pmdpal"); +const RGB_Struct gUnknown_981AB84[] = INCBIN_U8("data/effects/efob091.pmdpal"); const ax_pose *const gUnknown_981ABC4[] = { gUnknown_98196CC, gUnknown_98196E0, diff --git a/src/data/effects/efob092.c b/src/data/effects/efob092.c index 84a1305c8..cac9950b3 100644 --- a/src/data/effects/efob092.c +++ b/src/data/effects/efob092.c @@ -24,7 +24,7 @@ const ax_anim gUnknown_981ACD8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981ACFC[] = INCBIN_U32("data/effects/efob092.4bpp"); -const RGB gUnknown_981AF3C[] = INCBIN_U8("data/effects/efob092.pmdpal"); +const RGB_Struct gUnknown_981AF3C[] = INCBIN_U8("data/effects/efob092.pmdpal"); const ax_pose *const gUnknown_981AF7C[] = { gUnknown_981AC70, gUnknown_981ACA2, diff --git a/src/data/effects/efob093.c b/src/data/effects/efob093.c index c1bdfcc38..bf0648a8b 100644 --- a/src/data/effects/efob093.c +++ b/src/data/effects/efob093.c @@ -614,7 +614,7 @@ const ax_anim gUnknown_981C1B8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981C2CC[] = INCBIN_U32("data/effects/efob093.4bpp"); -const RGB gUnknown_981CA4C[] = INCBIN_U8("data/effects/efob093.pmdpal"); +const RGB_Struct gUnknown_981CA4C[] = INCBIN_U8("data/effects/efob093.pmdpal"); const ax_pose *const gUnknown_981CA8C[] = { gUnknown_981AFD8, gUnknown_981AFEC, diff --git a/src/data/effects/efob094.c b/src/data/effects/efob094.c index cc74e2839..a428dd2b8 100644 --- a/src/data/effects/efob094.c +++ b/src/data/effects/efob094.c @@ -416,7 +416,7 @@ const ax_anim gUnknown_981D42C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981D768[] = INCBIN_U32("data/effects/efob094.4bpp"); -const RGB gUnknown_981D7E8[] = INCBIN_U8("data/effects/efob094.pmdpal"); +const RGB_Struct gUnknown_981D7E8[] = INCBIN_U8("data/effects/efob094.pmdpal"); const ax_pose *const gUnknown_981D828[] = { gUnknown_981CC30, gUnknown_981CC4E, diff --git a/src/data/effects/efob095.c b/src/data/effects/efob095.c index 4a3ca4dae..8cb2b66dd 100644 --- a/src/data/effects/efob095.c +++ b/src/data/effects/efob095.c @@ -158,7 +158,7 @@ const ax_anim gUnknown_981DD70[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981DE48[] = INCBIN_U32("data/effects/efob095.4bpp"); -const RGB gUnknown_981E388[] = INCBIN_U8("data/effects/efob095.pmdpal"); +const RGB_Struct gUnknown_981E388[] = INCBIN_U8("data/effects/efob095.pmdpal"); const ax_pose *const gUnknown_981E3C8[] = { gUnknown_981D98C, gUnknown_981D9A0, diff --git a/src/data/effects/efob096.c b/src/data/effects/efob096.c index c4b035c60..02cba5007 100644 --- a/src/data/effects/efob096.c +++ b/src/data/effects/efob096.c @@ -497,7 +497,7 @@ const ax_anim gUnknown_981F318[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_981F4B0[] = INCBIN_U32("data/effects/efob096.4bpp"); -const RGB gUnknown_981FC90[] = INCBIN_U8("data/effects/efob096.pmdpal"); +const RGB_Struct gUnknown_981FC90[] = INCBIN_U8("data/effects/efob096.pmdpal"); const ax_pose *const gUnknown_981FCD0[] = { gUnknown_981E460, gUnknown_981E474, diff --git a/src/data/effects/efob097.c b/src/data/effects/efob097.c index f9ac0ef3f..d8ac4ef86 100644 --- a/src/data/effects/efob097.c +++ b/src/data/effects/efob097.c @@ -313,7 +313,7 @@ const ax_anim gUnknown_982064C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98207C0[] = INCBIN_U32("data/effects/efob097.4bpp"); -const RGB gUnknown_98215A0[] = INCBIN_U8("data/effects/efob097.pmdpal"); +const RGB_Struct gUnknown_98215A0[] = INCBIN_U8("data/effects/efob097.pmdpal"); const ax_pose *const gUnknown_98215E0[] = { gUnknown_981FDEC, gUnknown_981FE00, diff --git a/src/data/effects/efob098.c b/src/data/effects/efob098.c index 20b463e53..1da21fffc 100644 --- a/src/data/effects/efob098.c +++ b/src/data/effects/efob098.c @@ -38,7 +38,7 @@ const ax_anim gUnknown_9821784[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98217E4[] = INCBIN_U32("data/effects/efob098.4bpp"); -const RGB gUnknown_9821984[] = INCBIN_U8("data/effects/efob098.pmdpal"); +const RGB_Struct gUnknown_9821984[] = INCBIN_U8("data/effects/efob098.pmdpal"); const ax_pose *const gUnknown_98219C4[] = { gUnknown_98216FC, gUnknown_982171A, diff --git a/src/data/effects/efob099.c b/src/data/effects/efob099.c index ad559c6c7..f08ec565c 100644 --- a/src/data/effects/efob099.c +++ b/src/data/effects/efob099.c @@ -523,7 +523,7 @@ const ax_anim gUnknown_9822A2C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9822A80[] = INCBIN_U32("data/effects/efob099.4bpp"); -const RGB gUnknown_9823980[] = INCBIN_U8("data/effects/efob099.pmdpal"); +const RGB_Struct gUnknown_9823980[] = INCBIN_U8("data/effects/efob099.pmdpal"); const ax_pose *const gUnknown_98239C0[] = { gUnknown_9821A2C, gUnknown_9821A40, diff --git a/src/data/effects/efob100.c b/src/data/effects/efob100.c index 0ecbad655..02ae39143 100644 --- a/src/data/effects/efob100.c +++ b/src/data/effects/efob100.c @@ -257,7 +257,7 @@ const ax_anim gUnknown_98243F4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982446C[] = INCBIN_U32("data/effects/efob100.4bpp"); -const RGB gUnknown_9824B4C[] = INCBIN_U8("data/effects/efob100.pmdpal"); +const RGB_Struct gUnknown_9824B4C[] = INCBIN_U8("data/effects/efob100.pmdpal"); const ax_pose *const gUnknown_9824B8C[] = { gUnknown_9823C20, gUnknown_9823C3E, diff --git a/src/data/effects/efob101.c b/src/data/effects/efob101.c index 8f36aca8c..6135cab54 100644 --- a/src/data/effects/efob101.c +++ b/src/data/effects/efob101.c @@ -108,7 +108,7 @@ const ax_anim gUnknown_9825020[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982508C[] = INCBIN_U32("data/effects/efob101.4bpp"); -const RGB gUnknown_982542C[] = INCBIN_U8("data/effects/efob101.pmdpal"); +const RGB_Struct gUnknown_982542C[] = INCBIN_U8("data/effects/efob101.pmdpal"); const ax_pose *const gUnknown_982546C[] = { gUnknown_9824E3C, gUnknown_9824E50, diff --git a/src/data/effects/efob102.c b/src/data/effects/efob102.c index c8e70b067..9eec29132 100644 --- a/src/data/effects/efob102.c +++ b/src/data/effects/efob102.c @@ -594,7 +594,7 @@ const ax_anim gUnknown_98266AC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98266E8[] = INCBIN_U32("data/effects/efob102.4bpp"); -const RGB gUnknown_9827688[] = INCBIN_U8("data/effects/efob102.pmdpal"); +const RGB_Struct gUnknown_9827688[] = INCBIN_U8("data/effects/efob102.pmdpal"); const ax_pose *const gUnknown_98276C8[] = { gUnknown_9825518, gUnknown_982552C, diff --git a/src/data/effects/efob103.c b/src/data/effects/efob103.c index a85735509..609bbdb94 100644 --- a/src/data/effects/efob103.c +++ b/src/data/effects/efob103.c @@ -267,7 +267,7 @@ const ax_anim gUnknown_9827F88[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98280FC[] = INCBIN_U32("data/effects/efob103.4bpp"); -const RGB gUnknown_9828DDC[] = INCBIN_U8("data/effects/efob103.pmdpal"); +const RGB_Struct gUnknown_9828DDC[] = INCBIN_U8("data/effects/efob103.pmdpal"); const ax_pose *const gUnknown_9828E1C[] = { gUnknown_98278E8, gUnknown_98278FC, diff --git a/src/data/effects/efob104.c b/src/data/effects/efob104.c index 58c2aa3e7..0f8f37e43 100644 --- a/src/data/effects/efob104.c +++ b/src/data/effects/efob104.c @@ -125,7 +125,7 @@ const ax_anim gUnknown_98292D8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982935C[] = INCBIN_U32("data/effects/efob104.4bpp"); -const RGB gUnknown_98299DC[] = INCBIN_U8("data/effects/efob104.pmdpal"); +const RGB_Struct gUnknown_98299DC[] = INCBIN_U8("data/effects/efob104.pmdpal"); const ax_pose *const gUnknown_9829A1C[] = { gUnknown_9828EE8, gUnknown_9828EFC, diff --git a/src/data/effects/efob105.c b/src/data/effects/efob105.c index 9d62e0749..9834d373a 100644 --- a/src/data/effects/efob105.c +++ b/src/data/effects/efob105.c @@ -163,7 +163,7 @@ const ax_anim gUnknown_9829F98[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982A0C4[] = INCBIN_U32("data/effects/efob105.4bpp"); -const RGB gUnknown_982A884[] = INCBIN_U8("data/effects/efob105.pmdpal"); +const RGB_Struct gUnknown_982A884[] = INCBIN_U8("data/effects/efob105.pmdpal"); const ax_pose *const gUnknown_982A8C4[] = { gUnknown_9829B7C, gUnknown_9829BE0, diff --git a/src/data/effects/efob106.c b/src/data/effects/efob106.c index ba3ccfa1a..f4d9772e2 100644 --- a/src/data/effects/efob106.c +++ b/src/data/effects/efob106.c @@ -113,7 +113,7 @@ const ax_anim gUnknown_982ABD8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982ABFC[] = INCBIN_U32("data/effects/efob106.4bpp"); -const RGB gUnknown_982AD1C[] = INCBIN_U8("data/effects/efob106.pmdpal"); +const RGB_Struct gUnknown_982AD1C[] = INCBIN_U8("data/effects/efob106.pmdpal"); const ax_pose *const gUnknown_982AD5C[] = { gUnknown_982A970, gUnknown_982A98E, diff --git a/src/data/effects/efob107.c b/src/data/effects/efob107.c index d9a62115d..f43207be5 100644 --- a/src/data/effects/efob107.c +++ b/src/data/effects/efob107.c @@ -18,7 +18,7 @@ const ax_anim gUnknown_982AF18[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_982AF3C[] = INCBIN_U32("data/effects/efob107.4bpp"); -const RGB gUnknown_982B03C[] = INCBIN_U8("data/effects/efob107.pmdpal"); +const RGB_Struct gUnknown_982B03C[] = INCBIN_U8("data/effects/efob107.pmdpal"); const ax_pose *const gUnknown_982B07C[] = { gUnknown_982AEEC, gUnknown_982AF00, diff --git a/src/data/effects/efob108.c b/src/data/effects/efob108.c index a320bf204..6ad367d8d 100644 --- a/src/data/effects/efob108.c +++ b/src/data/effects/efob108.c @@ -3956,7 +3956,7 @@ const ax_anim gUnknown_9832878[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9832CBC[] = INCBIN_U32("data/effects/efob108.4bpp"); -const RGB gUnknown_9833BDC[] = INCBIN_U8("data/effects/efob108.pmdpal"); +const RGB_Struct gUnknown_9833BDC[] = INCBIN_U8("data/effects/efob108.pmdpal"); const ax_pose *const gUnknown_9833C1C[] = { gUnknown_982B0D8, gUnknown_982B11E, diff --git a/src/data/effects/efob109.c b/src/data/effects/efob109.c index c50192c2f..dd3a3f90c 100644 --- a/src/data/effects/efob109.c +++ b/src/data/effects/efob109.c @@ -536,7 +536,7 @@ const ax_anim gUnknown_983558C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98355E0[] = INCBIN_U32("data/effects/efob109.4bpp"); -const RGB gUnknown_98365E0[] = INCBIN_U8("data/effects/efob109.pmdpal"); +const RGB_Struct gUnknown_98365E0[] = INCBIN_U8("data/effects/efob109.pmdpal"); const ax_pose *const gUnknown_9836620[] = { gUnknown_98344D8, gUnknown_9834528, diff --git a/src/data/effects/efob110.c b/src/data/effects/efob110.c index 22451104d..fa931a2fb 100644 --- a/src/data/effects/efob110.c +++ b/src/data/effects/efob110.c @@ -367,7 +367,7 @@ const ax_anim gUnknown_9837278[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9837308[] = INCBIN_U32("data/effects/efob110.4bpp"); -const RGB gUnknown_98378C8[] = INCBIN_U8("data/effects/efob110.pmdpal"); +const RGB_Struct gUnknown_98378C8[] = INCBIN_U8("data/effects/efob110.pmdpal"); const ax_pose *const gUnknown_9837908[] = { gUnknown_98367E4, gUnknown_9836834, diff --git a/src/data/effects/efob111.c b/src/data/effects/efob111.c index 4f18bbfff..0300170c0 100644 --- a/src/data/effects/efob111.c +++ b/src/data/effects/efob111.c @@ -71,7 +71,7 @@ const ax_anim gUnknown_9837BB0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9837C28[] = INCBIN_U32("data/effects/efob111.4bpp"); -const RGB gUnknown_98385C8[] = INCBIN_U8("data/effects/efob111.pmdpal"); +const RGB_Struct gUnknown_98385C8[] = INCBIN_U8("data/effects/efob111.pmdpal"); const ax_pose *const gUnknown_9838608[] = { gUnknown_9837A44, gUnknown_9837A58, diff --git a/src/data/effects/efob112.c b/src/data/effects/efob112.c index da9af2d41..0a909a32e 100644 --- a/src/data/effects/efob112.c +++ b/src/data/effects/efob112.c @@ -36,7 +36,7 @@ const ax_anim gUnknown_98386F0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983875C[] = INCBIN_U32("data/effects/efob112.4bpp"); -const RGB gUnknown_9838A1C[] = INCBIN_U8("data/effects/efob112.pmdpal"); +const RGB_Struct gUnknown_9838A1C[] = INCBIN_U8("data/effects/efob112.pmdpal"); const ax_pose *const gUnknown_9838A5C[] = { gUnknown_9838688, gUnknown_983869C, diff --git a/src/data/effects/efob113.c b/src/data/effects/efob113.c index fd25833b3..280d45767 100644 --- a/src/data/effects/efob113.c +++ b/src/data/effects/efob113.c @@ -365,7 +365,7 @@ const ax_anim gUnknown_98396B8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9839748[] = INCBIN_U32("data/effects/efob113.4bpp"); -const RGB gUnknown_983A6A8[] = INCBIN_U8("data/effects/efob113.pmdpal"); +const RGB_Struct gUnknown_983A6A8[] = INCBIN_U8("data/effects/efob113.pmdpal"); const ax_pose *const gUnknown_983A6E8[] = { gUnknown_9838AC4, gUnknown_9838B96, diff --git a/src/data/effects/efob114.c b/src/data/effects/efob114.c index a89615105..d745c5f0e 100644 --- a/src/data/effects/efob114.c +++ b/src/data/effects/efob114.c @@ -477,7 +477,7 @@ const ax_anim gUnknown_983B2FC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983B5B4[] = INCBIN_U32("data/effects/efob114.4bpp"); -const RGB gUnknown_983BD34[] = INCBIN_U8("data/effects/efob114.pmdpal"); +const RGB_Struct gUnknown_983BD34[] = INCBIN_U8("data/effects/efob114.pmdpal"); const ax_pose *const gUnknown_983BD74[] = { gUnknown_983A7B8, gUnknown_983A7CC, diff --git a/src/data/effects/efob115.c b/src/data/effects/efob115.c index 3d65fba15..8cff4e450 100644 --- a/src/data/effects/efob115.c +++ b/src/data/effects/efob115.c @@ -39,7 +39,7 @@ const ax_anim gUnknown_983BF58[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983BFF4[] = INCBIN_U32("data/effects/efob115.4bpp"); -const RGB gUnknown_983C1B4[] = INCBIN_U8("data/effects/efob115.pmdpal"); +const RGB_Struct gUnknown_983C1B4[] = INCBIN_U8("data/effects/efob115.pmdpal"); const ax_pose *const gUnknown_983C1F4[] = { gUnknown_983BEE4, gUnknown_983BEF8, diff --git a/src/data/effects/efob116.c b/src/data/effects/efob116.c index 8ee0b1ee4..aa910184b 100644 --- a/src/data/effects/efob116.c +++ b/src/data/effects/efob116.c @@ -165,7 +165,7 @@ const ax_anim gUnknown_983C5F4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983C78C[] = INCBIN_U32("data/effects/efob116.4bpp"); -const RGB gUnknown_983D34C[] = INCBIN_U8("data/effects/efob116.pmdpal"); +const RGB_Struct gUnknown_983D34C[] = INCBIN_U8("data/effects/efob116.pmdpal"); const ax_pose *const gUnknown_983D38C[] = { gUnknown_983C258, gUnknown_983C26C, diff --git a/src/data/effects/efob117.c b/src/data/effects/efob117.c index 1afbabb9b..b6b8bd614 100644 --- a/src/data/effects/efob117.c +++ b/src/data/effects/efob117.c @@ -18,7 +18,7 @@ const ax_anim gUnknown_983D44C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983D470[] = INCBIN_U32("data/effects/efob117.4bpp"); -const RGB gUnknown_983D570[] = INCBIN_U8("data/effects/efob117.pmdpal"); +const RGB_Struct gUnknown_983D570[] = INCBIN_U8("data/effects/efob117.pmdpal"); const ax_pose *const gUnknown_983D5B0[] = { gUnknown_983D420, gUnknown_983D434, diff --git a/src/data/effects/efob118.c b/src/data/effects/efob118.c index 51cae73d9..0560869f1 100644 --- a/src/data/effects/efob118.c +++ b/src/data/effects/efob118.c @@ -253,7 +253,7 @@ const ax_anim gUnknown_983DCB4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983DCF0[] = INCBIN_U32("data/effects/efob118.4bpp"); -const RGB gUnknown_983DDF0[] = INCBIN_U8("data/effects/efob118.pmdpal"); +const RGB_Struct gUnknown_983DDF0[] = INCBIN_U8("data/effects/efob118.pmdpal"); const ax_pose *const gUnknown_983DE30[] = { gUnknown_983D60C, gUnknown_983D634, diff --git a/src/data/effects/efob119.c b/src/data/effects/efob119.c index 8c52f1027..6a9689d58 100644 --- a/src/data/effects/efob119.c +++ b/src/data/effects/efob119.c @@ -199,7 +199,7 @@ const ax_anim gUnknown_983E578[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983E650[] = INCBIN_U32("data/effects/efob119.4bpp"); -const RGB gUnknown_983EF50[] = INCBIN_U8("data/effects/efob119.pmdpal"); +const RGB_Struct gUnknown_983EF50[] = INCBIN_U8("data/effects/efob119.pmdpal"); const ax_pose *const gUnknown_983EF90[] = { gUnknown_983E000, gUnknown_983E014, diff --git a/src/data/effects/efob120.c b/src/data/effects/efob120.c index f2a7172ec..dba2d71a1 100644 --- a/src/data/effects/efob120.c +++ b/src/data/effects/efob120.c @@ -45,7 +45,7 @@ const ax_anim gUnknown_983F128[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_983F1D0[] = INCBIN_U32("data/effects/efob120.4bpp"); -const RGB gUnknown_983F2F0[] = INCBIN_U8("data/effects/efob120.pmdpal"); +const RGB_Struct gUnknown_983F2F0[] = INCBIN_U8("data/effects/efob120.pmdpal"); const ax_pose *const gUnknown_983F330[] = { gUnknown_983F070, gUnknown_983F084, diff --git a/src/data/effects/efob121.c b/src/data/effects/efob121.c index cfd7470db..290e93501 100644 --- a/src/data/effects/efob121.c +++ b/src/data/effects/efob121.c @@ -1301,7 +1301,7 @@ const ax_anim gUnknown_98415F0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9841698[] = INCBIN_U32("data/effects/efob121.4bpp"); -const RGB gUnknown_9841EB8[] = INCBIN_U8("data/effects/efob121.pmdpal"); +const RGB_Struct gUnknown_9841EB8[] = INCBIN_U8("data/effects/efob121.pmdpal"); const ax_pose *const gUnknown_9841EF8[] = { gUnknown_983F3B4, gUnknown_983F3DC, diff --git a/src/data/effects/efob122.c b/src/data/effects/efob122.c index d0e423538..e24b672c5 100644 --- a/src/data/effects/efob122.c +++ b/src/data/effects/efob122.c @@ -757,7 +757,7 @@ const ax_anim gUnknown_98439E8[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9843A3C[] = INCBIN_U32("data/effects/efob122.4bpp"); -const RGB gUnknown_984499C[] = INCBIN_U8("data/effects/efob122.pmdpal"); +const RGB_Struct gUnknown_984499C[] = INCBIN_U8("data/effects/efob122.pmdpal"); const ax_pose *const gUnknown_98449DC[] = { gUnknown_98424A8, gUnknown_98424DA, diff --git a/src/data/effects/efob123.c b/src/data/effects/efob123.c index 332d2a17f..61ba945bf 100644 --- a/src/data/effects/efob123.c +++ b/src/data/effects/efob123.c @@ -39,7 +39,7 @@ const ax_anim gUnknown_9844F38[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9845034[] = INCBIN_U32("data/effects/efob123.4bpp"); -const RGB gUnknown_9845254[] = INCBIN_U8("data/effects/efob123.pmdpal"); +const RGB_Struct gUnknown_9845254[] = INCBIN_U8("data/effects/efob123.pmdpal"); const ax_pose *const gUnknown_9845294[] = { gUnknown_9844EEC, gUnknown_9844F1E, diff --git a/src/data/effects/efob124.c b/src/data/effects/efob124.c index 3ab35f558..15e244324 100644 --- a/src/data/effects/efob124.c +++ b/src/data/effects/efob124.c @@ -249,7 +249,7 @@ const ax_anim gUnknown_9845AB4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9845AF0[] = INCBIN_U32("data/effects/efob124.4bpp"); -const RGB gUnknown_98469D0[] = INCBIN_U8("data/effects/efob124.pmdpal"); +const RGB_Struct gUnknown_98469D0[] = INCBIN_U8("data/effects/efob124.pmdpal"); const ax_pose *const gUnknown_9846A10[] = { gUnknown_98452F0, gUnknown_984530E, diff --git a/src/data/effects/efob125.c b/src/data/effects/efob125.c index 79b69d7c3..53a450ab6 100644 --- a/src/data/effects/efob125.c +++ b/src/data/effects/efob125.c @@ -360,7 +360,7 @@ const ax_anim gUnknown_98475B0[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9847640[] = INCBIN_U32("data/effects/efob125.4bpp"); -const RGB gUnknown_9847BC0[] = INCBIN_U8("data/effects/efob125.pmdpal"); +const RGB_Struct gUnknown_9847BC0[] = INCBIN_U8("data/effects/efob125.pmdpal"); const ax_pose *const gUnknown_9847C00[] = { gUnknown_9846AD8, gUnknown_9846B28, diff --git a/src/data/effects/efob126.c b/src/data/effects/efob126.c index 45b3087a2..5644a5c20 100644 --- a/src/data/effects/efob126.c +++ b/src/data/effects/efob126.c @@ -93,7 +93,7 @@ const ax_anim gUnknown_9847F74[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9847FB0[] = INCBIN_U32("data/effects/efob126.4bpp"); -const RGB gUnknown_9848130[] = INCBIN_U8("data/effects/efob126.pmdpal"); +const RGB_Struct gUnknown_9848130[] = INCBIN_U8("data/effects/efob126.pmdpal"); const ax_pose *const gUnknown_9848170[] = { gUnknown_9847D2C, gUnknown_9847D40, diff --git a/src/data/effects/efob127.c b/src/data/effects/efob127.c index a2a92d36e..e849e714c 100644 --- a/src/data/effects/efob127.c +++ b/src/data/effects/efob127.c @@ -69,7 +69,7 @@ const ax_anim gUnknown_984842C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9848444[] = INCBIN_U32("data/effects/efob127.4bpp"); -const RGB gUnknown_9848844[] = INCBIN_U8("data/effects/efob127.pmdpal"); +const RGB_Struct gUnknown_9848844[] = INCBIN_U8("data/effects/efob127.pmdpal"); const ax_pose *const gUnknown_9848884[] = { gUnknown_98482E0, gUnknown_98482F4, diff --git a/src/data/effects/efob128.c b/src/data/effects/efob128.c index 7e64c9d0a..221f11b73 100644 --- a/src/data/effects/efob128.c +++ b/src/data/effects/efob128.c @@ -90,7 +90,7 @@ const ax_anim gUnknown_9848AAC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9848CE0[] = INCBIN_U32("data/effects/efob128.4bpp"); -const RGB gUnknown_9849100[] = INCBIN_U8("data/effects/efob128.pmdpal"); +const RGB_Struct gUnknown_9849100[] = INCBIN_U8("data/effects/efob128.pmdpal"); const ax_pose *const gUnknown_9849140[] = { gUnknown_98489F4, gUnknown_9848A08, diff --git a/src/data/effects/efob129.c b/src/data/effects/efob129.c index 5918ee8f0..b0603de2e 100644 --- a/src/data/effects/efob129.c +++ b/src/data/effects/efob129.c @@ -607,7 +607,7 @@ const ax_anim gUnknown_984A154[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984A22C[] = INCBIN_U32("data/effects/efob129.4bpp"); -const RGB gUnknown_984AB2C[] = INCBIN_U8("data/effects/efob129.pmdpal"); +const RGB_Struct gUnknown_984AB2C[] = INCBIN_U8("data/effects/efob129.pmdpal"); const ax_pose *const gUnknown_984AB6C[] = { gUnknown_98491B8, gUnknown_98491CC, diff --git a/src/data/effects/efob130.c b/src/data/effects/efob130.c index 98a947d4d..77a6e25c5 100644 --- a/src/data/effects/efob130.c +++ b/src/data/effects/efob130.c @@ -103,7 +103,7 @@ const ax_anim gUnknown_984AF50[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984B238[] = INCBIN_U32("data/effects/efob130.4bpp"); -const RGB gUnknown_984BD58[] = INCBIN_U8("data/effects/efob130.pmdpal"); +const RGB_Struct gUnknown_984BD58[] = INCBIN_U8("data/effects/efob130.pmdpal"); const ax_pose *const gUnknown_984BD98[] = { gUnknown_984AE84, gUnknown_984AEA2, diff --git a/src/data/effects/efob131.c b/src/data/effects/efob131.c index a382d8ac2..196369123 100644 --- a/src/data/effects/efob131.c +++ b/src/data/effects/efob131.c @@ -63,7 +63,7 @@ const ax_anim gUnknown_984BF28[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984BF7C[] = INCBIN_U32("data/effects/efob131.4bpp"); -const RGB gUnknown_984CC1C[] = INCBIN_U8("data/effects/efob131.pmdpal"); +const RGB_Struct gUnknown_984CC1C[] = INCBIN_U8("data/effects/efob131.pmdpal"); const ax_pose *const gUnknown_984CC5C[] = { gUnknown_984BE08, gUnknown_984BE1C, diff --git a/src/data/effects/efob132.c b/src/data/effects/efob132.c index ad822e33b..dc4eaa84a 100644 --- a/src/data/effects/efob132.c +++ b/src/data/effects/efob132.c @@ -277,7 +277,7 @@ const ax_anim gUnknown_984D520[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984D628[] = INCBIN_U32("data/effects/efob132.4bpp"); -const RGB gUnknown_984E388[] = INCBIN_U8("data/effects/efob132.pmdpal"); +const RGB_Struct gUnknown_984E388[] = INCBIN_U8("data/effects/efob132.pmdpal"); const ax_pose *const gUnknown_984E3C8[] = { gUnknown_984CCFC, gUnknown_984CD10, diff --git a/src/data/effects/efob133.c b/src/data/effects/efob133.c index 6d3582a0f..d23a9693e 100644 --- a/src/data/effects/efob133.c +++ b/src/data/effects/efob133.c @@ -182,7 +182,7 @@ const ax_anim gUnknown_984E81C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984E9C0[] = INCBIN_U32("data/effects/efob133.4bpp"); -const RGB gUnknown_984EAC0[] = INCBIN_U8("data/effects/efob133.pmdpal"); +const RGB_Struct gUnknown_984EAC0[] = INCBIN_U8("data/effects/efob133.pmdpal"); const ax_pose *const gUnknown_984EB00[] = { gUnknown_984E46C, gUnknown_984E480, diff --git a/src/data/effects/efob134.c b/src/data/effects/efob134.c index 4b709cf57..ebcfce328 100644 --- a/src/data/effects/efob134.c +++ b/src/data/effects/efob134.c @@ -124,7 +124,7 @@ const ax_anim gUnknown_984EE34[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_984EEC4[] = INCBIN_U32("data/effects/efob134.4bpp"); -const RGB gUnknown_984FB24[] = INCBIN_U8("data/effects/efob134.pmdpal"); +const RGB_Struct gUnknown_984FB24[] = INCBIN_U8("data/effects/efob134.pmdpal"); const ax_pose *const gUnknown_984FB64[] = { gUnknown_984EBB0, gUnknown_984EBC4, diff --git a/src/data/effects/efob135.c b/src/data/effects/efob135.c index 5e8fda1b2..61245465a 100644 --- a/src/data/effects/efob135.c +++ b/src/data/effects/efob135.c @@ -1217,7 +1217,7 @@ const ax_anim gUnknown_98520F4[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_98523E8[] = INCBIN_U32("data/effects/efob135.4bpp"); -const RGB gUnknown_98531E8[] = INCBIN_U8("data/effects/efob135.pmdpal"); +const RGB_Struct gUnknown_98531E8[] = INCBIN_U8("data/effects/efob135.pmdpal"); const ax_pose *const gUnknown_9853228[] = { gUnknown_984FC50, gUnknown_984FC6E, diff --git a/src/data/effects/efob136.c b/src/data/effects/efob136.c index 3bf774fae..7aecd7fcc 100644 --- a/src/data/effects/efob136.c +++ b/src/data/effects/efob136.c @@ -485,7 +485,7 @@ const ax_anim gUnknown_9854034[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9854058[] = INCBIN_U32("data/effects/efob136.4bpp"); -const RGB gUnknown_98543D8[] = INCBIN_U8("data/effects/efob136.pmdpal"); +const RGB_Struct gUnknown_98543D8[] = INCBIN_U8("data/effects/efob136.pmdpal"); const ax_pose *const gUnknown_9854418[] = { gUnknown_9853454, gUnknown_9853472, diff --git a/src/data/effects/efob137.c b/src/data/effects/efob137.c index 66ceb454e..3e74c66d7 100644 --- a/src/data/effects/efob137.c +++ b/src/data/effects/efob137.c @@ -60,7 +60,7 @@ const ax_anim gUnknown_9854ADC[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9854B48[] = INCBIN_U32("data/effects/efob137.4bpp"); -const RGB gUnknown_9854C48[] = INCBIN_U8("data/effects/efob137.pmdpal"); +const RGB_Struct gUnknown_9854C48[] = INCBIN_U8("data/effects/efob137.pmdpal"); const ax_pose *const gUnknown_9854C88[] = { gUnknown_98549C8, gUnknown_98549DC, diff --git a/src/data/effects/efob138.c b/src/data/effects/efob138.c index cc16b372a..332a3b22f 100644 --- a/src/data/effects/efob138.c +++ b/src/data/effects/efob138.c @@ -1284,7 +1284,7 @@ const ax_anim gUnknown_985739C[] = { { 0, 0, 0, { 0, 0 }, { 0, 0 } }, }; const u32 gUnknown_9857720[] = INCBIN_U32("data/effects/efob138.4bpp"); -const RGB gUnknown_9858720[] = INCBIN_U8("data/effects/efob138.pmdpal"); +const RGB_Struct gUnknown_9858720[] = INCBIN_U8("data/effects/efob138.pmdpal"); const ax_pose *const gUnknown_9858760[] = { gUnknown_9854D20, gUnknown_9854D34, diff --git a/src/data/felicity_bank.h b/src/data/felicity_bank.h index b5f6f1fdc..21c7816dd 100644 --- a/src/data/felicity_bank.h +++ b/src/data/felicity_bank.h @@ -1,28 +1,25 @@ -static const WindowTemplate sUnknown_80DB6DC = { - 0, - 3, - 0, 0, - 0, 0, - 0, 0, - NULL -}; +static const WindowTemplate sUnknown_80DB6DC = WIN_TEMPLATE_DUMMY; static const WindowTemplate sUnknown_80DB6F4 = { - 0, - 3, - 2, 3, - 26, 2, - 2, 0, - NULL + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_NORMAL, + .pos = { 2, 3 }, + .width = 26, + .height = 2, + .totalHeight = 2, + .unk12 = 0, + .header = NULL }; static const WindowTemplate sUnknown_80DB70C = { - 0, - 3, - 17, 8, - 11, 4, - 4, 0, - NULL + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_NORMAL, + .pos = { 17, 8 }, + .width = 11, + .height = 4, + .totalHeight = 4, + .unk12 = 0, + .header = NULL }; ALIGNED(4) static const u8 sDisplayMoney[] = _("Money: "); diff --git a/src/data/ground/ground_data_a01p01_station.h b/src/data/ground/ground_data_a01p01_station.h index 038be0c54..b7561ff52 100644 --- a/src/data/ground/ground_data_a01p01_station.h +++ b/src/data/ground/ground_data_a01p01_station.h @@ -8,18 +8,18 @@ static const struct ScriptCommand s_gs162_g0_s0_station_sref_script[] = { /* 0x820fd30 */ DEBUGINFO_O(10), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), BGM_STOP, JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs162_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs162_g0_s0_station_sref_script }; /* 0x820fd9c */ +static const struct ScriptRef s_gs162_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs162_g0_s0_station_sref_script }; /* 0x820fd9c */ static const struct ScriptCommand s_gs162_g1_s0_station_sref_script[] = { /* 0x820fda8 */ DEBUGINFO_O(19), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(4), + BGM_SWITCH(MUS_DREAM), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs162_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g1_s0_station_sref_script }; /* 0x820fe48 */ +static const struct ScriptRef s_gs162_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g1_s0_station_sref_script }; /* 0x820fe48 */ static const struct ScriptCommand s_gs162_g1_s0_lives0_dlg0[] = { /* 0x820fe54 */ DEBUGINFO_O(34), @@ -37,19 +37,19 @@ static const struct ScriptCommand s_gs162_g1_s0_lives0_dlg0[] = { /* 0x820fe54 * { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Where...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Where am I?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Maybe...{WAIT_PRESS} Is this a dream...?") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("Where...")), + MSG_QUIET(0, _("Where am I?")), + MSG_QUIET(0, _("Maybe...{WAIT_PRESS} Is this a dream...?")), TEXTBOX_CLEAR, WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Oh?{WAIT_PRESS} There's someone here.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Who is it...?{WAIT_PRESS} Someone I know...?") }, + MSG_QUIET(0, _("...Oh?{WAIT_PRESS} There's someone here.")), + MSG_QUIET(0, _("Who is it...?{WAIT_PRESS} Someone I know...?")), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......{WAIT_PRESS}Hmm... I can't remember.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, + MSG_QUIET(0, _("......{WAIT_PRESS}Hmm... I can't remember.")), + MSG_QUIET(0, _("............")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -59,9 +59,9 @@ static const struct ScriptCommand s_gs162_g1_s0_lives0_dlg0[] = { /* 0x820fe54 * static const struct ScriptCommand s_gs162_g2_s0_station_sref_script[] = { /* 0x8210084 */ DEBUGINFO_O(61), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(4), + BGM_SWITCH(MUS_DREAM), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), FANFARE_FADEOUT2(60, 453), @@ -72,7 +72,7 @@ static const struct ScriptCommand s_gs162_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g2_s0_station_sref_script }; /* 0x8210144 */ +static const struct ScriptRef s_gs162_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g2_s0_station_sref_script }; /* 0x8210144 */ static const struct ScriptCommand s_gs162_g2_s0_eff0_script[] = { /* 0x8210150 */ DEBUGINFO_O(78), @@ -88,28 +88,28 @@ static const struct ScriptCommand s_gs162_g2_s0_lives0_dlg0[] = { /* 0x8210190 * { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Again?{WAIT_PRESS} Am I dreaming again...?") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), + MSG_QUIET(0, _("...Again?{WAIT_PRESS} Am I dreaming again...?")), TEXTBOX_CLEAR, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...It's that Pokémon again.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Huh?{WAIT_PRESS}\nThey're...talking to me...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...{WAIT_PRESS}I can't hear them clearly.\nWhat are they saying?") }, + MSG_QUIET(0, _("...It's that Pokémon again.")), + MSG_QUIET(0, _("Huh?{WAIT_PRESS}\nThey're...talking to me...?")), + MSG_QUIET(0, _("...{WAIT_PRESS}I can't hear them clearly.\nWhat are they saying?")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(453), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000003, NULL }, WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Huh? It's shaking.{WAIT_PRESS} An earthquake...?") }, + MSG_QUIET(0, _("Huh? It's shaking.{WAIT_PRESS} An earthquake...?")), { 0x97, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Whoa! It's getting worse.") }, + MSG_QUIET(0, _("Whoa! It's getting worse.")), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("For a dream, this feels strangely\nreal, but...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, + MSG_QUIET(0, _("For a dream, this feels strangely\nreal, but...")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -119,9 +119,9 @@ static const struct ScriptCommand s_gs162_g2_s0_lives0_dlg0[] = { /* 0x8210190 * static const struct ScriptCommand s_gs162_g3_s0_station_sref_script[] = { /* 0x82104bc */ DEBUGINFO_O(121), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(4), + BGM_SWITCH(MUS_DREAM), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -130,7 +130,7 @@ static const struct ScriptCommand s_gs162_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g3_s0_station_sref_script }; /* 0x821055c */ +static const struct ScriptRef s_gs162_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g3_s0_station_sref_script }; /* 0x821055c */ static const struct ScriptCommand s_gs162_g3_s0_lives0_dlg0[] = { /* 0x8210568 */ DEBUGINFO_O(136), @@ -140,23 +140,23 @@ static const struct ScriptCommand s_gs162_g3_s0_lives0_dlg0[] = { /* 0x8210568 * { 0x2d, 0x09, 0x0001, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......Again...{WAIT_PRESS}\nIt's that dream again.") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("......Again...{WAIT_PRESS}\nIt's that dream again.")), TEXTBOX_CLEAR, WAIT(30), SELECT_LIVES(-1, 1), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("That Pokémon... Who could it be...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Huh?{WAIT_PRESS} I'm hearing better this time...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...What?{WAIT_PRESS} Human?{WAIT_PRESS} My role?") }, + MSG_QUIET(0, _("That Pokémon... Who could it be...?")), + MSG_QUIET(0, _("Huh?{WAIT_PRESS} I'm hearing better this time...")), + MSG_QUIET(0, _("...What?{WAIT_PRESS} Human?{WAIT_PRESS} My role?")), TEXTBOX_CLEAR, ALERT_CUE(6), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000007), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("W-wait.\nPlease, tell me more.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......{WAIT_PRESS}\nI can't... Drifting off...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, + MSG_QUIET(0, _("W-wait.\nPlease, tell me more.")), + MSG_QUIET(0, _("......{WAIT_PRESS}\nI can't... Drifting off...")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -228,9 +228,9 @@ static const struct ScriptCommand s_gs162_g3_s1_lives0_dlg0[] = { /* 0x82107fc * static const struct ScriptCommand s_gs162_g4_s0_station_sref_script[] = { /* 0x8210bbc */ DEBUGINFO_O(230), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(4), + BGM_SWITCH(MUS_DREAM), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -239,7 +239,7 @@ static const struct ScriptCommand s_gs162_g4_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g4_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g4_s0_station_sref_script }; /* 0x8210c5c */ +static const struct ScriptRef s_gs162_g4_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g4_s0_station_sref_script }; /* 0x8210c5c */ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 */ DEBUGINFO_O(245), @@ -249,22 +249,22 @@ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 * { 0x2d, 0x09, 0x0002, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), TEXTBOX_CLEAR, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......{WAIT_PRESS}Again.") }, + MSG_QUIET(0, _("......{WAIT_PRESS}Again.")), TEXTBOX_CLEAR, WAIT(30), SELECT_LIVES(-1, 1), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......It's that dream again.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I always see this silhouette...{WAIT_PRESS}\nWho could it be?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh?{WAIT_PRESS} It's saying something!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("But... I can't quite make it out...{WAIT_PRESS}\nIt's clearer than it was before, but...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'll try talking to it.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Hello.{WAIT_PRESS} Please, tell me.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("You...{WAIT_PRESS}\nWho are you?") }, + MSG_QUIET(0, _("......It's that dream again.")), + MSG_QUIET(0, _("I always see this silhouette...{WAIT_PRESS}\nWho could it be?")), + MSG_QUIET(0, _("Oh?{WAIT_PRESS} It's saying something!")), + MSG_QUIET(0, _("But... I can't quite make it out...{WAIT_PRESS}\nIt's clearer than it was before, but...")), + MSG_QUIET(0, _("I'll try talking to it.")), + MSG_QUIET(0, _("Hello.{WAIT_PRESS} Please, tell me.")), + MSG_QUIET(0, _("You...{WAIT_PRESS}\nWho are you?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(-1, _(" ...{WAIT_PRESS}I am...")), @@ -272,7 +272,7 @@ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Ga-{NAME_2}...?!") }, + MSG_QUIET(0, _("Ga-{NAME_2}...?!")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000041), @@ -280,8 +280,8 @@ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...?{WAIT_PRESS} Finally met me...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("You knew me from before?\nWhat about me?") }, + MSG_QUIET(0, _("...?{WAIT_PRESS} Finally met me...?")), + MSG_QUIET(0, _("You knew me from before?\nWhat about me?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000000), @@ -291,13 +291,13 @@ static const struct ScriptCommand s_gs162_g4_s0_lives0_dlg0[] = { /* 0x8210c68 * ALERT_CUE(7), WAIT(30), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh! Wait.{WAIT_PRESS} Just a little longer...") }, + MSG_QUIET(0, _("Oh! Wait.{WAIT_PRESS} Just a little longer...")), TEXTBOX_CLEAR, PORTRAIT_REP(0x0000, 0x00000005), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I want to know more...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("No... It's fading...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, + MSG_QUIET(0, _("I want to know more...")), + MSG_QUIET(0, _("No... It's fading...")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -376,9 +376,9 @@ static const struct ScriptCommand s_gs162_g4_s1_lives0_dlg0[] = { /* 0x821124c * static const struct ScriptCommand s_gs162_g5_s0_station_sref_script[] = { /* 0x821161c */ DEBUGINFO_O(378), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(5), + BGM_SWITCH(MUS_BENEVOLENT_SPIRIT), { 0x27, 0x00, 0x0005, 0x00000020, 0x00ffffff, NULL }, AWAIT_CUE(3), FANFARE_PLAY2(506), @@ -386,7 +386,7 @@ static const struct ScriptCommand s_gs162_g5_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g5_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g5_s0_station_sref_script }; /* 0x82116ac */ +static const struct ScriptRef s_gs162_g5_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g5_s0_station_sref_script }; /* 0x82116ac */ static const struct ScriptCommand s_gs162_g5_s0_lives0_dlg0[] = { /* 0x82116b8 */ DEBUGINFO_O(392), @@ -394,13 +394,13 @@ static const struct ScriptCommand s_gs162_g5_s0_lives0_dlg0[] = { /* 0x82116b8 * SELECT_ANIMATION(2), { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - ROTATE(10, 1, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(30), MSG_NPC(-1, _(" I've been waiting for you.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Ga...{WAIT_PRESS}{NAME_2}!") }, + MSG_QUIET(0, _("Ga...{WAIT_PRESS}{NAME_2}!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(3), @@ -411,9 +411,9 @@ static const struct ScriptCommand s_gs162_g5_s0_lives0_dlg0[] = { /* 0x82116b8 * static const struct ScriptCommand s_gs162_g6_s0_station_sref_script[] = { /* 0x82117e4 */ DEBUGINFO_O(413), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(5), + BGM_SWITCH(MUS_BENEVOLENT_SPIRIT), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -423,7 +423,7 @@ static const struct ScriptCommand s_gs162_g6_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g6_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g6_s0_station_sref_script }; /* 0x8211894 */ +static const struct ScriptRef s_gs162_g6_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g6_s0_station_sref_script }; /* 0x8211894 */ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 */ DEBUGINFO_O(429), @@ -434,18 +434,18 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * { 0x2d, 0x09, 0x0002, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), TEXTBOX_CLEAR, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......This............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......That dream...... Again......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......It's been a while......") }, + MSG_QUIET(0, _("......This............")), + MSG_QUIET(0, _("......That dream...... Again......")), + MSG_QUIET(0, _("......It's been a while......")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(477), SELECT_LIVES(-1, 1), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......You're......{WAIT_PRESS} {NAME_2}...") }, + MSG_QUIET(0, _("......You're......{WAIT_PRESS} {NAME_2}...")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(7), @@ -455,15 +455,15 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" Yes...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...{NAME_2}.{WAIT_PRESS}\nThere's so much I want to ask you.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Why do you appear in my dreams?") }, + MSG_QUIET(0, _("...{NAME_2}.{WAIT_PRESS}\nThere's so much I want to ask you.")), + MSG_QUIET(0, _("Why do you appear in my dreams?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" As an agent of spirits...{WAIT_PRESS}\nI must watch over you...")), MSG_NPC(2, _(" Because that is my role\nnow.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...An agent of spirits?") }, + MSG_QUIET(0, _("...An agent of spirits?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Yes.")), @@ -471,8 +471,8 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" And became a presence\nwithout a physical form like this.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Trainer...?{WAIT_PRESS}\nYou mean the human that was in the\nlegend about Ninetales?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It's awful that your Trainer would abandon\nyou and run away.") }, + MSG_QUIET(0, _("Trainer...?{WAIT_PRESS}\nYou mean the human that was in the\nlegend about Ninetales?")), + MSG_QUIET(0, _("It's awful that your Trainer would abandon\nyou and run away.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000041), @@ -483,7 +483,7 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" But...{WAIT_PRESS}\nI don't hate my Trainer.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Huh? Don't hate your Trainer?{WAIT_PRESS}\nWhy not?") }, + MSG_QUIET(0, _("Huh? Don't hate your Trainer?{WAIT_PRESS}\nWhy not?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Well...{WAIT_PRESS}\nI wonder why myself.\nI don't quite understand...")), @@ -496,7 +496,7 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" And, when it happened,\nI was desperate...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("When it happened...?{WAIT_PRESS}\nYou mean Ninetales's curse?") }, + MSG_QUIET(0, _("When it happened...?{WAIT_PRESS}\nYou mean Ninetales's curse?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Yes.")), @@ -506,8 +506,8 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" I kept my Trainer safe...{WAIT_PRESS}\nThat alone was enough to make me happy.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...Protect the Trainer even at the risk\nof your own life...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...It's amazing what {POKEMON_2}\ndid.)") }, + MSG_QUIET(0, _("(...Protect the Trainer even at the risk\nof your own life...)")), + MSG_QUIET(0, _("(...It's amazing what {POKEMON_2}\ndid.)")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000041), @@ -515,7 +515,7 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" I live on this way with\npride in the role I have been given.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Role?") }, + MSG_QUIET(0, _("...Role?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000000), @@ -527,17 +527,17 @@ static const struct ScriptCommand s_gs162_g6_s0_lives0_dlg0[] = { /* 0x82118a0 * MSG_NPC(2, _(" And, for that role...{WAIT_PRESS}\nyou became a Pokémon.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("What...?{WAIT_PRESS}\nWhat are you saying?") }, + MSG_QUIET(0, _("What...?{WAIT_PRESS}\nWhat are you saying?")), TEXTBOX_CLEAR, FANFARE_PLAY2(453), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000003, NULL }, WAIT(30), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Wah!\nE-earthquake?!") }, + MSG_QUIET(0, _("Wah!\nE-earthquake?!")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(7), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("No! Wait!{WAIT_PRESS}\nI need to know more...") }, + MSG_QUIET(0, _("No! Wait!{WAIT_PRESS}\nI need to know more...")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -626,7 +626,7 @@ static const struct ScriptCommand s_gs162_g6_s1_lives0_dlg0[] = { /* 0x8212774 * SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WAIT(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(7), @@ -674,7 +674,7 @@ static const struct ScriptCommand s_gs162_g6_s1_lives0_dlg0[] = { /* 0x8212774 * static const struct ScriptCommand s_gs162_g7_s0_station_sref_script[] = { /* 0x8212df4 */ DEBUGINFO_O(676), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, -1), { 0x27, 0x01, 0x000e, 0x0000001e, 0x00000000, NULL }, AWAIT_CUE(3), @@ -682,7 +682,7 @@ static const struct ScriptCommand s_gs162_g7_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g7_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g7_s0_station_sref_script }; /* 0x8212e64 */ +static const struct ScriptRef s_gs162_g7_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g7_s0_station_sref_script }; /* 0x8212e64 */ static const struct ScriptCommand s_gs162_g7_s0_lives0_dlg0[] = { /* 0x8212e70 */ DEBUGINFO_O(688), @@ -711,9 +711,9 @@ static const struct ScriptCommand s_gs162_g7_s0_lives1_dlg0[] = { /* 0x8212f40 * static const struct ScriptCommand s_gs162_g8_s0_station_sref_script[] = { /* 0x8212f90 */ DEBUGINFO_O(713), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(5), + BGM_SWITCH(MUS_BENEVOLENT_SPIRIT), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -722,7 +722,7 @@ static const struct ScriptCommand s_gs162_g8_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g8_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g8_s0_station_sref_script }; /* 0x8213030 */ +static const struct ScriptRef s_gs162_g8_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g8_s0_station_sref_script }; /* 0x8213030 */ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c */ DEBUGINFO_O(728), @@ -732,16 +732,16 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * { 0x2d, 0x09, 0x0001, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), TEXTBOX_CLEAR, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......I'm......{WAIT_PRESS}\nIn that dream again...") }, + MSG_QUIET(0, _("......I'm......{WAIT_PRESS}\nIn that dream again...")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(477), SELECT_LIVES(-1, 1), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}{NAME_1}...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}{NAME_1}...")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), @@ -751,8 +751,8 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * MSG_NPC(1, _(" It's tomorrow, isn't it?{WAIT_PRESS}\nThat you take to that underground dungeon.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Yes.{WAIT_PRESS} They make it sound like one\nterrible place...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I wonder if we'll be OK...") }, + MSG_QUIET(0, _("Yes.{WAIT_PRESS} They make it sound like one\nterrible place...")), + MSG_QUIET(0, _("I wonder if we'll be OK...")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0001, 0x00000041), @@ -762,19 +762,19 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000009), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I will. Thank you.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'm feeling a little braver now.\nI will go for it.") }, + MSG_QUIET(0, _("I will. Thank you.")), + MSG_QUIET(0, _("I'm feeling a little braver now.\nI will go for it.")), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("By the way...{WAIT_PRESS}\nGardevoir, do you know?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("What it's like underground?{WAIT_PRESS}\nOr what Groudon is like?") }, + MSG_QUIET(0, _("By the way...{WAIT_PRESS}\nGardevoir, do you know?")), + MSG_QUIET(0, _("What it's like underground?{WAIT_PRESS}\nOr what Groudon is like?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0001, 0x00000042), MSG_NPC(1, _(" No... I'm sorry to say...{WAIT_PRESS}\nI can't envision it...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...OK.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I thought maybe you knew something,\nthe way you said it.") }, + MSG_QUIET(0, _("...OK.")), + MSG_QUIET(0, _("I thought maybe you knew something,\nthe way you said it.")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(1, _(" No. I only wanted to give\nyou encouragement...")), @@ -782,8 +782,8 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000009), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("No, no.\nThat's fine, too.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'm happy you tried to cheer me up.\nThank you.") }, + MSG_QUIET(0, _("No, no.\nThat's fine, too.")), + MSG_QUIET(0, _("I'm happy you tried to cheer me up.\nThank you.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0001, 0x00000000), @@ -791,13 +791,13 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Huh?") }, + MSG_QUIET(0, _("...Huh?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(1, _(" Your role...{WAIT_PRESS}\nis coming to its end, little by little.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("My role...{WAIT_PRESS}\nis ending...?") }, + MSG_QUIET(0, _("My role...{WAIT_PRESS}\nis ending...?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(1, _(" You became a Pokémon in\norder to fulfill a certain role...")), @@ -808,9 +808,9 @@ static const struct ScriptCommand s_gs162_g8_s0_lives0_dlg0[] = { /* 0x821303c * MSG_NPC(1, _(" Now, that role...{WAIT_PRESS}\nis finally drawing to its conclusion.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Gardevoir, tell me!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("What is my role?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Why did I become a Pokémon?") }, + MSG_QUIET(0, _("Gardevoir, tell me!")), + MSG_QUIET(0, _("What is my role?")), + MSG_QUIET(0, _("Why did I become a Pokémon?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(1, _(" When the time comes...")), @@ -885,7 +885,7 @@ static const struct ScriptCommand s_gs162_g8_s1_lives0_dlg0[] = { /* 0x8213b50 * SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WAIT(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(6), @@ -976,9 +976,9 @@ static const struct ScriptCommand s_gs162_g8_s1_lives0_dlg0[] = { /* 0x8213b50 * static const struct ScriptCommand s_gs162_g9_s0_station_sref_script[] = { /* 0x8214480 */ DEBUGINFO_O(978), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(5), + BGM_SWITCH(MUS_BENEVOLENT_SPIRIT), { 0x27, 0x00, 0x0005, 0x0000003c, 0x00ffffff, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -987,7 +987,7 @@ static const struct ScriptCommand s_gs162_g9_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs162_g9_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g9_s0_station_sref_script }; /* 0x8214520 */ +static const struct ScriptRef s_gs162_g9_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g9_s0_station_sref_script }; /* 0x8214520 */ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c */ DEBUGINFO_O(993), @@ -999,15 +999,15 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}Gardevoir...?") }, + MSG_QUIET(0, _("............{WAIT_PRESS}Gardevoir...?")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(477), SELECT_LIVES(-1, 1), AWAIT_CUE(5), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Gardevoir...{WAIT_PRESS}\nWill you tell me now?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Who or what I am...?") }, + MSG_QUIET(0, _("Gardevoir...{WAIT_PRESS}\nWill you tell me now?")), + MSG_QUIET(0, _("Who or what I am...?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), @@ -1019,7 +1019,7 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * MSG_NPC(2, _(" Come to save this world.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nCame to save the world of Pokémon?{WAIT_PRESS}\nI did...?") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nCame to save the world of Pokémon?{WAIT_PRESS}\nI did...?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Yes.{WAIT_PRESS} We learned that\nthis world faced extinction.")), @@ -1030,8 +1030,8 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Wa... {WAIT_PRESS}Wait a second!{WAIT_PRESS}\nHero? Me? That's too much!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'm not anything special like that?!") }, + MSG_QUIET(0, _("Wa... {WAIT_PRESS}Wait a second!{WAIT_PRESS}\nHero? Me? That's too much!")), + MSG_QUIET(0, _("I'm not anything special like that?!")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000041), @@ -1045,7 +1045,7 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("True courage...?{WAIT_PRESS}\nThat...{WAIT_PRESS} I'm even less confident about that.") }, + MSG_QUIET(0, _("True courage...?{WAIT_PRESS}\nThat...{WAIT_PRESS} I'm even less confident about that.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000041), @@ -1063,7 +1063,7 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * MSG_NPC(2, _(" That is how you came to\nbe in this world.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I...{WAIT_PRESS}\nI did that?") }, + MSG_QUIET(0, _("I...{WAIT_PRESS}\nI did that?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Your courage has been\nproven.")), @@ -1071,23 +1071,23 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * MSG_NPC(2, _(" And that role...{WAIT_PRESS}\nIt is soon coming to its end.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...{WAIT_PRESS}Stopping the meteor from\ncrashing into this world...?{WAIT_PRESS}\nThat's my role?") }, + MSG_QUIET(0, _("...{WAIT_PRESS}Stopping the meteor from\ncrashing into this world...?{WAIT_PRESS}\nThat's my role?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Yes.{WAIT_PRESS}\nAnd when that is accomplished...")), MSG_NPC(2, _(" You can return to your\nhuman world.")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh...{WAIT_PRESS}\nSo I can go back to being a human...") }, + MSG_QUIET(0, _("Oh...{WAIT_PRESS}\nSo I can go back to being a human...")), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Wait!{WAIT_PRESS}\nBut that means...") }, + MSG_QUIET(0, _("Wait!{WAIT_PRESS}\nBut that means...")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Yes.{WAIT_PRESS} It means...{WAIT_PRESS}\nParting ways with {NAME_1}.")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000005), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("{NAME_1}......{WAIT_PRESS}\nI have to leave?") }, + MSG_QUIET(0, _("{NAME_1}......{WAIT_PRESS}\nI have to leave?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" {NAME_1} feels great\nkinship with you, {NAME_0}.")), @@ -1108,7 +1108,7 @@ static const struct ScriptCommand s_gs162_g9_s0_lives0_dlg0[] = { /* 0x821452c * { 0x27, 0x00, 0x0005, 0x00000018, 0x00ffffff, NULL }, WAIT(30), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...!{WAIT_PRESS} W-what was that?!") }, + MSG_QUIET(0, _("...!{WAIT_PRESS} W-what was that?!")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" ............{WAIT_PRESS}Who was it?{WAIT_PRESS}\nSomeone appears to have been looking\ninto your dream.")), @@ -1186,7 +1186,7 @@ static const struct ScriptCommand s_gs162_g9_s1_lives0_dlg0[] = { /* 0x82157b8 * SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WAIT(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(7), @@ -1235,7 +1235,7 @@ static const struct ScriptCommand s_gs162_g9_s1_lives0_dlg0[] = { /* 0x82157b8 * static const struct ScriptCommand s_gs162_g10_s0_station_sref_script[] = { /* 0x8215d28 */ DEBUGINFO_O(1237), - SELECT_MAP(162), + SELECT_MAP(MAP_PERSONALITY_TEST_CYAN), SELECT_ENTITIES(-1, 0), { 0x27, 0x01, 0x000e, 0x0000001e, 0x00000000, NULL }, AWAIT_CUE(3), @@ -1243,7 +1243,7 @@ static const struct ScriptCommand s_gs162_g10_s0_station_sref_script[] = { /* 0x RET, }; -static const struct ScriptRef s_gs162_g10_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs162_g10_s0_station_sref_script }; /* 0x8215d98 */ +static const struct ScriptRef s_gs162_g10_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs162_g10_s0_station_sref_script }; /* 0x8215d98 */ static const struct ScriptCommand s_gs162_g10_s0_lives0_dlg0[] = { /* 0x8215da4 */ DEBUGINFO_O(1249), @@ -1485,4 +1485,4 @@ static const struct GroundLink s_gs162_links[] = { /* 0x82163b8 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs162 = { LPARRAY(s_gs162_groups), s_gs162_links }; /* 0x82163c0 */ +const GroundScriptHeader gGroundScript_gs162 = { LPARRAY(s_gs162_groups), s_gs162_links }; /* 0x82163c0 */ diff --git a/src/data/ground/ground_data_a01p02_station.h b/src/data/ground/ground_data_a01p02_station.h index 353f24f66..b64992f37 100644 --- a/src/data/ground/ground_data_a01p02_station.h +++ b/src/data/ground/ground_data_a01p02_station.h @@ -8,22 +8,22 @@ static const struct ScriptCommand s_gs163_g0_s0_station_sref_script[] = { /* 0x82163d4 */ DEBUGINFO_O(10), - SELECT_MAP(163), + SELECT_MAP(MAP_PERSONALITY_TEST_PURPLE), BGM_STOP, JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs163_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs163_g0_s0_station_sref_script }; /* 0x8216440 */ +static const struct ScriptRef s_gs163_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs163_g0_s0_station_sref_script }; /* 0x8216440 */ static const struct ScriptCommand s_gs163_g1_s0_station_sref_script[] = { /* 0x821644c */ DEBUGINFO_O(19), BGM_STOP, - SELECT_MAP(163), + SELECT_MAP(MAP_PERSONALITY_TEST_PURPLE), { 0x2d, 0x09, 0x0000, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000002), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Urgggh...{WAIT_PRESS} I feel horrible...") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("...Urgggh...{WAIT_PRESS} I feel horrible...")), TEXTBOX_CLEAR, WAIT(10), SELECT_ENTITIES(-1, -1), @@ -34,7 +34,7 @@ static const struct ScriptCommand s_gs163_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs163_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs163_g1_s0_station_sref_script }; /* 0x8216588 */ +static const struct ScriptRef s_gs163_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs163_g1_s0_station_sref_script }; /* 0x8216588 */ static const struct ScriptCommand s_gs163_g1_s0_lives0_dlg0[] = { /* 0x8216594 */ @@ -45,9 +45,9 @@ static const struct ScriptCommand s_gs163_g1_s0_lives0_dlg0[] = { /* 0x8216594 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000002), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("This is a dream...{WAIT_PRESS} Isn't it...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...But why...?{WAIT_PRESS}\nWhy do I feel this terrible...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("This is...{WAIT_PRESS} The first time...") }, + MSG_QUIET(0, _("This is a dream...{WAIT_PRESS} Isn't it...?")), + MSG_QUIET(0, _("...But why...?{WAIT_PRESS}\nWhy do I feel this terrible...?")), + MSG_QUIET(0, _("This is...{WAIT_PRESS} The first time...")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -56,7 +56,7 @@ static const struct ScriptCommand s_gs163_g1_s0_lives0_dlg0[] = { /* 0x8216594 * static const struct ScriptCommand s_gs163_g2_s0_station_sref_script[] = { /* 0x82166dc */ DEBUGINFO_O(58), - SELECT_MAP(163), + SELECT_MAP(MAP_PERSONALITY_TEST_PURPLE), SELECT_ENTITIES(-1, -1), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), @@ -64,7 +64,7 @@ static const struct ScriptCommand s_gs163_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs163_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs163_g2_s0_station_sref_script }; /* 0x821674c */ +static const struct ScriptRef s_gs163_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs163_g2_s0_station_sref_script }; /* 0x821674c */ static const struct ScriptCommand s_gs163_g2_s0_lives0_dlg0[] = { /* 0x8216758 */ DEBUGINFO_O(70), @@ -76,9 +76,9 @@ static const struct ScriptCommand s_gs163_g2_s0_lives0_dlg0[] = { /* 0x8216758 * WAIT(60), BGM_FADEOUT(120), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......The pain......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......It's going away............") }, + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("......The pain......")), + MSG_QUIET(0, _("......It's going away............")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -87,7 +87,7 @@ static const struct ScriptCommand s_gs163_g2_s0_lives0_dlg0[] = { /* 0x8216758 * static const struct ScriptCommand s_gs163_g3_s0_station_sref_script[] = { /* 0x8216898 */ DEBUGINFO_O(89), - SELECT_MAP(163), + SELECT_MAP(MAP_PERSONALITY_TEST_PURPLE), SELECT_ENTITIES(-1, -1), BGM_FADEIN(60, 37), { 0x22, 0x01, 0x005a, 0x00000000, 0x00000000, NULL }, @@ -99,7 +99,7 @@ static const struct ScriptCommand s_gs163_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs163_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs163_g3_s0_station_sref_script }; /* 0x8216948 */ +static const struct ScriptRef s_gs163_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs163_g3_s0_station_sref_script }; /* 0x8216948 */ static const struct ScriptCommand s_gs163_g3_s0_lives0_dlg0[] = { /* 0x8216954 */ DEBUGINFO_O(105), @@ -109,8 +109,8 @@ static const struct ScriptCommand s_gs163_g3_s0_lives0_dlg0[] = { /* 0x8216954 * { 0x2d, 0x09, 0x0003, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}If you fail to draw out {NAME_2}'s\n{CENTER_ALIGN}true feelings...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}The curse will never be broken.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}If you fail to draw out {NAME_2}'s\n{CENTER_ALIGN}true feelings...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}The curse will never be broken.")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(465), @@ -121,124 +121,124 @@ static const struct ScriptCommand s_gs163_g3_s0_lives0_dlg0[] = { /* 0x8216954 * MSG_NPC(2, _(" Don't you dare fool around!\nI'll make you pay for it!")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You have but one chance.{WAIT_PRESS}\n{CENTER_ALIGN}{NAME_0},\n{CENTER_ALIGN}do your best.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Fine...{WAIT_PRESS} It is time.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}First of all...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}You have but one chance.{WAIT_PRESS}\n{CENTER_ALIGN}{NAME_0},\n{CENTER_ALIGN}do your best.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Fine...{WAIT_PRESS} It is time.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}First of all...")), LABEL(2), /* = 0x02 */ ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}Why does {NAME_2} wish to\n{CENTER_ALIGN}break this curse?")), CHOICE(/* label */ 4, _("To help {NAME_3}.")), CHOICE(/* label */ 5, _("Just a whim.")), LABEL(5), /* = 0x05 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}............{WAIT_PRESS}Do you mean that?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}............{WAIT_PRESS}Do you mean that?")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}Do you truly...{WAIT_PRESS}\n{CENTER_ALIGN}truly believe that?")), CHOICE(/* label */ 7, _("Yes.")), CHOICE(/* label */ 8, _("No.")), LABEL(7), /* = 0x07 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}If that is truly how you feel...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}My questions\n{CENTER_ALIGN}will end now.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}If that is truly how you feel...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}My questions\n{CENTER_ALIGN}will end now.")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}You have\n{CENTER_ALIGN}no regrets?")), CHOICE(/* label */ 10, _("None.")), CHOICE(/* label */ 8, _("I do.")), LABEL(8), /* = 0x08 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}Please be serious.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Let me ask you again.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}Please be serious.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Let me ask you again.")), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}That's a lie, isn't it?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Didn't {NAME_2} abandon\n{CENTER_ALIGN}{NAME_3} long ago?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}That's a lie, isn't it?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Didn't {NAME_2} abandon\n{CENTER_ALIGN}{NAME_3} long ago?")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}Why would {NAME_2}\n{CENTER_ALIGN}want to save Gardevoir now?")), CHOICE(/* label */ 12, _("For taking the curse.")), CHOICE(/* label */ 13, _("Came to understand {NAME_3}.")), LABEL(12), /* = 0x0c */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_3} certainly did protect\n{CENTER_ALIGN}{NAME_2} from the curse.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Sacrificing herself to do so.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_3} certainly did protect\n{CENTER_ALIGN}{NAME_2} from the curse.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Sacrificing herself to do so.")), LABEL(14), /* = 0x0e */ ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}But what did {NAME_2}\n{CENTER_ALIGN}do then?")), CHOICE(/* label */ 5, _("Tried to protect {NAME_3}.")), CHOICE(/* label */ 15, _("Abandoned Gardevoir and ran.")), LABEL(15), /* = 0x0f */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Yes...{WAIT_PRESS} {NAME_2} abandoned\n{CENTER_ALIGN}{NAME_3} and fled.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Yes...{WAIT_PRESS} {NAME_2} abandoned\n{CENTER_ALIGN}{NAME_3} and fled.")), LABEL(16), /* = 0x10 */ ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}Why did {NAME_2}\n{CENTER_ALIGN}abandon {NAME_3}?")), CHOICE(/* label */ 17, _("Gengar only cared about himself.")), CHOICE(/* label */ 5, _("Gengar intended to help later.")), LABEL(17), /* = 0x11 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}That's right.{WAIT_PRESS}\n{CENTER_ALIGN}{NAME_2} didn't want to\n{CENTER_ALIGN}be cursed himself...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}And abandoned {NAME_3}.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}When {NAME_2} was a human,\n{CENTER_ALIGN}{NAME_3} was his partner.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}But to {NAME_2}, {NAME_3}\n{CENTER_ALIGN}was merely a tool.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}That's right.{WAIT_PRESS}\n{CENTER_ALIGN}{NAME_2} didn't want to\n{CENTER_ALIGN}be cursed himself...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}And abandoned {NAME_3}.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}When {NAME_2} was a human,\n{CENTER_ALIGN}{NAME_3} was his partner.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}But to {NAME_2}, {NAME_3}\n{CENTER_ALIGN}was merely a tool.")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}The bond between {NAME_2} and\n{CENTER_ALIGN}{NAME_3} was that flimsy...{WAIT_PRESS}\n{CENTER_ALIGN}Is that what I am hearing?")), CHOICE(/* label */ 19, _("Yes.")), CHOICE(/* label */ 20, _("No.")), LABEL(20), /* = 0x14 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}The bond between {NAME_2} and\n{CENTER_ALIGN}{NAME_3} you claim to be strong?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}But that makes no sense.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_3} saved {NAME_2} from\n{CENTER_ALIGN}the curse. That much is true.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}It was from her depth of\n{CENTER_ALIGN}feeling for {NAME_2}.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}The bond between {NAME_2} and\n{CENTER_ALIGN}{NAME_3} you claim to be strong?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}But that makes no sense.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_3} saved {NAME_2} from\n{CENTER_ALIGN}the curse. That much is true.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}It was from her depth of\n{CENTER_ALIGN}feeling for {NAME_2}.")), JUMP_LABEL(14), LABEL(19), /* = 0x13 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}If that is truly how you feel...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}My questions\n{CENTER_ALIGN}will end now.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}If that is truly how you feel...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}My questions\n{CENTER_ALIGN}will end now.")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}You have\n{CENTER_ALIGN}no regrets?")), CHOICE(/* label */ 10, _("None.")), CHOICE(/* label */ 22, _("I do.")), LABEL(22), /* = 0x16 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You claim that isn't true?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}But {NAME_2} abandoned\n{CENTER_ALIGN}{NAME_3}.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}You claim that isn't true?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}But {NAME_2} abandoned\n{CENTER_ALIGN}{NAME_3}.")), JUMP_LABEL(16), LABEL(13), /* = 0x0d */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Came to understand\n{CENTER_ALIGN}{NAME_3}'s feelings?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}What is it you claim to understand?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Came to understand\n{CENTER_ALIGN}{NAME_3}'s feelings?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}What is it you claim to understand?")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}What do you claim to be\n{CENTER_ALIGN}{NAME_3}'s feelings?")), CHOICE(/* label */ 24, _("Caring for {NAME_2}.")), CHOICE(/* label */ 25, _("Hatred for {NAME_2}.")), LABEL(24), /* = 0x18 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Caring for {NAME_2}.{WAIT_PRESS}\n{CENTER_ALIGN}I see...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_3} became a presence\n{CENTER_ALIGN}without a physical form because\n{CENTER_ALIGN}she bore the curse...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}But even then, Gardevoir never\n{CENTER_ALIGN}stopped caring for {NAME_2}...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Having learned that, {NAME_2}\n{CENTER_ALIGN}now wants to save {NAME_3}...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}It makes sense...{WAIT_PRESS} However...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Until now, {NAME_2} had\n{CENTER_ALIGN}forgotten entirely about\n{CENTER_ALIGN}{NAME_3}, correct?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Caring for {NAME_2}.{WAIT_PRESS}\n{CENTER_ALIGN}I see...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_3} became a presence\n{CENTER_ALIGN}without a physical form because\n{CENTER_ALIGN}she bore the curse...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}But even then, Gardevoir never\n{CENTER_ALIGN}stopped caring for {NAME_2}...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Having learned that, {NAME_2}\n{CENTER_ALIGN}now wants to save {NAME_3}...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}It makes sense...{WAIT_PRESS} However...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Until now, {NAME_2} had\n{CENTER_ALIGN}forgotten entirely about\n{CENTER_ALIGN}{NAME_3}, correct?")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}But now Gengar wants to save\n{CENTER_ALIGN}Gardevoir. Isn't that asking a lot?")), CHOICE(/* label */ 27, _("Yes.")), CHOICE(/* label */ 28, _("No.")), LABEL(27), /* = 0x1b */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I see...\n{CENTER_ALIGN}You say this because Gengar is\n{CENTER_ALIGN}willing to face the consequences?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Gengar is coming to the help of\n{CENTER_ALIGN}Gardevoir because he wants to help...{WAIT_PRESS}\n{CENTER_ALIGN}Is that what you claim?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}I see...\n{CENTER_ALIGN}You say this because Gengar is\n{CENTER_ALIGN}willing to face the consequences?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Gengar is coming to the help of\n{CENTER_ALIGN}Gardevoir because he wants to help...{WAIT_PRESS}\n{CENTER_ALIGN}Is that what you claim?")), JUMP_LABEL(10), LABEL(28), /* = 0x1c */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You say that is not so...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You believe that this is another matter?\n{CENTER_ALIGN}And to help is only natural?{WAIT_PRESS}\n{CENTER_ALIGN}That is what you believe?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}You say that is not so...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}You believe that this is another matter?\n{CENTER_ALIGN}And to help is only natural?{WAIT_PRESS}\n{CENTER_ALIGN}That is what you believe?")), JUMP_LABEL(10), LABEL(25), /* = 0x19 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Hatred for {NAME_2}...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_3} felt hatred toward\n{CENTER_ALIGN}{NAME_2} for abandonment...{WAIT_PRESS}\n{CENTER_ALIGN}That is what you claim?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Hatred for {NAME_2}...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_3} felt hatred toward\n{CENTER_ALIGN}{NAME_2} for abandonment...{WAIT_PRESS}\n{CENTER_ALIGN}That is what you claim?")), LABEL(29), /* = 0x1d */ ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}In spite of that, {NAME_2}\n{CENTER_ALIGN}is trying to help Gardevoir...{WAIT_PRESS}\n{CENTER_ALIGN}Why should that be so?")), CHOICE(/* label */ 30, _("To clear up misunderstandings.")), CHOICE(/* label */ 31, _("To punish Gardevoir.")), LABEL(30), /* = 0x1e */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I see.\n{CENTER_ALIGN}To clear up misunderstandings.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Gengar hopes to help {NAME_3}\n{CENTER_ALIGN}and clear up misunderstandings...{WAIT_PRESS}\n{CENTER_ALIGN}That is what you claim?") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}I see.\n{CENTER_ALIGN}To clear up misunderstandings.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Gengar hopes to help {NAME_3}\n{CENTER_ALIGN}and clear up misunderstandings...{WAIT_PRESS}\n{CENTER_ALIGN}That is what you claim?")), JUMP_LABEL(10), LABEL(31), /* = 0x1f */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Gengar would go through the trouble\n{CENTER_ALIGN}of helping {NAME_3} just so she\n{CENTER_ALIGN}could be punished?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Do you claim that seriously?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}If that is true...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}My queries will\n{CENTER_ALIGN}end now.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Gengar would go through the trouble\n{CENTER_ALIGN}of helping {NAME_3} just so she\n{CENTER_ALIGN}could be punished?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Do you claim that seriously?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}If that is true...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}My queries will\n{CENTER_ALIGN}end now.")), ASK2(FALSE, /*default*/ -1, /* speaker */ -1, _("{CENTER_ALIGN}May I finish now?")), CHOICE(/* label */ 10, _("Yes.")), CHOICE(/* label */ 33, _("No.")), LABEL(33), /* = 0x21 */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}This isn't the end?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Is there anything else you wish to say?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Oh? You are confused?") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}You must be more serious.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Let me go back to my inquiry.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_3} felt hatred toward\n{CENTER_ALIGN}{NAME_2} for abandonment...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}This isn't the end?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Is there anything else you wish to say?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Oh? You are confused?")), + MSG_QUIET(-1, _("{CENTER_ALIGN}............{WAIT_PRESS}\n{CENTER_ALIGN}You must be more serious.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Let me go back to my inquiry.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_3} felt hatred toward\n{CENTER_ALIGN}{NAME_2} for abandonment...")), JUMP_LABEL(29), LABEL(10), /* = 0x0a */ - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I understand now...\n{CENTER_ALIGN}My questions are finished.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}I understand now...\n{CENTER_ALIGN}My questions are finished.")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -333,4 +333,4 @@ static const struct GroundLink s_gs163_links[] = { /* 0x8218124 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs163 = { LPARRAY(s_gs163_groups), s_gs163_links }; /* 0x821812c */ +const GroundScriptHeader gGroundScript_gs163 = { LPARRAY(s_gs163_groups), s_gs163_links }; /* 0x821812c */ diff --git a/src/data/ground/ground_data_a02p01_station.h b/src/data/ground/ground_data_a02p01_station.h index 40956121e..4c2ec43b6 100644 --- a/src/data/ground/ground_data_a02p01_station.h +++ b/src/data/ground/ground_data_a02p01_station.h @@ -15,11 +15,11 @@ static const struct ScriptCommand s_gs164_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs164_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs164_g0_s0_station_sref_script }; /* 0x82181ac */ +static const struct ScriptRef s_gs164_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs164_g0_s0_station_sref_script }; /* 0x82181ac */ static const struct ScriptCommand s_gs164_g1_s0_station_sref_script[] = { /* 0x82181b8 */ DEBUGINFO_O(21), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x23, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x26, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(164), @@ -37,7 +37,7 @@ static const struct ScriptCommand s_gs164_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs164_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs164_g1_s0_station_sref_script }; /* 0x8218330 */ +static const struct ScriptRef s_gs164_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs164_g1_s0_station_sref_script }; /* 0x8218330 */ static const struct ScriptCommand s_gs164_g1_s0_lives0_dlg0[] = { /* 0x821833c */ @@ -104,4 +104,4 @@ static const struct GroundLink s_gs164_links[] = { /* 0x821857c */ /* link 1 */ { { /*x*/ 35, /*y*/ 21, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs164 = { LPARRAY(s_gs164_groups), s_gs164_links }; /* 0x821858c */ +const GroundScriptHeader gGroundScript_gs164 = { LPARRAY(s_gs164_groups), s_gs164_links }; /* 0x821858c */ diff --git a/src/data/ground/ground_data_a02p02_station.h b/src/data/ground/ground_data_a02p02_station.h index 4a665c7af..1d2ffddbe 100644 --- a/src/data/ground/ground_data_a02p02_station.h +++ b/src/data/ground/ground_data_a02p02_station.h @@ -15,11 +15,11 @@ static const struct ScriptCommand s_gs165_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs165_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs165_g0_s0_station_sref_script }; /* 0x821860c */ +static const struct ScriptRef s_gs165_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs165_g0_s0_station_sref_script }; /* 0x821860c */ static const struct ScriptCommand s_gs165_g1_s0_station_sref_script[] = { /* 0x8218618 */ DEBUGINFO_O(21), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x23, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x26, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(165), @@ -44,7 +44,7 @@ static const struct ScriptCommand s_gs165_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs165_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs165_g1_s0_station_sref_script }; /* 0x8218828 */ +static const struct ScriptRef s_gs165_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs165_g1_s0_station_sref_script }; /* 0x8218828 */ @@ -54,7 +54,7 @@ static const struct ScriptCommand s_gs165_g1_s0_lives0_dlg0[] = { /* 0x8218834 * { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(6), WALK_GRID(204, 0), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(5), WAIT(30), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000005), @@ -79,7 +79,7 @@ static const struct ScriptCommand s_gs165_g1_s0_lives1_dlg0[] = { /* 0x8218a34 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(204, 1), - ROTATE(8, 11, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_11, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), WAIT(10), @@ -124,4 +124,4 @@ static const struct GroundLink s_gs165_links[] = { /* 0x8218b98 */ /* link 1 */ { { /*x*/ 14, /*y*/ 12, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs165 = { LPARRAY(s_gs165_groups), s_gs165_links }; /* 0x8218ba8 */ +const GroundScriptHeader gGroundScript_gs165 = { LPARRAY(s_gs165_groups), s_gs165_links }; /* 0x8218ba8 */ diff --git a/src/data/ground/ground_data_a02p03_station.h b/src/data/ground/ground_data_a02p03_station.h index c2c1b5c0e..82af64648 100644 --- a/src/data/ground/ground_data_a02p03_station.h +++ b/src/data/ground/ground_data_a02p03_station.h @@ -15,7 +15,7 @@ static const struct ScriptCommand s_gs166_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs166_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs166_g0_s0_station_sref_script }; /* 0x8218c28 */ +static const struct ScriptRef s_gs166_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs166_g0_s0_station_sref_script }; /* 0x8218c28 */ static const struct ScriptCommand s_gs166_g1_s0_station_sref_script[] = { /* 0x8218c34 */ DEBUGINFO_O(21), @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs166_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs166_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs166_g1_s0_station_sref_script }; /* 0x8218ca4 */ +static const struct ScriptRef s_gs166_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs166_g1_s0_station_sref_script }; /* 0x8218ca4 */ static const struct ScriptCommand s_gs166_g1_s0_lives0_dlg0[] = { /* 0x8218cb0 */ DEBUGINFO_O(33), @@ -36,7 +36,7 @@ static const struct ScriptCommand s_gs166_g1_s0_lives0_dlg0[] = { /* 0x8218cb0 * ALERT_CUE(6), WALK_GRID(512, 0), WAIT(15), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), BGM_FADEOUT(60), WAIT(20), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000002), @@ -47,8 +47,8 @@ static const struct ScriptCommand s_gs166_g1_s0_lives0_dlg0[] = { /* 0x8218cb0 * PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" Oh, no! Look!")), TEXTBOX_CLEAR, - BGM_SWITCH(38), - ROTATE(4, 11, DIRECTION_EAST), + BGM_SWITCH(MUS_THE_MOUNTAIN_OF_FIRE), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), WAIT(20), ALERT_CUE(3), HALT, @@ -61,9 +61,9 @@ static const struct ScriptCommand s_gs166_g1_s0_lives1_dlg0[] = { /* 0x8218e38 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(512, 1), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(20), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -95,7 +95,7 @@ static const struct ScriptCommand s_gs166_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs166_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs166_g2_s0_station_sref_script }; /* 0x8219150 */ +static const struct ScriptRef s_gs166_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs166_g2_s0_station_sref_script }; /* 0x8219150 */ static const struct ScriptCommand s_gs166_g2_s0_lives0_dlg0[] = { /* 0x821915c */ @@ -118,7 +118,7 @@ static const struct ScriptCommand s_gs166_g2_s0_lives0_dlg0[] = { /* 0x821915c * WAIT(20), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), PORTRAIT_REP(0x0001, 0x00000005), MSG_NPC(1, _(" What'll we do,\n{NAME_0}?")), TEXTBOX_CLEAR, @@ -128,7 +128,7 @@ static const struct ScriptCommand s_gs166_g2_s0_lives0_dlg0[] = { /* 0x821915c * FANFARE_PLAY2(465), ALERT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), MSG_NPC(-1, _(" Get them!")), TEXTBOX_CLEAR, ALERT_CUE(6), @@ -152,16 +152,16 @@ static const struct ScriptCommand s_gs166_g2_s0_lives1_dlg0[] = { /* 0x821952c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x50, 0x0200, 0x00000002, 0x00000000, NULL }, @@ -223,4 +223,4 @@ static const struct GroundLink s_gs166_links[] = { /* 0x8219760 */ /* link 1 */ { { /*x*/ 32, /*y*/ 27, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs166 = { LPARRAY(s_gs166_groups), s_gs166_links }; /* 0x8219770 */ +const GroundScriptHeader gGroundScript_gs166 = { LPARRAY(s_gs166_groups), s_gs166_links }; /* 0x8219770 */ diff --git a/src/data/ground/ground_data_a02p04_station.h b/src/data/ground/ground_data_a02p04_station.h index e2776a942..a53fd324c 100644 --- a/src/data/ground/ground_data_a02p04_station.h +++ b/src/data/ground/ground_data_a02p04_station.h @@ -18,7 +18,7 @@ static const struct ScriptCommand s_gs167_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs167_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs167_g0_s0_station_sref_script }; /* 0x82197f0 */ +static const struct ScriptRef s_gs167_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs167_g0_s0_station_sref_script }; /* 0x82197f0 */ static const struct ScriptCommand s_gs167_g1_s0_station_sref_script[] = { /* 0x82197fc */ DEBUGINFO_O(24), @@ -30,13 +30,13 @@ static const struct ScriptCommand s_gs167_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs167_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs167_g1_s0_station_sref_script }; /* 0x821986c */ +static const struct ScriptRef s_gs167_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs167_g1_s0_station_sref_script }; /* 0x821986c */ static const struct ScriptCommand s_gs167_g2_s0_station_sref_script[] = { /* 0x8219878 */ DEBUGINFO_O(36), SELECT_MAP(167), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -59,7 +59,7 @@ static const struct ScriptCommand s_gs167_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs167_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs167_g2_s0_station_sref_script }; /* 0x8219b4c */ +static const struct ScriptRef s_gs167_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs167_g2_s0_station_sref_script }; /* 0x8219b4c */ static const struct ScriptCommand s_gs167_g2_s0_eff0_script[] = { /* 0x8219b58 */ @@ -88,7 +88,7 @@ static const struct ScriptCommand s_gs167_g2_s0_lives0_dlg0[] = { /* 0x8219c28 * WAIT(120), ALERT_CUE(6), WALK_GRID(256, 1), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), WAIT(80), ALERT_CUE(6), AWAIT_CUE(5), @@ -104,7 +104,7 @@ static const struct ScriptCommand s_gs167_g2_s0_lives0_dlg0[] = { /* 0x8219c28 * ALERT_CUE(6), AWAIT_CUE(5), WAIT(15), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Haaah!\nThe view's great here.")), @@ -132,7 +132,7 @@ static const struct ScriptCommand s_gs167_g2_s0_lives0_dlg0[] = { /* 0x8219c28 * VARIANT(/* == */ 1, _(" ............{WAIT_PRESS}Hey, {NAME_0}.")), VARIANT(/* == */ 3, _(" ............{WAIT_PRESS}Um, {NAME_0}?")), VARIANT_DEFAULT(_(" ............{WAIT_PRESS}{NAME_0}.")), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" You remember how tough it\nwas getting over Mt. Blaze, right?")), VARIANT(/* == */ 1, _(" I don't think many Pokémon\ncan get through there.")), @@ -226,7 +226,7 @@ static const struct ScriptCommand s_gs167_g2_s0_lives0_dlg0[] = { /* 0x8219c28 * VARIANT(/* == */ 3, _(" Oh?{WAIT_PRESS} What's wrong?\nAren't we going, {NAME_0}?")), VARIANT_DEFAULT(_(" Huh?{WAIT_PRESS} What's the matter?\nAren't you coming, {NAME_0}?")), TEXTBOX_CLEAR, - ROTATE(10, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_11, DIRECTION_SOUTHWEST), WAIT(30), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" ...{WAIT_PRESS}What?{WAIT_PRESS}\nAren't I tired, you're asking?")), @@ -280,13 +280,13 @@ static const struct ScriptCommand s_gs167_g2_s0_lives1_dlg0[] = { /* 0x821b5d4 * AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), WAIT(15), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), @@ -308,7 +308,7 @@ static const struct ScriptCommand s_gs167_g2_s0_lives1_dlg0[] = { /* 0x821b5d4 * AWAIT_CUE(6), WALK_GRID(153, 3), WAIT(30), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(153, 4), @@ -364,4 +364,4 @@ static const struct GroundLink s_gs167_links[] = { /* 0x821b9e8 */ /* link 4 */ { { /*x*/ 1, /*y*/ 40, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs167 = { LPARRAY(s_gs167_groups), s_gs167_links }; /* 0x821ba10 */ +const GroundScriptHeader gGroundScript_gs167 = { LPARRAY(s_gs167_groups), s_gs167_links }; /* 0x821ba10 */ diff --git a/src/data/ground/ground_data_a03p01_station.h b/src/data/ground/ground_data_a03p01_station.h index 935f6b1ae..bfba10c1e 100644 --- a/src/data/ground/ground_data_a03p01_station.h +++ b/src/data/ground/ground_data_a03p01_station.h @@ -13,7 +13,7 @@ static const struct ScriptCommand s_gs168_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs168_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs168_g0_s0_station_sref_script }; /* 0x821ba90 */ +static const struct ScriptRef s_gs168_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs168_g0_s0_station_sref_script }; /* 0x821ba90 */ static const struct ScriptCommand s_gs168_g1_s0_station_sref_script[] = { /* 0x821ba9c */ DEBUGINFO_O(19), @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs168_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs168_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs168_g1_s0_station_sref_script }; /* 0x821bb2c */ +static const struct ScriptRef s_gs168_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs168_g1_s0_station_sref_script }; /* 0x821bb2c */ static const struct ScriptCommand s_gs168_g1_s0_eff0_script[] = { /* 0x821bb38 */ DEBUGINFO_O(33), @@ -65,7 +65,7 @@ static const struct ScriptCommand s_gs168_g1_s0_lives0_dlg0[] = { /* 0x821bbf8 * MSG_NPC(1, _(" Hachoo!")), TEXTBOX_CLEAR, WAIT(8), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(24), ALERT_CUE(6), AWAIT_CUE(5), @@ -74,7 +74,7 @@ static const struct ScriptCommand s_gs168_g1_s0_lives0_dlg0[] = { /* 0x821bbf8 * MSG_NPC(1, _(" Yuck...{WAIT_PRESS}\nMy nose is running, and it's freezing.")), TEXTBOX_CLEAR, WAIT(30), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), { 0x3b, 0x36, 0x0004, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(5), ALERT_CUE(6), @@ -167,32 +167,32 @@ static const struct ScriptCommand s_gs168_g1_s0_lives1_dlg0[] = { /* 0x821c620 * { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), SELECT_ANIMATION(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), { 0x56, 0x00, 0x0000, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x89, 0x0c, 0x0100, 0x00000002, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), SELECT_ANIMATION(5), HALT, @@ -203,7 +203,7 @@ static const struct ScriptCommand s_gs168_g1_s0_lives2_dlg0[] = { /* 0x821c8e0 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), SELECT_ANIMATION(32), WAIT(9), FANFARE_PLAY2(478), @@ -216,14 +216,14 @@ static const struct ScriptCommand s_gs168_g2_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(168), SELECT_WEATHER(-1), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs168_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs168_g2_s0_station_sref_script }; /* 0x821ca10 */ +static const struct ScriptRef s_gs168_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs168_g2_s0_station_sref_script }; /* 0x821ca10 */ static const struct ScriptCommand s_gs168_g2_s0_lives0_dlg0[] = { /* 0x821ca1c */ DEBUGINFO_O(229), @@ -244,13 +244,13 @@ static const struct ScriptCommand s_gs168_g2_s0_lives0_dlg0[] = { /* 0x821ca1c * VARIANT_DEFAULT(_(" Oh!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), ALERT_CUE(6), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!\nCheck that out!")), VARIANT_DEFAULT(_(" {NAME_0}! Look!")), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(6), MSG_NPC(1, _(" See that?{WAIT_PRESS}\nThose trees are frozen!")), TEXTBOX_CLEAR, @@ -270,10 +270,10 @@ static const struct ScriptCommand s_gs168_g2_s0_lives1_dlg0[] = { /* 0x821cc58 * SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), HALT, }; @@ -335,4 +335,4 @@ static const struct GroundLink s_gs168_links[] = { /* 0x821ce84 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs168 = { LPARRAY(s_gs168_groups), s_gs168_links }; /* 0x821ce8c */ +const GroundScriptHeader gGroundScript_gs168 = { LPARRAY(s_gs168_groups), s_gs168_links }; /* 0x821ce8c */ diff --git a/src/data/ground/ground_data_a03p02_station.h b/src/data/ground/ground_data_a03p02_station.h index dc01a4ef2..941acb819 100644 --- a/src/data/ground/ground_data_a03p02_station.h +++ b/src/data/ground/ground_data_a03p02_station.h @@ -13,20 +13,20 @@ static const struct ScriptCommand s_gs169_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs169_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs169_g0_s0_station_sref_script }; /* 0x821cf0c */ +static const struct ScriptRef s_gs169_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs169_g0_s0_station_sref_script }; /* 0x821cf0c */ static const struct ScriptCommand s_gs169_g1_s0_station_sref_script[] = { /* 0x821cf18 */ DEBUGINFO_O(19), SELECT_MAP(169), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs169_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs169_g1_s0_station_sref_script }; /* 0x821cf98 */ +static const struct ScriptRef s_gs169_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs169_g1_s0_station_sref_script }; /* 0x821cf98 */ static const struct ScriptCommand s_gs169_g1_s0_lives0_dlg0[] = { /* 0x821cfa4 */ DEBUGINFO_O(32), @@ -88,4 +88,4 @@ static const struct GroundLink s_gs169_links[] = { /* 0x821d1c8 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs169 = { LPARRAY(s_gs169_groups), s_gs169_links }; /* 0x821d1d0 */ +const GroundScriptHeader gGroundScript_gs169 = { LPARRAY(s_gs169_groups), s_gs169_links }; /* 0x821d1d0 */ diff --git a/src/data/ground/ground_data_a03p03_station.h b/src/data/ground/ground_data_a03p03_station.h index c0d5b8f7a..517d39098 100644 --- a/src/data/ground/ground_data_a03p03_station.h +++ b/src/data/ground/ground_data_a03p03_station.h @@ -13,7 +13,7 @@ static const struct ScriptCommand s_gs170_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs170_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs170_g0_s0_station_sref_script }; /* 0x821d250 */ +static const struct ScriptRef s_gs170_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs170_g0_s0_station_sref_script }; /* 0x821d250 */ static const struct ScriptCommand s_gs170_g1_s0_station_sref_script[] = { /* 0x821d25c */ DEBUGINFO_O(19), @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs170_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs170_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs170_g1_s0_station_sref_script }; /* 0x821d2ec */ +static const struct ScriptRef s_gs170_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs170_g1_s0_station_sref_script }; /* 0x821d2ec */ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 */ DEBUGINFO_O(33), @@ -38,12 +38,12 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * WAIT(30), WAIT(120), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(This icy mountain path seems to go\non forever...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(We've walked a long way here...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("({NAME_1} looks exhausted, too...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(We've been running all this time out\nof desperation...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(What's in store for us ahead?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Are we really doing the right thing?)") }, + MSG_QUIET(0, _("(This icy mountain path seems to go\non forever...)")), + MSG_QUIET(0, _("(We've walked a long way here...)")), + MSG_QUIET(0, _("({NAME_1} looks exhausted, too...)")), + MSG_QUIET(0, _("(We've been running all this time out\nof desperation...)")), + MSG_QUIET(0, _("(What's in store for us ahead?)")), + MSG_QUIET(0, _("(Are we really doing the right thing?)")), TEXTBOX_CLEAR, WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT_FLIP, 0x0001, 0x00000002), @@ -84,7 +84,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * { 0x3b, 0x36, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x00000000), PORTRAIT_POS(1, 0, 2), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -118,7 +118,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * { 0x3b, 0x36, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x00000000), PORTRAIT_POS(1, 0, 2), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -151,10 +151,10 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * LABEL(5), /* = 0x05 */ ALERT_CUE(6), WAIT(45), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Yes...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("({NAME_1} trusts me without any\ndoubt.)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I can't afford to be indecisive.)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I have to believe in myself more.)") }, + MSG_QUIET(0, _("(Yes...)")), + MSG_QUIET(0, _("({NAME_1} trusts me without any\ndoubt.)")), + MSG_QUIET(0, _("(I can't afford to be indecisive.)")), + MSG_QUIET(0, _("(I have to believe in myself more.)")), TEXTBOX_CLEAR, WAIT(30), BGM_FADEOUT(30), @@ -169,7 +169,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * SELECT_ANIMATION(2), WAIT(60), PORTRAIT_REP(0x0000, 0x00000002), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...{WAIT_PRESS}Wh-what?{WAIT_PRESS} What was that?)") }, + MSG_QUIET(0, _("(...{WAIT_PRESS}Wh-what?{WAIT_PRESS} What was that?)")), TEXTBOX_CLEAR, FANFARE_PLAY2(476), { 0x28, 0x01, 0x0007, 0x00000004, 0x00806040, NULL }, @@ -180,7 +180,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * { 0x27, 0x01, 0x0007, 0x0000000c, 0x00806040, NULL }, { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...D-dizzy?{WAIT_PRESS} Or what?)") }, + MSG_QUIET(0, _("(...D-dizzy?{WAIT_PRESS} Or what?)")), TEXTBOX_CLEAR, FANFARE_PLAY2(469), ALERT_CUE(6), @@ -205,15 +205,15 @@ static const struct ScriptCommand s_gs170_g1_s0_lives0_dlg0[] = { /* 0x821d2f8 * MSG_NPC(-1, _(" ...Finally, you have arrived...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Someone...{WAIT_PRESS}\nSomeone is talking to me...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("({NAME_1}...?{WAIT_PRESS} No.\nThis voice isn't {NAME_1}...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(This voice...{WAIT_PRESS}\nI've heard it somewhere...)") }, + MSG_QUIET(0, _("(Someone...{WAIT_PRESS}\nSomeone is talking to me...)")), + MSG_QUIET(0, _("({NAME_1}...?{WAIT_PRESS} No.\nThis voice isn't {NAME_1}...)")), + MSG_QUIET(0, _("(This voice...{WAIT_PRESS}\nI've heard it somewhere...)")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(477), SELECT_ENTITIES(-1, 1), { 0x27, 0x01, 0x0005, 0x00000030, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(30), MSG_NPC(-1, _(" Finally...")), MSG_NPC(-1, _(" You have arrived...")), @@ -235,7 +235,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives1_dlg0[] = { /* 0x821ec08 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, ALERT_CUE(5), @@ -253,7 +253,7 @@ static const struct ScriptCommand s_gs170_g1_s0_lives2_dlg0[] = { /* 0x821ed08 * SELECT_ANIMATION(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), HALT, }; @@ -278,7 +278,7 @@ static const struct ScriptCommand s_gs170_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs170_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs170_g2_s0_station_sref_script }; /* 0x821ee58 */ +static const struct ScriptRef s_gs170_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs170_g2_s0_station_sref_script }; /* 0x821ee58 */ static const struct ScriptCommand s_gs170_g2_s0_lives0_dlg0[] = { /* 0x821ee64 */ DEBUGINFO_O(284), @@ -292,7 +292,7 @@ static const struct ScriptCommand s_gs170_g2_s0_lives0_dlg0[] = { /* 0x821ee64 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...You're...{WAIT_PRESS} What...") }, + MSG_QUIET(0, _("...You're...{WAIT_PRESS} What...")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), @@ -308,9 +308,9 @@ static const struct ScriptCommand s_gs170_g2_s0_lives0_dlg0[] = { /* 0x821ee64 * WAIT(10), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), WAIT(64), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(16), MSG_NPC(2, _(" I cannot be seen by others.")), MSG_NPC(2, _(" I am visible only to you.")), @@ -322,7 +322,7 @@ static const struct ScriptCommand s_gs170_g2_s0_lives0_dlg0[] = { /* 0x821ee64 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Ninetales?!") }, + MSG_QUIET(0, _("...Ninetales?!")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Ninetales awaits your\narrival.")), @@ -331,11 +331,11 @@ static const struct ScriptCommand s_gs170_g2_s0_lives0_dlg0[] = { /* 0x821ee64 * MSG_NPC(2, _(" Beware...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh! W-wait...!") }, + MSG_QUIET(0, _("Oh! W-wait...!")), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), WAIT(60), PORTRAIT_REP(0x0000, 0x00000005), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, + MSG_QUIET(0, _("..................")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), @@ -377,10 +377,10 @@ static const struct ScriptCommand s_gs170_g2_s0_lives2_dlg0[] = { /* 0x821f5e4 * SELECT_ANIMATION(2), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_RIGHT_FUNC), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_LEFT_FUNC), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(6), HALT, }; @@ -482,4 +482,4 @@ static const struct GroundLink s_gs170_links[] = { /* 0x821f9a0 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs170 = { LPARRAY(s_gs170_groups), s_gs170_links }; /* 0x821f9a8 */ +const GroundScriptHeader gGroundScript_gs170 = { LPARRAY(s_gs170_groups), s_gs170_links }; /* 0x821f9a8 */ diff --git a/src/data/ground/ground_data_a04p01_station.h b/src/data/ground/ground_data_a04p01_station.h index f463ff02e..a7fdd7c3f 100644 --- a/src/data/ground/ground_data_a04p01_station.h +++ b/src/data/ground/ground_data_a04p01_station.h @@ -24,20 +24,20 @@ static const struct ScriptCommand s_gs171_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs171_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs171_g0_s0_station_sref_script }; /* 0x821fa28 */ +static const struct ScriptRef s_gs171_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs171_g0_s0_station_sref_script }; /* 0x821fa28 */ static const struct ScriptCommand s_gs171_g1_s0_station_sref_script[] = { /* 0x821fa34 */ DEBUGINFO_O(30), SELECT_MAP(171), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x27, 0x00, 0x0005, 0x00000020, 0x00ffffff, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs171_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g1_s0_station_sref_script }; /* 0x821fab4 */ +static const struct ScriptRef s_gs171_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g1_s0_station_sref_script }; /* 0x821fab4 */ static const struct ScriptCommand s_gs171_g1_s0_eff0_script[] = { /* 0x821fac0 */ DEBUGINFO_O(43), @@ -74,14 +74,14 @@ static const struct ScriptCommand s_gs171_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(74), SELECT_MAP(171), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x28, 0x01, 0x0005, 0x00000020, 0x00ffffff, NULL }, RET, }; -static const struct ScriptRef s_gs171_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g2_s0_station_sref_script }; /* 0x821fd38 */ +static const struct ScriptRef s_gs171_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g2_s0_station_sref_script }; /* 0x821fd38 */ static const struct ScriptCommand s_gs171_g2_s0_eff0_script[] = { /* 0x821fd44 */ DEBUGINFO_O(87), @@ -123,14 +123,14 @@ static const struct ScriptCommand s_gs171_g3_s0_station_sref_script[] = { /* 0x8 WAIT(60), SELECT_MAP(171), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs171_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g3_s0_station_sref_script }; /* 0x82200a4 */ +static const struct ScriptRef s_gs171_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g3_s0_station_sref_script }; /* 0x82200a4 */ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 */ DEBUGINFO_O(136), @@ -160,7 +160,7 @@ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 * WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), MSG_NPC(1, _(" Wh-{WAIT_PRESS}what's going on?{WAIT_PRESS}\nWhat is {NAME_3} doing?")), TEXTBOX_CLEAR, @@ -199,18 +199,18 @@ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 * TEXTBOX_CLEAR, WAIT(30), { 0x84, 0x00, 0x0100, -0x00000018, -0x00000018, NULL }, - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), ALERT_CUE(9), AWAIT_CUE(5), FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0}'s team received\n{CENTER_ALIGN}the {COLOR GREEN}Teleport Gem{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(7), { 0x84, 0x00, 0x0100, 0x00000018, 0x00000018, NULL }, - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(30), MSG_NPC(3, _(" That was made using\nthe powers of psychics.")), MSG_NPC(3, _(" By me, {NAME_2},\nand...{WAIT_PRESS}\nOh?")), @@ -222,7 +222,7 @@ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 * MSG_NPC(3, _(" ...Gone away, it seems...")), TEXTBOX_CLEAR, ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(30), MSG_NPC(1, _(" Who could it be?")), TEXTBOX_CLEAR, @@ -234,7 +234,7 @@ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 * WAIT(30), ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" Now...{WAIT_PRESS}\nI must ask you this one last time.")), MSG_NPC(2, _(" This journey will be fraught\nwith considerable danger.{WAIT_PRESS}\nWill you still go?")), @@ -257,8 +257,8 @@ static const struct ScriptCommand s_gs171_g3_s0_lives0_dlg0[] = { /* 0x82200b0 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_RIGHT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...Yes...{WAIT_PRESS}\nAnd when that wish comes true...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Gardevoir said...)") }, + MSG_QUIET(0, _("(...Yes...{WAIT_PRESS}\nAnd when that wish comes true...)")), + MSG_QUIET(0, _("(Gardevoir said...)")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(3), @@ -285,18 +285,18 @@ static const struct ScriptCommand s_gs171_g3_s0_lives1_dlg0[] = { /* 0x8220df0 * AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), HALT, }; @@ -308,12 +308,12 @@ static const struct ScriptCommand s_gs171_g3_s0_lives2_dlg0[] = { /* 0x8220f50 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(7), - ROTATE(10, 10, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(7), @@ -333,7 +333,7 @@ static const struct ScriptCommand s_gs171_g3_s0_lives3_dlg0[] = { /* 0x8221070 * SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(LOOK_AROUND_FUNC), @@ -382,7 +382,7 @@ static const struct ScriptCommand s_gs171_g4_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(382), SELECT_MAP(171), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -390,7 +390,7 @@ static const struct ScriptCommand s_gs171_g4_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs171_g4_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g4_s0_station_sref_script }; /* 0x82213f0 */ +static const struct ScriptRef s_gs171_g4_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g4_s0_station_sref_script }; /* 0x82213f0 */ static const struct ScriptCommand s_gs171_g4_s0_lives0_dlg0[] = { /* 0x82213fc */ DEBUGINFO_O(396), @@ -399,13 +399,13 @@ static const struct ScriptCommand s_gs171_g4_s0_lives0_dlg0[] = { /* 0x82213fc * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(This will be my last adventure...{WAIT_PRESS}\nWith {NAME_1}...)") }, + MSG_QUIET(0, _("(............)")), + MSG_QUIET(0, _("(This will be my last adventure...{WAIT_PRESS}\nWith {NAME_1}...)")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!\nLet's do this right!")), VARIANT_DEFAULT(_(" {NAME_0}!\nLet's get this done!")), @@ -450,7 +450,7 @@ static const struct ScriptCommand s_gs171_g4_s0_lives1_dlg0[] = { /* 0x8221794 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), WAIT(120), @@ -468,7 +468,7 @@ static const struct ScriptCommand s_gs171_g4_s0_lives2_dlg0[] = { /* 0x8221864 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(7), HALT, @@ -489,7 +489,7 @@ static const struct ScriptCommand s_gs171_g4_s0_lives4_dlg0[] = { /* 0x8221944 * WAIT(120), { 0x89, 0x10, 0x0100, 0x00000004, 0x00000000, NULL }, { 0x89, 0x08, 0x0100, 0x00000002, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), { 0x59, 0x00, 0x0000, -0x000000c8, 0x00000000, NULL }, AWAIT_CUE(12), @@ -573,12 +573,12 @@ static const struct ScriptCommand s_gs171_g5_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(5, 0), BGM_STOP, AWAIT_CUE(3), - BGM_SWITCH(41), + BGM_SWITCH(MUS_AFTERMATH), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs171_g5_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g5_s0_station_sref_script }; /* 0x8221e34 */ +static const struct ScriptRef s_gs171_g5_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g5_s0_station_sref_script }; /* 0x8221e34 */ static const struct ScriptCommand s_gs171_g5_s0_eff0_script[] = { /* 0x8221e40 */ DEBUGINFO_O(584), @@ -609,7 +609,7 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * { 0x27, 0x01, 0x0005, 0x0000003c, 0x00ffffff, NULL }, WAIT(60), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...{WAIT_PRESS}Huh...?{WAIT_PRESS} This place...)") }, + MSG_QUIET(0, _("(...{WAIT_PRESS}Huh...?{WAIT_PRESS} This place...)")), TEXTBOX_CLEAR, { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, ALERT_CUE(6), @@ -623,18 +623,18 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * ALERT_CUE(6), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), - MSG_NPC(2, _("...Regained consciousness!")), + MSG_NPC(2, _("...Regained consciousness!")), // Alakazam is 2 TEXTBOX_CLEAR, MSG_NPC(-1, _(" Oooooooohhhhh!")), TEXTBOX_CLEAR, ALERT_CUE(6), CALL_SCRIPT(WAKEUP_FUNC), WAIT(15), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...{WAIT_PRESS}I'm sure of it...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I'm sure... Back there...{WAIT_PRESS}\nGengar saved me...)") }, + MSG_QUIET(0, _("(...{WAIT_PRESS}I'm sure of it...)")), + MSG_QUIET(0, _("(I'm sure... Back there...{WAIT_PRESS}\nGengar saved me...)")), TEXTBOX_CLEAR, WAIT(30), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" ...Maybe...{WAIT_PRESS}\nDid Gengar save {NAME_0} too?")), TEXTBOX_CLEAR, @@ -669,11 +669,11 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(474), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Kwaaaaaaaaah!") }, + MSG_OVERHEARD(_(" Kwaaaaaaaaah!")), ALERT_CUE(4), ALERT_CUE(6), CALL_LABEL(3), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(8), AWAIT_CUE(5), WAIT(60), @@ -723,7 +723,7 @@ static const struct ScriptCommand s_gs171_g5_s0_lives0_dlg0[] = { /* 0x8221f00 * TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), CALL_LABEL(3), PORTRAIT_REP(0x0001, 0x00000001), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -776,19 +776,19 @@ static const struct ScriptCommand s_gs171_g5_s0_lives1_dlg0[] = { /* 0x8222c44 * ALERT_CUE(5), AWAIT_CUE(6), WAIT(10), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(6, 10, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(20), - ROTATE(6, 10, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), CJUMP_UNK_C6(10), COND_EQUAL(0, /* to label */ 0), @@ -802,7 +802,7 @@ static const struct ScriptCommand s_gs171_g5_s0_lives1_dlg0[] = { /* 0x8222c44 * CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), HALT, }; @@ -817,10 +817,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives2_dlg0[] = { /* 0x8222ec4 * CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(7), AWAIT_CUE(7), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), HALT, }; @@ -835,7 +835,7 @@ static const struct ScriptCommand s_gs171_g5_s0_lives3_dlg0[] = { /* 0x8222fb4 * WAIT(30), SELECT_ANIMATION(2), WAIT(30), - ROTATE(10, 10, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), HALT, @@ -855,10 +855,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives4_dlg0[] = { /* 0x8223084 * ALERT_CUE(5), AWAIT_CUE(9), WAIT(7), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(9), WAIT(2), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(9), HALT, }; @@ -877,10 +877,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives5_dlg0[] = { /* 0x82231b4 * ALERT_CUE(5), AWAIT_CUE(11), WAIT(7), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), WAIT(3), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(11), HALT, }; @@ -897,10 +897,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives6_dlg0[] = { /* 0x82232e4 * { 0x89, 0x08, 0x0100, 0x00000007, 0x00000000, NULL }, AWAIT_CUE(12), WAIT(5), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), WAIT(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(12), HALT, }; @@ -917,10 +917,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives7_dlg0[] = { /* 0x82233f4 * { 0x89, 0x08, 0x0100, 0x00000002, 0x00000000, NULL }, AWAIT_CUE(13), WAIT(6), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(13), WAIT(10), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(13), HALT, }; @@ -936,10 +936,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives8_dlg0[] = { /* 0x8223504 * { 0x89, 0x08, 0x0100, 0x00000006, 0x00000000, NULL }, AWAIT_CUE(16), WAIT(3), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(16), WAIT(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(16), HALT, }; @@ -953,10 +953,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives9_dlg0[] = { /* 0x8223604 * { 0x89, 0x08, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(15), WAIT(5), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(15), WAIT(11), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(15), HALT, }; @@ -972,10 +972,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives10_dlg0[] = { /* 0x82236e4 { 0x89, 0x08, 0x0100, 0x00000005, 0x00000000, NULL }, AWAIT_CUE(14), WAIT(4), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(14), WAIT(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(14), HALT, }; @@ -991,10 +991,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives11_dlg0[] = { /* 0x82237e4 { 0x89, 0x08, 0x0100, 0x00000003, 0x00000000, NULL }, AWAIT_CUE(17), WAIT(4), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(17), WAIT(12), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(17), HALT, }; @@ -1008,10 +1008,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives12_dlg0[] = { /* 0x82238e4 { 0x89, 0x08, 0x0100, 0x00000007, 0x00000000, NULL }, AWAIT_CUE(18), WAIT(4), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(18), WAIT(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(18), HALT, }; @@ -1027,10 +1027,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives13_dlg0[] = { /* 0x82239c4 { 0x89, 0x08, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(19), WAIT(5), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(19), WAIT(9), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(19), HALT, }; @@ -1045,10 +1045,10 @@ static const struct ScriptCommand s_gs171_g5_s0_lives14_dlg0[] = { /* 0x8223ac4 { 0x89, 0x08, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(20), WAIT(3), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), HALT, }; @@ -1057,14 +1057,14 @@ static const struct ScriptCommand s_gs171_g6_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(1057), SELECT_MAP(171), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(41), + BGM_SWITCH(MUS_AFTERMATH), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs171_g6_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g6_s0_station_sref_script }; /* 0x8223c34 */ +static const struct ScriptRef s_gs171_g6_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g6_s0_station_sref_script }; /* 0x8223c34 */ static const struct ScriptCommand s_gs171_g6_s0_eff0_script[] = { /* 0x8223c40 */ DEBUGINFO_O(1070), @@ -1137,7 +1137,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * ALERT_CUE(13), CALL_LABEL(2), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(120), PORTRAIT(PLACEMENT_TOP_LEFT, 0x0008, 0x00000000), MSG_NPC(8, _(" I'll secure him so he can't\nget away.")), @@ -1182,11 +1182,11 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * SELECT_LIVES(-1, 1), AWAIT_CUE(5), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............{WAIT_PRESS}\n{NAME_5}...)") }, + MSG_QUIET(0, _("(............{WAIT_PRESS}\n{NAME_5}...)")), TEXTBOX_CLEAR, WAIT(10), - BGM_SWITCH(42), - PORTRAIT(PLACEMENT_RIGHT, 0x0005, 0x00000000), + BGM_SWITCH(MUS_FAREWELL), + PORTRAIT(PLACEMENT_RIGHT, 0x0005, 0x00000000), // Gardevoir is 5 MSG_NPC(5, _(" We owe everything to you,\n{NAME_0}, and your friends.")), MSG_NPC(5, _(" Peace has returned to\nour world.")), MSG_NPC(5, _(" Thank you for everything.")), @@ -1196,7 +1196,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(It's finally come...{WAIT_PRESS}\nThis time has finally arrived...)") }, + MSG_QUIET(0, _("(It's finally come...{WAIT_PRESS}\nThis time has finally arrived...)")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(20), @@ -1215,7 +1215,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * ALERT_CUE(11), ALERT_CUE(4), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_TOP_LEFT, 0x0006, 0x00000000), + PORTRAIT(PLACEMENT_TOP_LEFT, 0x0006, 0x00000000), // Caterpie is 6 MSG_NPC(6, _(" Oh? {NAME_0}?")), TEXTBOX_CLEAR, ALERT_CUE(6), @@ -1225,23 +1225,23 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * WAIT(45), ALERT_CUE(6), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x0000000c), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x0000000c), // Partner is 1 PORTRAIT_POS(1, 0, 3), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" ...!{WAIT_PRESS} {NAME_0}...!{WAIT_PRESS}\nYour body...{WAIT_PRESS} What's happening?")), VARIANT_DEFAULT(_(" ...!{WAIT_PRESS} {NAME_0}...!{WAIT_PRESS}\nYour body...{WAIT_PRESS} What's happening to you?")), TEXTBOX_CLEAR, - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("{NAME_1}...") }, + MSG_QUIET(0, _("{NAME_1}...")), TEXTBOX_CLEAR, - ROTATE(10, 10, DIRECTION_NORTHWEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(30), - ROTATE(10, 10, DIRECTION_NORTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("And, everyone...{WAIT_PRESS} I'm sorry.{WAIT_PRESS}\nBut I have to leave.") }, + MSG_QUIET(0, _("And, everyone...{WAIT_PRESS} I'm sorry.{WAIT_PRESS}\nBut I have to leave.")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(465), @@ -1250,17 +1250,17 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * ALERT_CUE(6), WAIT(30), ALERT_CUE(12), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0007, 0x00000041), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0007, 0x00000041), // Snubbull is 7 MSG_NPC(7, _(" What?!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(18), { 0x2d, 0x09, 0x0009, 0x0000004f, 0x00000000, NULL }, - PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0009, 0x00000041), + PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0009, 0x00000041), // Bellsprout is 9 MSG_NPC(9, _(" Wh-what are you saying?!")), TEXTBOX_CLEAR, WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Everyone...{WAIT_PRESS}\nThank you for everything all this time.") }, + MSG_QUIET(0, _("Everyone...{WAIT_PRESS}\nThank you for everything all this time.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), @@ -1269,17 +1269,17 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * MSG_NPC(1, _(" ...{WAIT_PRESS}Leave...?{WAIT_PRESS}\nWhat do you mean, leave?")), TEXTBOX_CLEAR, WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("My role as a Pokémon has ended.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I have to return to the human world.") }, + MSG_QUIET(0, _("My role as a Pokémon has ended.")), + MSG_QUIET(0, _("I have to return to the human world.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), // Alakazam is 2 MSG_NPC(2, _(" Unbelievable!")), TEXTBOX_CLEAR, WAIT(10), { 0x2d, 0x09, 0x0009, 0x0000005a, 0x00000000, NULL }, - PORTRAIT(PLACEMENT_TOP_LEFT, 0x0009, 0x00000041), + PORTRAIT(PLACEMENT_TOP_LEFT, 0x0009, 0x00000041), // Tyranitar is 9 MSG_NPC(9, _(" Go back...{WAIT_PRESS}\nTo the human world?!")), TEXTBOX_CLEAR, WAIT(30), @@ -1292,8 +1292,8 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * TEXTBOX_CLEAR, ALERT_CUE(20), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Yes.{WAIT_PRESS}\nYou will always be my friend,\n{NAME_1}.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I will never forget you.") }, + MSG_QUIET(0, _("Yes.{WAIT_PRESS}\nYou will always be my friend,\n{NAME_1}.")), + MSG_QUIET(0, _("I will never forget you.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), @@ -1304,7 +1304,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * TEXTBOX_CLEAR, ALERT_CUE(20), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'm blessed to have met you.") }, + MSG_QUIET(0, _("I'm blessed to have met you.")), TEXTBOX_CLEAR, WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -1313,7 +1313,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives0_dlg0[] = { /* 0x8223d40 * VARIANT_DEFAULT(_(" I...\nWhat am I going to do when you're\ngone, {NAME_0}?")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'm so very sorry.\nThis is good-bye...") }, + MSG_QUIET(0, _("I'm so very sorry.\nThis is good-bye...")), TEXTBOX_CLEAR, ALERT_CUE(20), WAIT(60), @@ -1389,13 +1389,13 @@ static const struct ScriptCommand s_gs171_g6_s0_lives1_dlg0[] = { /* 0x8225528 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), WAIT(15), WALK_GRID(179, 0), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), @@ -1409,7 +1409,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives1_dlg0[] = { /* 0x8225528 * WALK_RELATIVE(51, 0, 10), AWAIT_CUE(6), WAIT(110), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), WAIT(40), { 0x89, 0x50, 0x004c, 0x00000004, 0x00000000, NULL }, WAIT(10), @@ -1431,10 +1431,10 @@ static const struct ScriptCommand s_gs171_g6_s0_lives2_dlg0[] = { /* 0x8225728 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(7), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(7), WALK_GRID(179, 1), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), AWAIT_CUE(7), WAIT(30), @@ -1453,7 +1453,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives2_dlg0[] = { /* 0x8225728 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(7), WAIT(2), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(7), @@ -1463,10 +1463,10 @@ static const struct ScriptCommand s_gs171_g6_s0_lives2_dlg0[] = { /* 0x8225728 * WALK_RELATIVE(256, 0, 8), AWAIT_CUE(7), WAIT(170), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), WAIT(25), WALK_RELATIVE(128, 16, -16), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), AWAIT_CUE(7), HALT, @@ -1481,7 +1481,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives3_dlg0[] = { /* 0x8225a58 * WALK_RELATIVE(128, 0, 12), AWAIT_CUE(8), WAIT(260), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(8), HALT, }; @@ -1500,40 +1500,40 @@ static const struct ScriptCommand s_gs171_g6_s0_lives4_dlg0[] = { /* 0x8225b08 * AWAIT_CUE(9), { 0x7e, 0x00, 0x004c, 0x00000000, -0x00000028, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, AWAIT_CUE(9), CALL_SCRIPT(JUMP_SURPRISE_FUNC), LABEL(0), /* = 0x00 */ - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(10), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(9), WAIT(10), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(30), LABEL(2), /* = 0x02 */ - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(60), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(50), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(50), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -1542,13 +1542,13 @@ static const struct ScriptCommand s_gs171_g6_s0_lives4_dlg0[] = { /* 0x8225b08 * WAIT(1), AWAIT_CUE(9), WAIT(4), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), WAIT(6), WALK_RELATIVE(256, 0, 10), AWAIT_CUE(9), WAIT(170), - ROTATE(12, 2, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(9), WAIT(30), WALK_RELATIVE(179, 0, -16), @@ -1567,14 +1567,14 @@ static const struct ScriptCommand s_gs171_g6_s0_lives5_dlg0[] = { /* 0x8225f38 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(11), WAIT(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), WALK_GRID(179, 2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), AWAIT_CUE(11), AWAIT_CUE(11), - ROTATE(10, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHEAST), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(11), @@ -1583,10 +1583,10 @@ static const struct ScriptCommand s_gs171_g6_s0_lives5_dlg0[] = { /* 0x8225f38 * AWAIT_CUE(11), WAIT(2), WALK_RELATIVE(204, 0, 10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(11), WAIT(120), - ROTATE(12, 2, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(11), WAIT(60), WALK_RELATIVE(179, 0, -16), @@ -1608,18 +1608,18 @@ static const struct ScriptCommand s_gs171_g6_s0_lives6_dlg0[] = { /* 0x8226168 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(12), WAIT(4), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(12), WAIT(30), WALK_GRID(179, 4), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(12), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(12), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(12), WAIT(3), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(12), AWAIT_CUE(12), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -1628,7 +1628,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives6_dlg0[] = { /* 0x8226168 * WALK_RELATIVE(256, 0, 8), AWAIT_CUE(12), WAIT(190), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WALK_RELATIVE(76, 0, -16), AWAIT_CUE(12), AWAIT_CUE(12), @@ -1648,7 +1648,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives7_dlg0[] = { /* 0x82263c8 * WAIT(35), WALK_RELATIVE(256, 0, -64), WALK_RELATIVE(256, 16, 0), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(13), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(13), @@ -1672,7 +1672,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives7_dlg0[] = { /* 0x82263c8 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(13), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(13), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), @@ -1680,7 +1680,7 @@ static const struct ScriptCommand s_gs171_g6_s0_lives7_dlg0[] = { /* 0x82263c8 * WALK_RELATIVE(179, 0, 6), AWAIT_CUE(13), WAIT(200), - ROTATE(12, 2, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(13), WAIT(10), WALK_RELATIVE(76, 0, -16), @@ -1698,14 +1698,14 @@ static const struct ScriptCommand s_gs171_g6_s0_lives8_dlg0[] = { /* 0x82266e8 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(16), WAIT(2), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(16), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(16), WAIT(40), WALK_GRID(179, 6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(16), AWAIT_CUE(16), WAIT(45), @@ -1724,16 +1724,16 @@ static const struct ScriptCommand s_gs171_g6_s0_lives8_dlg0[] = { /* 0x82266e8 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(16), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(16), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(16), WAIT(6), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(16), WAIT(170), - ROTATE(12, 1, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(16), WAIT(40), WALK_RELATIVE(179, 0, -16), @@ -1755,26 +1755,26 @@ static const struct ScriptCommand s_gs171_g6_s0_lives9_dlg0[] = { /* 0x8226a08 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(14), WAIT(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(14), WAIT(40), WALK_GRID(179, 7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(14), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(14), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(14), WAIT(2), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(14), AWAIT_CUE(14), WAIT(3), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(14), WAIT(120), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(14), WAIT(40), WALK_RELATIVE(179, 0, -16), @@ -1793,23 +1793,23 @@ static const struct ScriptCommand s_gs171_g6_s0_lives10_dlg0[] = { /* 0x8226c68 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(15), WAIT(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(15), WAIT(40), WALK_GRID(179, 10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(15), AWAIT_CUE(15), AWAIT_CUE(15), WAIT(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(15), AWAIT_CUE(15), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(15), WAIT(90), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(15), WAIT(55), WALK_RELATIVE(102, 0, -16), @@ -1827,27 +1827,27 @@ static const struct ScriptCommand s_gs171_g6_s0_lives11_dlg0[] = { /* 0x8226e68 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(17), WAIT(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(17), WAIT(10), WALK_GRID(179, 3), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(17), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(17), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(17), WAIT(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(17), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(17), WAIT(6), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(17), WAIT(170), - ROTATE(12, 2, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(17), WAIT(40), WALK_RELATIVE(128, 0, -16), @@ -1865,16 +1865,16 @@ static const struct ScriptCommand s_gs171_g6_s0_lives12_dlg0[] = { /* 0x8227098 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(18), WAIT(4), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(18), WAIT(35), WALK_GRID(179, 5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(18), AWAIT_CUE(18), AWAIT_CUE(18), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(18), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(18), @@ -1882,10 +1882,10 @@ static const struct ScriptCommand s_gs171_g6_s0_lives12_dlg0[] = { /* 0x8227098 AWAIT_CUE(18), WAIT(10), WALK_RELATIVE(179, 0, 6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(18), WAIT(210), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(18), WAIT(25), WALK_RELATIVE(179, 0, -16), @@ -1903,11 +1903,11 @@ static const struct ScriptCommand s_gs171_g6_s0_lives13_dlg0[] = { /* 0x82272c8 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(19), WAIT(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(19), WAIT(45), WALK_GRID(179, 8), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(19), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(19), @@ -1928,15 +1928,15 @@ static const struct ScriptCommand s_gs171_g6_s0_lives13_dlg0[] = { /* 0x82272c8 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(19), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(19), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(19), WALK_RELATIVE(256, 0, 12), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(19), WAIT(120), - ROTATE(12, 2, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(19), WAIT(50), WALK_RELATIVE(102, 0, -16), @@ -1954,11 +1954,11 @@ static const struct ScriptCommand s_gs171_g6_s0_lives14_dlg0[] = { /* 0x82275c8 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(19), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(19), WAIT(40), WALK_GRID(179, 9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(19), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(19), @@ -1979,15 +1979,15 @@ static const struct ScriptCommand s_gs171_g6_s0_lives14_dlg0[] = { /* 0x82275c8 CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(19), WAIT(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(19), AWAIT_CUE(19), WAIT(2), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(19), WAIT(130), - ROTATE(12, 1, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(19), WAIT(60), WALK_RELATIVE(179, 0, -16), @@ -2108,7 +2108,7 @@ static const struct ScriptCommand s_gs171_g7_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs171_g7_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs171_g7_s0_station_sref_script }; /* 0x8227f48 */ +static const struct ScriptRef s_gs171_g7_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs171_g7_s0_station_sref_script }; /* 0x8227f48 */ static const struct ScriptCommand s_gs171_g7_s0_lives0_dlg0[] = { /* 0x8227f54 */ DEBUGINFO_O(2114), @@ -2120,23 +2120,23 @@ static const struct ScriptCommand s_gs171_g7_s0_lives0_dlg0[] = { /* 0x8227f54 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(90), TEXTBOX_AUTO_PRESS(-1, -1), - PORTRAIT(PLACEMENT_LEFT_, 0x0006, 0x00000042), + PORTRAIT(PLACEMENT_LEFT_, 0x0006, 0x00000042), // Caterpie is 6 MSG_NPC(6, _(" Snivel... {NAME_0}...{WAIT_PRESS}\nWhy...{WAIT_PRESS} I don't understand...")), TEXTBOX_CLEAR, WAIT(10), { 0x2d, 0x09, 0x0009, 0x00000059, 0x00000000, NULL }, - PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0009, 0x00000044), + PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0009, 0x00000044), // Charizard is 9 MSG_NPC(9, _(" Why?{WAIT_PRESS}\nWhy was it necessary to leave us...?")), TEXTBOX_CLEAR, WAIT(10), { 0x2d, 0x09, 0x0009, 0x00000055, 0x00000000, NULL }, - PORTRAIT(PLACEMENT_TOP_LEFT, 0x0009, 0x00000043), + PORTRAIT(PLACEMENT_TOP_LEFT, 0x0009, 0x00000043), // Now Shiftry is 9 MSG_NPC(9, _(" {NAME_0} saved my\nlife...")), MSG_NPC(9, _(" But I hadn't done anything\nto show my thanks...")), MSG_NPC(9, _(" Left...{WAIT_PRESS}\nBefore I could even say thanks...")), TEXTBOX_CLEAR, WAIT(30), - PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0004, 0x00000043), + PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0004, 0x00000043), // Lombre is 4 PORTRAIT_POS(4, -2, 0), MSG_NPC(4, _(" You're right...")), MSG_NPC(4, _(" Just upped and went like\nthat...")), @@ -2146,13 +2146,13 @@ static const struct ScriptCommand s_gs171_g7_s0_lives0_dlg0[] = { /* 0x8227f54 * WAIT(10), ALERT_CUE(8), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0003, 0x00000000), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0003, 0x00000000), // Xatu is 3 MSG_NPC(3, _(" This was coming...{WAIT_PRESS}\nOur world, it was saved by {NAME_0}.")), MSG_NPC(3, _(" I look back now...{WAIT_PRESS}\nWhen bound for the sky, {NAME_0}\nseemed...")), MSG_NPC(3, _(" As if resigned.\nResigned to accept what was to come.")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000005), + PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000005), // Partner is 1 MSG_NPC(1, _(" ............{WAIT_PRESS}\nI think I know...")), TEXTBOX_CLEAR, WAIT(10), @@ -2175,7 +2175,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives0_dlg0[] = { /* 0x8227f54 * MSG_NPC(1, _(" If this was coming...{WAIT_PRESS}\nWhy didn't {NAME_0} tell me?")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), // Alakazam is 2 MSG_NPC(2, _(" Those words couldn't be\nspoken.")), MSG_NPC(2, _(" As much as you are heart-\nbroken now...")), MSG_NPC(2, _(" {NAME_0} must have felt\nthe same pain of leaving.")), @@ -2230,7 +2230,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives2_dlg0[] = { /* 0x8228a14 * { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(7), HALT, }; @@ -2244,7 +2244,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives3_dlg0[] = { /* 0x8228ab4 * ALERT_CUE(5), AWAIT_CUE(8), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), HALT, }; @@ -2255,7 +2255,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives4_dlg0[] = { /* 0x8228b64 * { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(9), HALT, }; @@ -2266,7 +2266,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives5_dlg0[] = { /* 0x8228be4 * { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(11), HALT, }; @@ -2277,7 +2277,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives6_dlg0[] = { /* 0x8228c64 * { 0x2d, 0x07, 0x0007, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(12), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(12), HALT, }; @@ -2288,7 +2288,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives7_dlg0[] = { /* 0x8228ce4 * { 0x2d, 0x07, 0x0008, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(13), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(13), HALT, }; @@ -2298,7 +2298,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives8_dlg0[] = { /* 0x8228d64 * SELECT_ANIMATION(2), AWAIT_CUE(16), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(16), HALT, }; @@ -2308,7 +2308,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives9_dlg0[] = { /* 0x8228dd4 * SELECT_ANIMATION(2), AWAIT_CUE(14), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(14), HALT, }; @@ -2318,7 +2318,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives10_dlg0[] = { /* 0x8228e44 SELECT_ANIMATION(2), AWAIT_CUE(15), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(15), HALT, }; @@ -2328,7 +2328,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives11_dlg0[] = { /* 0x8228eb4 SELECT_ANIMATION(2), AWAIT_CUE(17), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(17), HALT, }; @@ -2338,7 +2338,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives12_dlg0[] = { /* 0x8228f24 SELECT_ANIMATION(2), AWAIT_CUE(18), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(18), HALT, }; @@ -2348,7 +2348,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives13_dlg0[] = { /* 0x8228f94 SELECT_ANIMATION(2), AWAIT_CUE(19), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(19), HALT, }; @@ -2358,7 +2358,7 @@ static const struct ScriptCommand s_gs171_g7_s0_lives14_dlg0[] = { /* 0x8229004 SELECT_ANIMATION(2), AWAIT_CUE(19), WAIT_RANDOM(0, 15), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(19), HALT, }; @@ -2664,4 +2664,4 @@ static const struct GroundLink s_gs171_links[] = { /* 0x8229848 */ /* link 10 */ { { /*x*/ 22, /*y*/ 40, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs171 = { LPARRAY(s_gs171_groups), s_gs171_links }; /* 0x82298a0 */ +const GroundScriptHeader gGroundScript_gs171 = { LPARRAY(s_gs171_groups), s_gs171_links }; /* 0x82298a0 */ diff --git a/src/data/ground/ground_data_a04p02_station.h b/src/data/ground/ground_data_a04p02_station.h index 9a3214119..f2387d6a3 100644 --- a/src/data/ground/ground_data_a04p02_station.h +++ b/src/data/ground/ground_data_a04p02_station.h @@ -13,14 +13,14 @@ static const struct ScriptCommand s_gs172_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs172_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs172_g0_s0_station_sref_script }; /* 0x8229920 */ +static const struct ScriptRef s_gs172_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs172_g0_s0_station_sref_script }; /* 0x8229920 */ static const struct ScriptCommand s_gs172_g1_s0_station_sref_script[] = { /* 0x822992c */ DEBUGINFO_O(19), SELECT_MAP(172), SELECT_ENTITIES(-1, 0), { 0x2d, 0x09, 0x0000, 0x00000022, 0x00000000, NULL }, - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), ALERT_CUE(4), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(5), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs172_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs172_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs172_g1_s0_station_sref_script }; /* 0x8229a20 */ +static const struct ScriptRef s_gs172_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs172_g1_s0_station_sref_script }; /* 0x8229a20 */ static const struct ScriptCommand s_gs172_g1_s0_eff0_script[] = { /* 0x8229a2c */ @@ -70,4 +70,4 @@ static const struct GroundLink s_gs172_links[] = { /* 0x8229b10 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs172 = { LPARRAY(s_gs172_groups), s_gs172_links }; /* 0x8229b18 */ +const GroundScriptHeader gGroundScript_gs172 = { LPARRAY(s_gs172_groups), s_gs172_links }; /* 0x8229b18 */ diff --git a/src/data/ground/ground_data_a04p03_station.h b/src/data/ground/ground_data_a04p03_station.h index fc95b02d2..b153fef5f 100644 --- a/src/data/ground/ground_data_a04p03_station.h +++ b/src/data/ground/ground_data_a04p03_station.h @@ -14,7 +14,7 @@ static const struct ScriptCommand s_gs173_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs173_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs173_g0_s0_station_sref_script }; /* 0x8229b98 */ +static const struct ScriptRef s_gs173_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs173_g0_s0_station_sref_script }; /* 0x8229b98 */ static const struct ScriptCommand s_gs173_g1_s0_station_sref_script[] = { /* 0x8229ba4 */ DEBUGINFO_O(20), @@ -22,7 +22,7 @@ static const struct ScriptCommand s_gs173_g1_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(-1, -1), WAIT(60), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000001, NULL }, - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), FANFARE_PLAY2(508), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, WAIT(240), @@ -32,7 +32,7 @@ static const struct ScriptCommand s_gs173_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs173_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs173_g1_s0_station_sref_script }; /* 0x8229c74 */ +static const struct ScriptRef s_gs173_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs173_g1_s0_station_sref_script }; /* 0x8229c74 */ static const struct ScriptCommand s_gs173_g1_s0_eff0_script[] = { /* 0x8229c80 */ DEBUGINFO_O(38), @@ -46,7 +46,7 @@ static const struct ScriptCommand s_gs173_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(46), SELECT_MAP(173), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(26), + BGM_SWITCH(MUS_RAYQUAZAS_DOMAIN), FANFARE_PLAY2(508), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000001, NULL }, { 0x22, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, @@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs173_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs173_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs173_g2_s0_station_sref_script }; /* 0x8229d90 */ +static const struct ScriptRef s_gs173_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs173_g2_s0_station_sref_script }; /* 0x8229d90 */ static const struct ScriptCommand s_gs173_g2_s0_eff0_script[] = { /* 0x8229d9c */ DEBUGINFO_O(63), @@ -74,7 +74,7 @@ static const struct ScriptCommand s_gs173_g3_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(74), SELECT_MAP(173), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(26), + BGM_SWITCH(MUS_RAYQUAZAS_DOMAIN), { 0x97, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, { 0x27, 0x00, 0x0005, 0x00000010, 0x00ffffff, NULL }, AWAIT_CUE(5), @@ -92,7 +92,7 @@ static const struct ScriptCommand s_gs173_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs173_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs173_g3_s0_station_sref_script }; /* 0x8229f4c */ +static const struct ScriptRef s_gs173_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs173_g3_s0_station_sref_script }; /* 0x8229f4c */ static const struct ScriptCommand s_gs173_g3_s0_eff0_script[] = { /* 0x8229f58 */ DEBUGINFO_O(98), @@ -158,4 +158,4 @@ static const struct GroundLink s_gs173_links[] = { /* 0x822a108 */ /* link 0 */ { { /*x*/ 18, /*y*/ 6, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs173 = { LPARRAY(s_gs173_groups), s_gs173_links }; /* 0x822a110 */ +const GroundScriptHeader gGroundScript_gs173 = { LPARRAY(s_gs173_groups), s_gs173_links }; /* 0x822a110 */ diff --git a/src/data/ground/ground_data_a04p04_station.h b/src/data/ground/ground_data_a04p04_station.h index 7f7f137ec..7e3fca6bf 100644 --- a/src/data/ground/ground_data_a04p04_station.h +++ b/src/data/ground/ground_data_a04p04_station.h @@ -13,7 +13,7 @@ static const struct ScriptCommand s_gs174_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs174_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs174_g0_s0_station_sref_script }; /* 0x822a190 */ +static const struct ScriptRef s_gs174_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs174_g0_s0_station_sref_script }; /* 0x822a190 */ static const struct ScriptCommand s_gs174_g1_s0_station_sref_script[] = { /* 0x822a19c */ DEBUGINFO_O(19), @@ -29,7 +29,7 @@ static const struct ScriptCommand s_gs174_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs174_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs174_g1_s0_station_sref_script }; /* 0x822a24c */ +static const struct ScriptRef s_gs174_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs174_g1_s0_station_sref_script }; /* 0x822a24c */ static const struct ScriptCommand s_gs174_g1_s0_lives0_dlg0[] = { /* 0x822a258 */ DEBUGINFO_O(35), @@ -39,16 +39,16 @@ static const struct ScriptCommand s_gs174_g1_s0_lives0_dlg0[] = { /* 0x822a258 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, BGM_FADEIN(30, 37), WAIT(60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Is this...\na dream...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("No...{WAIT_PRESS}\nThis is no dream...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Yes...{WAIT_PRESS}\nThe star's explosion swallowed me...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("And I'm now adrift...{WAIT_PRESS}\nas a spirit...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("What's going to happen...?") }, + MSG_QUIET(0, _("......")), + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("........................")), + MSG_QUIET(0, _("...Is this...\na dream...?")), + MSG_QUIET(0, _("........................")), + MSG_QUIET(0, _("No...{WAIT_PRESS}\nThis is no dream...")), + MSG_QUIET(0, _("Yes...{WAIT_PRESS}\nThe star's explosion swallowed me...")), + MSG_QUIET(0, _("And I'm now adrift...{WAIT_PRESS}\nas a spirit...")), + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("What's going to happen...?")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(485), @@ -56,8 +56,8 @@ static const struct ScriptCommand s_gs174_g1_s0_lives0_dlg0[] = { /* 0x822a258 * WAIT(30), SELECT_LIVES(-1, 1), { 0x27, 0x01, 0x0005, 0x0000003c, 0x00ffffff, NULL }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...This shadow...{WAIT_PRESS}\n{NAME_4}...)") }, + MSG_QUIET(0, _("(............)")), + MSG_QUIET(0, _("(...This shadow...{WAIT_PRESS}\n{NAME_4}...)")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(9), @@ -80,12 +80,12 @@ static const struct ScriptCommand s_gs174_g1_s0_lives0_dlg0[] = { /* 0x822a258 * SELECT_ANIMATION(51), { 0x3b, 0x36, 0x0004, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000005), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Gengar is dragging me...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...{WAIT_PRESS}Gengar said...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(He would drag me into the dark\nworld...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(What is the dark world...?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Am I going to be abandoned in a world\nI don't know?)") }, + MSG_QUIET(0, _("(............)")), + MSG_QUIET(0, _("(Gengar is dragging me...)")), + MSG_QUIET(0, _("(...{WAIT_PRESS}Gengar said...)")), + MSG_QUIET(0, _("(He would drag me into the dark\nworld...)")), + MSG_QUIET(0, _("(What is the dark world...?)")), + MSG_QUIET(0, _("(Am I going to be abandoned in a world\nI don't know?)")), TEXTBOX_CLEAR, WAIT(90), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT_FLIP, 0x0004, 0x00000000), @@ -103,7 +103,7 @@ static const struct ScriptCommand s_gs174_g1_s0_lives0_dlg0[] = { /* 0x822a258 * MSG_NPC(4, _(" Darn it...\nI took the wrong path...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(......What?)") }, + MSG_QUIET(0, _("(......What?)")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(9), @@ -144,9 +144,9 @@ static const struct ScriptCommand s_gs174_g1_s1_lives0_dlg0[] = { /* 0x822abd8 * ALERT_CUE(5), AWAIT_CUE(9), WALK_RELATIVE(128, 16, 32), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), WAIT(60), - ROTATE(10, 10, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_EAST), WAIT(45), { 0x54, 0x00, 0x001f, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -154,23 +154,23 @@ static const struct ScriptCommand s_gs174_g1_s1_lives0_dlg0[] = { /* 0x822abd8 * SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(6, 10, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(20), - ROTATE(6, 10, DIRECTION_EAST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(6, 10, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(20), - ROTATE(6, 10, DIRECTION_EAST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_EAST), WAIT(60), { 0x89, 0x10, 0x0100, 0x00000002, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(9), { 0x89, 0x50, 0x0099, 0x00000002, 0x00000000, NULL }, @@ -217,4 +217,4 @@ static const struct GroundLink s_gs174_links[] = { /* 0x822af64 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs174 = { LPARRAY(s_gs174_groups), s_gs174_links }; /* 0x822af6c */ +const GroundScriptHeader gGroundScript_gs174 = { LPARRAY(s_gs174_groups), s_gs174_links }; /* 0x822af6c */ diff --git a/src/data/ground/ground_data_a05p01_station.h b/src/data/ground/ground_data_a05p01_station.h index 2f6747249..f5cc1bf63 100644 --- a/src/data/ground/ground_data_a05p01_station.h +++ b/src/data/ground/ground_data_a05p01_station.h @@ -8,17 +8,17 @@ static const struct ScriptCommand s_gs175_g0_s0_station_sref_script[] = { /* 0x822af80 */ DEBUGINFO_O(10), - SELECT_MAP(175), + SELECT_MAP(MAP_NIGHT_SKY_1), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs175_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs175_g0_s0_station_sref_script }; /* 0x822afdc */ +static const struct ScriptRef s_gs175_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs175_g0_s0_station_sref_script }; /* 0x822afdc */ static const struct ScriptCommand s_gs175_g1_s0_station_sref_script[] = { /* 0x822afe8 */ DEBUGINFO_O(18), BGM_STOP, WAIT(180), - SELECT_MAP(175), + SELECT_MAP(MAP_NIGHT_SKY_1), SELECT_ENTITIES(-1, 0), { 0x3b, 0x36, 0x0000, -0x00000002, 0x00000000, NULL }, { 0x22, 0x01, 0x00b4, 0x00000000, 0x00000000, NULL }, @@ -33,27 +33,27 @@ static const struct ScriptCommand s_gs175_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs175_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs175_g1_s0_station_sref_script }; /* 0x822b0e8 */ +static const struct ScriptRef s_gs175_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs175_g1_s0_station_sref_script }; /* 0x822b0e8 */ static const struct ScriptCommand s_gs175_g1_s0_eff1_script[] = { /* 0x822b0f4 */ DEBUGINFO_O(39), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(40), - BGM_SWITCH(44), + BGM_SWITCH(MUS_CREDITS), WAIT(300), TEXTBOX_AUTO_PRESS(-200, 60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(..................)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(What is this...?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I'm rising into the sky...)") }, + MSG_QUIET(0, _("(..................)")), + MSG_QUIET(0, _("(What is this...?)")), + MSG_QUIET(0, _("(I'm rising into the sky...)")), TEXTBOX_AUTO_PRESS(-190, 60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Is this my spirit...?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I wonder where I'm going?)") }, + MSG_QUIET(0, _("(Is this my spirit...?)")), + MSG_QUIET(0, _("(I wonder where I'm going?)")), TEXTBOX_CLEAR, WAIT(120), TEXTBOX_AUTO_PRESS(-110, 60), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(......!)") }, + MSG_QUIET(0, _("(......!)")), TEXTBOX_AUTO_PRESS(-210, 50), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Voices...{WAIT_PRESS}\nI hear voices...)") }, + MSG_QUIET(0, _("(Voices...{WAIT_PRESS}\nI hear voices...)")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -62,7 +62,7 @@ static const struct ScriptCommand s_gs175_g1_s0_eff1_script[] = { /* 0x822b0f4 * static const struct ScriptCommand s_gs175_g2_s0_station_sref_script[] = { /* 0x822b2f4 */ DEBUGINFO_O(64), - SELECT_MAP(175), + SELECT_MAP(MAP_NIGHT_SKY_1), SELECT_ENTITIES(-1, 0), { 0x3b, 0x36, 0x0000, -0x00000002, 0x00000000, NULL }, BGM_STOP, @@ -76,14 +76,14 @@ static const struct ScriptCommand s_gs175_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs175_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs175_g2_s0_station_sref_script }; /* 0x822b3c4 */ +static const struct ScriptRef s_gs175_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs175_g2_s0_station_sref_script }; /* 0x822b3c4 */ static const struct ScriptCommand s_gs175_g2_s0_eff1_script[] = { /* 0x822b3d0 */ DEBUGINFO_O(82), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(120), - BGM_SWITCH(45), + BGM_SWITCH(MUS_TIME_OF_REUNION), WAIT(60), TEXTBOX_AUTO_PRESS(190, 190), { 0x26, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -139,4 +139,4 @@ static const struct GroundLink s_gs175_links[] = { /* 0x822b650 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs175 = { LPARRAY(s_gs175_groups), s_gs175_links }; /* 0x822b658 */ +const GroundScriptHeader gGroundScript_gs175 = { LPARRAY(s_gs175_groups), s_gs175_links }; /* 0x822b658 */ diff --git a/src/data/ground/ground_data_a05p02_station.h b/src/data/ground/ground_data_a05p02_station.h index c710e7578..b070ca857 100644 --- a/src/data/ground/ground_data_a05p02_station.h +++ b/src/data/ground/ground_data_a05p02_station.h @@ -9,15 +9,15 @@ static const struct ScriptCommand s_gs176_g0_s0_station_sref_script[] = { /* 0x822b66c */ DEBUGINFO_O(10), BGM_STOP, - SELECT_MAP(176), + SELECT_MAP(MAP_NIGHT_SKY_2), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs176_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs176_g0_s0_station_sref_script }; /* 0x822b6d8 */ +static const struct ScriptRef s_gs176_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs176_g0_s0_station_sref_script }; /* 0x822b6d8 */ static const struct ScriptCommand s_gs176_g1_s0_station_sref_script[] = { /* 0x822b6e4 */ DEBUGINFO_O(19), - SELECT_MAP(176), + SELECT_MAP(MAP_NIGHT_SKY_2), SELECT_ENTITIES(-1, 0), { 0x3b, 0x36, 0x0000, -0x00000002, 0x00000000, NULL }, { 0x27, 0x01, 0x0001, 0x0000001e, 0x00ffffff, NULL }, @@ -88,7 +88,7 @@ static const struct ScriptCommand s_gs176_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs176_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs176_g1_s0_station_sref_script }; /* 0x822bb44 */ +static const struct ScriptRef s_gs176_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs176_g1_s0_station_sref_script }; /* 0x822bb44 */ static const struct ScriptCommand s_gs176_g1_s0_eff1_script[] = { /* 0x822bb50 */ DEBUGINFO_O(94), @@ -140,4 +140,4 @@ static const struct GroundLink s_gs176_links[] = { /* 0x822bdcc */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs176 = { LPARRAY(s_gs176_groups), s_gs176_links }; /* 0x822bdd4 */ +const GroundScriptHeader gGroundScript_gs176 = { LPARRAY(s_gs176_groups), s_gs176_links }; /* 0x822bdd4 */ diff --git a/src/data/ground/ground_data_a05p03_station.h b/src/data/ground/ground_data_a05p03_station.h index c47712c22..b0ef76edb 100644 --- a/src/data/ground/ground_data_a05p03_station.h +++ b/src/data/ground/ground_data_a05p03_station.h @@ -8,16 +8,16 @@ static const struct ScriptCommand s_gs177_g0_s0_station_sref_script[] = { /* 0x822bde8 */ DEBUGINFO_O(10), - SELECT_MAP(177), + SELECT_MAP(MAP_THE_END), BGM_STOP, JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs177_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs177_g0_s0_station_sref_script }; /* 0x822be54 */ +static const struct ScriptRef s_gs177_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs177_g0_s0_station_sref_script }; /* 0x822be54 */ static const struct ScriptCommand s_gs177_g1_s0_station_sref_script[] = { /* 0x822be60 */ DEBUGINFO_O(19), - SELECT_MAP(177), + SELECT_MAP(MAP_THE_END), SELECT_ENTITIES(-1, -1), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, { 0xe0, 0x00, 0x002d, 0x00000000, 0x00000000, NULL }, @@ -41,7 +41,7 @@ static const struct ScriptCommand s_gs177_g1_s0_station_sref_script[] = { /* 0x8 { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), { 0x3b, 0x09, 0x0000, 0x00000000, 0x00000000, NULL }, - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), ASK1(FALSE, /*default*/ -1, /* speaker */ -1, _("Would you like to save your adventure?")), CHOICE(/* label */ 0, _("Yes.")), CHOICE(/* label */ 1, _("No.")), @@ -54,7 +54,7 @@ static const struct ScriptCommand s_gs177_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs177_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs177_g1_s0_station_sref_script }; /* 0x822c1ac */ +static const struct ScriptRef s_gs177_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs177_g1_s0_station_sref_script }; /* 0x822c1ac */ static const struct GroundEffectData s_gs177_g1_s0_effs[] = { /* 0x822c1b8 */ /* 0 */ { 0, 0, 1, 1, { 21, 15, CPOS_HALFTILE, CPOS_HALFTILE }, NULL }, }; @@ -81,4 +81,4 @@ static const struct GroundLink s_gs177_links[] = { /* 0x822c22c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs177 = { LPARRAY(s_gs177_groups), s_gs177_links }; /* 0x822c234 */ +const GroundScriptHeader gGroundScript_gs177 = { LPARRAY(s_gs177_groups), s_gs177_links }; /* 0x822c234 */ diff --git a/src/data/ground/ground_data_b01p01a_station.h b/src/data/ground/ground_data_b01p01a_station.h index 0671570fb..698e63230 100644 --- a/src/data/ground/ground_data_b01p01a_station.h +++ b/src/data/ground/ground_data_b01p01a_station.h @@ -1,145 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static const struct ScriptCommand s_gs9_g0_s0_station_sref_script[] = { /* 0x819ad18 */ DEBUGINFO_O(144), SELECT_MAP(MAP_TEAM_BASE), @@ -320,13 +179,13 @@ static const struct ScriptCommand s_gs9_g0_s0_station_sref_script[] = { /* 0x819 COND_EQUAL(4, /* to label */ 45), COND_EQUAL(5, /* to label */ 46), CJUMP_VAR(START_MODE), - COND_EQUAL(1, /* to label */ 47), - COND_EQUAL(3, /* to label */ 48), - COND_EQUAL(2, /* to label */ 49), - COND_EQUAL(4, /* to label */ 45), - COND_EQUAL(5, /* to label */ 46), - COND_EQUAL(9, /* to label */ 46), - COND_EQUAL(10, /* to label */ 46), + COND_EQUAL(STARTMODE_CONTINUE_GAME, /* to label */ 47), + COND_EQUAL(STARTMODE_3, /* to label */ 48), + COND_EQUAL(STARTMODE_GROUND, /* to label */ 49), + COND_EQUAL(STARTMODE_FRIEND_AREAS, /* to label */ 45), + COND_EQUAL(STARTMODE_DUNGEON_FROM_WORLD_MAP, /* to label */ 46), + COND_EQUAL(STARTMODE_DUNGEON_WON, /* to label */ 46), + COND_EQUAL(STARTMODE_10, /* to label */ 46), JUMP_LABEL(47), LABEL(49), /* = 0x31 */ CJUMP_VAR(GROUND_GETOUT), @@ -378,10 +237,10 @@ static const struct ScriptCommand s_gs9_g0_s0_station_sref_script[] = { /* 0x819 LABEL(55), /* = 0x37 */ SELECT_ENTITIES(0, 7), LABEL(56), /* = 0x38 */ - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), JUMP_SCRIPT(COMMON_ENTER), LABEL(53), /* = 0x35 */ - JUMPIF_SCENARIOCHECK(8, /* to label */ 57), + JUMPIF_SCENARIOCHECK(QUEST_CAN_CHANGE_LEADER, /* to label */ 57), CJUMP_VAR(DUNGEON_ENTER), COND_EQUAL(1, /* to label */ 58), COND_EQUAL(2, /* to label */ 59), @@ -392,38 +251,38 @@ static const struct ScriptCommand s_gs9_g0_s0_station_sref_script[] = { /* 0x819 COND_EQUAL(17, /* to label */ 64), COND_EQUAL(19, /* to label */ 65), LABEL(57), /* = 0x39 */ - EXECUTE_SUBSTATION(9, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 5, 0), RET, LABEL(58), /* = 0x3a */ - EXECUTE_SUBSTATION(9, 21, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 21, 0), RET, LABEL(59), /* = 0x3b */ - EXECUTE_SUBSTATION(9, 27, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 27, 0), RET, LABEL(60), /* = 0x3c */ - EXECUTE_SUBSTATION(9, 33, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 33, 0), RET, LABEL(61), /* = 0x3d */ - EXECUTE_SUBSTATION(9, 38, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 38, 0), RET, LABEL(62), /* = 0x3e */ - EXECUTE_SUBSTATION(9, 42, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 42, 0), RET, LABEL(63), /* = 0x3f */ - EXECUTE_SUBSTATION(9, 44, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 44, 0), RET, LABEL(64), /* = 0x40 */ - EXECUTE_SUBSTATION(9, 63, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 63, 0), RET, LABEL(65), /* = 0x41 */ - EXECUTE_SUBSTATION(9, 67, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 67, 0), RET, LABEL(54), /* = 0x36 */ - EXECUTE_SUBSTATION(9, 7, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 7, 0), RET, }; -static const struct ScriptRef s_gs9_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs9_g0_s0_station_sref_script }; /* 0x819bec8 */ +static const struct ScriptRef s_gs9_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs9_g0_s0_station_sref_script }; /* 0x819bec8 */ static const struct ScriptCommand s_gs9_g0_s0_evt0_sref_script[] = { /* 0x819bed4 */ @@ -436,12 +295,12 @@ static const struct ScriptCommand s_gs9_g0_s0_evt0_sref_script[] = { /* 0x819bed HALT, }; -static const struct ScriptRef s_gs9_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g0_s0_evt0_sref_script }; /* 0x819bf44 */ +static const struct ScriptRef s_gs9_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g0_s0_evt0_sref_script }; /* 0x819bf44 */ static const struct ScriptCommand s_gs9_g0_s0_evt1_sref_script[] = { /* 0x819bf50 */ DEBUGINFO_O(442), JUMPIF_SCENE_LT(SCENARIO_MAIN, 4, 3, /* to label */ 0), - JUMPIF_SCENARIOCHECK(4, /* to label */ 1), + JUMPIF_SCENARIOCHECK(QUEST_SQUARE_ASLEEP, /* to label */ 1), LABEL(2), /* = 0x02 */ { 0x3b, 0x12, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(1, /* to label */ 3), @@ -464,13 +323,13 @@ static const struct ScriptCommand s_gs9_g0_s0_evt1_sref_script[] = { /* 0x819bf5 SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_TOP_LEFT, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("This will be a dangerous journey.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'd better leave without telling\nthe others.") }, + MSG_QUIET(0, _("This will be a dangerous journey.")), + MSG_QUIET(0, _("I'd better leave without telling\nthe others.")), TEXTBOX_CLEAR, RET, }; -static const struct ScriptRef s_gs9_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g0_s0_evt1_sref_script }; /* 0x819c174 */ +static const struct ScriptRef s_gs9_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g0_s0_evt1_sref_script }; /* 0x819c174 */ static const struct ScriptCommand s_gs9_g0_s0_evt2_sref_script[] = { /* 0x819c180 */ DEBUGINFO_O(476), @@ -498,11 +357,11 @@ static const struct ScriptCommand s_gs9_g0_s0_evt2_sref_script[] = { /* 0x819c18 EXECUTE_STATION(-1, 64, 1), HALT, LABEL(5), /* = 0x05 */ - EXECUTE_STATION(9, 71, 0), + EXECUTE_STATION(MAP_TEAM_BASE, 71, 0), HALT, }; -static const struct ScriptRef s_gs9_g0_s0_evt2_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g0_s0_evt2_sref_script }; /* 0x819c330 */ +static const struct ScriptRef s_gs9_g0_s0_evt2_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g0_s0_evt2_sref_script }; /* 0x819c330 */ static const struct ScriptCommand s_gs9_g0_s0_evt3_sref_script[] = { /* 0x819c33c */ @@ -511,7 +370,7 @@ static const struct ScriptCommand s_gs9_g0_s0_evt3_sref_script[] = { /* 0x819c33 HALT, }; -static const struct ScriptRef s_gs9_g0_s0_evt3_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g0_s0_evt3_sref_script }; /* 0x819c36c */ +static const struct ScriptRef s_gs9_g0_s0_evt3_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g0_s0_evt3_sref_script }; /* 0x819c36c */ static const struct ScriptCommand s_gs9_g0_s0_obj0_dlg2[] = { /* 0x819c378 */ DEBUGINFO_O(517), @@ -554,7 +413,7 @@ static const struct ScriptCommand s_gs9_g0_s0_obj2_dlg2[] = { /* 0x819c748 */ WAIT(1), MSG_INSTANT(_("\n ← Friend Areas")), TEXTBOX_CLEAR, - JUMPIF_SCENARIOCHECK(4, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_SQUARE_ASLEEP, /* to label */ 0), LABEL(1), /* = 0x01 */ SPECIAL_TEXT(SPECIAL_TEXT_FRIEND_AREA_SELECT, 0, 0), COND_EQUAL(-2, /* to label */ 2), @@ -569,15 +428,15 @@ static const struct ScriptCommand s_gs9_g0_s0_obj2_dlg2[] = { /* 0x819c748 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_TOP_LEFT, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("This will be a dangerous journey.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'd better leave without telling\nthe others.") }, + MSG_QUIET(0, _("This will be a dangerous journey.")), + MSG_QUIET(0, _("I'd better leave without telling\nthe others.")), TEXTBOX_CLEAR, RET, }; static const struct ScriptCommand s_gs9_g0_s0_obj3_dlg0[] = { /* 0x819c8f4 */ DEBUGINFO_O(579), - JUMPIF_SCENARIOCHECK(29, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_COMPLETED_ALL_MAZES, /* to label */ 0), JUMPIF_ARRAY(EVENT_B01P01, 2, /* to label */ 0), END_DELETE, LABEL(0), /* = 0x00 */ @@ -1006,7 +865,7 @@ static const struct ScriptCommand s_gs9_g1_s0_station_sref_script[] = { /* 0x819 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g1_s0_station_sref_script }; /* 0x819e758 */ +static const struct ScriptRef s_gs9_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g1_s0_station_sref_script }; /* 0x819e758 */ @@ -1046,7 +905,7 @@ static const struct ScriptCommand s_gs9_g2_s0_station_sref_script[] = { /* 0x819 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g2_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g2_s0_station_sref_script }; /* 0x819e8b4 */ +static const struct ScriptRef s_gs9_g2_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g2_s0_station_sref_script }; /* 0x819e8b4 */ static const struct ScriptCommand s_gs9_g2_s0_eff0_script[] = { /* 0x819e8c0 */ DEBUGINFO_O(1052), @@ -1064,24 +923,24 @@ static const struct ScriptCommand s_gs9_g2_s1_lives0_dlg0[] = { /* 0x819e920 */ { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, FANFARE_PLAY2(451), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), WALK_GRID(256, 3), TEXTBOX_CLEAR, - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), SELECT_ANIMATION(22), WAIT(20), FANFARE_PLAY2(501), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Clunk!") }, + MSG_OVERHEARD(_("Clunk!")), WAIT(60), TEXTBOX_CLEAR, FANFARE_PLAY2(451), SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WALK_GRID(256, 4), FANFARE_STOP2(451), ALERT_CUE(3), @@ -1090,7 +949,7 @@ static const struct ScriptCommand s_gs9_g2_s1_lives0_dlg0[] = { /* 0x819e920 */ static const struct ScriptCommand s_gs9_g2_s1_eff0_script[] = { /* 0x819eaf4 */ DEBUGINFO_O(1092), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), WAIT(60), TEXTBOX_CLEAR, END_DELETE, @@ -1109,7 +968,7 @@ static const struct ScriptCommand s_gs9_g3_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs9_g3_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g3_s0_station_sref_script }; /* 0x819ebb4 */ +static const struct ScriptRef s_gs9_g3_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g3_s0_station_sref_script }; /* 0x819ebb4 */ static const struct ScriptCommand s_gs9_g4_s0_station_sref_script[] = { /* 0x819ebc0 */ DEBUGINFO_O(1115), @@ -1164,7 +1023,7 @@ static const struct ScriptCommand s_gs9_g4_s0_station_sref_script[] = { /* 0x819 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g4_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g4_s0_station_sref_script }; /* 0x819eee0 */ +static const struct ScriptRef s_gs9_g4_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g4_s0_station_sref_script }; /* 0x819eee0 */ @@ -1179,7 +1038,7 @@ static const struct ScriptCommand s_gs9_g5_s0_station_sref_script[] = { /* 0x819 SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), UPDATE_VARINT(CALC_SET, GROUND_ENTER, MAP_TEAM_BASE), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, MAP_TEAM_BASE_INSIDE), - JUMPIF_SCENARIOCHECK(8, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_CAN_CHANGE_LEADER, /* to label */ 0), UPDATE_VARINT(CALC_SET, PARTNER1_KIND, 2), UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), @@ -1191,14 +1050,14 @@ static const struct ScriptCommand s_gs9_g5_s0_station_sref_script[] = { /* 0x819 LABEL(1), /* = 0x01 */ SELECT_EVENTS(0, 0), CALL_STATION( 4, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), JUMP_STATION( 8, 0), RET, }; -static const struct ScriptRef s_gs9_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g5_s0_station_sref_script }; /* 0x819f03c */ +static const struct ScriptRef s_gs9_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g5_s0_station_sref_script }; /* 0x819f03c */ static const struct ScriptCommand s_gs9_g5_s0_lives0_dlg0[] = { /* 0x819f048 */ DEBUGINFO_O(1204), @@ -1246,7 +1105,7 @@ static const struct ScriptCommand s_gs9_g6_s0_station_sref_script[] = { /* 0x819 SELECT_ENTITIES(-1, 2), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -1255,7 +1114,7 @@ static const struct ScriptCommand s_gs9_g6_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs9_g6_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g6_s0_station_sref_script }; /* 0x819f39c */ +static const struct ScriptRef s_gs9_g6_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g6_s0_station_sref_script }; /* 0x819f39c */ static const struct ScriptCommand s_gs9_g6_s1_lives0_dlg0[] = { /* 0x819f3a8 */ @@ -1290,7 +1149,7 @@ static const struct ScriptCommand s_gs9_g6_s2_lives0_dlg0[] = { /* 0x819f594 */ { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), PORTRAIT(PLACEMENT_LEFT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("That was good work today.\nI should get some rest.") }, + MSG_QUIET(0, _("That was good work today.\nI should get some rest.")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -1301,7 +1160,7 @@ static const struct ScriptCommand s_gs9_g7_s0_station_sref_script[] = { /* 0x819 SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), UPDATE_VARINT(CALC_SET, GROUND_ENTER, MAP_TEAM_BASE), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, MAP_TEAM_BASE_INSIDE), - JUMPIF_SCENARIOCHECK(8, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_CAN_CHANGE_LEADER, /* to label */ 0), UPDATE_VARINT(CALC_SET, PARTNER1_KIND, 2), UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), @@ -1313,14 +1172,14 @@ static const struct ScriptCommand s_gs9_g7_s0_station_sref_script[] = { /* 0x819 LABEL(1), /* = 0x01 */ SELECT_EVENTS(0, 0), CALL_STATION( 4, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), JUMP_STATION( 8, 0), RET, }; -static const struct ScriptRef s_gs9_g7_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g7_s0_station_sref_script }; /* 0x819f7b8 */ +static const struct ScriptRef s_gs9_g7_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g7_s0_station_sref_script }; /* 0x819f7b8 */ static const struct ScriptCommand s_gs9_g7_s0_lives0_dlg0[] = { /* 0x819f7c4 */ DEBUGINFO_O(1326), @@ -1364,7 +1223,7 @@ static const struct ScriptCommand s_gs9_g8_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs9_g8_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g8_s0_station_sref_script }; /* 0x819f9a4 */ +static const struct ScriptRef s_gs9_g8_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g8_s0_station_sref_script }; /* 0x819f9a4 */ static const struct ScriptCommand s_gs9_g8_s0_lives0_dlg0[] = { /* 0x819f9b0 */ DEBUGINFO_O(1370), @@ -1402,7 +1261,7 @@ static const struct ScriptCommand s_gs9_g9_s0_lives0_dlg2[] = { /* 0x819fac0 */ LABEL(1), /* = 0x01 */ TEXTBOX_CLEAR, SCENARIO_CALC(SCENARIO_SUB1, 31, 1), - { 0xae, 0x01, 0x000f, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_HOWLING_FOREST), CANCEL_ENTITIES(9, 0), JUMP_SCRIPT(END_TALK), }; @@ -1492,7 +1351,7 @@ static const struct ScriptCommand s_gs9_g14_s0_lives0_dlg2[] = { /* 0x81a002c */ JUMP_SCRIPT(END_TALK), LABEL(1), /* = 0x01 */ SCENARIO_CALC(SCENARIO_SUB7, 49, 1), - { 0xae, 0x01, 0x001b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_BURIED_RELIC), CANCEL_ENTITIES(14, 0), JUMP_SCRIPT(END_TALK), }; @@ -1539,7 +1398,7 @@ static const struct ScriptCommand s_gs9_g17_s0_station_sref_script[] = { /* 0x81 { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -1558,7 +1417,7 @@ static const struct ScriptCommand s_gs9_g17_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g17_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g17_s0_station_sref_script }; /* 0x81a0500 */ +static const struct ScriptRef s_gs9_g17_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g17_s0_station_sref_script }; /* 0x81a0500 */ static const struct ScriptCommand s_gs9_g17_s0_eff0_script[] = { /* 0x81a050c - PART 1 0:18:58-0:19:03 - Possibly the camera scroll? WAIT timing seems to match */ @@ -1580,14 +1439,14 @@ static const struct ScriptCommand s_gs9_g17_s0_lives0_dlg0[] = { /* 0x81a05ac - { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), WALK_GRID(256, 7), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(30), MSG_NPC(1, _(" Well, this is the place...")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), @@ -1600,13 +1459,13 @@ static const struct ScriptCommand s_gs9_g17_s0_lives0_dlg0[] = { /* 0x81a05ac - CALL_SCRIPT(SMILE_END_FUNC), WAIT(20), PORTRAIT_REP(0x0000, 0x0000000b), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Wow!)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I can't explain, but I'm happy!)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I'm a human being, but I like this place.\nI feel weirdly happy!)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(It might be an instinct thing for\nPokémon...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Maybe this is what it feels like to want\nto wag your tail...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(It doesn't matter! I'm happy!)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Maybe I feel that way because I'm\n{POKEMON_0}!)") }, + MSG_QUIET(0, _("(Wow!)")), + MSG_QUIET(0, _("(I can't explain, but I'm happy!)")), + MSG_QUIET(0, _("(I'm a human being, but I like this place.\nI feel weirdly happy!)")), + MSG_QUIET(0, _("(It might be an instinct thing for\nPokémon...)")), + MSG_QUIET(0, _("(Maybe this is what it feels like to want\nto wag your tail...)")), + MSG_QUIET(0, _("(It doesn't matter! I'm happy!)")), + MSG_QUIET(0, _("(Maybe I feel that way because I'm\n{POKEMON_0}!)")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), @@ -1625,7 +1484,7 @@ static const struct ScriptCommand s_gs9_g17_s0_lives0_dlg0[] = { /* 0x81a05ac - WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" This is your {COLOR CYAN}Mailbox{RESET}.{WAIT_PRESS}\nThis is where you'll get mail from\nother Pokémon.")), @@ -1713,7 +1572,7 @@ static const struct ScriptCommand s_gs9_g17_s0_lives0_dlg0[] = { /* 0x81a05ac - TEXTBOX_CLEAR, RENAME_TEAM, WAIT(30), - { 0xb0, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_TINY_WOODS), SCENARIO_CALC(SCENARIO_MAIN, 3, 0), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, @@ -1729,7 +1588,7 @@ static const struct ScriptCommand s_gs9_g17_s0_lives0_dlg0[] = { /* 0x81a05ac - VARIANT_DEFAULT(_(" Rescue Team\n{TEAM_NAME}{RESET}!{WAIT_PRESS}\nLet's do good starting tomorrow!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(6, 10, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(20), ALERT_CUE(6), WAIT(1), @@ -1755,21 +1614,21 @@ static const struct ScriptCommand s_gs9_g17_s0_lives1_dlg0[] = { /* 0x81a1e94 - { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), WALK_GRID(256, 8), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(153, 10), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(10), ALERT_CUE(5), { 0xda, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -1812,7 +1671,7 @@ static const struct ScriptCommand s_gs9_g17_s3_lives0_dlg0[] = { /* 0x81a21b0 - CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), WAIT(2), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(6), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, STOP_ANIMATION_ON_CURRENT_FRAME, @@ -1828,7 +1687,7 @@ static const struct ScriptCommand s_gs9_g18_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -1836,7 +1695,7 @@ static const struct ScriptCommand s_gs9_g18_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g18_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g18_s0_station_sref_script }; /* 0x81a2390 */ +static const struct ScriptRef s_gs9_g18_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g18_s0_station_sref_script }; /* 0x81a2390 */ static const struct ScriptCommand s_gs9_g18_s0_eff0_script[] = { /* 0x81a239c */ DEBUGINFO_O(1842), @@ -1863,7 +1722,7 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ TEXTBOX_CLEAR, ALERT_CUE(6), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), WAIT(10), FANFARE_PLAY2(468), AWAIT_CUE(5), @@ -1910,14 +1769,14 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ ALERT_CUE(4), WAIT(60), WALK_GRID(256, 14), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), WAIT(30), { 0x3b, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, MSG_INSTANT(_("{CENTER_ALIGN}{NAME_1} checked the Mailbox.")), FANFARE_PLAY(213), MSG_INSTANT(_("{CENTER_ALIGN}The Mailbox contained\n{CENTER_ALIGN}a {COLOR CYAN}Rescue Team Starter Set{RESET}!")), - { 0xe1, 0x00, 0x00d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(213), TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), @@ -1939,13 +1798,13 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ MSG_INSTANT(_("{CENTER_ALIGN}{NAME_1} opened\n{CENTER_ALIGN}the {COLOR CYAN}Rescue Team Starter Set{RESET}.")), FANFARE_PLAY(213), MSG_INSTANT(_("{CENTER_ALIGN}There was\n{CENTER_ALIGN}a {COLOR CYAN}Rescue Team Badge{RESET} inside!")), - { 0xe1, 0x00, 0x00d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(213), FANFARE_PLAY(213), MSG_INSTANT(_("{CENTER_ALIGN}There was a {COLOR CYAN}Toolbox{RESET} inside!")), - { 0xe1, 0x00, 0x00d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(213), FANFARE_PLAY(213), MSG_INSTANT(_("{CENTER_ALIGN}There was also an issue of\n{CENTER_ALIGN}{COLOR CYAN}Pokémon News{RESET} inside!")), - { 0xe1, 0x00, 0x00d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(213), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), @@ -1990,7 +1849,7 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" If there were any rescue\njobs, we would be getting mail, but...")), @@ -2004,15 +1863,15 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ ALERT_CUE(6), AWAIT_CUE(5), ALERT_CUE(7), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), FANFARE_PLAY2(451), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(60), TEXTBOX_CLEAR, WAIT(15), ALERT_CUE(6), - ROTATE(30, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -2020,7 +1879,7 @@ static const struct ScriptCommand s_gs9_g18_s0_lives0_dlg0[] = { /* 0x81a23fc */ VARIANT_DEFAULT(_(" Oh?\nI wonder what it could be.")), TEXTBOX_CLEAR, ALERT_CUE(6), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), AWAIT_CUE(5), ALERT_CUE(7), AWAIT_CUE(5), @@ -2053,7 +1912,7 @@ static const struct ScriptCommand s_gs9_g18_s0_lives1_dlg0[] = { /* 0x81a3a10 */ AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(20), - { 0x93, 0x08, 0x0002, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_SPINLEFT1, 0), CALL_SCRIPT(SMILE_START_FUNC), ALERT_CUE(5), AWAIT_CUE(6), @@ -2066,41 +1925,41 @@ static const struct ScriptCommand s_gs9_g18_s0_lives1_dlg0[] = { /* 0x81a3a10 */ CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x04, 0x000a, 0x0000000c, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 12), WALK_GRID(256, 12), - { 0x95, 0x04, 0x000a, 0x0000000d, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 13), WALK_GRID(256, 13), - ROTATE(4, 10, DIRECTION_NORTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), ALERT_CUE(5), AWAIT_CUE(6), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x04, 0x000a, 0x0000000c, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 12), WALK_GRID(256, 12), ALERT_CUE(5), - { 0x95, 0x04, 0x000a, 0x0000000b, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 11), WALK_GRID(256, 11), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), CALL_SCRIPT(SMILE_START_FUNC), ALERT_CUE(5), AWAIT_CUE(6), @@ -2108,13 +1967,13 @@ static const struct ScriptCommand s_gs9_g18_s0_lives1_dlg0[] = { /* 0x81a3a10 */ CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(6), ALERT_CUE(5), - { 0x95, 0x04, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 15), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -2128,14 +1987,14 @@ static const struct ScriptCommand s_gs9_g18_s0_lives2_dlg0[] = { /* 0x81a3ef0 */ { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, AWAIT_CUE(7), WALK_GRID(256, 3), - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), SELECT_ANIMATION(22), WAIT(20), FANFARE_PLAY2(501), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Clunk!") }, + MSG_OVERHEARD(_("Clunk!")), WAIT(60), TEXTBOX_CLEAR, WAIT(30), @@ -2145,7 +2004,7 @@ static const struct ScriptCommand s_gs9_g18_s0_lives2_dlg0[] = { /* 0x81a3ef0 */ SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WALK_GRID(256, 4), ALERT_CUE(5), END_DELETE, @@ -2157,7 +2016,7 @@ static const struct ScriptCommand s_gs9_g19_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g19_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g19_s0_station_sref_script }; /* 0x81a40e0 */ +static const struct ScriptRef s_gs9_g19_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g19_s0_station_sref_script }; /* 0x81a40e0 */ static const struct ScriptCommand s_gs9_g19_s0_lives0_dlg0[] = { /* 0x81a40ec */ DEBUGINFO_O(2163), @@ -2202,7 +2061,7 @@ static const struct ScriptCommand s_gs9_g19_s0_evt0_sref_script[] = { /* 0x81a43 HALT, }; -static const struct ScriptRef s_gs9_g19_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g19_s0_evt0_sref_script }; /* 0x81a4380 */ +static const struct ScriptRef s_gs9_g19_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g19_s0_evt0_sref_script }; /* 0x81a4380 */ static const struct ScriptCommand s_gs9_g19_s1_station_sref_script[] = { /* 0x81a438c */ DEBUGINFO_O(2208), @@ -2213,7 +2072,7 @@ static const struct ScriptCommand s_gs9_g19_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g19_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g19_s1_station_sref_script }; /* 0x81a43ec */ +static const struct ScriptRef s_gs9_g19_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g19_s1_station_sref_script }; /* 0x81a43ec */ static const struct ScriptCommand s_gs9_g19_s1_lives0_dlg0[] = { /* 0x81a43f8 */ DEBUGINFO_O(2219), @@ -2234,7 +2093,7 @@ static const struct ScriptCommand s_gs9_g19_s1_lives1_dlg0[] = { /* 0x81a4504 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(3), RET, }; @@ -2266,13 +2125,13 @@ static const struct ScriptCommand s_gs9_g20_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(2266), SELECT_ENTITIES(-1, 0), AWAIT_CUE(3), - { 0xaf, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_THUNDERWAVE_CAVE, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 3, 6), { 0x04, 0x00, 0x001e, 0x00000001, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g20_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g20_s0_station_sref_script }; /* 0x81a484c */ +static const struct ScriptRef s_gs9_g20_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g20_s0_station_sref_script }; /* 0x81a484c */ static const struct ScriptCommand s_gs9_g20_s0_eff0_script[] = { /* 0x81a4858 */ DEBUGINFO_O(2278), @@ -2301,7 +2160,7 @@ static const struct ScriptCommand s_gs9_g20_s0_lives0_dlg0[] = { /* 0x81a48c8 */ VARIANT(/* == */ 1, _(" Maybe it's a rescue job\nrequest?!{WAIT_PRESS}\nCome on, what's it say?")), VARIANT_DEFAULT(_(" Maybe it's a rescue job\noffer!{WAIT_PRESS}\nWhat does it say?")), TEXTBOX_CLEAR, - { 0x8e, 0x1e, 0x0000, 0x00000022, 0x00000000, NULL }, + CMD_UNK_8E(30, DIR_TRANS_NONE, 34), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} read the letter.")), TEXTBOX_CLEAR, WAIT(30), @@ -2327,7 +2186,7 @@ static const struct ScriptCommand s_gs9_g20_s0_lives0_dlg0[] = { /* 0x81a48c8 */ SELECT_ENTITIES(-1, 1), AWAIT_CUE(5), WAIT(30), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x0000000c), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -2350,7 +2209,7 @@ static const struct ScriptCommand s_gs9_g20_s0_lives0_dlg0[] = { /* 0x81a48c8 */ VARIANT_DEFAULT(_(" That's the spirit!\nLet's do our best!")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), ALERT_CUE(6), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, @@ -2368,7 +2227,7 @@ static const struct ScriptCommand s_gs9_g20_s0_lives1_dlg0[] = { /* 0x81a50ac */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(256, 16), - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), ALERT_CUE(5), HALT, }; @@ -2396,7 +2255,7 @@ static const struct ScriptCommand s_gs9_g20_s2_lives0_dlg0[] = { /* 0x81a51fc */ WAIT(20), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, HALT, @@ -2411,14 +2270,14 @@ static const struct ScriptCommand s_gs9_g21_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g21_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g21_s0_station_sref_script }; /* 0x81a536c */ +static const struct ScriptRef s_gs9_g21_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g21_s0_station_sref_script }; /* 0x81a536c */ static const struct ScriptCommand s_gs9_g21_s0_lives0_dlg0[] = { /* 0x81a5378 */ DEBUGINFO_O(2424), @@ -2466,7 +2325,7 @@ static const struct ScriptCommand s_gs9_g22_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g22_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g22_s0_station_sref_script }; /* 0x81a566c */ +static const struct ScriptRef s_gs9_g22_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g22_s0_station_sref_script }; /* 0x81a566c */ static const struct ScriptCommand s_gs9_g22_s1_station_sref_script[] = { /* 0x81a5678 */ DEBUGINFO_O(2472), @@ -2474,7 +2333,7 @@ static const struct ScriptCommand s_gs9_g22_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g22_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g22_s1_station_sref_script }; /* 0x81a56a8 */ +static const struct ScriptRef s_gs9_g22_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g22_s1_station_sref_script }; /* 0x81a56a8 */ static const struct ScriptCommand s_gs9_g22_s1_lives0_dlg0[] = { /* 0x81a56b4 */ DEBUGINFO_O(2480), @@ -2485,7 +2344,7 @@ static const struct ScriptCommand s_gs9_g22_s1_lives0_dlg0[] = { /* 0x81a56b4 */ PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_NPC(1, _(" {NAME_0}!\nThe dungeon isn't that way.")), TEXTBOX_CLEAR, - { 0x93, 0x08, 0x000a, 0x00000004, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 4), WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), @@ -2509,15 +2368,15 @@ static const struct ScriptCommand s_gs9_g22_s1_lives1_dlg0[] = { /* 0x81a5930 */ DEBUGINFO_O(2509), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x08, 0x000a, 0x00000011, 0x00000000, NULL }, + CMD_UNK_95(8, DIR_TRANS_10, 17), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), @@ -2531,7 +2390,7 @@ static const struct ScriptCommand s_gs9_g22_s2_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g22_s2_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g22_s2_station_sref_script }; /* 0x81a5a70 */ +static const struct ScriptRef s_gs9_g22_s2_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g22_s2_station_sref_script }; /* 0x81a5a70 */ static const struct ScriptCommand s_gs9_g22_s2_lives0_dlg0[] = { /* 0x81a5a7c */ DEBUGINFO_O(2537), @@ -2542,7 +2401,7 @@ static const struct ScriptCommand s_gs9_g22_s2_lives0_dlg0[] = { /* 0x81a5a7c */ PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(1, _(" {NAME_0}!\nThe dungeon isn't that way.")), TEXTBOX_CLEAR, - { 0x93, 0x08, 0x000a, 0x00000004, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 4), WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), @@ -2566,15 +2425,15 @@ static const struct ScriptCommand s_gs9_g22_s2_lives1_dlg0[] = { /* 0x81a5c1c */ DEBUGINFO_O(2566), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - { 0x95, 0x08, 0x000a, 0x00000011, 0x00000000, NULL }, + CMD_UNK_95(8, DIR_TRANS_10, 17), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), @@ -2586,7 +2445,7 @@ static const struct ScriptCommand s_gs9_g23_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(2586), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -2595,7 +2454,7 @@ static const struct ScriptCommand s_gs9_g23_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g23_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g23_s0_station_sref_script }; /* 0x81a5dcc */ +static const struct ScriptRef s_gs9_g23_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g23_s0_station_sref_script }; /* 0x81a5dcc */ static const struct ScriptCommand s_gs9_g23_s0_lives0_dlg0[] = { /* 0x81a5dd8 */ DEBUGINFO_O(2601), @@ -2625,7 +2484,7 @@ static const struct ScriptCommand s_gs9_g23_s0_lives0_dlg0[] = { /* 0x81a5dd8 */ TEXTBOX_CLEAR, ALERT_CUE(6), WAIT(30), - ROTATE(10, 1, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(30), ALERT_CUE(3), HALT, @@ -2647,7 +2506,7 @@ static const struct ScriptCommand s_gs9_g24_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g24_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g24_s0_station_sref_script }; /* 0x81a6378 */ +static const struct ScriptRef s_gs9_g24_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g24_s0_station_sref_script }; /* 0x81a6378 */ static const struct ScriptCommand s_gs9_g24_s0_obj0_dlg2[] = { /* 0x81a6384 */ DEBUGINFO_O(2653), @@ -2674,7 +2533,7 @@ static const struct ScriptCommand s_gs9_g24_s0_evt0_sref_script[] = { /* 0x81a64 HALT, }; -static const struct ScriptRef s_gs9_g24_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g24_s0_evt0_sref_script }; /* 0x81a64e4 */ +static const struct ScriptRef s_gs9_g24_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g24_s0_evt0_sref_script }; /* 0x81a64e4 */ static const struct ScriptCommand s_gs9_g24_s1_station_sref_script[] = { /* 0x81a64f0 */ DEBUGINFO_O(2680), @@ -2685,13 +2544,13 @@ static const struct ScriptCommand s_gs9_g24_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g24_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g24_s1_station_sref_script }; /* 0x81a6550 */ +static const struct ScriptRef s_gs9_g24_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g24_s1_station_sref_script }; /* 0x81a6550 */ static const struct ScriptCommand s_gs9_g24_s1_lives0_dlg0[] = { /* 0x81a655c */ DEBUGINFO_O(2691), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oops!{WAIT_PRESS}\nI'd better check the Mailbox.") }, + MSG_QUIET(0, _("Oops!{WAIT_PRESS}\nI'd better check the Mailbox.")), TEXTBOX_CLEAR, WALK_RELATIVE(256, 0, -8), WAIT(30), @@ -2709,7 +2568,7 @@ static const struct ScriptCommand s_gs9_g25_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g25_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g25_s0_station_sref_script }; /* 0x81a6684 */ +static const struct ScriptRef s_gs9_g25_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g25_s0_station_sref_script }; /* 0x81a6684 */ static const struct ScriptCommand s_gs9_g25_s0_eff0_script[] = { /* 0x81a6690 */ DEBUGINFO_O(2715), @@ -2733,7 +2592,7 @@ static const struct ScriptCommand s_gs9_g25_s0_lives0_dlg0[] = { /* 0x81a6700 */ VARIANT(/* == */ 1, _(" Morning, {NAME_0}!\nYou're up early.")), VARIANT_DEFAULT(_(" Good morning, {NAME_0}!\nAren't you up early?")), TEXTBOX_CLEAR, - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(4), AWAIT_CUE(5), ALERT_CUE(6), @@ -2799,7 +2658,7 @@ static const struct ScriptCommand s_gs9_g25_s0_lives1_dlg0[] = { /* 0x81a6f34 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(256, 19), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -2823,14 +2682,14 @@ static const struct ScriptCommand s_gs9_g26_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g26_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g26_s0_station_sref_script }; /* 0x81a7134 */ +static const struct ScriptRef s_gs9_g26_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g26_s0_station_sref_script }; /* 0x81a7134 */ static const struct ScriptCommand s_gs9_g26_s0_lives0_dlg0[] = { /* 0x81a7140 */ DEBUGINFO_O(2836), @@ -2939,14 +2798,14 @@ static const struct ScriptCommand s_gs9_g27_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g27_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g27_s0_station_sref_script }; /* 0x81a7904 */ +static const struct ScriptRef s_gs9_g27_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g27_s0_station_sref_script }; /* 0x81a7904 */ static const struct ScriptCommand s_gs9_g27_s0_lives0_dlg0[] = { /* 0x81a7910 */ DEBUGINFO_O(2952), @@ -2986,7 +2845,7 @@ static const struct ScriptCommand s_gs9_g28_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(2986), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(103), + BGM_SWITCH(MUS_A_SUCCESSFUL_RESCUE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(90), @@ -2995,7 +2854,7 @@ static const struct ScriptCommand s_gs9_g28_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g28_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g28_s0_station_sref_script }; /* 0x81a7bf4 */ +static const struct ScriptRef s_gs9_g28_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g28_s0_station_sref_script }; /* 0x81a7bf4 */ static const struct ScriptCommand s_gs9_g28_s0_eff0_script[] = { /* 0x81a7c00 */ DEBUGINFO_O(3001), @@ -3019,7 +2878,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ MSG_NPC(2, _(" Ohhh...\nI was very scared.")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 68), MSG_NPC(2, _(" Maybe because I was\nsomewhere up so high...")), MSG_NPC(2, _(" My feet feel like they're\nstill walking on air...")), TEXTBOX_CLEAR, @@ -3030,11 +2889,11 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ CALL_SCRIPT(SWEAT_FUNC), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), - { 0x34, 0x00, 0x0001, 0x00000000, 0x00000000, _(" (Feet...?)") }, + MSG_NPC(1, _(" (Feet...?)")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0003, 0x00000000), - { 0x34, 0x00, 0x0003, 0x00000000, 0x00000000, _(" (HE HAS THEM? FEET?)") }, + MSG_NPC(3, _(" (HE HAS THEM? FEET?)")), TEXTBOX_CLEAR, WAIT(45), ALERT_CUE(7), @@ -3052,13 +2911,13 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(8), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT_RANDOM(10, 20), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT_RANDOM(10, 20), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT_RANDOM(10, 20), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(45), ALERT_CUE(6), ALERT_CUE(8), @@ -3077,7 +2936,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ ALERT_CUE(8), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), MSG_NPC(-1, _(" Hello. {NAME_4} here.")), TEXTBOX_CLEAR, @@ -3092,7 +2951,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_NPC(2, _(" Nope!\nIt was scary, but I'm all right.{WAIT_PRESS}\nIt's all thanks to {NAME_0}'s team.")), TEXTBOX_CLEAR, WAIT(10), @@ -3100,7 +2959,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ ALERT_CUE(8), ALERT_CUE(9), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0004, 0x00000000), MSG_NPC(4, _(" Thank you for everything.\nYou're heroes.")), TEXTBOX_CLEAR, @@ -3170,7 +3029,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ WAIT(80), ALERT_CUE(8), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0003, 0x00000000), MSG_NPC(3, _(" WE'LL BE ON OUR WAY\nTOO...")), @@ -3185,7 +3044,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT_REP(0x0003, 0x00000000), MSG_NPC(3, _(" WHAT IS IT?")), TEXTBOX_CLEAR, @@ -3197,7 +3056,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ VARIANT_DEFAULT(_(" Uh...{WAIT_PRESS}\nWould you like to join our team?")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_NPC(3, _(" JOIN YOUR TEAM?")), TEXTBOX_CLEAR, WAIT(10), @@ -3207,7 +3066,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(5), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0001, 0x00000000), ASK3_VAR(FALSE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), @@ -3290,7 +3149,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ LABEL(27), /* = 0x1b */ UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000009), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -3326,7 +3185,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ WAIT(10), ALERT_CUE(8), AWAIT_CUE(5), - ROTATE(12, 1, DIRECTION_SOUTH), + ROTATE_TO(12, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000005), MSG_NPC(1, _(" That is too bad.")), @@ -3334,7 +3193,7 @@ static const struct ScriptCommand s_gs9_g28_s0_lives0_dlg0[] = { /* 0x81a7c70 */ WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT_REP(0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" I guess we need somewhere\nPokémon can live if we want them to\njoin the rescue team...")), @@ -3404,36 +3263,36 @@ static const struct ScriptCommand s_gs9_g28_s0_lives1_dlg0[] = { /* 0x81aa778 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT_RANDOM(10, 20), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), WAIT(15), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(15), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(6), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), @@ -3459,16 +3318,16 @@ static const struct ScriptCommand s_gs9_g28_s0_lives1_dlg0[] = { /* 0x81aa778 */ ALERT_CUE(5), AWAIT_CUE(6), LABEL(0), /* = 0x00 */ - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - ROTATE(12, 2, DIRECTION_SOUTH), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), @@ -3482,23 +3341,23 @@ static const struct ScriptCommand s_gs9_g28_s0_lives2_dlg0[] = { /* 0x81aac28 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), FANFARE_PLAY2(486), SELECT_ANIMATION(23), @@ -3513,40 +3372,40 @@ static const struct ScriptCommand s_gs9_g28_s0_lives3_dlg0[] = { /* 0x81aade8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), { 0x2d, 0x09, 0x0002, 0x0000003c, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), @@ -3574,35 +3433,35 @@ static const struct ScriptCommand s_gs9_g28_s0_lives4_dlg0[] = { /* 0x81ab198 */ DEBUGINFO_O(3574), SELECT_ANIMATION(2), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT_RANDOM(10, 20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), { 0x2d, 0x09, 0x0002, 0x0000003c, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), @@ -3630,18 +3489,18 @@ static const struct ScriptCommand s_gs9_g28_s1_lives0_dlg0[] = { /* 0x81ab488 */ SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), FANFARE_PLAY2(486), SELECT_ANIMATION(23), @@ -3655,14 +3514,14 @@ static const struct ScriptCommand s_gs9_g29_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(3655), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g29_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g29_s0_station_sref_script }; /* 0x81ab6c8 */ +static const struct ScriptRef s_gs9_g29_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g29_s0_station_sref_script }; /* 0x81ab6c8 */ static const struct ScriptCommand s_gs9_g29_s0_lives0_dlg0[] = { /* 0x81ab6d4 */ DEBUGINFO_O(3668), @@ -3721,8 +3580,8 @@ static const struct ScriptCommand s_gs9_g29_s0_lives0_dlg0[] = { /* 0x81ab6d4 */ TEXTBOX_CLEAR, WAIT(16), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...It's true...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I haven't thought about it much, but...)") }, + MSG_QUIET(0, _("(...It's true...)")), + MSG_QUIET(0, _("(I haven't thought about it much, but...)")), ASK2(FALSE, /*default*/ -1, /* speaker */ 0, _("(Do I want to become a human again?)")), CHOICE(/* label */ 5, _("I'm not sure...")), CHOICE(/* label */ 6, _("I want to be a human again.")), @@ -3746,13 +3605,13 @@ static const struct ScriptCommand s_gs9_g29_s0_lives0_dlg0[] = { /* 0x81ab6d4 */ TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(When I was a human...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Huh? What was I like when I was\na human, anyway...?)") }, + MSG_QUIET(0, _("(When I was a human...)")), + MSG_QUIET(0, _("(Huh? What was I like when I was\na human, anyway...?)")), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), - { 0xe2, 0x00, 0x01d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(470), PORTRAIT_REP(0x0000, 0x00000005), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............{WAIT_PRESS}\nNope. I can't remember a thing...)") }, + MSG_QUIET(0, _("(............{WAIT_PRESS}\nNope. I can't remember a thing...)")), TEXTBOX_CLEAR, ALERT_CUE(6), PORTRAIT_REP(0x0001, 0x00000001), @@ -3845,7 +3704,7 @@ static const struct ScriptCommand s_gs9_g30_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEIN(60, 1), @@ -3853,7 +3712,7 @@ static const struct ScriptCommand s_gs9_g30_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g30_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g30_s0_station_sref_script }; /* 0x81acc48 */ +static const struct ScriptRef s_gs9_g30_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g30_s0_station_sref_script }; /* 0x81acc48 */ static const struct ScriptCommand s_gs9_g30_s0_eff0_script[] = { /* 0x81acc54 */ DEBUGINFO_O(3859), @@ -3892,7 +3751,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives0_dlg0[] = { /* 0x81acd04 */ ALERT_CUE(4), AWAIT_CUE(5), WAIT(30), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), PORTRAIT(PLACEMENT_RIGHT, 0x0003, 0x00000000), MSG_NPC(3, _(" There's nothing here.")), TEXTBOX_CLEAR, @@ -3928,7 +3787,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives0_dlg0[] = { /* 0x81acd04 */ ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - { 0x8e, 0x04, 0x0000, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 91), WAIT(30), ALERT_CUE(7), AWAIT_CUE(5), @@ -4041,7 +3900,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives0_dlg0[] = { /* 0x81acd04 */ FANFARE_PLAY2(473), CALL_SCRIPT(SHOCK_FUNC), WALK_GRID(512, 31), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(16), ALERT_CUE(6), AWAIT_CUE(5), @@ -4054,18 +3913,18 @@ static const struct ScriptCommand s_gs9_g30_s0_lives0_dlg0[] = { /* 0x81acd04 */ ALERT_CUE(10), WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(5), ALERT_CUE(10), AWAIT_CUE(5), { 0x3b, 0x06, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), WAIT(30), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000009), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -4118,7 +3977,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives1_dlg0[] = { /* 0x81ae20c */ WALK_GRID(256, 26), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(6), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000005, NULL }, @@ -4128,19 +3987,19 @@ static const struct ScriptCommand s_gs9_g30_s0_lives1_dlg0[] = { /* 0x81ae20c */ AWAIT_CUE(6), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), - { 0xe2, 0x00, 0x01c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(457), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(458), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), WAIT(10), - { 0xe2, 0x00, 0x01ca, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(458), AWAIT_CUE(6), FANFARE_PLAY2(473), CALL_SCRIPT(SHOCK_FUNC), WAIT(20), - { 0xe2, 0x00, 0x01d9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(473), AWAIT_CUE(6), { 0x89, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -4152,26 +4011,26 @@ static const struct ScriptCommand s_gs9_g30_s0_lives1_dlg0[] = { /* 0x81ae20c */ CALL_SCRIPT(NOTICE_FUNC), WAIT(10), WALK_GRID(256, 2), - { 0x90, 0x01, 0x0000, 0x0000001c, 0x00000000, NULL }, + CMD_UNK_90(1, DIR_TRANS_NONE, 28), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), WAIT(20), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(10, 2, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), CALL_SCRIPT(ANGRY_START_FUNC), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(6), CALL_SCRIPT(ANGRY_END_FUNC), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -4185,17 +4044,17 @@ static const struct ScriptCommand s_gs9_g30_s0_lives2_dlg0[] = { /* 0x81ae61c */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(7), WALK_GRID(256, 30), - { 0x8e, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 0), ALERT_CUE(5), AWAIT_CUE(7), WALK_GRID(512, 31), - { 0x90, 0x01, 0x0000, 0x0000001c, 0x00000000, NULL }, + CMD_UNK_90(1, DIR_TRANS_NONE, 28), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(7), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), @@ -4211,15 +4070,15 @@ static const struct ScriptCommand s_gs9_g30_s0_lives3_dlg0[] = { /* 0x81ae78c */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(8), WALK_GRID(256, 33), - { 0x8e, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 0), AWAIT_CUE(8), WALK_GRID(512, 34), - { 0x90, 0x01, 0x0000, 0x0000001c, 0x00000000, NULL }, + CMD_UNK_90(1, DIR_TRANS_NONE, 28), AWAIT_CUE(8), FANFARE_PLAY2(463), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), WALK_GRID(512, 35), END_DELETE, @@ -4232,19 +4091,19 @@ static const struct ScriptCommand s_gs9_g30_s0_lives4_dlg0[] = { /* 0x81ae8ac */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(9), WALK_GRID(256, 36), - { 0x8e, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 0), AWAIT_CUE(9), FANFARE_PLAY2(463), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(9), WALK_GRID(512, 37), - { 0x90, 0x01, 0x0000, 0x0000001c, 0x00000000, NULL }, + CMD_UNK_90(1, DIR_TRANS_NONE, 28), AWAIT_CUE(9), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(9), WALK_GRID(512, 38), END_DELETE, @@ -4257,13 +4116,13 @@ static const struct ScriptCommand s_gs9_g30_s0_lives5_dlg0[] = { /* 0x81aea0c */ { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), FANFARE_PLAY2(451), WALK_GRID(256, 3), ALERT_CUE(6), ALERT_CUE(5), TEXTBOX_CLEAR, - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), @@ -4271,7 +4130,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives5_dlg0[] = { /* 0x81aea0c */ SELECT_ANIMATION(22), WAIT(20), FANFARE_PLAY2(501), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Clunk! Clunk!") }, + MSG_OVERHEARD(_("Clunk! Clunk!")), WAIT(60), TEXTBOX_CLEAR, ALERT_CUE(5), @@ -4280,7 +4139,7 @@ static const struct ScriptCommand s_gs9_g30_s0_lives5_dlg0[] = { /* 0x81aea0c */ SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(6), WALK_GRID(256, 4), FANFARE_STOP2(451), @@ -4297,7 +4156,7 @@ static const struct ScriptCommand s_gs9_g31_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -4306,7 +4165,7 @@ static const struct ScriptCommand s_gs9_g31_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g31_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g31_s0_station_sref_script }; /* 0x81aed3c */ +static const struct ScriptRef s_gs9_g31_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g31_s0_station_sref_script }; /* 0x81aed3c */ static const struct ScriptCommand s_gs9_g31_s0_eff0_script[] = { /* 0x81aed48 */ DEBUGINFO_O(4312), @@ -4355,7 +4214,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ ALERT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x84, 0x00, 0x0100, 0x00000010, 0x0000001e, NULL }, - { 0x93, 0x04, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 54), AWAIT_CUE(5), WAIT(10), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -4391,7 +4250,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ ALERT_CUE(9), ALERT_CUE(10), AWAIT_CUE(5), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), WAIT(16), ALERT_CUE(6), AWAIT_CUE(5), @@ -4484,7 +4343,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ ALERT_CUE(10), WAIT(30), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Don't worry.\nWe'll save your friend first.")), @@ -4494,7 +4353,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives0_dlg0[] = { /* 0x81aee18 */ WAIT(15), ALERT_CUE(6), WAIT(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!{WAIT_PRESS}\nLet's roll, and quick!")), @@ -4536,12 +4395,12 @@ static const struct ScriptCommand s_gs9_g31_s0_lives1_dlg0[] = { /* 0x81b002c */ WALK_RELATIVE(256, 0, -3), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 54), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(10), WALK_RELATIVE(256, -8, 0), - { 0x93, 0x04, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 54), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), @@ -4550,22 +4409,22 @@ static const struct ScriptCommand s_gs9_g31_s0_lives1_dlg0[] = { /* 0x81b002c */ CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), WAIT(5), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(6), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), WAIT(5), - { 0xe2, 0x00, 0x01c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(457), AWAIT_CUE(6), CALL_SCRIPT(ANGRY_START_FUNC), AWAIT_CUE(6), CALL_SCRIPT(ANGRY_END_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x00020000, 0x00000000, NULL }, { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -4590,10 +4449,10 @@ static const struct ScriptCommand s_gs9_g31_s0_lives2_dlg0[] = { /* 0x81b02dc */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(8), WAIT(16), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(9), WAIT(16), ALERT_CUE(5), @@ -4613,7 +4472,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives3_dlg0[] = { /* 0x81b04bc */ AWAIT_CUE(8), { 0x89, 0x24, 0x0200, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), WALK_GRID(256, 35), WAIT(60), @@ -4628,7 +4487,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives4_dlg0[] = { /* 0x81b057c */ AWAIT_CUE(9), { 0x89, 0x24, 0x0200, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(9), WALK_GRID(256, 38), WAIT(60), @@ -4641,14 +4500,14 @@ static const struct ScriptCommand s_gs9_g31_s0_lives5_dlg0[] = { /* 0x81b063c */ { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), WALK_GRID(256, 39), - { 0x93, 0x04, 0x000a, 0x00000002, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 2), ALERT_CUE(5), AWAIT_CUE(10), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(10), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000004, NULL }, AWAIT_CUE(10), @@ -4656,7 +4515,7 @@ static const struct ScriptCommand s_gs9_g31_s0_lives5_dlg0[] = { /* 0x81b063c */ ALERT_CUE(5), AWAIT_CUE(10), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), RET, }; @@ -4667,7 +4526,7 @@ static const struct ScriptCommand s_gs9_g32_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g32_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g32_s0_station_sref_script }; /* 0x81b07dc */ +static const struct ScriptRef s_gs9_g32_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g32_s0_station_sref_script }; /* 0x81b07dc */ static const struct ScriptCommand s_gs9_g32_s0_lives0_dlg0[] = { /* 0x81b07e8 */ DEBUGINFO_O(4673), @@ -4695,14 +4554,14 @@ static const struct ScriptCommand s_gs9_g33_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g33_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g33_s0_station_sref_script }; /* 0x81b09f4 */ +static const struct ScriptRef s_gs9_g33_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g33_s0_station_sref_script }; /* 0x81b09f4 */ static const struct ScriptCommand s_gs9_g33_s0_lives0_dlg0[] = { /* 0x81b0a00 */ DEBUGINFO_O(4708), @@ -4736,7 +4595,7 @@ static const struct ScriptCommand s_gs9_g34_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(4736), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(103), + BGM_SWITCH(MUS_A_SUCCESSFUL_RESCUE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(90), @@ -4745,7 +4604,7 @@ static const struct ScriptCommand s_gs9_g34_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g34_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g34_s0_station_sref_script }; /* 0x81b0c8c */ +static const struct ScriptRef s_gs9_g34_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g34_s0_station_sref_script }; /* 0x81b0c8c */ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ DEBUGINFO_O(4751), @@ -4815,7 +4674,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}, how about we\ndo something right here?")), @@ -4832,7 +4691,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ MSG_NPC(2, _(" That's cool!\nA rescue team base is cool!")), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(4), MSG_NPC(2, _(" I want to work here when\nI grow up!")), TEXTBOX_CLEAR, @@ -4844,7 +4703,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(30), ALERT_CUE(6), PORTRAIT_REP(0x0001, 0x00000001), @@ -4855,7 +4714,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ WAIT(30), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(10), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -4874,7 +4733,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ CALL_SCRIPT(SMILE_END_FUNC), WAIT(30), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), PORTRAIT_REP(0x0003, 0x00000000), MSG_NPC(3, _(" {NAME_0} and\n{NAME_1}, thank you again!")), TEXTBOX_CLEAR, @@ -4889,11 +4748,11 @@ static const struct ScriptCommand s_gs9_g34_s0_lives0_dlg0[] = { /* 0x81b0c98 */ ALERT_CUE(8), WAIT(30), ALERT_CUE(6), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), WAIT(60), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(30), PORTRAIT_REP(0x0001, 0x00000005), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -4933,7 +4792,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives1_dlg0[] = { /* 0x81b1da4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(6), CALL_SCRIPT(SMILE_END_FUNC), @@ -4944,27 +4803,27 @@ static const struct ScriptCommand s_gs9_g34_s0_lives1_dlg0[] = { /* 0x81b1da4 */ ALERT_CUE(5), FANFARE_STOP2(465), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), WAIT(5), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(6), CALL_SCRIPT(SMILE_END_FUNC), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(6), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), @@ -4979,13 +4838,13 @@ static const struct ScriptCommand s_gs9_g34_s0_lives2_dlg0[] = { /* 0x81b2054 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000005e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 94), WAIT(10), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(7), CALL_SCRIPT(SMILE_END_FUNC), @@ -4998,7 +4857,7 @@ static const struct ScriptCommand s_gs9_g34_s0_lives2_dlg0[] = { /* 0x81b2054 */ FANFARE_STOP2(470), AWAIT_CUE(7), WAIT(5), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), @@ -5010,18 +4869,18 @@ static const struct ScriptCommand s_gs9_g34_s0_lives2_dlg0[] = { /* 0x81b2054 */ WAIT(5), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), WAIT(4), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(7), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(7), - { 0x8e, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 0), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(256, 40), ALERT_CUE(5), @@ -5033,12 +4892,12 @@ static const struct ScriptCommand s_gs9_g34_s0_lives3_dlg0[] = { /* 0x81b2384 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 54), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), @@ -5054,14 +4913,14 @@ static const struct ScriptCommand s_gs9_g35_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(5054), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g35_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g35_s0_station_sref_script }; /* 0x81b2534 */ +static const struct ScriptRef s_gs9_g35_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g35_s0_station_sref_script }; /* 0x81b2534 */ static const struct ScriptCommand s_gs9_g35_s0_lives0_dlg0[] = { /* 0x81b2540 */ DEBUGINFO_O(5067), @@ -5115,10 +4974,10 @@ static const struct ScriptCommand s_gs9_g35_s1_lives0_dlg0[] = { /* 0x81b2854 */ CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(70), CAMERA_PAN(204, 44), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(6), HALT, }; @@ -5145,13 +5004,13 @@ static const struct ScriptCommand s_gs9_g36_s0_station_sref_script[] = { /* 0x81 SELECT_ENTITIES(-1, -1), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), SELECT_EVENTS(0, 0), CALL_STATION( 37, 0), RET, }; -static const struct ScriptRef s_gs9_g36_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g36_s0_station_sref_script }; /* 0x81b2aa4 */ +static const struct ScriptRef s_gs9_g36_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g36_s0_station_sref_script }; /* 0x81b2aa4 */ static const struct ScriptCommand s_gs9_g36_s0_lives0_dlg0[] = { /* 0x81b2ab0 */ DEBUGINFO_O(5157), @@ -5181,7 +5040,7 @@ static const struct ScriptCommand s_gs9_g36_s0_lives0_dlg0[] = { /* 0x81b2ab0 */ ALERT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), WAIT(30), - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" Are you serious?!")), TEXTBOX_CLEAR, @@ -5214,7 +5073,7 @@ static const struct ScriptCommand s_gs9_g36_s0_lives0_dlg0[] = { /* 0x81b2ab0 */ ALERT_CUE(6), AWAIT_CUE(5), WAIT(15), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(40), PORTRAIT_REP(0x0001, 0x0000000b), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -5223,7 +5082,7 @@ static const struct ScriptCommand s_gs9_g36_s0_lives0_dlg0[] = { /* 0x81b2ab0 */ TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" That's it, then!\nWe'll go look for them!")), @@ -5243,7 +5102,7 @@ static const struct ScriptCommand s_gs9_g36_s0_lives0_dlg0[] = { /* 0x81b2ab0 */ TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Let's get to it,\n{NAME_0}!")), @@ -5278,13 +5137,13 @@ static const struct ScriptCommand s_gs9_g36_s0_lives1_dlg0[] = { /* 0x81b3680 */ CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -5311,7 +5170,7 @@ static const struct ScriptCommand s_gs9_g37_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g37_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g37_s0_station_sref_script }; /* 0x81b38d0 */ +static const struct ScriptRef s_gs9_g37_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g37_s0_station_sref_script }; /* 0x81b38d0 */ static const struct ScriptCommand s_gs9_g37_s0_lives0_dlg0[] = { /* 0x81b38dc */ DEBUGINFO_O(5317), @@ -5338,14 +5197,14 @@ static const struct ScriptCommand s_gs9_g38_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g38_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g38_s0_station_sref_script }; /* 0x81b3ac0 */ +static const struct ScriptRef s_gs9_g38_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g38_s0_station_sref_script }; /* 0x81b3ac0 */ static const struct ScriptCommand s_gs9_g38_s0_lives0_dlg0[] = { /* 0x81b3acc */ DEBUGINFO_O(5351), @@ -5378,7 +5237,7 @@ static const struct ScriptCommand s_gs9_g39_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(5378), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -5387,7 +5246,7 @@ static const struct ScriptCommand s_gs9_g39_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g39_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g39_s0_station_sref_script }; /* 0x81b3d24 */ +static const struct ScriptRef s_gs9_g39_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g39_s0_station_sref_script }; /* 0x81b3d24 */ static const struct ScriptCommand s_gs9_g39_s0_eff0_script[] = { /* 0x81b3d30 */ DEBUGINFO_O(5393), @@ -5448,7 +5307,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(8), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), WAIT(30), FANFARE_PLAY2(466), @@ -5464,8 +5323,8 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ AWAIT_CUE(5), WAIT(64), ALERT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), - BGM_SWITCH(114), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), PORTRAIT(PLACEMENT_TOP_FLIP, 0x0004, 0x00000000), MSG_NPC(4, _(" Zapdos...{WAIT_PRESS}\nIt's one of the legendary bird Pokémon.")), MSG_NPC(4, _(" I heard it had been\nsleeping for a long time...")), @@ -5521,7 +5380,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ ALERT_CUE(7), ALERT_CUE(8), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), PORTRAIT_REP(0x0001, 0x00000000), ASK3_VAR(FALSE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), @@ -5555,7 +5414,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ WAIT(20), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" We're a rescue team too!")), @@ -5630,7 +5489,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives0_dlg0[] = { /* 0x81b3de0 */ ALERT_CUE(8), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!\nLet's give it our best, partner!")), @@ -5670,12 +5529,12 @@ static const struct ScriptCommand s_gs9_g39_s0_lives1_dlg0[] = { /* 0x81b56f0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), AWAIT_CUE(6), { 0x70, 0x00, 0x0200, 0x00000007, 0x00000000, NULL }, WAIT(1), @@ -5685,14 +5544,14 @@ static const struct ScriptCommand s_gs9_g39_s0_lives1_dlg0[] = { /* 0x81b56f0 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 0, /* to label */ 0), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), WAIT(16), ALERT_CUE(5), AWAIT_CUE(6), @@ -5705,7 +5564,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives1_dlg0[] = { /* 0x81b56f0 */ { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, @@ -5725,19 +5584,19 @@ static const struct ScriptCommand s_gs9_g39_s0_lives2_dlg0[] = { /* 0x81b59c0 */ ALERT_CUE(5), AWAIT_CUE(7), WAIT(20), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(7), WAIT(5), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(7), HALT, }; @@ -5747,18 +5606,18 @@ static const struct ScriptCommand s_gs9_g39_s0_lives3_dlg0[] = { /* 0x81b5b60 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(8), HALT, }; @@ -5772,13 +5631,13 @@ static const struct ScriptCommand s_gs9_g39_s0_lives4_dlg0[] = { /* 0x81b5c80 */ AWAIT_CUE(9), { 0x89, 0x58, 0x0100, 0x00000006, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), HALT, @@ -5791,13 +5650,13 @@ static const struct ScriptCommand s_gs9_g39_s0_lives5_dlg0[] = { /* 0x81b5da0 */ AWAIT_CUE(10), { 0x89, 0x58, 0x0100, 0x00000006, 0x00000000, NULL }, AWAIT_CUE(10), - ROTATE(8, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(10), WALK_RELATIVE(256, -5, 0), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), HALT, @@ -5810,7 +5669,7 @@ static const struct ScriptCommand s_gs9_g39_s0_lives6_dlg0[] = { /* 0x81b5ea0 */ AWAIT_CUE(11), { 0x89, 0x58, 0x0100, 0x00000006, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(11), WALK_RELATIVE(256, -5, 0), ALERT_CUE(5), @@ -5827,14 +5686,14 @@ static const struct ScriptCommand s_gs9_g40_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g40_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g40_s0_station_sref_script }; /* 0x81b6030 */ +static const struct ScriptRef s_gs9_g40_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g40_s0_station_sref_script }; /* 0x81b6030 */ static const struct ScriptCommand s_gs9_g40_s0_lives0_dlg0[] = { /* 0x81b603c */ DEBUGINFO_O(5840), @@ -5882,7 +5741,7 @@ static const struct ScriptCommand s_gs9_g41_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g41_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g41_s0_station_sref_script }; /* 0x81b6548 */ +static const struct ScriptRef s_gs9_g41_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g41_s0_station_sref_script }; /* 0x81b6548 */ static const struct ScriptCommand s_gs9_g42_s0_station_sref_script[] = { /* 0x81b6554 */ DEBUGINFO_O(5888), @@ -5893,14 +5752,14 @@ static const struct ScriptCommand s_gs9_g42_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g42_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g42_s0_station_sref_script }; /* 0x81b6624 */ +static const struct ScriptRef s_gs9_g42_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g42_s0_station_sref_script }; /* 0x81b6624 */ static const struct ScriptCommand s_gs9_g42_s0_lives0_dlg0[] = { /* 0x81b6630 */ DEBUGINFO_O(5906), @@ -5938,14 +5797,14 @@ static const struct ScriptCommand s_gs9_g43_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g43_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g43_s0_station_sref_script }; /* 0x81b6880 */ +static const struct ScriptRef s_gs9_g43_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g43_s0_station_sref_script }; /* 0x81b6880 */ static const struct ScriptCommand s_gs9_g43_s0_eff0_script[] = { /* 0x81b688c */ DEBUGINFO_O(5951), @@ -6090,7 +5949,7 @@ static const struct ScriptCommand s_gs9_g43_s0_lives1_dlg0[] = { /* 0x81b7674 */ CALL_SCRIPT(NOTICE_FUNC), WAIT(30), FANFARE_STOP2(463), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), @@ -6112,14 +5971,14 @@ static const struct ScriptCommand s_gs9_g44_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g44_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g44_s0_station_sref_script }; /* 0x81b78b4 */ +static const struct ScriptRef s_gs9_g44_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g44_s0_station_sref_script }; /* 0x81b78b4 */ static const struct ScriptCommand s_gs9_g44_s0_lives0_dlg0[] = { /* 0x81b78c0 */ DEBUGINFO_O(6125), @@ -6158,14 +6017,14 @@ static const struct ScriptCommand s_gs9_g45_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g45_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g45_s0_station_sref_script }; /* 0x81b7b44 */ +static const struct ScriptRef s_gs9_g45_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g45_s0_station_sref_script }; /* 0x81b7b44 */ static const struct ScriptCommand s_gs9_g45_s0_lives0_dlg0[] = { /* 0x81b7b50 */ DEBUGINFO_O(6171), @@ -6326,11 +6185,11 @@ static const struct ScriptCommand s_gs9_g45_s0_lives0_dlg0[] = { /* 0x81b7b50 */ SELECT_LIVES(-1, 1), WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), ALERT_CUE(6), AWAIT_CUE(5), @@ -6353,7 +6212,7 @@ static const struct ScriptCommand s_gs9_g45_s0_lives0_dlg0[] = { /* 0x81b7b50 */ WAIT(90), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000003), ASK3(FALSE, /*default*/ -1, /* speaker */ 1, _(" ........................")), CHOICE(/* label */ 10, _("It appears to be impossible...")), @@ -6485,21 +6344,21 @@ static const struct ScriptCommand s_gs9_g45_s0_lives1_dlg0[] = { /* 0x81b9ee8 */ AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 0, /* to label */ 4), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 0, /* to label */ 5), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(30), ALERT_CUE(5), AWAIT_CUE(6), @@ -6542,31 +6401,31 @@ static const struct ScriptCommand s_gs9_g45_s1_lives0_dlg0[] = { /* 0x81ba378 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), FANFARE_PLAY2(451), WALK_GRID(256, 3), ALERT_CUE(6), ALERT_CUE(5), TEXTBOX_CLEAR, - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), ALERT_CUE(6), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), FANFARE_PLAY2(451), SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(6), WALK_GRID(256, 4), FANFARE_STOP2(451), @@ -6578,7 +6437,7 @@ static const struct ScriptCommand s_gs9_g46_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(6578), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(90), @@ -6587,7 +6446,7 @@ static const struct ScriptCommand s_gs9_g46_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g46_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g46_s0_station_sref_script }; /* 0x81ba658 */ +static const struct ScriptRef s_gs9_g46_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g46_s0_station_sref_script }; /* 0x81ba658 */ static const struct ScriptCommand s_gs9_g46_s0_lives0_dlg0[] = { /* 0x81ba664 */ DEBUGINFO_O(6593), @@ -6612,9 +6471,9 @@ static const struct ScriptCommand s_gs9_g46_s0_lives0_dlg0[] = { /* 0x81ba664 */ BGM_FADEOUT(160), ALERT_CUE(6), WAIT(10), - ROTATE(12, 2, DIRECTION_NORTHEAST), + ROTATE_TO(12, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), - ROTATE(30, 2, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(5), WAIT(45), ALERT_CUE(6), @@ -6628,7 +6487,7 @@ static const struct ScriptCommand s_gs9_g46_s0_lives0_dlg0[] = { /* 0x81ba664 */ WAIT(10), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), WAIT(30), PORTRAIT_REP(0x0001, 0x00000002), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -6657,7 +6516,7 @@ static const struct ScriptCommand s_gs9_g46_s0_lives0_dlg0[] = { /* 0x81ba664 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), WAIT(150), ALERT_CUE(3), HALT, @@ -6673,7 +6532,7 @@ static const struct ScriptCommand s_gs9_g46_s0_lives1_dlg0[] = { /* 0x81baf28 */ ALERT_CUE(5), WALK_GRID(153, 49), WAIT(90), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(3), @@ -6696,14 +6555,14 @@ static const struct ScriptCommand s_gs9_g47_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g47_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g47_s0_station_sref_script }; /* 0x81bb148 */ +static const struct ScriptRef s_gs9_g47_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g47_s0_station_sref_script }; /* 0x81bb148 */ static const struct ScriptCommand s_gs9_g47_s0_lives0_dlg0[] = { /* 0x81bb154 */ DEBUGINFO_O(6709), @@ -6770,7 +6629,7 @@ static const struct ScriptCommand s_gs9_g48_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g48_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g48_s0_station_sref_script }; /* 0x81bb620 */ +static const struct ScriptRef s_gs9_g48_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g48_s0_station_sref_script }; /* 0x81bb620 */ static const struct ScriptCommand s_gs9_g48_s0_eff0_script[] = { /* 0x81bb62c */ DEBUGINFO_O(6776), @@ -6801,7 +6660,7 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT_FLIP, 0x0001, 0x0000000c), MSG_NPC(1, _(" Gasp, gasp...{WAIT_PRESS}\nWow, that was a real shock!")), SELECT_ANIMATION(2), - { 0x93, 0x05, 0x0002, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_SPINLEFT1, 34), PORTRAIT_REP(0x0001, 0x00000005), MSG_NPC(1, _(" I never expected everyone\nto attack us like that.")), TEXTBOX_CLEAR, @@ -6921,15 +6780,15 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ TEXTBOX_CLEAR, ALERT_CUE(4), WAIT(30), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), + CMD_UNK_E5(7, 0), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" After that scene in\nPokémon Square...{WAIT_PRESS}\nWe held a town meeting...")), MSG_NPC(2, _(" On what we must do to\nsave the world...")), MSG_NPC(2, _(" And we arrived at a\nconsensus.{WAIT_PRESS}\nWe must get rid of you.")), TEXTBOX_CLEAR, - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), WAIT(10), ALERT_CUE(6), PORTRAIT_REP(0x0001, 0x0000000c), @@ -6952,9 +6811,9 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ AWAIT_CUE(5), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x0000000c), - { 0x34, 0x00, 0x0001, 0x00000000, 0x00000000, _(" (W-we're fighting here...?)") }, + MSG_NPC(1, _(" (W-we're fighting here...?)")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), AWAIT_CUE(5), ALERT_CUE(7), AWAIT_CUE(5), @@ -7013,7 +6872,7 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ ALERT_CUE(6), ALERT_CUE(4), WAIT(60), - { 0x93, 0x0a, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(10, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}...")), @@ -7050,7 +6909,7 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ ALERT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x0a, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(10, DIR_TRANS_10, 54), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x00000005), MSG_NPC(1, _(" {NAME_5}...")), @@ -7081,7 +6940,7 @@ static const struct ScriptCommand s_gs9_g48_s0_lives0_dlg0[] = { /* 0x81bb6cc */ ALERT_CUE(10), AWAIT_CUE(5), ALERT_CUE(10), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), PORTRAIT_REP(0x0001, 0x0000000b), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" That's right!\nThat's the spirit!\nThat's what I wanted to hear!")), @@ -7136,10 +6995,10 @@ static const struct ScriptCommand s_gs9_g48_s0_lives1_dlg0[] = { /* 0x81bddd8 */ WAIT(30), WALK_RELATIVE(768, -160, 0), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, @@ -7155,31 +7014,31 @@ static const struct ScriptCommand s_gs9_g48_s0_lives1_dlg0[] = { /* 0x81bddd8 */ AWAIT_CUE(6), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 88), WAIT(30), FANFARE_PLAY2(464), { 0x56, 0x00, 0x0000, 0x00000058, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), { 0x62, 0x00, 0x004c, -0x00000008, -0x00000010, NULL }, AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), { 0x62, 0x00, 0x0080, -0x00000004, 0x00000000, NULL }, WAIT(15), ALERT_CUE(5), AWAIT_CUE(6), WAIT(30), - ROTATE(6, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(15), - ROTATE(6, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(15), - ROTATE(6, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(15), - ROTATE(6, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), @@ -7188,20 +7047,20 @@ static const struct ScriptCommand s_gs9_g48_s0_lives1_dlg0[] = { /* 0x81bddd8 */ AWAIT_CUE(6), SELECT_ANIMATION(2), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(10, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(60), ALERT_CUE(5), CALL_SCRIPT(SMILE_START_FUNC), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), ALERT_CUE(5), CALL_SCRIPT(JUMP_HAPPY_FUNC), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -7237,12 +7096,12 @@ static const struct ScriptCommand s_gs9_g48_s1_lives0_dlg0[] = { /* 0x81be318 */ WAIT(60), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x05, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 34), AWAIT_CUE(7), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(7), WALK_RELATIVE(153, 160, 0), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), END_DELETE, }; @@ -7263,7 +7122,7 @@ static const struct ScriptCommand s_gs9_g48_s1_lives1_dlg0[] = { /* 0x81be4f8 */ { 0x62, 0x00, 0x004c, 0x00000008, 0x00000000, NULL }, AWAIT_CUE(8), WALK_RELATIVE(153, 160, -16), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), END_DELETE, }; @@ -7283,7 +7142,7 @@ static const struct ScriptCommand s_gs9_g48_s1_lives2_dlg0[] = { /* 0x81be618 */ { 0x62, 0x00, 0x004c, 0x00000008, 0x00000000, NULL }, AWAIT_CUE(9), WALK_RELATIVE(153, 160, 16), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), END_DELETE, }; @@ -7296,7 +7155,7 @@ static const struct ScriptCommand s_gs9_g48_s2_lives0_dlg0[] = { /* 0x81be728 */ WALK_RELATIVE(128, -40, 0), SELECT_ANIMATION(2), WAIT(15), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), WALK_RELATIVE(256, -80, 0), WAIT(30), @@ -7305,10 +7164,10 @@ static const struct ScriptCommand s_gs9_g48_s2_lives0_dlg0[] = { /* 0x81be728 */ AWAIT_CUE(10), SELECT_ANIMATION(2), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(10), CALL_SCRIPT(SMILE_START_FUNC), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(10), CALL_SCRIPT(JUMP_HAPPY_FUNC), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -7343,7 +7202,7 @@ static const struct ScriptCommand s_gs9_g49_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g49_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g49_s0_station_sref_script }; /* 0x81bea5c */ +static const struct ScriptRef s_gs9_g49_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g49_s0_station_sref_script }; /* 0x81bea5c */ static const struct ScriptCommand s_gs9_g49_s0_lives0_dlg0[] = { /* 0x81bea68 */ @@ -7402,7 +7261,7 @@ static const struct ScriptCommand s_gs9_g50_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g50_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g50_s0_station_sref_script }; /* 0x81beebc */ +static const struct ScriptRef s_gs9_g50_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g50_s0_station_sref_script }; /* 0x81beebc */ static const struct ScriptCommand s_gs9_g50_s0_lives0_dlg0[] = { /* 0x81beec8 */ DEBUGINFO_O(7408), @@ -7444,7 +7303,7 @@ static const struct ScriptCommand s_gs9_g50_s1_evt0_sref_script[] = { /* 0x81bf0 RET, }; -static const struct ScriptRef s_gs9_g50_s1_evt0_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs9_g50_s1_evt0_sref_script }; /* 0x81bf110 */ +static const struct ScriptRef s_gs9_g50_s1_evt0_sref = { NORMAL_EVENT, 7, NULL, s_gs9_g50_s1_evt0_sref_script }; /* 0x81bf110 */ static const struct ScriptCommand s_gs9_g50_s2_station_sref_script[] = { /* 0x81bf11c */ DEBUGINFO_O(7450), @@ -7455,14 +7314,14 @@ static const struct ScriptCommand s_gs9_g50_s2_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g50_s2_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g50_s2_station_sref_script }; /* 0x81bf17c */ +static const struct ScriptRef s_gs9_g50_s2_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g50_s2_station_sref_script }; /* 0x81bf17c */ static const struct ScriptCommand s_gs9_g50_s2_lives0_dlg0[] = { /* 0x81bf188 */ DEBUGINFO_O(7461), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x2d, 0x09, 0x0001, 0x00000022, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Are you going to the\nsquare?")), @@ -7483,7 +7342,7 @@ static const struct ScriptCommand s_gs9_g50_s2_lives1_dlg0[] = { /* 0x81bf44c */ { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_11, 0), AWAIT_CUE(3), RET, }; @@ -7519,7 +7378,7 @@ static const struct ScriptCommand s_gs9_g50_s3_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g50_s3_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g50_s3_station_sref_script }; /* 0x81bf63c */ +static const struct ScriptRef s_gs9_g50_s3_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g50_s3_station_sref_script }; /* 0x81bf63c */ static const struct ScriptCommand s_gs9_g50_s3_lives0_dlg0[] = { /* 0x81bf648 */ DEBUGINFO_O(7525), @@ -7538,7 +7397,7 @@ static const struct ScriptCommand s_gs9_g50_s3_lives1_dlg0[] = { /* 0x81bf708 */ DEBUGINFO_O(7538), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), HALT, @@ -7552,7 +7411,7 @@ static const struct ScriptCommand s_gs9_g51_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g51_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g51_s0_station_sref_script }; /* 0x81bf7c8 */ +static const struct ScriptRef s_gs9_g51_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g51_s0_station_sref_script }; /* 0x81bf7c8 */ static const struct ScriptCommand s_gs9_g51_s0_lives0_dlg0[] = { /* 0x81bf7d4 */ DEBUGINFO_O(7558), @@ -7591,10 +7450,10 @@ static const struct ScriptCommand s_gs9_g51_s0_lives0_dlg0[] = { /* 0x81bf7d4 */ VARIANT_DEFAULT(_(" We have to get away at\nall cost.")), TEXTBOX_CLEAR, WAIT(30), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), PORTRAIT(PLACEMENT_RIGHT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...Yes. We have to escape.)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Like {NAME_2} said that time...)") }, + MSG_QUIET(0, _("(...Yes. We have to escape.)")), + MSG_QUIET(0, _("(Like {NAME_2} said that time...)")), TEXTBOX_CLEAR, { 0x5f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -7615,14 +7474,14 @@ static const struct ScriptCommand s_gs9_g52_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(7615), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x27, 0x01, 0x000e, 0x0000001e, 0x00000000, NULL }, AWAIT_CUE(3), { 0x28, 0x01, 0x000e, 0x0000001e, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g52_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g52_s0_station_sref_script }; /* 0x81bff64 */ +static const struct ScriptRef s_gs9_g52_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g52_s0_station_sref_script }; /* 0x81bff64 */ static const struct ScriptCommand s_gs9_g52_s0_lives0_dlg0[] = { /* 0x81bff70 */ DEBUGINFO_O(7628), @@ -7676,14 +7535,14 @@ static const struct ScriptCommand s_gs9_g53_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(7676), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g53_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g53_s0_station_sref_script }; /* 0x81c01f0 */ +static const struct ScriptRef s_gs9_g53_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g53_s0_station_sref_script }; /* 0x81c01f0 */ static const struct ScriptCommand s_gs9_g53_s0_eff0_script[] = { /* 0x81c01fc */ DEBUGINFO_O(7689), @@ -7712,9 +7571,9 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Yes...\nWho am I?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Until I discover that truth, I have to\nrun and survive.)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Even if it means going to the edge\nof this world...)") }, + MSG_QUIET(0, _("(Yes...\nWho am I?)")), + MSG_QUIET(0, _("(Until I discover that truth, I have to\nrun and survive.)")), + MSG_QUIET(0, _("(Even if it means going to the edge\nof this world...)")), TEXTBOX_CLEAR, WAIT(30), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), @@ -7728,7 +7587,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ FANFARE_PLAY2(465), ALERT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(15), ALERT_CUE(4), ALERT_CUE(7), @@ -7738,7 +7597,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ AWAIT_CUE(5), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 52), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(15), ALERT_CUE(6), AWAIT_CUE(5), @@ -7784,7 +7643,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ ALERT_CUE(8), ALERT_CUE(11), ALERT_CUE(12), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(30), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0004, 0x00000000), @@ -7805,11 +7664,11 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(11), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(5), ALERT_CUE(10), AWAIT_CUE(5), @@ -7828,7 +7687,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ ALERT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 57), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), WAIT(30), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} began reading the letter.")), TEXTBOX_CLEAR, @@ -7849,7 +7708,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ MSG_NPC(4, _(" The other Pokémon will\nbe waking up soon.")), MSG_NPC(4, _(" You have to go!\nHurry!")), TEXTBOX_CLEAR, - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(6), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x00000000), @@ -7871,7 +7730,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives0_dlg0[] = { /* 0x81c02fc */ ALERT_CUE(12), { 0x89, 0xe0, 0x0099, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), ALERT_CUE(6), AWAIT_CUE(5), WAIT(30), @@ -7917,7 +7776,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives1_dlg0[] = { /* 0x81c1318 */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), @@ -7925,42 +7784,42 @@ static const struct ScriptCommand s_gs9_g53_s0_lives1_dlg0[] = { /* 0x81c1318 */ WAIT(12), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 68), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), WAIT(30), - ROTATE(10, 11, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(30), - ROTATE(10, 11, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), WAIT(20), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(6), WALK_RELATIVE(128, -4, 4), WAIT(30), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), WAIT(25), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 58), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), WALK_RELATIVE(256, -8, 8), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0xe0, 0x0099, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x78, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -7985,21 +7844,21 @@ static const struct ScriptCommand s_gs9_g53_s0_lives2_dlg0[] = { /* 0x81c1678 */ AWAIT_CUE(7), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(7), WAIT(22), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(7), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 59), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(20), TEXTBOX_AUTO_PRESS(60, 60), PORTRAIT(PLACEMENT_TOP, 0x0002, 0x00000000), @@ -8023,18 +7882,18 @@ static const struct ScriptCommand s_gs9_g53_s0_lives3_dlg0[] = { /* 0x81c1904 */ WAIT(4), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(8), - { 0x93, 0x04, 0x000b, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 68), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 60), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), HALT, }; @@ -8046,7 +7905,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives4_dlg0[] = { /* 0x81c1a94 */ { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), FANFARE_PLAY2(451), WALK_GRID(256, 3), ALERT_CUE(6), @@ -8057,7 +7916,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives4_dlg0[] = { /* 0x81c1a94 */ ALERT_CUE(12), ALERT_CUE(5), TEXTBOX_CLEAR, - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), @@ -8071,7 +7930,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives4_dlg0[] = { /* 0x81c1a94 */ SELECT_ANIMATION(22), WAIT(20), FANFARE_PLAY2(501), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Clunk!") }, + MSG_OVERHEARD(_("Clunk!")), WAIT(60), TEXTBOX_CLEAR, ALERT_CUE(5), @@ -8080,7 +7939,7 @@ static const struct ScriptCommand s_gs9_g53_s0_lives4_dlg0[] = { /* 0x81c1a94 */ SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WALK_GRID(256, 4), FANFARE_STOP2(451), ALERT_CUE(5), @@ -8102,21 +7961,21 @@ static const struct ScriptCommand s_gs9_g53_s0_lives5_dlg0[] = { /* 0x81c1d74 */ WAIT(12), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(11), - { 0x93, 0x04, 0x000b, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 68), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(11), WAIT(25), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(11), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(11), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(11), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 61), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(11), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(110), TEXTBOX_AUTO_PRESS(80, 80), PORTRAIT(PLACEMENT_TOP, 0x0006, 0x00000000), @@ -8141,16 +8000,16 @@ static const struct ScriptCommand s_gs9_g53_s0_lives6_dlg0[] = { /* 0x81c2004 */ WAIT(8), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 68), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), HALT, }; @@ -8162,19 +8021,19 @@ static const struct ScriptCommand s_gs9_g53_s2_lives0_dlg0[] = { /* 0x81c2174 */ SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(9), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(9), CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), HALT, }; @@ -8187,7 +8046,7 @@ static const struct ScriptCommand s_gs9_g55_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x3b, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -8196,7 +8055,7 @@ static const struct ScriptCommand s_gs9_g55_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g55_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g55_s0_station_sref_script }; /* 0x81c23b4 */ +static const struct ScriptRef s_gs9_g55_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g55_s0_station_sref_script }; /* 0x81c23b4 */ static const struct ScriptCommand s_gs9_g55_s0_lives0_dlg0[] = { /* 0x81c23c0 */ DEBUGINFO_O(8202), @@ -8217,22 +8076,22 @@ static const struct ScriptCommand s_gs9_g55_s0_lives0_dlg0[] = { /* 0x81c23c0 */ TEXTBOX_CLEAR, WAIT(30), SELECT_ENTITIES(-1, 1), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Flap! Flap!") }, + MSG_OVERHEARD(_("Flap! Flap!")), WAIT(5), ALERT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000b, 0x00000037, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 55), WAIT(100), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(5), WAIT(30), ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), WAIT(10), - { 0x93, 0x04, 0x000b, 0x00000007, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 7), WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_2}'s brought us\nmail already, too.")), @@ -8260,11 +8119,11 @@ static const struct ScriptCommand s_gs9_g55_s0_lives1_dlg0[] = { /* 0x81c2858 */ ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000b, 0x00000037, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 55), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -8279,14 +8138,14 @@ static const struct ScriptCommand s_gs9_g55_s1_lives0_dlg0[] = { /* 0x81c2958 */ { 0x60, 0x00, 0x0000, 0x00000030, 0x00000000, NULL }, FANFARE_PLAY2(451), WALK_GRID(256, 3), - ROTATE(30, 2, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, FANFARE_STOP2(451), SELECT_ANIMATION(22), WAIT(20), FANFARE_PLAY2(501), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Clunk! Clunk!") }, + MSG_OVERHEARD(_("Clunk! Clunk!")), WAIT(60), TEXTBOX_CLEAR, ALERT_CUE(5), @@ -8295,7 +8154,7 @@ static const struct ScriptCommand s_gs9_g55_s1_lives0_dlg0[] = { /* 0x81c2958 */ SELECT_ANIMATION(2), { 0x68, 0x00, 0x0100, 0x00000030, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 1, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WALK_GRID(256, 4), FANFARE_STOP2(451), ALERT_CUE(5), @@ -8308,7 +8167,7 @@ static const struct ScriptCommand s_gs9_g56_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g56_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g56_s0_station_sref_script }; /* 0x81c2b58 */ +static const struct ScriptRef s_gs9_g56_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g56_s0_station_sref_script }; /* 0x81c2b58 */ static const struct ScriptCommand s_gs9_g57_s0_station_sref_script[] = { /* 0x81c2b64 */ DEBUGINFO_O(8314), @@ -8319,7 +8178,7 @@ static const struct ScriptCommand s_gs9_g57_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -8327,7 +8186,7 @@ static const struct ScriptCommand s_gs9_g57_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g57_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g57_s0_station_sref_script }; /* 0x81c2c44 */ +static const struct ScriptRef s_gs9_g57_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g57_s0_station_sref_script }; /* 0x81c2c44 */ static const struct ScriptCommand s_gs9_g57_s0_lives0_dlg0[] = { /* 0x81c2c50 */ DEBUGINFO_O(8333), @@ -8409,14 +8268,14 @@ static const struct ScriptCommand s_gs9_g58_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(8409), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g58_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g58_s0_station_sref_script }; /* 0x81c372c */ +static const struct ScriptRef s_gs9_g58_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g58_s0_station_sref_script }; /* 0x81c372c */ static const struct ScriptCommand s_gs9_g58_s0_eff0_script[] = { /* 0x81c3738 */ DEBUGINFO_O(8422), @@ -8460,7 +8319,7 @@ static const struct ScriptCommand s_gs9_g58_s0_lives0_dlg0[] = { /* 0x81c37c8 */ ALERT_CUE(7), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 63), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(5), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x00000000), @@ -8482,7 +8341,7 @@ static const struct ScriptCommand s_gs9_g58_s0_lives0_dlg0[] = { /* 0x81c37c8 */ MSG_NPC(2, _(" He's getting the other rescue\nteams to come.")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), MSG_NPC(1, _(" {NAME_0}, let's go!")), TEXTBOX_CLEAR, ALERT_CUE(7), @@ -8509,12 +8368,12 @@ static const struct ScriptCommand s_gs9_g58_s0_lives1_dlg0[] = { /* 0x81c3df4 */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(6), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(6), WAIT(5), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -8553,14 +8412,14 @@ static const struct ScriptCommand s_gs9_g59_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(MAP_TEAM_BASE), CALL_STATION( 4, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g59_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g59_s0_station_sref_script }; /* 0x81c40f4 */ +static const struct ScriptRef s_gs9_g59_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g59_s0_station_sref_script }; /* 0x81c40f4 */ static const struct ScriptCommand s_gs9_g59_s0_lives0_dlg0[] = { /* 0x81c4100 */ DEBUGINFO_O(8566), @@ -8606,7 +8465,7 @@ static const struct ScriptCommand s_gs9_g60_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -8614,7 +8473,7 @@ static const struct ScriptCommand s_gs9_g60_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g60_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g60_s0_station_sref_script }; /* 0x81c458c */ +static const struct ScriptRef s_gs9_g60_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g60_s0_station_sref_script }; /* 0x81c458c */ static const struct ScriptCommand s_gs9_g60_s0_eff0_script[] = { /* 0x81c4598 */ DEBUGINFO_O(8620), @@ -8666,7 +8525,7 @@ static const struct ScriptCommand s_gs9_g61_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g61_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g61_s0_station_sref_script }; /* 0x81c4a34 */ +static const struct ScriptRef s_gs9_g61_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g61_s0_station_sref_script }; /* 0x81c4a34 */ static const struct ScriptCommand s_gs9_g61_s0_lives0_dlg0[] = { /* 0x81c4a40 */ DEBUGINFO_O(8672), @@ -8716,7 +8575,7 @@ static const struct ScriptCommand s_gs9_g61_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g61_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g61_s1_station_sref_script }; /* 0x81c4da8 */ +static const struct ScriptRef s_gs9_g61_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g61_s1_station_sref_script }; /* 0x81c4da8 */ static const struct ScriptCommand s_gs9_g61_s1_lives0_dlg0[] = { /* 0x81c4db4 */ DEBUGINFO_O(8722), @@ -8735,7 +8594,7 @@ static const struct ScriptCommand s_gs9_g61_s1_lives1_dlg0[] = { /* 0x81c4e54 */ DEBUGINFO_O(8735), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), HALT, @@ -8750,14 +8609,14 @@ static const struct ScriptCommand s_gs9_g62_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g62_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g62_s0_station_sref_script }; /* 0x81c4f94 */ +static const struct ScriptRef s_gs9_g62_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g62_s0_station_sref_script }; /* 0x81c4f94 */ static const struct ScriptCommand s_gs9_g62_s0_eff0_script[] = { /* 0x81c4fa0 */ DEBUGINFO_O(8763), @@ -8799,10 +8658,10 @@ static const struct ScriptCommand s_gs9_g62_s0_lives0_dlg0[] = { /* 0x81c5060 */ { 0x89, 0x40, 0x0100, 0x00000000, 0x00000000, NULL }, WAIT(45), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Gardevoir said...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(She will tell me everything when this\nadventure is over...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Is going underground the adventure\nshe meant...?)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Will she tell me if we rescue Alakazam's\nteam...?)") }, + MSG_QUIET(0, _("(Gardevoir said...)")), + MSG_QUIET(0, _("(She will tell me everything when this\nadventure is over...)")), + MSG_QUIET(0, _("(Is going underground the adventure\nshe meant...?)")), + MSG_QUIET(0, _("(Will she tell me if we rescue Alakazam's\nteam...?)")), TEXTBOX_CLEAR, WAIT(15), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -8819,7 +8678,7 @@ static const struct ScriptCommand s_gs9_g62_s0_lives0_dlg0[] = { /* 0x81c5060 */ TEXTBOX_CLEAR, FANFARE_PLAY2(463), CALL_SCRIPT(NOTICE_FUNC), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x89, 0x48, 0x0100, 0x00000000, 0x00000000, NULL }, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -8853,14 +8712,14 @@ static const struct ScriptCommand s_gs9_g63_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g63_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g63_s0_station_sref_script }; /* 0x81c56a8 */ +static const struct ScriptRef s_gs9_g63_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g63_s0_station_sref_script }; /* 0x81c56a8 */ static const struct ScriptCommand s_gs9_g63_s0_lives0_dlg0[] = { /* 0x81c56b4 */ DEBUGINFO_O(8866), @@ -8903,7 +8762,7 @@ static const struct ScriptCommand s_gs9_g64_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g64_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g64_s0_station_sref_script }; /* 0x81c5ad4 */ +static const struct ScriptRef s_gs9_g64_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g64_s0_station_sref_script }; /* 0x81c5ad4 */ static const struct ScriptCommand s_gs9_g64_s1_station_sref_script[] = { /* 0x81c5ae0 */ DEBUGINFO_O(8909), @@ -8913,7 +8772,7 @@ static const struct ScriptCommand s_gs9_g64_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g64_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g64_s1_station_sref_script }; /* 0x81c5b30 */ +static const struct ScriptRef s_gs9_g64_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g64_s1_station_sref_script }; /* 0x81c5b30 */ static const struct ScriptCommand s_gs9_g64_s1_lives0_dlg0[] = { /* 0x81c5b3c */ DEBUGINFO_O(8919), @@ -8921,7 +8780,7 @@ static const struct ScriptCommand s_gs9_g64_s1_lives0_dlg0[] = { /* 0x81c5b3c */ { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), PORTRAIT(PLACEMENT_LEFT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Whoops.\nI'd better get packed to leave.") }, + MSG_QUIET(0, _("Whoops.\nI'd better get packed to leave.")), TEXTBOX_CLEAR, ALERT_CUE(3), RET, @@ -8936,14 +8795,14 @@ static const struct ScriptCommand s_gs9_g65_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g65_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g65_s0_station_sref_script }; /* 0x81c5cc8 */ +static const struct ScriptRef s_gs9_g65_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g65_s0_station_sref_script }; /* 0x81c5cc8 */ static const struct ScriptCommand s_gs9_g65_s0_lives0_dlg0[] = { /* 0x81c5cd4 */ DEBUGINFO_O(8949), @@ -8985,7 +8844,7 @@ static const struct ScriptCommand s_gs9_g66_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g66_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g66_s0_station_sref_script }; /* 0x81c5f74 */ +static const struct ScriptRef s_gs9_g66_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g66_s0_station_sref_script }; /* 0x81c5f74 */ static const struct ScriptCommand s_gs9_g67_s0_station_sref_script[] = { /* 0x81c5f80 */ DEBUGINFO_O(8991), @@ -8996,14 +8855,14 @@ static const struct ScriptCommand s_gs9_g67_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g67_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g67_s0_station_sref_script }; /* 0x81c6050 */ +static const struct ScriptRef s_gs9_g67_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g67_s0_station_sref_script }; /* 0x81c6050 */ static const struct ScriptCommand s_gs9_g67_s0_lives0_dlg0[] = { /* 0x81c605c */ DEBUGINFO_O(9009), @@ -9060,7 +8919,7 @@ static const struct ScriptCommand s_gs9_g68_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g68_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g68_s0_station_sref_script }; /* 0x81c6514 */ +static const struct ScriptRef s_gs9_g68_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g68_s0_station_sref_script }; /* 0x81c6514 */ static const struct ScriptCommand s_gs9_g68_s0_eff0_script[] = { /* 0x81c6520 */ DEBUGINFO_O(9066), @@ -9137,7 +8996,7 @@ static const struct ScriptCommand s_gs9_g68_s0_lives1_dlg0[] = { /* 0x81c68e0 */ WAIT(50), SELECT_ANIMATION(2), WAIT(15), - ROTATE(10, 10, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), ALERT_CUE(18), WAIT(30), @@ -9165,7 +9024,7 @@ static const struct ScriptCommand s_gs9_g68_s0_lives2_dlg0[] = { /* 0x81c6a60 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(7), WAIT(30), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), WAIT(10), CALL_SCRIPT(JUMP_ANGRY_FUNC), @@ -9174,7 +9033,7 @@ static const struct ScriptCommand s_gs9_g68_s0_lives2_dlg0[] = { /* 0x81c6a60 */ AWAIT_CUE(7), WAIT(40), { 0x89, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), CALL_SCRIPT(JUMP_ANGRY_FUNC), WAIT(60), @@ -9192,22 +9051,22 @@ static const struct ScriptCommand s_gs9_g68_s0_lives3_dlg0[] = { /* 0x81c6be0 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(8), WAIT(5), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), WAIT(15), CALL_SCRIPT(NOTICE_FUNC), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(8), WAIT(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(40), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), WAIT(35), { 0x89, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), CALL_SCRIPT(JUMP_HAPPY_FUNC), WAIT(45), @@ -9224,25 +9083,25 @@ static const struct ScriptCommand s_gs9_g68_s0_lives4_dlg0[] = { /* 0x81c6dc0 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), WAIT(10), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(9), WAIT(60), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(9), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(40), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(10), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(9), WAIT(30), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(20), CALL_SCRIPT(JUMP_HAPPY_FUNC), WAIT(20), @@ -9260,20 +9119,20 @@ static const struct ScriptCommand s_gs9_g68_s0_lives5_dlg0[] = { /* 0x81c6fc0 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(9), WAIT(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), WAIT(15), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(9), WAIT(50), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(9), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(40), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(40), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(9), @@ -9290,7 +9149,7 @@ static const struct ScriptCommand s_gs9_g68_s0_lives6_dlg0[] = { /* 0x81c7170 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(10), WAIT(25), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(10), WAIT(20), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -9300,7 +9159,7 @@ static const struct ScriptCommand s_gs9_g68_s0_lives6_dlg0[] = { /* 0x81c7170 */ AWAIT_CUE(10), WAIT(35), WALK_GRID(256, 71), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), HALT, }; @@ -9317,13 +9176,13 @@ static const struct ScriptCommand s_gs9_g68_s0_lives7_dlg0[] = { /* 0x81c72a0 */ WAIT(30), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(11), WAIT(45), WALK_GRID(204, 72), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(11), HALT, }; @@ -9335,30 +9194,30 @@ static const struct ScriptCommand s_gs9_g68_s0_lives8_dlg0[] = { /* 0x81c73e0 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(12), WAIT(15), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(12), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(12), WAIT(15), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WALK_RELATIVE(128, -8, 0), CALL_SCRIPT(JUMP_ANGRY_FUNC), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(12), WAIT(40), WALK_GRID(256, 73), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), CALL_SCRIPT(JUMP_ANGRY_FUNC), WAIT(45), CALL_SCRIPT(JUMP_ANGRY_FUNC), @@ -9375,18 +9234,18 @@ static const struct ScriptCommand s_gs9_g68_s0_lives9_dlg0[] = { /* 0x81c7630 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(13), WAIT(30), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(13), WAIT(10), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(20), CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(13), @@ -9404,21 +9263,21 @@ static const struct ScriptCommand s_gs9_g68_s0_lives10_dlg0[] = { /* 0x81c77c0 * { 0x2d, 0x07, 0x0009, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(14), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(14), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(14), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(70), { 0x89, 0x28, 0x0080, 0x00000002, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(14), { 0x89, 0x10, 0x0080, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(14), WAIT(30), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(14), HALT, }; @@ -9434,15 +9293,15 @@ static const struct ScriptCommand s_gs9_g68_s0_lives11_dlg0[] = { /* 0x81c7940 * CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(15), WAIT(60), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(15), - ROTATE(12, 10, DIRECTION_NORTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(15), WAIT(30), { 0x89, 0x08, 0x0100, 0x00000002, 0x00000000, NULL }, - ROTATE(12, 10, DIRECTION_NORTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), @@ -9461,18 +9320,18 @@ static const struct ScriptCommand s_gs9_g68_s0_lives12_dlg0[] = { /* 0x81c7b10 * { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(16), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(16), AWAIT_CUE(15), WAIT(60), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(16), AWAIT_CUE(16), WAIT(35), { 0x89, 0x0c, 0x0100, 0x00000005, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), @@ -9548,13 +9407,13 @@ static const struct ScriptCommand s_gs9_g69_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(9548), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs9_g69_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g69_s0_station_sref_script }; /* 0x81c80b0 */ +static const struct ScriptRef s_gs9_g69_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g69_s0_station_sref_script }; /* 0x81c80b0 */ static const struct ScriptCommand s_gs9_g69_s0_eff0_script[] = { /* 0x81c80bc */ DEBUGINFO_O(9560), @@ -9610,7 +9469,7 @@ static const struct ScriptCommand s_gs9_g69_s0_lives0_dlg0[] = { /* 0x81c817c */ WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" {NAME_0}!\nLet's go to the square!")), TEXTBOX_CLEAR, @@ -9641,12 +9500,12 @@ static const struct ScriptCommand s_gs9_g69_s0_lives1_dlg0[] = { /* 0x81c8584 */ AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 74), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), WAIT(15), @@ -9665,7 +9524,7 @@ static const struct ScriptCommand s_gs9_g69_s0_lives2_dlg0[] = { /* 0x81c86f4 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x89, 0x40, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), @@ -9700,7 +9559,7 @@ static const struct ScriptCommand s_gs9_g70_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g70_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g70_s0_station_sref_script }; /* 0x81c8914 */ +static const struct ScriptRef s_gs9_g70_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g70_s0_station_sref_script }; /* 0x81c8914 */ static const struct ScriptCommand s_gs9_g71_s0_station_sref_script[] = { /* 0x81c8920 */ DEBUGINFO_O(9706), @@ -9712,7 +9571,7 @@ static const struct ScriptCommand s_gs9_g71_s0_station_sref_script[] = { /* 0x81 HALT, }; -static const struct ScriptRef s_gs9_g71_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g71_s0_station_sref_script }; /* 0x81c8990 */ +static const struct ScriptRef s_gs9_g71_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g71_s0_station_sref_script }; /* 0x81c8990 */ static const struct ScriptCommand s_gs9_g71_s0_lives0_dlg0[] = { /* 0x81c899c */ DEBUGINFO_O(9718), @@ -9722,7 +9581,7 @@ static const struct ScriptCommand s_gs9_g71_s0_lives0_dlg0[] = { /* 0x81c899c */ FANFARE_PLAY2(465), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Oh, yeah, {NAME_0}!\nHang on a second!")), VARIANT(/* == */ 1, _(" There's something I wanted\nto bounce off you before we go to any\ndungeon.")), @@ -9758,14 +9617,14 @@ static const struct ScriptCommand s_gs9_g72_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(MAP_TEAM_BASE), CALL_STATION( 4, 0), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs9_g72_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g72_s0_station_sref_script }; /* 0x81c8d84 */ +static const struct ScriptRef s_gs9_g72_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g72_s0_station_sref_script }; /* 0x81c8d84 */ static const struct ScriptCommand s_gs9_g72_s0_lives0_dlg0[] = { /* 0x81c8d90 */ DEBUGINFO_O(9771), @@ -9909,7 +9768,7 @@ static const struct ScriptCommand s_gs9_g73_s0_evt0_sref_script[] = { /* 0x81ca5 HALT, }; -static const struct ScriptRef s_gs9_g73_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs9_g73_s0_evt0_sref_script }; /* 0x81ca5b0 */ +static const struct ScriptRef s_gs9_g73_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs9_g73_s0_evt0_sref_script }; /* 0x81ca5b0 */ static const struct ScriptCommand s_gs9_g74_s0_station_sref_script[] = { /* 0x81ca5bc */ DEBUGINFO_O(9915), @@ -9920,7 +9779,7 @@ static const struct ScriptCommand s_gs9_g74_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g74_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g74_s0_station_sref_script }; /* 0x81ca61c */ +static const struct ScriptRef s_gs9_g74_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g74_s0_station_sref_script }; /* 0x81ca61c */ static const struct ScriptCommand s_gs9_g74_s0_eff0_script[] = { /* 0x81ca628 */ DEBUGINFO_O(9926), @@ -9946,23 +9805,23 @@ static const struct ScriptCommand s_gs9_g74_s0_lives0_dlg0[] = { /* 0x81ca698 */ FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(45), ALERT_CUE(4), ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(8), WALK_GRID(256, 75), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_NPC(2, _(" Um...{WAIT_PRESS}\nI'm Wynaut, and this is...")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), { 0x2d, 0x03, 0x0003, 0x0000006e, 0x00000000, NULL }, PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0003, 0x00000041), @@ -9974,14 +9833,14 @@ static const struct ScriptCommand s_gs9_g74_s0_lives0_dlg0[] = { /* 0x81ca698 */ ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" We have a notice on the\nBulletin Board outside the Pelipper Post\nOffice.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0003, 0x00000041), MSG_NPC(3, _(" Wobbuffet!")), @@ -9989,13 +9848,13 @@ static const struct ScriptCommand s_gs9_g74_s0_lives0_dlg0[] = { /* 0x81ca698 */ ALERT_CUE(8), WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_NPC(2, _(" Please look at it for me.\nPlease, please.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), PORTRAIT_REP(0x0003, 0x00000041), MSG_NPC(3, _(" Wobbuffet!!!{WAIT_PRESS}")), @@ -10004,23 +9863,23 @@ static const struct ScriptCommand s_gs9_g74_s0_lives0_dlg0[] = { /* 0x81ca698 */ WAIT(10), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_NPC(2, _(" Please help me.{WAIT_PRESS}\nI have to go now.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(8), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), MSG_NPC(3, _(" Wobbuffet!")), TEXTBOX_CLEAR, ALERT_CUE(8), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(5), ALERT_CUE(6), WAIT(1), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(10), PORTRAIT_REP(0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -10051,34 +9910,34 @@ static const struct ScriptCommand s_gs9_g74_s0_lives1_dlg0[] = { /* 0x81cb178 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), WALK_GRID(256, 76), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), - { 0xe2, 0x00, 0x01d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(470), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -10092,7 +9951,7 @@ static const struct ScriptCommand s_gs9_g74_s0_lives2_dlg0[] = { /* 0x81cb3a8 */ AWAIT_CUE(7), WALK_GRID(256, 77), WALK_GRID(256, 78), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -10116,7 +9975,7 @@ static const struct ScriptCommand s_gs9_g74_s0_lives3_dlg0[] = { /* 0x81cb508 */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), WALK_GRID(256, 80), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), SELECT_ANIMATION(19), @@ -10154,7 +10013,7 @@ static const struct ScriptCommand s_gs9_g75_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(10154), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -10162,7 +10021,7 @@ static const struct ScriptCommand s_gs9_g75_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g75_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g75_s0_station_sref_script }; /* 0x81cb7f8 */ +static const struct ScriptRef s_gs9_g75_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g75_s0_station_sref_script }; /* 0x81cb7f8 */ static const struct ScriptCommand s_gs9_g75_s0_eff0_script[] = { /* 0x81cb804 */ DEBUGINFO_O(10168), @@ -10219,7 +10078,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ AWAIT_CUE(5), FANFARE_PLAY(203), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0}'s team received\n{CENTER_ALIGN}a peeled {COLOR GREEN}Chestnut{RESET} as their reward.")), - { 0xe1, 0x00, 0x00cb, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(203), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(7), @@ -10261,9 +10120,9 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ TEXTBOX_CLEAR, FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), - { 0xe2, 0x00, 0x01d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(470), WAIT(30), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(30), MSG_NPC(-1, _(" Hey, you!")), TEXTBOX_CLEAR, @@ -10273,8 +10132,8 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), WAIT(1), - ROTATE(8, 1, DIRECTION_SOUTH), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), + WAIT_FANFARE2(465), ALERT_CUE(4), BGM_FADEOUT(90), AWAIT_CUE(5), @@ -10295,7 +10154,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ VARIANT_DEFAULT(_(" That {NAME_4} gang...")), VARIANT_DEFAULT(_(" Did they chase us here to\nget us back?")), TEXTBOX_CLEAR, - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), ALERT_CUE(4), ALERT_CUE(9), ALERT_CUE(10), @@ -10307,7 +10166,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ MSG_NPC(4, _(" That's right, you!")), ALERT_CUE(9), ALERT_CUE(6), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), MSG_NPC(4, _(" You got lucky!\nYou don't mess with us!")), TEXTBOX_CLEAR, WAIT(10), @@ -10328,7 +10187,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ WAIT(10), ALERT_CUE(6), WAIT(1), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), SELECT_ANIMATION(41), BGM_STOP, AWAIT_CUE(5), @@ -10390,7 +10249,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ ALERT_CUE(10), ALERT_CUE(11), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(5), WAIT(20), PORTRAIT(PLACEMENT_LEFT_, 0x0004, 0x00000000), @@ -10417,7 +10276,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000004), MSG_NPC(1, _(" Hmmm...\n{NAME_0}, what do you think?")), @@ -10427,7 +10286,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ LABEL(16), /* = 0x10 */ TEXTBOX_CLEAR, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), SELECT_ENTITIES(-1, 1), WAIT(2), AWAIT_CUE(5), @@ -10446,12 +10305,12 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ PORTRAIT(PLACEMENT_LEFT_, 0x0004, 0x00000000), MSG_NPC(4, _(" Mukkeeeeeh!\nGet them!")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), ALERT_CUE(9), ALERT_CUE(10), ALERT_CUE(11), WAIT(4), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), SELECT_ANIMATION(41), BGM_FADEOUT(60), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -10470,10 +10329,10 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), - { 0x8b, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 1), ALERT_CUE(6), ALERT_CUE(11), ALERT_CUE(9), @@ -10499,7 +10358,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ ALERT_CUE(11), ALERT_CUE(6), { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 1), WAIT(30), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, BGM_FADEIN(30, 1), @@ -10517,7 +10376,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), PORTRAIT_POS(1, -1, -4), @@ -10530,7 +10389,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ LABEL(15), /* = 0x0f */ TEXTBOX_CLEAR, UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), - { 0x8b, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 1), SELECT_ENTITIES(-1, 2), WAIT(2), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), @@ -10626,16 +10485,16 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ ALERT_CUE(7), ALERT_CUE(8), WAIT(1), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), MSG_NPC(7, _(" I'll spit silk for gluing\nthings together!")), TEXTBOX_CLEAR, WAIT(10), - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" I'll help too!")), @@ -10687,7 +10546,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives0_dlg0[] = { /* 0x81cb8b4 */ ALERT_CUE(8), ALERT_CUE(7), ALERT_CUE(12), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, WAIT(80), ALERT_CUE(3), @@ -10729,28 +10588,28 @@ static const struct ScriptCommand s_gs9_g75_s0_lives1_dlg0[] = { /* 0x81ce8cc */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), WAIT(1), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(2, 2, DIRECTION_SOUTH), + ROTATE_TO(2, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), SELECT_ANIMATION(41), AWAIT_CUE(6), SELECT_ANIMATION(2), FANFARE_PLAY2(468), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), AWAIT_CUE(6), - ROTATE(2, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(2, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(1), ALERT_CUE(5), HALT, @@ -10769,7 +10628,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives2_dlg0[] = { /* 0x81cea9c */ ALERT_CUE(5), AWAIT_CUE(7), { 0x89, 0x10, 0x0100, 0x00000004, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(19), @@ -10790,18 +10649,18 @@ static const struct ScriptCommand s_gs9_g75_s0_lives2_dlg0[] = { /* 0x81cea9c */ AWAIT_CUE(7), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), - ROTATE(8, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(20), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(20), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(7), WALK_GRID(256, 85), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), SELECT_ANIMATION(19), WAIT(30), @@ -10847,15 +10706,15 @@ static const struct ScriptCommand s_gs9_g75_s0_lives3_dlg0[] = { /* 0x81cee3c */ AWAIT_CUE(8), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), - ROTATE(8, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(20), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(20), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(8), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(8), WALK_GRID(256, 86), AWAIT_CUE(8), @@ -10882,9 +10741,9 @@ static const struct ScriptCommand s_gs9_g75_s0_lives4_dlg0[] = { /* 0x81cf1ac */ AWAIT_CUE(9), WALK_GRID(256, 87), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WALK_GRID(256, 88), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), @@ -10892,14 +10751,14 @@ static const struct ScriptCommand s_gs9_g75_s0_lives4_dlg0[] = { /* 0x81cf1ac */ { 0x63, 0x00, 0x0040, 0x00000057, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), - ROTATE(8, 1, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(9), - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), HALT, }; @@ -10922,9 +10781,9 @@ static const struct ScriptCommand s_gs9_g75_s0_lives5_dlg0[] = { /* 0x81cf33c */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), HALT, }; @@ -10948,9 +10807,9 @@ static const struct ScriptCommand s_gs9_g75_s0_lives6_dlg0[] = { /* 0x81cf49c */ CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), HALT, }; @@ -10968,7 +10827,7 @@ static const struct ScriptCommand s_gs9_g75_s0_lives7_dlg0[] = { /* 0x81cf60c */ AWAIT_CUE(12), WALK_GRID(256, 95), WALK_GRID(256, 96), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(12), SELECT_ANIMATION(17), AWAIT_CUE(12), @@ -10980,16 +10839,16 @@ static const struct ScriptCommand s_gs9_g75_s1_lives0_dlg0[] = { /* 0x81cf72c */ { 0x57, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 1), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(1), AWAIT_CUE(6), SELECT_ANIMATION(41), WAIT(1), AWAIT_CUE(6), { 0x58, 0x01, 0x0000, 0x00000148, 0x00000168, NULL }, - { 0x8b, 0x01, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHWEST, 1), SELECT_ANIMATION(5), AWAIT_CUE(6), WAIT(10), @@ -11004,9 +10863,9 @@ static const struct ScriptCommand s_gs9_g75_s1_lives0_dlg0[] = { /* 0x81cf72c */ WAIT(1), AWAIT_CUE(6), { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 1), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(10), ALERT_CUE(5), HALT, @@ -11052,7 +10911,7 @@ static const struct ScriptCommand s_gs9_g75_s1_lives2_dlg0[] = { /* 0x81cfacc */ WALK_GRID(256, 91), AWAIT_CUE(10), WARP_WAYPOINT(1, 90), - { 0x8b, 0x01, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 1), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), SELECT_ANIMATION(2), @@ -11072,7 +10931,7 @@ static const struct ScriptCommand s_gs9_g75_s1_lives3_dlg0[] = { /* 0x81cfbec */ AWAIT_CUE(11), WALK_GRID(256, 93), AWAIT_CUE(11), - { 0x8b, 0x01, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 1), { 0x58, 0x01, 0x0000, 0x00000130, 0x00000180, NULL }, AWAIT_CUE(11), SELECT_ANIMATION(5), @@ -11094,25 +10953,25 @@ static const struct ScriptCommand s_gs9_g75_s2_lives0_dlg0[] = { /* 0x81cfd9c */ DEBUGINFO_O(11094), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), CALL_SCRIPT(JUMP_HAPPY_FUNC), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), { 0x54, 0x00, 0x002a, 0x00000000, 0x00000000, NULL }, HALT, }; @@ -11122,13 +10981,13 @@ static const struct ScriptCommand s_gs9_g75_s2_lives1_dlg0[] = { /* 0x81cff1c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), HALT, }; @@ -11137,13 +10996,13 @@ static const struct ScriptCommand s_gs9_g75_s2_lives2_dlg0[] = { /* 0x81cffdc */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), WALK_GRID(256, 98), AWAIT_CUE(10), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), HALT, }; @@ -11152,16 +11011,16 @@ static const struct ScriptCommand s_gs9_g75_s2_lives3_dlg0[] = { /* 0x81d009c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), WALK_GRID(256, 99), WALK_GRID(256, 100), - ROTATE(1, 2, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), HALT, }; @@ -11188,7 +11047,7 @@ static const struct ScriptCommand s_gs9_g76_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g76_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g76_s0_station_sref_script }; /* 0x81d0340 */ +static const struct ScriptRef s_gs9_g76_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g76_s0_station_sref_script }; /* 0x81d0340 */ static const struct ScriptCommand s_gs9_g76_s0_eff0_script[] = { /* 0x81d034c */ @@ -11221,7 +11080,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives0_dlg0[] = { /* 0x81d041c */ PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0007, 0x00000000), WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000001), MSG_NPC(1, _(" Whew...{WAIT_PRESS}\nOur base is coming along quickly.")), TEXTBOX_CLEAR, @@ -11246,13 +11105,13 @@ static const struct ScriptCommand s_gs9_g76_s0_lives0_dlg0[] = { /* 0x81d041c */ ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(12), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(8), WAIT(80), ALERT_CUE(12), MSG_NPC(7, _(" But there's still lots to do.")), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(7), ALERT_CUE(8), MSG_NPC(7, _(" We still have difficult\nthings to do.")), @@ -11274,7 +11133,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives0_dlg0[] = { /* 0x81d041c */ AWAIT_CUE(5), MSG_NPC(1, _(" Look!\nOver there!")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(7), ALERT_CUE(8), ALERT_CUE(4), @@ -11344,7 +11203,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives0_dlg0[] = { /* 0x81d041c */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Problem, {NAME_0}.")), @@ -11373,26 +11232,26 @@ static const struct ScriptCommand s_gs9_g76_s0_lives1_dlg0[] = { /* 0x81d11b8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(5), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(1), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_SOUTHWEST), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, @@ -11402,7 +11261,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives1_dlg0[] = { /* 0x81d11b8 */ AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(1), ALERT_CUE(5), HALT, @@ -11413,14 +11272,14 @@ static const struct ScriptCommand s_gs9_g76_s0_lives2_dlg0[] = { /* 0x81d1408 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), SELECT_ANIMATION(5), WAIT(20), SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), WAIT(16), { 0x53, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, @@ -11428,7 +11287,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives2_dlg0[] = { /* 0x81d1408 */ WALK_GRID(256, 116), WALK_GRID(256, 117), { 0x52, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), CALL_SCRIPT(JUMP_SURPRISE_FUNC), HALT, @@ -11439,7 +11298,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives3_dlg0[] = { /* 0x81d1578 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, ALERT_CUE(5), @@ -11452,11 +11311,11 @@ static const struct ScriptCommand s_gs9_g76_s0_lives3_dlg0[] = { /* 0x81d1578 */ AWAIT_CUE(8), SELECT_ANIMATION(2), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(20), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(8), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -11464,14 +11323,14 @@ static const struct ScriptCommand s_gs9_g76_s0_lives3_dlg0[] = { /* 0x81d1578 */ AWAIT_CUE(8), SELECT_ANIMATION(2), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, WALK_GRID(256, 112), WALK_GRID(256, 113), WALK_GRID(256, 114), { 0x52, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), CALL_SCRIPT(JUMP_SURPRISE_FUNC), HALT, @@ -11483,7 +11342,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives4_dlg0[] = { /* 0x81d17f8 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), SELECT_ANIMATION(2), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(9), HALT, @@ -11496,7 +11355,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives5_dlg0[] = { /* 0x81d1888 */ { 0x59, 0x01, 0x0000, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(10), SELECT_ANIMATION(2), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(10), HALT, }; @@ -11507,7 +11366,7 @@ static const struct ScriptCommand s_gs9_g76_s0_lives6_dlg0[] = { /* 0x81d1918 */ { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), SELECT_ANIMATION(2), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(11), HALT, }; @@ -11517,21 +11376,21 @@ static const struct ScriptCommand s_gs9_g76_s0_lives7_dlg0[] = { /* 0x81d1998 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0007, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(8, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(12), WALK_RELATIVE(256, -16, 0), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(12), { 0x53, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, WAIT(20), WALK_GRID(204, 109), WALK_GRID(256, 110), WALK_GRID(256, 111), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), { 0x52, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, AWAIT_CUE(12), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -11552,7 +11411,7 @@ static const struct ScriptCommand s_gs9_g77_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs9_g77_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs9_g77_s0_station_sref_script }; /* 0x81d1bb8 */ +static const struct ScriptRef s_gs9_g77_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs9_g77_s0_station_sref_script }; /* 0x81d1bb8 */ static const struct ScriptCommand s_gs9_g77_s0_lives0_dlg0[] = { /* 0x81d1bc4 */ DEBUGINFO_O(11558), @@ -11660,7 +11519,7 @@ static const struct ScriptCommand s_gs9_g77_s0_lives4_dlg3[] = { /* 0x81d21f0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, ALERT_CUE(5), @@ -11677,7 +11536,7 @@ static const struct ScriptCommand s_gs9_g77_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g77_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs9_g77_s1_station_sref_script }; /* 0x81d22f0 */ +static const struct ScriptRef s_gs9_g77_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs9_g77_s1_station_sref_script }; /* 0x81d22f0 */ static const struct ScriptCommand s_gs9_g77_s1_eff0_script[] = { /* 0x81d22fc */ DEBUGINFO_O(11683), @@ -11703,11 +11562,11 @@ static const struct ScriptCommand s_gs9_g77_s1_lives0_dlg0[] = { /* 0x81d23bc */ PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), JUMPIF_EQUAL(PARTNER1_KIND, 0, /* to label */ 1), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), LABEL(1), /* = 0x01 */ - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), + CMD_UNK_E5(9, 0), PORTRAIT(PLACEMENT_TOP, 0x0002, 0x00000000), MSG_NPC(2, _(" Huh?\nDid you bring us a peeled Chestnut?")), TEXTBOX_CLEAR, @@ -11752,9 +11611,9 @@ static const struct ScriptCommand s_gs9_g77_s1_lives0_dlg0[] = { /* 0x81d23bc */ TEXTBOX_CLEAR, WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), + CMD_UNK_E5(9, 0), { 0x22, 0x00, 0x0028, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(5), PORTRAIT(PLACEMENT_TOP, 0x0002, 0x00000000), @@ -11790,9 +11649,9 @@ static const struct ScriptCommand s_gs9_g77_s1_lives0_dlg0[] = { /* 0x81d23bc */ ALERT_CUE(8), ALERT_CUE(9), WAIT(1), - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), + CMD_UNK_E5(9, 0), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" All right, you layabouts!\nGet it together! Chop, chop!")), TEXTBOX_CLEAR, @@ -11805,9 +11664,9 @@ static const struct ScriptCommand s_gs9_g77_s1_lives0_dlg0[] = { /* 0x81d23bc */ ALERT_CUE(8), ALERT_CUE(9), WAIT(1), - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), + CMD_UNK_E5(9, 0), PORTRAIT(PLACEMENT_TOP, 0x0002, 0x00000000), MSG_NPC(2, _(" We'll get hustling on\nrenovating your rescue team base!")), TEXTBOX_CLEAR, @@ -11836,7 +11695,7 @@ static const struct ScriptCommand s_gs9_g77_s1_lives0_dlg0[] = { /* 0x81d23bc */ CAMERA_INIT_PAN, SELECT_ENTITIES(-1, 0), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -11857,7 +11716,7 @@ static const struct ScriptCommand s_gs9_g77_s1_lives1_dlg0[] = { /* 0x81d3084 */ DEBUGINFO_O(11857), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), AWAIT_CUE(6), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -11868,7 +11727,7 @@ static const struct ScriptCommand s_gs9_g77_s1_lives2_dlg0[] = { /* 0x81d3104 */ DEBUGINFO_O(11868), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), AWAIT_CUE(7), HALT, }; @@ -11877,7 +11736,7 @@ static const struct ScriptCommand s_gs9_g77_s1_lives3_dlg0[] = { /* 0x81d3164 */ DEBUGINFO_O(11877), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), AWAIT_CUE(8), HALT, }; @@ -11886,7 +11745,7 @@ static const struct ScriptCommand s_gs9_g77_s1_lives4_dlg0[] = { /* 0x81d31c4 */ DEBUGINFO_O(11886), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), AWAIT_CUE(9), HALT, }; @@ -11898,13 +11757,13 @@ static const struct ScriptCommand s_gs9_g77_s2_lives0_dlg0[] = { /* 0x81d3224 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), { 0x6f, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), SELECT_ANIMATION(8), WAIT(10), - ROTATE(4, 2, DIRECTION_WEST), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), HALT, }; @@ -11915,13 +11774,13 @@ static const struct ScriptCommand s_gs9_g77_s2_lives1_dlg0[] = { /* 0x81d3314 */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(8), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), { 0x6f, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), SELECT_ANIMATION(8), WAIT(10), - ROTATE(4, 2, DIRECTION_WEST), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), HALT, }; @@ -11931,13 +11790,13 @@ static const struct ScriptCommand s_gs9_g77_s2_lives2_dlg0[] = { /* 0x81d33e4 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(9), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), { 0x6f, 0x08, 0x0100, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), SELECT_ANIMATION(8), WAIT(10), - ROTATE(4, 2, DIRECTION_WEST), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), HALT, }; @@ -11948,12 +11807,12 @@ static const struct ScriptCommand s_gs9_g77_s3_lives0_dlg0[] = { /* 0x81d34b4 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(1), AWAIT_CUE(7), WAIT(1), AWAIT_CUE(7), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(1), AWAIT_CUE(7), HALT, @@ -11966,12 +11825,12 @@ static const struct ScriptCommand s_gs9_g77_s3_lives1_dlg0[] = { /* 0x81d35a4 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(8), WAIT(1), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(1), AWAIT_CUE(8), WAIT(1), AWAIT_CUE(8), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(1), AWAIT_CUE(8), HALT, @@ -11983,12 +11842,12 @@ static const struct ScriptCommand s_gs9_g77_s3_lives2_dlg0[] = { /* 0x81d3694 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(JUMP_HAPPY_FUNC), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), WAIT(1), AWAIT_CUE(9), WAIT(1), AWAIT_CUE(9), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), WAIT(1), AWAIT_CUE(9), HALT, @@ -12031,7 +11890,7 @@ static const struct ScriptCommand s_gs9_g78_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g78_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g78_s0_station_sref_script }; /* 0x81d3b78 */ +static const struct ScriptRef s_gs9_g78_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g78_s0_station_sref_script }; /* 0x81d3b78 */ @@ -12045,7 +11904,7 @@ static const struct ScriptCommand s_gs9_g78_s0_eff0_script[] = { /* 0x81d3b84 */ BGM_STOP, WAIT(20), FANFARE_PLAY(201), - { 0xe1, 0x00, 0x00c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(201), WAIT(30), BGM_FADEIN(120, 1), WALK_GRID(256, 118), @@ -12080,7 +11939,7 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(8, 1, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000001), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -12091,7 +11950,7 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ VARIANT_DEFAULT(_(" {NAME_0}!\nIt's ready! Finally!")), VARIANT_DEFAULT(_(" Our... {COLOR CYAN}{TEAM_NAME}{RESET}'s\nrescue team base!")), TEXTBOX_CLEAR, - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(4), ALERT_CUE(6), AWAIT_CUE(5), @@ -12102,7 +11961,7 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(8, 1, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000001), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -12111,14 +11970,14 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ TEXTBOX_CLEAR, ALERT_CUE(12), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), MSG_NPC(7, _(" We all worked very hard!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), ALERT_CUE(6), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(5), MSG_NPC(2, _(" It was very hard, but it\nwas worth it!")), TEXTBOX_CLEAR, @@ -12131,13 +11990,13 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ ALERT_CUE(8), WAIT(10), ALERT_CUE(6), - ROTATE(10, 1, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(20), - ROTATE(10, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(20), - ROTATE(10, 1, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(20), - ROTATE(10, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(20), PORTRAIT_REP(0x0001, 0x0000000a), MSG_NPC(1, _(" Sniff... Everyone...{WAIT_PRESS}\nThank you!")), @@ -12152,8 +12011,8 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ MSG_NPC(4, _(" Say, there.{WAIT_PRESS}\nThere's something I want to ask...")), TEXTBOX_CLEAR, WAIT(10), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_WEST), + CMD_UNK_E5(6, 0), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(7), ALERT_CUE(8), ALERT_CUE(12), @@ -12190,43 +12049,43 @@ static const struct ScriptCommand s_gs9_g78_s0_lives0_dlg0[] = { /* 0x81d3cc4 */ MSG_NPC(4, _(" ....................................")), TEXTBOX_CLEAR, WAIT(10), - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(9, 0), + CMD_UNK_E5(10, 0), + CMD_UNK_E5(11, 0), AWAIT_CUE(5), MSG_NPC(4, _(" Ukkeeeeeeeeh!")), TEXTBOX_CLEAR, CLEAR_ARRAY(EVENT_LOCAL), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 0), - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(9, 0), + CMD_UNK_E5(10, 0), + CMD_UNK_E5(11, 0), WAIT(20), ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(8), ALERT_CUE(12), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(5), WAIT(10), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), MSG_NPC(1, _(" Wh-what?!")), TEXTBOX_CLEAR, - BGM_SWITCH(10), - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, + BGM_SWITCH(MUS_THERES_TROUBLE), + CMD_UNK_E5(9, 0), + CMD_UNK_E5(10, 0), + CMD_UNK_E5(11, 0), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x0000000c), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Whoa, whoa, whoa!\nWhat are you doing?!\nStop that!")), VARIANT_DEFAULT(_(" Waah! What are you doing?!\nStop that!")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x000c, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), + CMD_UNK_E5(7, 0), + CMD_UNK_E5(8, 0), + CMD_UNK_E5(12, 0), WAIT(10), WALK_RELATIVE(384, 0, -48), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), @@ -12261,27 +12120,27 @@ static const struct ScriptCommand s_gs9_g78_s0_lives1_dlg0[] = { /* 0x81d4d24 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(10, 1, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(20), - ROTATE(10, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), WAIT(20), - ROTATE(10, 2, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(20), - ROTATE(10, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), WAIT(10), @@ -12289,12 +12148,12 @@ static const struct ScriptCommand s_gs9_g78_s0_lives1_dlg0[] = { /* 0x81d4d24 */ AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(10), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), WALK_RELATIVE(384, -16, -64), WALK_GRID(256, 122), WALK_GRID(256, 121), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), SELECT_ANIMATION(9), ALERT_CUE(9), WAIT(100), @@ -12315,13 +12174,13 @@ static const struct ScriptCommand s_gs9_g78_s0_lives2_dlg0[] = { /* 0x81d5054 */ SELECT_ANIMATION(5), WAIT(20), SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(7), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), WAIT(70), WALK_GRID(256, 126), @@ -12334,23 +12193,23 @@ static const struct ScriptCommand s_gs9_g78_s0_lives3_dlg0[] = { /* 0x81d5184 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, ALERT_CUE(5), AWAIT_CUE(8), SELECT_ANIMATION(2), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(8), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(10), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(8), WAIT(90), WALK_RELATIVE(512, -32, 0), WALK_RELATIVE(256, 0, -56), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), SELECT_ANIMATION(19), HALT, }; @@ -12361,22 +12220,22 @@ static const struct ScriptCommand s_gs9_g78_s0_lives4_dlg0[] = { /* 0x81d52f4 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, { 0x57, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), FANFARE_PLAY2(472), CALL_SCRIPT(JUMP_ANGRY_FUNC), - { 0xe2, 0x00, 0x01d8, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(472), ALERT_CUE(5), AWAIT_CUE(9), SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WALK_GRID(512, 123), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(9), { 0x54, 0x00, 0x000c, 0x00000000, 0x00000000, NULL }, WAIT(10), @@ -12385,7 +12244,7 @@ static const struct ScriptCommand s_gs9_g78_s0_lives4_dlg0[] = { /* 0x81d52f4 */ SELECT_ANIMATION(2), WAIT(24), FANFARE_PLAY2(610), - { 0xe2, 0x00, 0x0262, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(610), ALERT_CUE(5), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), @@ -12396,7 +12255,7 @@ static const struct ScriptCommand s_gs9_g78_s0_lives4_dlg0[] = { /* 0x81d52f4 */ SELECT_ANIMATION(2), WAIT(24), FANFARE_PLAY2(610), - { 0xe2, 0x00, 0x0262, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(610), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ FANFARE_FADEOUT2(100, 702), @@ -12417,18 +12276,18 @@ static const struct ScriptCommand s_gs9_g78_s0_lives5_dlg0[] = { /* 0x81d5644 */ { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, { 0x57, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(10), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(10), SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(20), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WALK_GRID(512, 124), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), @@ -12453,19 +12312,19 @@ static const struct ScriptCommand s_gs9_g78_s0_lives6_dlg0[] = { /* 0x81d5854 */ { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, { 0x57, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(11), SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CALL_SCRIPT(JUMP_ANGRY_FUNC), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WALK_GRID(512, 124), WALK_GRID(512, 125), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(4), AWAIT_CUE(11), LABEL(0), /* = 0x00 */ @@ -12490,16 +12349,16 @@ static const struct ScriptCommand s_gs9_g78_s0_lives7_dlg0[] = { /* 0x81d5a84 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0007, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(4, 1, DIRECTION_NORTHEAST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), + CMD_UNK_E5(5, 0), AWAIT_CUE(12), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(12), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(5), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), - { 0x93, 0x06, 0x000a, 0x00000072, 0x00000000, NULL }, + CMD_UNK_93(6, DIR_TRANS_10, 114), WAIT(80), WALK_GRID(204, 127), HALT, @@ -12509,7 +12368,7 @@ static const struct ScriptCommand s_gs9_g79_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(12509), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -12518,7 +12377,7 @@ static const struct ScriptCommand s_gs9_g79_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g79_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g79_s0_station_sref_script }; /* 0x81d5c34 */ +static const struct ScriptRef s_gs9_g79_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g79_s0_station_sref_script }; /* 0x81d5c34 */ static const struct ScriptCommand s_gs9_g79_s0_eff0_script[] = { /* 0x81d5c40 */ DEBUGINFO_O(12524), @@ -12548,7 +12407,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" That's cool, {NAME_2}.{WAIT_PRESS}\nBut why'd you run away?")), @@ -12584,7 +12443,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ ALERT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), PORTRAIT_POS(1, -1, -4), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -12592,7 +12451,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ VARIANT_DEFAULT(_(" More {NAME_2}?{WAIT_PRESS}\nTwo of them...")), WAIT(20), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), PORTRAIT_REP(0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hey, {NAME_2}.{WAIT_PRESS}\nWho are those guys?")), @@ -12605,7 +12464,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0003, 0x00000000), MSG_NPC(3, _(" Now, come with us.{WAIT_PRESS}\nThe grown-up ritual is ready for you.")), @@ -12643,13 +12502,13 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ WAIT(10), ALERT_CUE(6), ALERT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0003, 0x00000000), MSG_NPC(3, _(" When we reach a certain age, they\nmark our backs with paw prints to show\nwe are grown-ups.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), PORTRAIT(PLACEMENT_LEFT_, 0x0003, 0x00000000), MSG_NPC(3, _(" They do that by taking the\nfront paw...{WAIT_PRESS}\nand pushing doooooowwnn on the back...")), TEXTBOX_CLEAR, @@ -12660,7 +12519,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), WAIT(20), ALERT_CUE(7), MSG_NPC(2, _(" I have dreams of creating\ngreat art, so I have certain standards\nfor design that I swear by.")), @@ -12681,7 +12540,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ WAIT(10), ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" So...\nI won't return to the pack!{WAIT_PRESS}\nThis is where I will dedicate myself!")), @@ -12717,14 +12576,14 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" But, that's OK.")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT_REP(0x0001, 0x00000009), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Welcome to the team!{WAIT_PRESS}\nWe expect your best, {NAME_2}!")), @@ -12747,13 +12606,13 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ ALERT_CUE(7), WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), SELECT_LIVES(79, 1), ALERT_CUE(4), ALERT_CUE(6), WALK_GRID(256, 129), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(5), ALERT_CUE(7), MSG_NPC(2, _(" Observe, the design of that\nflag.")), @@ -12764,7 +12623,7 @@ static const struct ScriptCommand s_gs9_g79_s0_lives0_dlg0[] = { /* 0x81d5d20 */ COND_EQUAL(1, /* to label */ 16), FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_2} joined the rescue team!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, WAIT(10), { 0x3b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -12814,52 +12673,52 @@ static const struct ScriptCommand s_gs9_g79_s0_lives1_dlg0[] = { /* 0x81d764c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(20), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(10), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(20), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(6), WAIT(5), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), WALK_RELATIVE(256, 0, -112), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), HALT, }; @@ -12869,52 +12728,52 @@ static const struct ScriptCommand s_gs9_g79_s0_lives2_dlg0[] = { /* 0x81d797c */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, { 0x52, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(7), WALK_RELATIVE(512, -16, 0), FANFARE_PLAY2(457), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000010, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0200, -0x00000010, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), { 0x62, 0x00, 0x0100, 0x00000010, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), WAIT(10), - ROTATE(8, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(30), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(7), WALK_RELATIVE(512, 0, 32), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(7), CALL_SCRIPT(SMILE_START_FUNC), WAIT(1), @@ -12924,10 +12783,10 @@ static const struct ScriptCommand s_gs9_g79_s0_lives2_dlg0[] = { /* 0x81d797c */ AWAIT_CUE(7), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(20), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(7), WALK_GRID(512, 129), @@ -12942,18 +12801,18 @@ static const struct ScriptCommand s_gs9_g79_s0_lives3_dlg0[] = { /* 0x81d7dcc */ AWAIT_CUE(8), WALK_RELATIVE(256, 0, -32), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(8), WALK_RELATIVE(256, 0, -88), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(8), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), { 0x62, 0x00, 0x0100, 0x00000004, 0x00000000, NULL }, WAIT(5), SELECT_ANIMATION(5), @@ -12961,9 +12820,9 @@ static const struct ScriptCommand s_gs9_g79_s0_lives3_dlg0[] = { /* 0x81d7dcc */ SELECT_ANIMATION(2), { 0x62, 0x00, 0x0100, -0x00000004, 0x00000000, NULL }, WAIT(60), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(8), WALK_RELATIVE(256, 0, 80), END_DELETE, @@ -12977,18 +12836,18 @@ static const struct ScriptCommand s_gs9_g79_s0_lives4_dlg0[] = { /* 0x81d7fbc */ WAIT(10), WALK_RELATIVE(256, 0, -16), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(9), WALK_RELATIVE(256, 0, -104), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(9), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(30), { 0x62, 0x00, 0x0100, -0x00000004, 0x00000000, NULL }, SELECT_ANIMATION(5), @@ -12996,11 +12855,11 @@ static const struct ScriptCommand s_gs9_g79_s0_lives4_dlg0[] = { /* 0x81d7fbc */ SELECT_ANIMATION(2), { 0x62, 0x00, 0x0100, 0x00000004, 0x00000000, NULL }, WAIT(30), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(10), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(9), WALK_RELATIVE(256, 0, 80), ALERT_CUE(5), @@ -13065,15 +12924,15 @@ static const struct ScriptCommand s_gs9_g80_s0_lives0_dlg3[] = { /* 0x81d8594 */ CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(2), RET, }; @@ -13089,7 +12948,7 @@ static const struct ScriptCommand s_gs9_g81_s0_station_sref_script[] = { /* 0x81 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -13097,7 +12956,7 @@ static const struct ScriptCommand s_gs9_g81_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g81_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g81_s0_station_sref_script }; /* 0x81d87cc */ +static const struct ScriptRef s_gs9_g81_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g81_s0_station_sref_script }; /* 0x81d87cc */ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ DEBUGINFO_O(13103), @@ -13124,12 +12983,12 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ WAIT(60), ALERT_CUE(7), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), CALL_SCRIPT(SHOCK_FUNC), PORTRAIT(PLACEMENT_TOP, 0x0002, 0x00000000), MSG_NPC(2, _(" Kwaaaaaah!")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), AWAIT_CUE(5), WAIT(60), MSG_NPC(2, _(" Wrong!")), @@ -13149,13 +13008,13 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ ALERT_CUE(6), ALERT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), ALERT_CUE(8), AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0003, 0x00000000), MSG_NPC(3, _(" Oh, hey!\nThere you are!")), @@ -13177,12 +13036,12 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ ALERT_CUE(7), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), CALL_SCRIPT(SHOCK_FUNC), MSG_NPC(2, _(" Kwaaaah!")), TEXTBOX_CLEAR, WAIT(10), - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), AWAIT_CUE(5), WAIT(60), ALERT_CUE(7), @@ -13208,7 +13067,7 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ TEXTBOX_CLEAR, WAIT(15), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), MSG_NPC(1, _(" Did you explore inside the\n{COLOR YELLOW_D}Meteor Cave{RESET}?")), TEXTBOX_CLEAR, WAIT(10), @@ -13241,7 +13100,7 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ WAIT(15), ALERT_CUE(6), ALERT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), PORTRAIT(PLACEMENT_RIGHT, 0x0003, 0x00000000), MSG_NPC(3, _(" {NAME_2}, do you have\nany idea what are in that place?")), TEXTBOX_CLEAR, @@ -13263,7 +13122,7 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -13277,7 +13136,7 @@ static const struct ScriptCommand s_gs9_g81_s0_lives0_dlg0[] = { /* 0x81d87d8 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The rescue team gained\n{CENTER_ALIGN}access to the {COLOR YELLOW_D}Meteor Cave{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -13310,33 +13169,33 @@ static const struct ScriptCommand s_gs9_g81_s0_lives1_dlg0[] = { /* 0x81d9bb4 */ { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), ALERT_CUE(5), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000061, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 97), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(4), @@ -13355,9 +13214,9 @@ static const struct ScriptCommand s_gs9_g81_s0_lives2_dlg0[] = { /* 0x81d9e14 */ ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(7), FANFARE_PLAY2(474), SELECT_ANIMATION(9), @@ -13365,18 +13224,18 @@ static const struct ScriptCommand s_gs9_g81_s0_lives2_dlg0[] = { /* 0x81d9e14 */ SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), SELECT_ANIMATION(4), RET, @@ -13390,23 +13249,23 @@ static const struct ScriptCommand s_gs9_g81_s0_lives3_dlg0[] = { /* 0x81da054 */ WALK_GRID(256, 132), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005e, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), SELECT_ANIMATION(4), RET, @@ -13423,7 +13282,7 @@ static const struct ScriptCommand s_gs9_g82_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g82_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g82_s0_station_sref_script }; /* 0x81da284 */ +static const struct ScriptRef s_gs9_g82_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g82_s0_station_sref_script }; /* 0x81da284 */ static const struct ScriptCommand s_gs9_g83_s0_station_sref_script[] = { /* 0x81da290 */ DEBUGINFO_O(13429), @@ -13436,7 +13295,7 @@ static const struct ScriptCommand s_gs9_g83_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g83_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g83_s0_station_sref_script }; /* 0x81da310 */ +static const struct ScriptRef s_gs9_g83_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g83_s0_station_sref_script }; /* 0x81da310 */ static const struct ScriptCommand s_gs9_g83_s0_eff1_script[] = { /* 0x81da31c */ DEBUGINFO_O(13442), @@ -13458,16 +13317,16 @@ static const struct ScriptCommand s_gs9_g83_s0_lives0_dlg0[] = { /* 0x81da3bc */ { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000003, NULL }, - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Whooooooosh!") }, + MSG_OVERHEARD(_("Whooooooosh!")), WALK_RELATIVE(512, 0, 80), WAIT(60), TEXTBOX_CLEAR, PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...This sound...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...Something's coming closer?!") }, + MSG_QUIET(0, _("...This sound...")), + MSG_QUIET(0, _("...Something's coming closer?!")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_SOUTHEAST), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Whoooooooooooooooooooooooshhh!") }, + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), + MSG_OVERHEARD(_("Whoooooooooooooooooooooooshhh!")), WAIT(20), FANFARE_STOP2(508), FANFARE_PLAY2(779), @@ -13477,29 +13336,29 @@ static const struct ScriptCommand s_gs9_g83_s0_lives0_dlg0[] = { /* 0x81da3bc */ { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, { 0x97, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, LABEL(1), /* = 0x01 */ - ROTATE(4, 1, DIRECTION_NORTHEAST), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 30, /* to label */ 2), JUMP_LABEL(1), LABEL(2), /* = 0x02 */ - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(30), SELECT_ANIMATION(2), WAIT(30), WALK_RELATIVE(512, 0, 40), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), PORTRAIT(PLACEMENT_LEFT_FLIP, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Wh-what was that...?{WAIT_PRESS}\nWhat just happened?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Something huge flew by at an incredible\nspeed...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It seemed to be going...\nToward the mountain range in the north?") }, + MSG_QUIET(0, _("Wh-what was that...?{WAIT_PRESS}\nWhat just happened?")), + MSG_QUIET(0, _("Something huge flew by at an incredible\nspeed...")), + MSG_QUIET(0, _("It seemed to be going...\nToward the mountain range in the north?")), TEXTBOX_CLEAR, WAIT(30), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nYawwwwwn...\nStill sleepy...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It's still early.\nI'll catch a little more sleep...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nYawwwwwn...\nStill sleepy...")), + MSG_QUIET(0, _("It's still early.\nI'll catch a little more sleep...")), TEXTBOX_CLEAR, WAIT(10), WALK_RELATIVE(153, 0, -40), @@ -13525,7 +13384,7 @@ static const struct ScriptCommand s_gs9_g84_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(13525), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -13534,7 +13393,7 @@ static const struct ScriptCommand s_gs9_g84_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g84_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g84_s0_station_sref_script }; /* 0x81da9bc */ +static const struct ScriptRef s_gs9_g84_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g84_s0_station_sref_script }; /* 0x81da9bc */ static const struct ScriptCommand s_gs9_g84_s0_lives0_dlg0[] = { /* 0x81da9c8 */ DEBUGINFO_O(13540), @@ -13591,14 +13450,14 @@ static const struct ScriptCommand s_gs9_g84_s0_lives0_dlg0[] = { /* 0x81da9c8 */ TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), WAIT(30), SPECIAL_TEXT(SPECIAL_TEXT_UNK_2C, 54, 0), WAIT(30), JUMP_LABEL(4), LABEL(4), /* = 0x04 */ ALERT_CUE(7), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(5), MSG_NPC(2, _(" They say if you take that\nstone to the {COLOR YELLOW_D}Wish Cave{RESET}...\nTo its very depths...")), PORTRAIT_REP(0x0002, 0x00000003), @@ -13624,29 +13483,29 @@ static const struct ScriptCommand s_gs9_g84_s0_lives1_dlg0[] = { /* 0x81db1f8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x0002, 0x0000005c, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 92), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x0002, 0x0000005c, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 92), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(ANGRY_START_FUNC), WAIT(60), CALL_SCRIPT(ANGRY_END_FUNC), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), WALK_RELATIVE(256, 0, 32), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WALK_RELATIVE(256, 0, -32), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), END_DELETE, @@ -13670,19 +13529,19 @@ static const struct ScriptCommand s_gs9_g84_s0_lives2_dlg0[] = { /* 0x81db4b8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), WAIT(30), ALERT_CUE(5), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(8), END_DELETE, }; @@ -13701,14 +13560,14 @@ static const struct ScriptCommand s_gs9_g85_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(13701), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs9_g85_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g85_s0_station_sref_script }; /* 0x81db734 */ +static const struct ScriptRef s_gs9_g85_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g85_s0_station_sref_script }; /* 0x81db734 */ static const struct ScriptCommand s_gs9_g85_s0_lives0_dlg0[] = { /* 0x81db740 */ DEBUGINFO_O(13714), @@ -13725,7 +13584,7 @@ static const struct ScriptCommand s_gs9_g85_s0_lives0_dlg0[] = { /* 0x81db740 */ MSG_INSTANT(_("{CENTER_ALIGN}The latest recruit to\n{CENTER_ALIGN}Team {COLOR CYAN}{TEAM_NAME}{RESET}!")), FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_2} joined\n{CENTER_ALIGN}the rescue team!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, { 0x3b, 0x2a, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 2), @@ -13734,7 +13593,7 @@ static const struct ScriptCommand s_gs9_g85_s0_lives0_dlg0[] = { /* 0x81db740 */ MSG_INSTANT(_("{CENTER_ALIGN}And more!")), MSG_INSTANT(_("{CENTER_ALIGN}The Friend Area\n{CENTER_ALIGN}{COLOR GREEN_H}{FRIEND_AREA}{RESET} was obtained!")), FANFARE_PLAY(212), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR2, LABEL(2), /* = 0x02 */ { 0x3b, 0x2b, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -13777,7 +13636,7 @@ static const struct ScriptCommand s_gs9_g86_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), SELECT_ENTITIES(-1, 1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_ENTITIES(87, 0), @@ -13785,7 +13644,7 @@ static const struct ScriptCommand s_gs9_g86_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g86_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g86_s0_station_sref_script }; /* 0x81dbc08 */ +static const struct ScriptRef s_gs9_g86_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g86_s0_station_sref_script }; /* 0x81dbc08 */ static const struct ScriptCommand s_gs9_g86_s0_lives0_dlg0[] = { /* 0x81dbc14 */ DEBUGINFO_O(13791), @@ -13836,9 +13695,9 @@ static const struct ScriptCommand s_gs9_g86_s0_lives0_dlg0[] = { /* 0x81dbc14 */ BGM_STOP, FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_2} can now tag\n{CENTER_ALIGN}along with the rescue team!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), WAIT(30), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" The only place I want to go\nis {COLOR YELLOW_D}Mt. Freeze{RESET}.")), @@ -13879,7 +13738,7 @@ static const struct ScriptCommand s_gs9_g86_s3_lives0_dlg0[] = { /* 0x81dc4d8 */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, { 0x89, 0x30, 0x0080, 0x00000000, 0x00000000, NULL }, WAIT(90), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), { 0x89, 0x18, 0x0100, 0x00000004, 0x00000000, NULL }, ALERT_CUE(5), @@ -13903,7 +13762,7 @@ static const struct ScriptCommand s_gs9_g88_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(13903), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -13912,7 +13771,7 @@ static const struct ScriptCommand s_gs9_g88_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g88_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g88_s0_station_sref_script }; /* 0x81dc6b8 */ +static const struct ScriptRef s_gs9_g88_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g88_s0_station_sref_script }; /* 0x81dc6b8 */ static const struct ScriptCommand s_gs9_g88_s0_lives0_dlg0[] = { /* 0x81dc6c4 */ DEBUGINFO_O(13918), @@ -13960,7 +13819,7 @@ static const struct ScriptCommand s_gs9_g89_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_ENTITIES(90, 0), @@ -13968,7 +13827,7 @@ static const struct ScriptCommand s_gs9_g89_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g89_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs9_g89_s0_station_sref_script }; /* 0x81dca3c */ +static const struct ScriptRef s_gs9_g89_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs9_g89_s0_station_sref_script }; /* 0x81dca3c */ static const struct ScriptCommand s_gs9_g89_s0_lives0_dlg0[] = { /* 0x81dca48 */ DEBUGINFO_O(13974), @@ -14019,9 +13878,9 @@ static const struct ScriptCommand s_gs9_g89_s0_lives0_dlg0[] = { /* 0x81dca48 */ BGM_STOP, FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_2} can now tag\n{CENTER_ALIGN}along with the rescue team!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), WAIT(30), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" The only place I want to go\nis the {COLOR YELLOW_D}Murky Cave{RESET}.")), @@ -14052,10 +13911,10 @@ static const struct ScriptCommand s_gs9_g89_s1_lives0_dlg0[] = { /* 0x81dd154 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), - ROTATE(4, 10, DIRECTION_NORTHEAST), - ROTATE(4, 10, DIRECTION_NORTHWEST), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), HALT, @@ -14067,7 +13926,7 @@ static const struct ScriptCommand s_gs9_g89_s2_lives0_dlg0[] = { /* 0x81dd224 */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, { 0x89, 0x30, 0x0080, 0x00000000, 0x00000000, NULL }, WAIT(90), - ROTATE(6, 10, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), { 0x89, 0x18, 0x0100, 0x00000004, 0x00000000, NULL }, ALERT_CUE(5), @@ -14091,7 +13950,7 @@ static const struct ScriptCommand s_gs9_g91_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(14091), SELECT_MAP(MAP_TEAM_BASE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(5), + BGM_SWITCH(MUS_BENEVOLENT_SPIRIT), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -14100,7 +13959,7 @@ static const struct ScriptCommand s_gs9_g91_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs9_g91_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs9_g91_s0_station_sref_script }; /* 0x81dd404 */ +static const struct ScriptRef s_gs9_g91_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs9_g91_s0_station_sref_script }; /* 0x81dd404 */ static const struct ScriptCommand s_gs9_g91_s0_lives0_dlg0[] = { /* 0x81dd410 */ DEBUGINFO_O(14106), @@ -14121,7 +13980,7 @@ static const struct ScriptCommand s_gs9_g91_s0_lives0_dlg0[] = { /* 0x81dd410 */ WAIT(45), ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_NPC(2, _(" Hey, {NAME_0}.\nThanks for getting me through this.")), MSG_NPC(2, _(" This is my thanks.")), TEXTBOX_CLEAR, @@ -14140,7 +13999,7 @@ static const struct ScriptCommand s_gs9_g91_s0_lives0_dlg0[] = { /* 0x81dd410 */ ALERT_CUE(8), MSG_NPC(3, _(" Oh, wait, please!")), TEXTBOX_CLEAR, - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), ALERT_CUE(7), AWAIT_CUE(5), @@ -14177,7 +14036,7 @@ static const struct ScriptCommand s_gs9_g91_s0_lives1_dlg0[] = { /* 0x81dd9c8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(7), { 0x89, 0x18, 0x0100, 0x00000006, 0x00000000, NULL }, @@ -14186,7 +14045,7 @@ static const struct ScriptCommand s_gs9_g91_s0_lives1_dlg0[] = { /* 0x81dd9c8 */ { 0x89, 0x28, 0x0080, 0x00000002, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(7), END_DELETE, @@ -14197,7 +14056,7 @@ static const struct ScriptCommand s_gs9_g91_s0_lives2_dlg0[] = { /* 0x81ddad8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(8), END_DELETE, @@ -16499,4 +16358,4 @@ static const struct GroundLink s_gs9_links[] = { /* 0x81e1510 */ /* link 133 */ { { /*x*/ 37, /*y*/ 40, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs9 = { LPARRAY(s_gs9_groups), s_gs9_links }; /* 0x81e1940 */ +const GroundScriptHeader gGroundScript_gs9 = { LPARRAY(s_gs9_groups), s_gs9_links }; /* 0x81e1940 */ diff --git a/src/data/ground/ground_data_b01p02a_station.h b/src/data/ground/ground_data_b01p02a_station.h index 87a878583..feec82c66 100644 --- a/src/data/ground/ground_data_b01p02a_station.h +++ b/src/data/ground/ground_data_b01p02a_station.h @@ -37,12 +37,12 @@ static const struct ScriptCommand s_gs12_g0_s0_station_sref_script[] = { /* 0x81 RET, LABEL(2), /* = 0x02 */ CJUMP_VAR(START_MODE), - COND_EQUAL(1, /* to label */ 6), - COND_EQUAL(2, /* to label */ 7), - COND_EQUAL(12, /* to label */ 8), - COND_EQUAL(11, /* to label */ 8), - COND_EQUAL(10, /* to label */ 9), - COND_EQUAL(9, /* to label */ 10), + COND_EQUAL(STARTMODE_CONTINUE_GAME, /* to label */ 6), + COND_EQUAL(STARTMODE_GROUND, /* to label */ 7), + COND_EQUAL(STARTMODE_DUNGEON_LOST, /* to label */ 8), + COND_EQUAL(STARTMODE_11, /* to label */ 8), + COND_EQUAL(STARTMODE_10, /* to label */ 9), + COND_EQUAL(STARTMODE_DUNGEON_WON, /* to label */ 10), JUMP_LABEL(6), LABEL(7), /* = 0x07 */ CJUMP_VAR(GROUND_GETOUT), @@ -75,11 +75,11 @@ static const struct ScriptCommand s_gs12_g0_s0_station_sref_script[] = { /* 0x81 SELECT_LIVES(0, 1), JUMP_LABEL(12), LABEL(12), /* = 0x0c */ - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs12_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs12_g0_s0_station_sref_script }; /* 0x81e1da4 */ +static const struct ScriptRef s_gs12_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs12_g0_s0_station_sref_script }; /* 0x81e1da4 */ static const struct ScriptCommand s_gs12_g0_s0_evt0_sref_script[] = { /* 0x81e1db0 */ DEBUGINFO_O(85), @@ -87,7 +87,7 @@ static const struct ScriptCommand s_gs12_g0_s0_evt0_sref_script[] = { /* 0x81e1d HALT, }; -static const struct ScriptRef s_gs12_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs12_g0_s0_evt0_sref_script }; /* 0x81e1de0 */ +static const struct ScriptRef s_gs12_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs12_g0_s0_evt0_sref_script }; /* 0x81e1de0 */ static const struct ScriptCommand s_gs12_g0_s0_evt1_sref_script[] = { /* 0x81e1dec */ DEBUGINFO_O(93), @@ -105,7 +105,7 @@ static const struct ScriptCommand s_gs12_g0_s0_evt1_sref_script[] = { /* 0x81e1d JUMP_SCRIPT(END_TALK), }; -static const struct ScriptRef s_gs12_g0_s0_evt1_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs12_g0_s0_evt1_sref_script }; /* 0x81e1ee4 */ +static const struct ScriptRef s_gs12_g0_s0_evt1_sref = { NORMAL_EVENT, 7, NULL, s_gs12_g0_s0_evt1_sref_script }; /* 0x81e1ee4 */ static const struct ScriptCommand s_gs12_g0_s0_obj0_dlg0[] = { /* 0x81e1ef0 */ DEBUGINFO_O(111), @@ -179,7 +179,7 @@ static const struct ScriptCommand s_gs12_g1_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs12_g1_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs12_g1_s0_station_sref_script }; /* 0x81e2220 */ +static const struct ScriptRef s_gs12_g1_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs12_g1_s0_station_sref_script }; /* 0x81e2220 */ static const struct ScriptCommand s_gs12_g1_s0_lives0_dlg0[] = { /* 0x81e222c */ DEBUGINFO_O(185), @@ -204,7 +204,7 @@ static const struct ScriptCommand s_gs12_g1_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs12_g1_s1_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g1_s1_station_sref_script }; /* 0x81e230c */ +static const struct ScriptRef s_gs12_g1_s1_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g1_s1_station_sref_script }; /* 0x81e230c */ static const struct ScriptCommand s_gs12_g1_s1_lives0_dlg0[] = { /* 0x81e2318 */ DEBUGINFO_O(210), @@ -233,7 +233,7 @@ static const struct ScriptCommand s_gs12_g2_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs12_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g2_s0_station_sref_script }; /* 0x81e2438 */ +static const struct ScriptRef s_gs12_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g2_s0_station_sref_script }; /* 0x81e2438 */ static const struct ScriptCommand s_gs12_g2_s0_lives0_dlg0[] = { /* 0x81e2444 */ DEBUGINFO_O(239), @@ -260,14 +260,14 @@ static const struct ScriptCommand s_gs12_g3_s0_station_sref_script[] = { /* 0x81 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g3_s0_station_sref_script }; /* 0x81e25fc */ +static const struct ScriptRef s_gs12_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g3_s0_station_sref_script }; /* 0x81e25fc */ static const struct ScriptCommand s_gs12_g3_s0_lives0_dlg0[] = { /* 0x81e2608 */ DEBUGINFO_O(273), @@ -289,14 +289,14 @@ static const struct ScriptCommand s_gs12_g4_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g4_s0_station_sref_script }; /* 0x81e2758 */ +static const struct ScriptRef s_gs12_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g4_s0_station_sref_script }; /* 0x81e2758 */ static const struct ScriptCommand s_gs12_g4_s0_lives0_dlg0[] = { /* 0x81e2764 */ DEBUGINFO_O(302), @@ -316,12 +316,12 @@ static const struct ScriptCommand s_gs12_g5_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(0, 2), SELECT_EVENTS(0, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs12_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g5_s0_station_sref_script }; /* 0x81e2874 */ +static const struct ScriptRef s_gs12_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g5_s0_station_sref_script }; /* 0x81e2874 */ static const struct ScriptCommand s_gs12_g6_s0_station_sref_script[] = { /* 0x81e2880 */ DEBUGINFO_O(327), @@ -339,14 +339,14 @@ static const struct ScriptCommand s_gs12_g6_s0_station_sref_script[] = { /* 0x81 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g6_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g6_s0_station_sref_script }; /* 0x81e29c0 */ +static const struct ScriptRef s_gs12_g6_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g6_s0_station_sref_script }; /* 0x81e29c0 */ static const struct ScriptCommand s_gs12_g6_s0_lives0_dlg0[] = { /* 0x81e29cc */ DEBUGINFO_O(352), @@ -367,14 +367,14 @@ static const struct ScriptCommand s_gs12_g7_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g7_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g7_s0_station_sref_script }; /* 0x81e2b0c */ +static const struct ScriptRef s_gs12_g7_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g7_s0_station_sref_script }; /* 0x81e2b0c */ static const struct ScriptCommand s_gs12_g7_s0_lives0_dlg0[] = { /* 0x81e2b18 */ DEBUGINFO_O(380), @@ -396,14 +396,14 @@ static const struct ScriptCommand s_gs12_g8_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g8_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g8_s0_station_sref_script }; /* 0x81e2c68 */ +static const struct ScriptRef s_gs12_g8_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g8_s0_station_sref_script }; /* 0x81e2c68 */ static const struct ScriptCommand s_gs12_g8_s0_lives0_dlg0[] = { /* 0x81e2c74 */ DEBUGINFO_O(409), @@ -427,7 +427,7 @@ static const struct ScriptCommand s_gs12_g9_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -437,11 +437,11 @@ static const struct ScriptCommand s_gs12_g9_s0_station_sref_script[] = { /* 0x81 SELECT_LIVES(9, 1), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), RET, }; -static const struct ScriptRef s_gs12_g9_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g9_s0_station_sref_script }; /* 0x81e2e54 */ +static const struct ScriptRef s_gs12_g9_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g9_s0_station_sref_script }; /* 0x81e2e54 */ static const struct ScriptCommand s_gs12_g9_s0_eff0_script[] = { /* 0x81e2e60 */ DEBUGINFO_O(447), @@ -466,7 +466,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" It's {NAME_0}'s house.")), @@ -484,7 +484,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ WAIT(10), ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), MSG_NPC(-1, _(" Th-thank you...")), TEXTBOX_CLEAR, @@ -558,13 +558,13 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ BGM_STOP, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_1} received something\n{CENTER_ALIGN}from {NAME_2}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), AWAIT_CUE(5), WALK_RELATIVE(256, 0, -24), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(30), SELECT_EFFECTS(9, 1), WAIT(30), @@ -574,7 +574,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), MSG_NPC(2, _(" It's a...{WAIT_PRESS}\n{COLOR GREEN_I}Clear Wing{RESET}...")), TEXTBOX_CLEAR, WAIT(10), @@ -588,7 +588,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ CANCEL_EFFECTS(9, 1), ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), MSG_NPC(2, _(" See? Depending on the light,\nit takes on many different colors.")), ALERT_CUE(7), @@ -603,13 +603,13 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ ALERT_CUE(6), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(5), ALERT_CUE(6), AWAIT_CUE(5), @@ -628,7 +628,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), @@ -636,7 +636,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives0_dlg0[] = { /* 0x81e2ec0 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" But you are interested in\nthe mirage Pokémon, right?")), @@ -674,43 +674,43 @@ static const struct ScriptCommand s_gs12_g9_s0_lives1_dlg0[] = { /* 0x81e4480 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), WALK_RELATIVE(512, 0, -24), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(6), ALERT_CUE(4), WALK_RELATIVE(256, 0, 40), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -728,7 +728,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives2_dlg0[] = { /* 0x81e4720 */ AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, @@ -743,7 +743,7 @@ static const struct ScriptCommand s_gs12_g9_s0_lives2_dlg0[] = { /* 0x81e4720 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), FANFARE_PLAY2(470), SELECT_ANIMATION(22), @@ -756,69 +756,69 @@ static const struct ScriptCommand s_gs12_g9_s0_lives2_dlg0[] = { /* 0x81e4720 */ ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), SELECT_ANIMATION(5), WAIT(60), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), SELECT_ANIMATION(7), SELECT_EFFECTS(9, 2), ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), SELECT_ANIMATION(5), WAIT(60), WALK_RELATIVE(256, 0, 32), ALERT_CUE(5), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), WAIT(30), WALK_RELATIVE(256, -32, 16), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), ALERT_CUE(5), WAIT(30), WALK_RELATIVE(256, 64, 16), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), ALERT_CUE(5), WAIT(30), WALK_RELATIVE(256, -32, 24), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), WAIT(30), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(7), WALK_RELATIVE(256, 16, 16), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), WAIT(60), WALK_RELATIVE(256, -16, 16), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(30), ALERT_CUE(5), WALK_RELATIVE(256, 0, 16), @@ -838,7 +838,7 @@ static const struct ScriptCommand s_gs12_g9_s1_lives0_dlg0[] = { /* 0x81e4e40 */ DEBUGINFO_O(838), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 1), { 0x58, 0x01, 0x0000, 0x000000f0, 0x00000120, NULL }, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -871,7 +871,7 @@ static const struct ScriptCommand s_gs12_g10_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g10_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g10_s0_station_sref_script }; /* 0x81e5070 */ +static const struct ScriptRef s_gs12_g10_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g10_s0_station_sref_script }; /* 0x81e5070 */ static const struct ScriptCommand s_gs12_g10_s0_lives0_dlg0[] = { /* 0x81e507c */ @@ -880,22 +880,22 @@ static const struct ScriptCommand s_gs12_g10_s0_lives0_dlg0[] = { /* 0x81e507c * { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("......") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("........................") }, + MSG_QUIET(-1, _("......")), + MSG_QUIET(-1, _("............")), + MSG_QUIET(-1, _("........................")), TEXTBOX_CLEAR, FANFARE_PLAY2(508), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000003, NULL }, - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gggwwooooooooooooaahhhhh!") }, + MSG_OVERHEARD(_("Gggwwooooooooooooaahhhhh!")), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(20), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), CALL_SCRIPT(LOOK_AROUND_FUNC), TEXTBOX_CLEAR, WAIT(10), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Wha...{WAIT_PRESS} What is it?!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("What...{WAIT_PRESS}\nWhat's happening outside?!") }, + MSG_QUIET(0, _("Wha...{WAIT_PRESS} What is it?!")), + MSG_QUIET(0, _("What...{WAIT_PRESS}\nWhat's happening outside?!")), TEXTBOX_CLEAR, WALK_RELATIVE(512, 0, 32), ALERT_CUE(3), @@ -928,7 +928,7 @@ static const struct ScriptCommand s_gs12_g11_s0_station_sref_script[] = { /* 0x8 VARIANT_DEFAULT(_(" {NAME_0}, wake up!\nCome on, wake up!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(120), @@ -937,7 +937,7 @@ static const struct ScriptCommand s_gs12_g11_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g11_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g11_s0_station_sref_script }; /* 0x81e551c */ +static const struct ScriptRef s_gs12_g11_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g11_s0_station_sref_script }; /* 0x81e551c */ static const struct ScriptCommand s_gs12_g11_s0_lives0_dlg0[] = { /* 0x81e5528 */ @@ -981,7 +981,7 @@ static const struct ScriptCommand s_gs12_g12_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -989,7 +989,7 @@ static const struct ScriptCommand s_gs12_g12_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g12_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g12_s0_station_sref_script }; /* 0x81e5878 */ +static const struct ScriptRef s_gs12_g12_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g12_s0_station_sref_script }; /* 0x81e5878 */ static const struct ScriptCommand s_gs12_g12_s0_lives0_dlg0[] = { /* 0x81e5884 */ DEBUGINFO_O(995), @@ -1125,7 +1125,7 @@ static const struct ScriptCommand s_gs12_g13_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -1133,7 +1133,7 @@ static const struct ScriptCommand s_gs12_g13_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g13_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g13_s0_station_sref_script }; /* 0x81e6574 */ +static const struct ScriptRef s_gs12_g13_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g13_s0_station_sref_script }; /* 0x81e6574 */ static const struct ScriptCommand s_gs12_g13_s0_lives0_dlg0[] = { /* 0x81e6580 */ DEBUGINFO_O(1139), @@ -1182,7 +1182,7 @@ static const struct ScriptCommand s_gs12_g13_s0_lives0_dlg0[] = { /* 0x81e6580 * WAIT(15), MSG_INSTANT(_("{CENTER_ALIGN}Team {COLOR CYAN}{TEAM_NAME}{RESET}'s\n{CENTER_ALIGN}rescue rank went up!")), FANFARE_PLAY(201), - { 0xe1, 0x00, 0x00c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(201), TEXTBOX_CLEAR2, { 0x3b, 0x2e, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 2), @@ -1225,7 +1225,7 @@ static const struct ScriptCommand s_gs12_g14_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -1233,7 +1233,7 @@ static const struct ScriptCommand s_gs12_g14_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g14_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g14_s0_station_sref_script }; /* 0x81e6fc0 */ +static const struct ScriptRef s_gs12_g14_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g14_s0_station_sref_script }; /* 0x81e6fc0 */ static const struct ScriptCommand s_gs12_g14_s0_lives0_dlg0[] = { /* 0x81e6fcc */ DEBUGINFO_O(1239), @@ -1302,14 +1302,14 @@ static const struct ScriptCommand s_gs12_g15_s0_station_sref_script[] = { /* 0x8 MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}The next morning...")), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 16, 0), RET, }; -static const struct ScriptRef s_gs12_g15_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g15_s0_station_sref_script }; /* 0x81e7554 */ +static const struct ScriptRef s_gs12_g15_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g15_s0_station_sref_script }; /* 0x81e7554 */ static const struct ScriptCommand s_gs12_g15_s0_lives0_dlg0[] = { /* 0x81e7560 - PART 1 0:22:30-0:22:53 - Player */ @@ -1321,16 +1321,16 @@ static const struct ScriptCommand s_gs12_g15_s0_lives0_dlg0[] = { /* 0x81e7560 - CALL_SCRIPT(WAKEUP_FUNC), CALL_SCRIPT(LOOK_AROUND_FUNC), PORTRAIT(PLACEMENT_LEFT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...I'm still the same.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("The way I look...\nI'm still {POKEMON_0}.") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("But why would I be transformed\ninto a Pokémon?") }, + MSG_QUIET(0, _("...I'm still the same.")), + MSG_QUIET(0, _("The way I look...\nI'm still {POKEMON_0}.")), + MSG_QUIET(0, _("But why would I be transformed\ninto a Pokémon?")), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), PORTRAIT(PLACEMENT_LEFT, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nHmm... I don't understand this at all...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("........................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nI feel groggy and sleepy...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Not feeling well...{WAIT_PRESS}\nI need more sleep...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nHmm... I don't understand this at all...")), + MSG_QUIET(0, _("........................")), + MSG_QUIET(0, _("............{WAIT_PRESS}\nI feel groggy and sleepy...")), + MSG_QUIET(0, _("Not feeling well...{WAIT_PRESS}\nI need more sleep...")), TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -1344,20 +1344,20 @@ static const struct ScriptCommand s_gs12_g16_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs12_g16_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs12_g16_s0_station_sref_script }; /* 0x81e77f4 */ +static const struct ScriptRef s_gs12_g16_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs12_g16_s0_station_sref_script }; /* 0x81e77f4 */ static const struct ScriptCommand s_gs12_g16_s0_evt0_sref_script[] = { /* 0x81e7800 - Likely door event/nearby trigger */ DEBUGINFO_O(1350), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Now, I only want to sleep...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I'll rest in bed...") }, + MSG_QUIET(0, _("Now, I only want to sleep...")), + MSG_QUIET(0, _("I'll rest in bed...")), TEXTBOX_CLEAR, ALERT_CUE(3), RET, }; -static const struct ScriptRef s_gs12_g16_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs12_g16_s0_evt0_sref_script }; /* 0x81e78b8 */ +static const struct ScriptRef s_gs12_g16_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs12_g16_s0_evt0_sref_script }; /* 0x81e78b8 */ static const struct ScriptCommand s_gs12_g16_s0_evt1_sref_script[] = { /* 0x81e78c4 - PART 1 0:22:53-0:23:04 - Bed, sleep trigger */ @@ -1377,7 +1377,7 @@ static const struct ScriptCommand s_gs12_g16_s0_evt1_sref_script[] = { /* 0x81e7 HALT, }; -static const struct ScriptRef s_gs12_g16_s0_evt1_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs12_g16_s0_evt1_sref_script }; /* 0x81e79a4 */ +static const struct ScriptRef s_gs12_g16_s0_evt1_sref = { NORMAL_EVENT, 7, NULL, s_gs12_g16_s0_evt1_sref_script }; /* 0x81e79a4 */ static const struct ScriptCommand s_gs12_g16_s1_station_sref_script[] = { /* 0x81e79b0 */ DEBUGINFO_O(1383), @@ -1388,14 +1388,14 @@ static const struct ScriptCommand s_gs12_g16_s1_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_ENTITIES(-1, 0), RET, }; -static const struct ScriptRef s_gs12_g16_s1_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g16_s1_station_sref_script }; /* 0x81e7a80 */ +static const struct ScriptRef s_gs12_g16_s1_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g16_s1_station_sref_script }; /* 0x81e7a80 */ static const struct ScriptCommand s_gs12_g16_s1_lives0_dlg0[] = { /* 0x81e7a8c */ DEBUGINFO_O(1401), @@ -1417,14 +1417,14 @@ static const struct ScriptCommand s_gs12_g17_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g17_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g17_s0_station_sref_script }; /* 0x81e7bdc */ +static const struct ScriptRef s_gs12_g17_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g17_s0_station_sref_script }; /* 0x81e7bdc */ static const struct ScriptCommand s_gs12_g17_s0_lives0_dlg0[] = { /* 0x81e7be8 */ DEBUGINFO_O(1430), @@ -1435,13 +1435,13 @@ static const struct ScriptCommand s_gs12_g17_s0_lives0_dlg0[] = { /* 0x81e7be8 * CALL_SCRIPT(WAKEUP_FUNC), CALL_SCRIPT(LOOK_AROUND_FUNC), PORTRAIT(PLACEMENT_LEFT, 0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oof...{WAIT_PRESS}\nI'm feeling refreshed!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I still look like a Pokémon, but...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh, that's right.{WAIT_PRESS} That Pokémon...{WAIT_PRESS}\nI think it was {NAME_1}?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("We made a promise to form a rescue\nteam together...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I wonder what {NAME_1} is doing?{WAIT_PRESS}\nI should go out.") }, + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("Oof...{WAIT_PRESS}\nI'm feeling refreshed!")), + MSG_QUIET(0, _("I still look like a Pokémon, but...")), + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("Oh, that's right.{WAIT_PRESS} That Pokémon...{WAIT_PRESS}\nI think it was {NAME_1}?")), + MSG_QUIET(0, _("We made a promise to form a rescue\nteam together...")), + MSG_QUIET(0, _("I wonder what {NAME_1} is doing?{WAIT_PRESS}\nI should go out.")), TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -1462,14 +1462,14 @@ static const struct ScriptCommand s_gs12_g18_s0_station_sref_script[] = { /* 0x8 MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}The next morning...")), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g18_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g18_s0_station_sref_script }; /* 0x81e7f2c */ +static const struct ScriptRef s_gs12_g18_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g18_s0_station_sref_script }; /* 0x81e7f2c */ static const struct ScriptCommand s_gs12_g18_s0_lives0_dlg0[] = { /* 0x81e7f38 */ DEBUGINFO_O(1475), @@ -1491,14 +1491,14 @@ static const struct ScriptCommand s_gs12_g19_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g19_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g19_s0_station_sref_script }; /* 0x81e8088 */ +static const struct ScriptRef s_gs12_g19_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g19_s0_station_sref_script }; /* 0x81e8088 */ static const struct ScriptCommand s_gs12_g19_s0_lives0_dlg0[] = { /* 0x81e8094 */ DEBUGINFO_O(1504), @@ -1508,12 +1508,12 @@ static const struct ScriptCommand s_gs12_g19_s0_lives0_dlg0[] = { /* 0x81e8094 * { 0x2d, 0x09, 0x0002, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(WAKEUP_FUNC), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I think I dreamt something...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("But I can't quite remember what that\ndream was about...") }, + MSG_QUIET(0, _("I think I dreamt something...")), + MSG_QUIET(0, _("But I can't quite remember what that\ndream was about...")), PORTRAIT_REP(0x0000, 0x00000009), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh, well.\nToday's another day of rescues!") }, + MSG_QUIET(0, _("Oh, well.\nToday's another day of rescues!")), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I wonder if I have any mail?\nBetter check the Mailbox.") }, + MSG_QUIET(0, _("I wonder if I have any mail?\nBetter check the Mailbox.")), TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -1542,7 +1542,7 @@ static const struct ScriptCommand s_gs12_g20_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g20_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g20_s0_station_sref_script }; /* 0x81e8388 */ +static const struct ScriptRef s_gs12_g20_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g20_s0_station_sref_script }; /* 0x81e8388 */ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 */ DEBUGINFO_O(1548), @@ -1559,12 +1559,12 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * CALL_SCRIPT(WAKEUP_FUNC), WAIT(60), FANFARE_PLAY2(468), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), FANFARE_PLAY2(468), - { 0x92, 0x04, 0x0001, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), WAIT(30), FANFARE_PLAY2(469), @@ -1574,15 +1574,15 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(468), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(15), FANFARE_PLAY2(468), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), FANFARE_PLAY2(468), - { 0x92, 0x04, 0x0001, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT2), WAIT(30), MSG_NPC(-1, _(" ...Oh! You can't see us, of course!{WAIT_PRESS}\nHow very rude of us!")), TEXTBOX_CLEAR, @@ -1612,9 +1612,9 @@ static const struct ScriptCommand s_gs12_g20_s0_lives0_dlg0[] = { /* 0x81e8394 * FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), WAIT(10), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("...That was so sudden, there was no time\nto even say no...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It's too bad. I'd better go.") }, + MSG_QUIET(0, _("............")), + MSG_QUIET(0, _("...That was so sudden, there was no time\nto even say no...")), + MSG_QUIET(0, _("It's too bad. I'd better go.")), TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -1633,7 +1633,7 @@ static const struct ScriptCommand s_gs12_g20_s1_lives0_dlg0[] = { /* 0x81e8ac8 * STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), WAIT(45), - ROTATE(10, 2, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(ANGRY_START_FUNC), @@ -1663,14 +1663,14 @@ static const struct ScriptCommand s_gs12_g21_s0_station_sref_script[] = { /* 0x8 MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}The next morning...")), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g21_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g21_s0_station_sref_script }; /* 0x81e8d48 */ +static const struct ScriptRef s_gs12_g21_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g21_s0_station_sref_script }; /* 0x81e8d48 */ static const struct ScriptCommand s_gs12_g21_s0_lives0_dlg0[] = { /* 0x81e8d54 */ DEBUGINFO_O(1676), @@ -1700,14 +1700,14 @@ static const struct ScriptCommand s_gs12_g22_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g22_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g22_s0_station_sref_script }; /* 0x81e8f24 */ +static const struct ScriptRef s_gs12_g22_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g22_s0_station_sref_script }; /* 0x81e8f24 */ static const struct ScriptCommand s_gs12_g22_s0_lives0_dlg0[] = { /* 0x81e8f30 */ DEBUGINFO_O(1713), @@ -1736,14 +1736,14 @@ static const struct ScriptCommand s_gs12_g23_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g23_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g23_s0_station_sref_script }; /* 0x81e90f0 */ +static const struct ScriptRef s_gs12_g23_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g23_s0_station_sref_script }; /* 0x81e90f0 */ static const struct ScriptCommand s_gs12_g23_s0_lives0_dlg0[] = { /* 0x81e90fc */ DEBUGINFO_O(1749), @@ -1772,14 +1772,14 @@ static const struct ScriptCommand s_gs12_g24_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g24_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g24_s0_station_sref_script }; /* 0x81e92bc */ +static const struct ScriptRef s_gs12_g24_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g24_s0_station_sref_script }; /* 0x81e92bc */ static const struct ScriptCommand s_gs12_g24_s0_lives0_dlg0[] = { /* 0x81e92c8 */ DEBUGINFO_O(1785), @@ -1800,14 +1800,14 @@ static const struct ScriptCommand s_gs12_g25_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g25_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g25_s0_station_sref_script }; /* 0x81e9408 */ +static const struct ScriptRef s_gs12_g25_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g25_s0_station_sref_script }; /* 0x81e9408 */ static const struct ScriptCommand s_gs12_g25_s0_lives0_dlg0[] = { /* 0x81e9414 */ DEBUGINFO_O(1813), @@ -1836,14 +1836,14 @@ static const struct ScriptCommand s_gs12_g26_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g26_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g26_s0_station_sref_script }; /* 0x81e95d4 */ +static const struct ScriptRef s_gs12_g26_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g26_s0_station_sref_script }; /* 0x81e95d4 */ static const struct ScriptCommand s_gs12_g26_s0_lives0_dlg0[] = { /* 0x81e95e0 */ DEBUGINFO_O(1849), @@ -1864,14 +1864,14 @@ static const struct ScriptCommand s_gs12_g27_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g27_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g27_s0_station_sref_script }; /* 0x81e9720 */ +static const struct ScriptRef s_gs12_g27_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g27_s0_station_sref_script }; /* 0x81e9720 */ static const struct ScriptCommand s_gs12_g27_s0_lives0_dlg0[] = { /* 0x81e972c */ DEBUGINFO_O(1877), @@ -1900,14 +1900,14 @@ static const struct ScriptCommand s_gs12_g28_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g28_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g28_s0_station_sref_script }; /* 0x81e98ec */ +static const struct ScriptRef s_gs12_g28_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g28_s0_station_sref_script }; /* 0x81e98ec */ static const struct ScriptCommand s_gs12_g28_s0_lives0_dlg0[] = { /* 0x81e98f8 */ DEBUGINFO_O(1913), @@ -1928,14 +1928,14 @@ static const struct ScriptCommand s_gs12_g29_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g29_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g29_s0_station_sref_script }; /* 0x81e9a38 */ +static const struct ScriptRef s_gs12_g29_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g29_s0_station_sref_script }; /* 0x81e9a38 */ static const struct ScriptCommand s_gs12_g29_s0_lives0_dlg0[] = { /* 0x81e9a44 */ DEBUGINFO_O(1941), @@ -1964,14 +1964,14 @@ static const struct ScriptCommand s_gs12_g30_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g30_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g30_s0_station_sref_script }; /* 0x81e9c04 */ +static const struct ScriptRef s_gs12_g30_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g30_s0_station_sref_script }; /* 0x81e9c04 */ static const struct ScriptCommand s_gs12_g30_s0_lives0_dlg0[] = { /* 0x81e9c10 */ DEBUGINFO_O(1977), @@ -1992,14 +1992,14 @@ static const struct ScriptCommand s_gs12_g31_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g31_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g31_s0_station_sref_script }; /* 0x81e9d50 */ +static const struct ScriptRef s_gs12_g31_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g31_s0_station_sref_script }; /* 0x81e9d50 */ static const struct ScriptCommand s_gs12_g31_s0_lives0_dlg0[] = { /* 0x81e9d5c */ DEBUGINFO_O(2005), @@ -2028,14 +2028,14 @@ static const struct ScriptCommand s_gs12_g32_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g32_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g32_s0_station_sref_script }; /* 0x81e9f1c */ +static const struct ScriptRef s_gs12_g32_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g32_s0_station_sref_script }; /* 0x81e9f1c */ static const struct ScriptCommand s_gs12_g32_s0_lives0_dlg0[] = { /* 0x81e9f28 */ DEBUGINFO_O(2041), @@ -2065,7 +2065,7 @@ static const struct ScriptCommand s_gs12_g33_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g33_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g33_s0_station_sref_script }; /* 0x81ea088 */ +static const struct ScriptRef s_gs12_g33_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g33_s0_station_sref_script }; /* 0x81ea088 */ static const struct ScriptCommand s_gs12_g33_s0_lives0_dlg0[] = { /* 0x81ea094 */ DEBUGINFO_O(2071), @@ -2079,14 +2079,14 @@ static const struct ScriptCommand s_gs12_g33_s0_lives0_dlg0[] = { /* 0x81ea094 * WAIT(15), CALL_SCRIPT(LOOK_AROUND_DOWN_FUNC), WAIT(45), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nWhat a strange dream...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It's the dream I always have, but it was\nclearer than it was before...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I think I finally learned who that\nPokémon was...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nWhat a strange dream...")), + MSG_QUIET(0, _("It's the dream I always have, but it was\nclearer than it was before...")), + MSG_QUIET(0, _("I think I finally learned who that\nPokémon was...")), FANFARE_PLAY2(464), CALL_SCRIPT(NOTICE_FUNC), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("That's it!{WAIT_PRESS}\n{NAME_2}!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("It was {NAME_2}!") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Yesterday, {NAME_3} said...") }, + MSG_QUIET(0, _("That's it!{WAIT_PRESS}\n{NAME_2}!")), + MSG_QUIET(0, _("It was {NAME_2}!")), + MSG_QUIET(0, _("Yesterday, {NAME_3} said...")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -2106,11 +2106,11 @@ static const struct ScriptCommand s_gs12_g34_s0_station_sref_script[] = { /* 0x8 { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), RET, }; -static const struct ScriptRef s_gs12_g34_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g34_s0_station_sref_script }; /* 0x81ea3b8 */ +static const struct ScriptRef s_gs12_g34_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g34_s0_station_sref_script }; /* 0x81ea3b8 */ static const struct ScriptCommand s_gs12_g34_s0_lives0_dlg0[] = { /* 0x81ea3c4 */ DEBUGINFO_O(2116), @@ -2121,11 +2121,11 @@ static const struct ScriptCommand s_gs12_g34_s0_lives0_dlg0[] = { /* 0x81ea3c4 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("..................") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Maybe...{WAIT_PRESS}\nMaybe, I...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Maybe I was the human who was\n{NAME_2}'s partner...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Maybe I was the one that abandoned\n{NAME_2} when she was cursed...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Maybe that's why I turned into\na Pokémon...") }, + MSG_QUIET(0, _("..................")), + MSG_QUIET(0, _("Maybe...{WAIT_PRESS}\nMaybe, I...")), + MSG_QUIET(0, _("Maybe I was the human who was\n{NAME_2}'s partner...")), + MSG_QUIET(0, _("Maybe I was the one that abandoned\n{NAME_2} when she was cursed...")), + MSG_QUIET(0, _("Maybe that's why I turned into\na Pokémon...")), TEXTBOX_CLEAR, WAIT(60), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -2150,14 +2150,14 @@ static const struct ScriptCommand s_gs12_g35_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g35_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g35_s0_station_sref_script }; /* 0x81ea6e4 */ +static const struct ScriptRef s_gs12_g35_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g35_s0_station_sref_script }; /* 0x81ea6e4 */ static const struct ScriptCommand s_gs12_g35_s0_lives0_dlg0[] = { /* 0x81ea6f0 */ DEBUGINFO_O(2163), @@ -2187,7 +2187,7 @@ static const struct ScriptCommand s_gs12_g36_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g36_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g36_s0_station_sref_script }; /* 0x81ea850 */ +static const struct ScriptRef s_gs12_g36_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g36_s0_station_sref_script }; /* 0x81ea850 */ static const struct ScriptCommand s_gs12_g36_s0_lives0_dlg0[] = { /* 0x81ea85c */ DEBUGINFO_O(2193), @@ -2197,14 +2197,14 @@ static const struct ScriptCommand s_gs12_g36_s0_lives0_dlg0[] = { /* 0x81ea85c * CALL_SCRIPT(WAKEUP_FUNC), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nThere was an earthquake...{WAIT_PRESS}\nWasn't there...?") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I think I had that dream again...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I think I spoke with Gardevoir...{WAIT_PRESS}\nShe said something important...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nThere was an earthquake...{WAIT_PRESS}\nWasn't there...?")), + MSG_QUIET(0, _("I think I had that dream again...")), + MSG_QUIET(0, _("I think I spoke with Gardevoir...{WAIT_PRESS}\nShe said something important...")), TEXTBOX_CLEAR, FANFARE_PLAY2(464), CALL_SCRIPT(NOTICE_FUNC), WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("That's it!{WAIT_PRESS}\nShe did say something!") }, + MSG_QUIET(0, _("That's it!{WAIT_PRESS}\nShe did say something!")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -2225,11 +2225,11 @@ static const struct ScriptCommand s_gs12_g37_s0_station_sref_script[] = { /* 0x8 { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), RET, }; -static const struct ScriptRef s_gs12_g37_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g37_s0_station_sref_script }; /* 0x81eab3c */ +static const struct ScriptRef s_gs12_g37_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g37_s0_station_sref_script }; /* 0x81eab3c */ static const struct ScriptCommand s_gs12_g37_s0_lives0_dlg0[] = { /* 0x81eab48 */ DEBUGINFO_O(2235), @@ -2239,9 +2239,9 @@ static const struct ScriptCommand s_gs12_g37_s0_lives0_dlg0[] = { /* 0x81eab48 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), FANFARE_PLAY2(466), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("{NAME_2} knows!{WAIT_PRESS}\nShe knows why I became a Pokémon.") }, + MSG_QUIET(0, _("{NAME_2} knows!{WAIT_PRESS}\nShe knows why I became a Pokémon.")), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("She also said something about a role...{WAIT_PRESS}\nWhat did she mean by that?") }, + MSG_QUIET(0, _("She also said something about a role...{WAIT_PRESS}\nWhat did she mean by that?")), TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -2271,7 +2271,7 @@ static const struct ScriptCommand s_gs12_g38_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g38_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g38_s0_station_sref_script }; /* 0x81eadd0 */ +static const struct ScriptRef s_gs12_g38_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g38_s0_station_sref_script }; /* 0x81eadd0 */ static const struct ScriptCommand s_gs12_g38_s0_lives0_dlg0[] = { /* 0x81eaddc */ DEBUGINFO_O(2277), @@ -2286,7 +2286,7 @@ static const struct ScriptCommand s_gs12_g38_s0_lives0_dlg0[] = { /* 0x81eaddc * WAIT(30), CALL_SCRIPT(SHOCK_FUNC), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh, wow, another earthquake...") }, + MSG_QUIET(0, _("Oh, wow, another earthquake...")), TEXTBOX_CLEAR, WAIT(120), FANFARE_FADEOUT2(60, 453), @@ -2294,10 +2294,10 @@ static const struct ScriptCommand s_gs12_g38_s0_lives0_dlg0[] = { /* 0x81eaddc * WAIT(60), CALL_SCRIPT(LOOK_AROUND_FUNC), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("............{WAIT_PRESS}\nI guess it settled down...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _(".......There've been a lot of earthquakes\nlately...") }, + MSG_QUIET(0, _("............{WAIT_PRESS}\nI guess it settled down...")), + MSG_QUIET(0, _(".......There've been a lot of earthquakes\nlately...")), TEXTBOX_CLEAR, - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), RET, @@ -2321,7 +2321,7 @@ static const struct ScriptCommand s_gs12_g39_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g39_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g39_s0_station_sref_script }; /* 0x81eb0f4 */ +static const struct ScriptRef s_gs12_g39_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g39_s0_station_sref_script }; /* 0x81eb0f4 */ static const struct ScriptCommand s_gs12_g39_s0_lives0_dlg0[] = { /* 0x81eb100 */ DEBUGINFO_O(2327), @@ -2336,15 +2336,15 @@ static const struct ScriptCommand s_gs12_g39_s0_lives0_dlg0[] = { /* 0x81eb100 * WAIT(30), CALL_SCRIPT(SHOCK_FUNC), PORTRAIT(PLACEMENT_LEFT_, 0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("Oh? Another earthquake...") }, + MSG_QUIET(0, _("Oh? Another earthquake...")), TEXTBOX_CLEAR, WAIT(120), FANFARE_FADEOUT2(60, 453), { 0x97, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("There've been so many quakes lately...") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("I wonder when they'll settle down...") }, + MSG_QUIET(0, _("There've been so many quakes lately...")), + MSG_QUIET(0, _("I wonder when they'll settle down...")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), AWAIT_CUE(5), @@ -2398,14 +2398,14 @@ static const struct ScriptCommand s_gs12_g40_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g40_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g40_s0_station_sref_script }; /* 0x81eb668 */ +static const struct ScriptRef s_gs12_g40_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g40_s0_station_sref_script }; /* 0x81eb668 */ static const struct ScriptCommand s_gs12_g40_s0_lives0_dlg0[] = { /* 0x81eb674 */ DEBUGINFO_O(2411), @@ -2433,14 +2433,14 @@ static const struct ScriptCommand s_gs12_g41_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g41_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g41_s0_station_sref_script }; /* 0x81eb824 */ +static const struct ScriptRef s_gs12_g41_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g41_s0_station_sref_script }; /* 0x81eb824 */ static const struct ScriptCommand s_gs12_g41_s0_lives0_dlg0[] = { /* 0x81eb830 */ DEBUGINFO_O(2446), @@ -2466,7 +2466,7 @@ static const struct ScriptCommand s_gs12_g42_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g42_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs12_g42_s0_station_sref_script }; /* 0x81eb950 */ +static const struct ScriptRef s_gs12_g42_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs12_g42_s0_station_sref_script }; /* 0x81eb950 */ static const struct ScriptCommand s_gs12_g42_s0_lives0_dlg0[] = { /* 0x81eb95c */ DEBUGINFO_O(2472), @@ -2513,17 +2513,17 @@ static const struct ScriptCommand s_gs12_g42_s0_lives1_dlg0[] = { /* 0x81ebd04 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(6, 10, DIRECTION_NORTHWEST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(6, 10, DIRECTION_NORTHEAST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(15), - ROTATE(6, 10, DIRECTION_NORTHWEST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), { 0x62, 0x00, 0x0080, 0x00000000, 0x0000000a, NULL }, WAIT(30), { 0x89, 0x40, 0x0200, 0x00000000, 0x00000000, NULL }, @@ -2559,14 +2559,14 @@ static const struct ScriptCommand s_gs12_g43_s0_station_sref_script[] = { /* 0x8 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g43_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g43_s0_station_sref_script }; /* 0x81ec024 */ +static const struct ScriptRef s_gs12_g43_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g43_s0_station_sref_script }; /* 0x81ec024 */ static const struct ScriptCommand s_gs12_g43_s0_lives0_dlg0[] = { /* 0x81ec030 */ DEBUGINFO_O(2572), @@ -2587,14 +2587,14 @@ static const struct ScriptCommand s_gs12_g44_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs12_g44_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g44_s0_station_sref_script }; /* 0x81ec170 */ +static const struct ScriptRef s_gs12_g44_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g44_s0_station_sref_script }; /* 0x81ec170 */ static const struct ScriptCommand s_gs12_g44_s0_lives0_dlg0[] = { /* 0x81ec17c */ DEBUGINFO_O(2600), @@ -2635,7 +2635,7 @@ static const struct ScriptCommand s_gs12_g45_s0_station_sref_script[] = { /* 0x8 { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(60), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), @@ -2644,7 +2644,7 @@ static const struct ScriptCommand s_gs12_g45_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs12_g45_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g45_s0_station_sref_script }; /* 0x81ec590 */ +static const struct ScriptRef s_gs12_g45_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g45_s0_station_sref_script }; /* 0x81ec590 */ static const struct ScriptCommand s_gs12_g45_s0_lives0_dlg0[] = { /* 0x81ec59c */ DEBUGINFO_O(2650), @@ -2692,7 +2692,7 @@ static const struct ScriptCommand s_gs12_g46_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs12_g46_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs12_g46_s0_station_sref_script }; /* 0x81eca10 */ +static const struct ScriptRef s_gs12_g46_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs12_g46_s0_station_sref_script }; /* 0x81eca10 */ static const struct ScriptCommand s_gs12_g46_s0_evt0_sref_script[] = { /* 0x81eca1c */ DEBUGINFO_O(2698), @@ -2700,7 +2700,7 @@ static const struct ScriptCommand s_gs12_g46_s0_evt0_sref_script[] = { /* 0x81ec HALT, }; -static const struct ScriptRef s_gs12_g46_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs12_g46_s0_evt0_sref_script }; /* 0x81eca4c */ +static const struct ScriptRef s_gs12_g46_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs12_g46_s0_evt0_sref_script }; /* 0x81eca4c */ static const struct ScriptCommand s_gs12_g46_s0_evt1_sref_script[] = { /* 0x81eca58 */ DEBUGINFO_O(2706), @@ -2716,7 +2716,7 @@ static const struct ScriptCommand s_gs12_g46_s0_evt1_sref_script[] = { /* 0x81ec JUMP_SCRIPT(END_TALK), }; -static const struct ScriptRef s_gs12_g46_s0_evt1_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs12_g46_s0_evt1_sref_script }; /* 0x81ecb2c */ +static const struct ScriptRef s_gs12_g46_s0_evt1_sref = { NORMAL_EVENT, 7, NULL, s_gs12_g46_s0_evt1_sref_script }; /* 0x81ecb2c */ static const struct ScriptCommand s_gs12_g46_s1_station_sref_script[] = { /* 0x81ecb38 */ DEBUGINFO_O(2722), @@ -2727,13 +2727,13 @@ static const struct ScriptCommand s_gs12_g46_s1_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_TEAM_BASE_INSIDE), SELECT_ENTITIES(0, 2), - BGM_SWITCH(1), + BGM_SWITCH(MUS_RESCUE_TEAM_BASE), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), RET, }; -static const struct ScriptRef s_gs12_g46_s1_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs12_g46_s1_station_sref_script }; /* 0x81ecbf8 */ +static const struct ScriptRef s_gs12_g46_s1_station_sref = { EVENT_STATION , 7, NULL, s_gs12_g46_s1_station_sref_script }; /* 0x81ecbf8 */ static const struct ScriptCommand s_gs12_g46_s1_lives0_dlg0[] = { /* 0x81ecc04 */ DEBUGINFO_O(2739), @@ -3628,4 +3628,4 @@ static const struct GroundLink s_gs12_links[] = { /* 0x81ee1f4 */ /* link 3 */ { { /*x*/ 30, /*y*/ 35, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs12 = { LPARRAY(s_gs12_groups), s_gs12_links }; /* 0x81ee214 */ +const GroundScriptHeader gGroundScript_gs12 = { LPARRAY(s_gs12_groups), s_gs12_links }; /* 0x81ee214 */ diff --git a/src/data/ground/ground_data_d01p01_station.h b/src/data/ground/ground_data_d01p01_station.h index 8dec37a53..ebdb71269 100644 --- a/src/data/ground/ground_data_d01p01_station.h +++ b/src/data/ground/ground_data_d01p01_station.h @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs178_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs178_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs178_g0_s0_station_sref_script }; /* 0x822c2b4 */ +static const struct ScriptRef s_gs178_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs178_g0_s0_station_sref_script }; /* 0x822c2b4 */ static const struct ScriptCommand s_gs178_g1_s0_station_sref_script[] = { /* 0x822c2c0 - PART 1 0:04:05-0:06:38 */ DEBUGINFO_O(37), @@ -68,7 +68,7 @@ static const struct ScriptCommand s_gs178_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs178_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs178_g1_s0_station_sref_script }; /* 0x822c5d8 */ +static const struct ScriptRef s_gs178_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs178_g1_s0_station_sref_script }; /* 0x822c5d8 */ @@ -87,16 +87,16 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - VARIANT_DEFAULT(_(" You're finally awake! Great!")), TEXTBOX_CLEAR, WAIT(30), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Wh-where is this...?)") }, + MSG_QUIET(0, _("(Wh-where is this...?)")), TEXTBOX_CLEAR, FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(20), FANFARE_PLAY2(468), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(20), FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(50), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" You were passed out here.\nI'm glad you woke up!")), @@ -141,14 +141,14 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - WAIT(40), FANFARE_PLAY2(482), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01e2, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(482), PORTRAIT_REP(0x0000, 0x0000000c), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(It... It's true...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(I have turned into\na {POKEMON_0}!)") }, + MSG_QUIET(0, _("(It... It's true...)")), + MSG_QUIET(0, _("(I have turned into\na {POKEMON_0}!)")), TEXTBOX_CLEAR, WAIT(20), PORTRAIT_REP(0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(...But why?\nI don't remember anything...)") }, + MSG_QUIET(0, _("(...But why?\nI don't remember anything...)")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), @@ -161,7 +161,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0000, 0x00000000), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(My name...?{WAIT_PRESS}\nThat's right, my name is...)") }, + MSG_QUIET(0, _("(My name...?{WAIT_PRESS}\nThat's right, my name is...)")), TEXTBOX_CLEAR, WAIT(20), { 0x3b, 0x16, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -184,12 +184,12 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - ALERT_CUE(6), AWAIT_CUE(5), WAIT(30), - ROTATE(6, 10, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), WAIT(45), - ROTATE(6, 10, DIRECTION_EAST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_EAST), BGM_FADEOUT(60), WAIT(60), MSG_NPC(-1, _(" Somebody!\nPlease! Help me!")), @@ -197,7 +197,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - ALERT_CUE(6), FANFARE_PLAY2(466), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(30), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -206,7 +206,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - TEXTBOX_CLEAR, SELECT_LIVES(-1, 1), AWAIT_CUE(5), - ROTATE(10, 1, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(5), WAIT(20), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -214,7 +214,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - VARIANT_DEFAULT(_(" What's wrong?")), TEXTBOX_CLEAR, WAIT(20), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), ALERT_CUE(7), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0002, 0x00000000), @@ -242,7 +242,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives0_dlg0[] = { /* 0x822c5e4 - ALERT_CUE(7), WAIT(60), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -291,7 +291,7 @@ static const struct ScriptCommand s_gs178_g1_s0_lives1_dlg0[] = { /* 0x822d950 - AWAIT_CUE(6), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), - { 0xe2, 0x00, 0x01d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(470), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -304,18 +304,18 @@ static const struct ScriptCommand s_gs178_g1_s0_lives1_dlg0[] = { /* 0x822d950 - AWAIT_CUE(6), FANFARE_PLAY2(466), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_WEST), - { 0xe2, 0x00, 0x01d2, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), + WAIT_FANFARE2(466), WAIT(30), AWAIT_CUE(6), - ROTATE(10, 1, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), FANFARE_PLAY2(463), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01cf, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(463), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(384, 11), @@ -340,18 +340,18 @@ static const struct ScriptCommand s_gs178_g1_s1_lives0_dlg0[] = { /* 0x822dc90 - ALERT_CUE(6), WALK_GRID(256, 6), WALK_GRID(256, 7), - ROTATE(6, 1, DIRECTION_SOUTH), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), FANFARE_STOP2(450), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), LABEL(0), /* = 0x00 */ - { 0x8b, 0x1e, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 30), + SET_DIR_WAIT(DIRECTION_SOUTH, 30), + SET_DIR_WAIT(DIRECTION_EAST, 30), + SET_DIR_WAIT(DIRECTION_SOUTH, 30), JUMP_LABEL(0), }; @@ -373,7 +373,7 @@ static const struct ScriptCommand s_gs178_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs178_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs178_g2_s0_station_sref_script }; /* 0x822df54 */ +static const struct ScriptRef s_gs178_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs178_g2_s0_station_sref_script }; /* 0x822df54 */ static const struct ScriptCommand s_gs178_g2_s0_lives0_dlg0[] = { /* 0x822df60 - PART 1 0:11:39-0:12:15 - Player */ @@ -390,20 +390,20 @@ static const struct ScriptCommand s_gs178_g2_s0_lives0_dlg0[] = { /* 0x822df60 - CALL_SCRIPT(WAKEUP_FUNC), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(8, 2, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), FANFARE_PLAY2(468), WAIT(1), - ROTATE(8, 1, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), FANFARE_PLAY2(468), WAIT(1), - ROTATE(8, 2, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), FANFARE_PLAY2(468), WAIT(50), FANFARE_STOP2(468), MSG_NPC(2, _(" Oh, my goodness!\nI'm so glad you came to!")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), ALERT_CUE(6), AWAIT_CUE(5), @@ -420,7 +420,7 @@ static const struct ScriptCommand s_gs178_g2_s0_lives0_dlg0[] = { /* 0x822df60 - VARIANT_DEFAULT(_(" ...We somehow ended up\nback here...")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(8, 1, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" I guess if we're defeated\nin there, we don't get to advance.")), @@ -432,14 +432,14 @@ static const struct ScriptCommand s_gs178_g2_s0_lives0_dlg0[] = { /* 0x822df60 - TEXTBOX_CLEAR, ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(30), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" That's right!\nWe have to help that kid, and now!")), VARIANT_DEFAULT(_(" That's right!\nWe've got to hurry!")), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Let's roll, {NAME_0}!")), VARIANT_DEFAULT(_(" {NAME_0}! Let's go!")), @@ -460,20 +460,20 @@ static const struct ScriptCommand s_gs178_g2_s0_lives1_dlg0[] = { /* 0x822e5fc - { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(WAKEUP_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), FANFARE_PLAY2(468), WAIT(1), - ROTATE(8, 2, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), FANFARE_PLAY2(468), WAIT(1), - ROTATE(8, 1, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), FANFARE_PLAY2(468), WAIT(50), FANFARE_STOP2(468), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(60), ALERT_CUE(5), AWAIT_CUE(6), @@ -481,16 +481,16 @@ static const struct ScriptCommand s_gs178_g2_s0_lives1_dlg0[] = { /* 0x822e5fc - CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), WAIT(5), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), AWAIT_CUE(6), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(20), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(384, 11), @@ -507,10 +507,10 @@ static const struct ScriptCommand s_gs178_g2_s0_lives2_dlg0[] = { /* 0x822e89c - CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(7), LABEL(0), /* = 0x00 */ - { 0x8b, 0x1e, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 30), + SET_DIR_WAIT(DIRECTION_SOUTH, 30), + SET_DIR_WAIT(DIRECTION_EAST, 30), + SET_DIR_WAIT(DIRECTION_SOUTH, 30), JUMP_LABEL(0), }; @@ -519,7 +519,7 @@ static const struct ScriptCommand s_gs178_g3_s0_station_sref_script[] = { /* 0x8 { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_TINY_WOODS_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(103), + BGM_SWITCH(MUS_A_SUCCESSFUL_RESCUE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(30), @@ -528,7 +528,7 @@ static const struct ScriptCommand s_gs178_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs178_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs178_g3_s0_station_sref_script }; /* 0x822ea0c */ +static const struct ScriptRef s_gs178_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs178_g3_s0_station_sref_script }; /* 0x822ea0c */ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - PART 1 0:17:17-0:18:51 - Player */ DEBUGINFO_O(534), @@ -579,11 +579,11 @@ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - WAIT(30), FANFARE_STOP2(470), PORTRAIT_REP(0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(He's, uh...{WAIT_PRESS} Staring at me adoringly...)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Those sparkly eyes...\nIt's a little embarrassing...)") }, + MSG_QUIET(0, _("(He's, uh...{WAIT_PRESS} Staring at me adoringly...)")), + MSG_QUIET(0, _("(Those sparkly eyes...\nIt's a little embarrassing...)")), PORTRAIT_REP(0x0000, 0x00000001), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(But, this doesn't feel bad, either.\nIt's like I'm a hero.)") }, - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(Helping Pokémon in trouble might be\na good experience.)") }, + MSG_QUIET(0, _("(But, this doesn't feel bad, either.\nIt's like I'm a hero.)")), + MSG_QUIET(0, _("(Helping Pokémon in trouble might be\na good experience.)")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(8), @@ -612,7 +612,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - ALERT_CUE(8), WAIT(30), ALERT_CUE(6), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), ALERT_CUE(6), AWAIT_CUE(5), @@ -620,7 +620,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hey, thanks for helping me\nout.")), VARIANT_DEFAULT(_(" Thank you for helping!")), - ROTATE(8, 1, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(10), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -631,7 +631,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - TEXTBOX_CLEAR, WAIT(30), PORTRAIT_REP(0x0000, 0x00000004), - { 0x33, 0x00, 0x0000, 0x00000000, 0x00000000, _("(............)") }, + MSG_QUIET(0, _("(............)")), TEXTBOX_CLEAR, WAIT(30), PORTRAIT_REP(0x0001, 0x00000000), @@ -641,7 +641,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives0_dlg0[] = { /* 0x822ea18 - TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), WAIT(10), ALERT_CUE(3), WALK_GRID(256, 16), @@ -664,26 +664,26 @@ static const struct ScriptCommand s_gs178_g3_s0_lives1_dlg0[] = { /* 0x822f68c - SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), WAIT(1), WALK_GRID(256, 17), @@ -701,7 +701,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives2_dlg0[] = { /* 0x822f84c - { 0x62, 0x00, 0x0080, 0x00000000, -0x00000008, NULL }, ALERT_CUE(5), AWAIT_CUE(7), - { 0x95, 0x08, 0x000a, 0x0000000e, 0x00000000, NULL }, + CMD_UNK_95(8, DIR_TRANS_10, 14), FANFARE_PLAY2(450), WALK_GRID(256, 14), FANFARE_STOP2(450), @@ -719,7 +719,7 @@ static const struct ScriptCommand s_gs178_g3_s0_lives3_dlg0[] = { /* 0x822f94c - WAIT(20), ALERT_CUE(5), AWAIT_CUE(8), - { 0x95, 0x08, 0x000a, 0x0000000f, 0x00000000, NULL }, + CMD_UNK_95(8, DIR_TRANS_10, 15), WALK_GRID(256, 15), END_DELETE, }; @@ -830,4 +830,4 @@ static const struct GroundLink s_gs178_links[] = { /* 0x822fc18 */ /* link 17 */ { { /*x*/ 52, /*y*/ 24, /*flags*/ 0, CPOS_HALFTILE|CPOS_CURRENT }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs178 = { LPARRAY(s_gs178_groups), s_gs178_links }; /* 0x822fca8 */ +const GroundScriptHeader gGroundScript_gs178 = { LPARRAY(s_gs178_groups), s_gs178_links }; /* 0x822fca8 */ diff --git a/src/data/ground/ground_data_d01p02_station.h b/src/data/ground/ground_data_d01p02_station.h index 9775d619a..5d6f01330 100644 --- a/src/data/ground/ground_data_d01p02_station.h +++ b/src/data/ground/ground_data_d01p02_station.h @@ -15,13 +15,13 @@ static const struct ScriptCommand s_gs179_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs179_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs179_g0_s0_station_sref_script }; /* 0x822fd28 */ +static const struct ScriptRef s_gs179_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs179_g0_s0_station_sref_script }; /* 0x822fd28 */ static const struct ScriptCommand s_gs179_g1_s0_station_sref_script[] = { /* 0x822fd34 - PART 1 0:16:37-0:17:16 - Tiny Woods end room */ DEBUGINFO_O(21), SELECT_MAP(179), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -29,7 +29,7 @@ static const struct ScriptCommand s_gs179_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs179_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs179_g1_s0_station_sref_script }; /* 0x822fdc4 */ +static const struct ScriptRef s_gs179_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs179_g1_s0_station_sref_script }; /* 0x822fdc4 */ static const struct ScriptCommand s_gs179_g1_s0_lives0_dlg0[] = { /* 0x822fdd0 - PART 1 0:16:37-0:17:16 - Player */ DEBUGINFO_O(35), @@ -93,10 +93,10 @@ static const struct ScriptCommand s_gs179_g1_s0_lives2_dlg0[] = { /* 0x8230108 - { 0x56, 0x00, 0x0000, 0x0000003e, 0x00000000, NULL }, FANFARE_PLAY2(457), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x01c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(457), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -144,4 +144,4 @@ static const struct GroundLink s_gs179_links[] = { /* 0x82302d4 */ /* link 1 */ { { /*x*/ 24, /*y*/ 23, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs179 = { LPARRAY(s_gs179_groups), s_gs179_links }; /* 0x82302e4 */ +const GroundScriptHeader gGroundScript_gs179 = { LPARRAY(s_gs179_groups), s_gs179_links }; /* 0x82302e4 */ diff --git a/src/data/ground/ground_data_d02p01_station.h b/src/data/ground/ground_data_d02p01_station.h index ea561d5d9..f867caff3 100644 --- a/src/data/ground/ground_data_d02p01_station.h +++ b/src/data/ground/ground_data_d02p01_station.h @@ -17,20 +17,20 @@ static const struct ScriptCommand s_gs180_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs180_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs180_g0_s0_station_sref_script }; /* 0x8230364 */ +static const struct ScriptRef s_gs180_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs180_g0_s0_station_sref_script }; /* 0x8230364 */ static const struct ScriptCommand s_gs180_g1_s0_station_sref_script[] = { /* 0x8230370 */ DEBUGINFO_O(23), SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(14), + BGM_SWITCH(MUS_THUNDERWAVE_CAVE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(0, SCRIPT_DUNGEON_THUNDERWAVE_CAVE), RET, }; -static const struct ScriptRef s_gs180_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs180_g1_s0_station_sref_script }; /* 0x82303f0 */ +static const struct ScriptRef s_gs180_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs180_g1_s0_station_sref_script }; /* 0x82303f0 */ static const struct ScriptCommand s_gs180_g1_s0_eff0_script[] = { /* 0x82303fc */ DEBUGINFO_O(36), @@ -63,13 +63,13 @@ static const struct ScriptCommand s_gs180_g1_s0_lives0_dlg0[] = { /* 0x823047c * MSG_NPC(2, _(" MY FRIENDS SHOULD BE\nON B{VALUE_0}F. PLEASE HELP THEM!\nBZBZBZZZT!")), TEXTBOX_CLEAR, ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(30), { 0x54, 0x00, 0x002f, 0x00000000, 0x00000000, NULL }, STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), WAIT(15), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), ALERT_CUE(7), ALERT_CUE(8), @@ -92,13 +92,13 @@ static const struct ScriptCommand s_gs180_g1_s0_lives1_dlg0[] = { /* 0x8230758 * AWAIT_CUE(6), WALK_RELATIVE(256, 0, -100), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), WAIT(30), { 0x54, 0x00, 0x002f, 0x00000000, 0x00000000, NULL }, STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), WAIT(15), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -113,11 +113,11 @@ static const struct ScriptCommand s_gs180_g1_s0_lives2_dlg0[] = { /* 0x82308a8 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0080, -0x00000010, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000041, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 65), HALT, }; @@ -126,10 +126,10 @@ static const struct ScriptCommand s_gs180_g1_s0_lives3_dlg0[] = { /* 0x8230948 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(8), { 0x62, 0x00, 0x0080, 0x00000010, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000040, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 64), HALT, }; @@ -137,14 +137,14 @@ static const struct ScriptCommand s_gs180_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(137), SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(14), + BGM_SWITCH(MUS_THUNDERWAVE_CAVE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(0, SCRIPT_DUNGEON_THUNDERWAVE_CAVE), RET, }; -static const struct ScriptRef s_gs180_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs180_g2_s0_station_sref_script }; /* 0x8230a58 */ +static const struct ScriptRef s_gs180_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs180_g2_s0_station_sref_script }; /* 0x8230a58 */ static const struct ScriptCommand s_gs180_g2_s0_eff0_script[] = { /* 0x8230a64 */ DEBUGINFO_O(150), @@ -176,7 +176,7 @@ static const struct ScriptCommand s_gs180_g2_s0_lives0_dlg0[] = { /* 0x8230ae4 * MSG_NPC(1, _(" The {NAME_2} are in\nthere somewhere.")), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Let's give it our best\nand rescue them {NAME_0}!")), VARIANT_DEFAULT(_(" Let's do our best to rescue\nthem, {NAME_0}!")), @@ -202,7 +202,7 @@ static const struct ScriptCommand s_gs180_g2_s0_lives1_dlg0[] = { /* 0x8230d64 * WALK_RELATIVE(256, 0, -100), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -217,10 +217,10 @@ static const struct ScriptCommand s_gs180_g2_s0_lives2_dlg0[] = { /* 0x8230e64 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(20, 2, DIRECTION_NORTHEAST), + ROTATE_TO(20, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), HALT, }; @@ -229,9 +229,9 @@ static const struct ScriptCommand s_gs180_g2_s0_lives3_dlg0[] = { /* 0x8230ef4 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(20, 1, DIRECTION_NORTHWEST), + ROTATE_TO(20, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), HALT, }; @@ -239,7 +239,7 @@ static const struct ScriptCommand s_gs180_g3_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(239), SELECT_MAP(MAP_THUNDERWAVE_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(103), + BGM_SWITCH(MUS_A_SUCCESSFUL_RESCUE), WAIT(30), { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, AWAIT_CUE(3), @@ -248,7 +248,7 @@ static const struct ScriptCommand s_gs180_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs180_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs180_g3_s0_station_sref_script }; /* 0x8231014 */ +static const struct ScriptRef s_gs180_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs180_g3_s0_station_sref_script }; /* 0x8231014 */ static const struct ScriptCommand s_gs180_g3_s0_lives0_dlg0[] = { /* 0x8231020 */ DEBUGINFO_O(254), @@ -308,7 +308,7 @@ static const struct ScriptCommand s_gs180_g3_s0_lives0_dlg0[] = { /* 0x8231020 * ALERT_CUE(10), WAIT(30), ALERT_CUE(6), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(90), ALERT_CUE(3), HALT, @@ -322,11 +322,11 @@ static const struct ScriptCommand s_gs180_g3_s0_lives1_dlg0[] = { /* 0x8231478 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), HALT, }; @@ -336,9 +336,9 @@ static const struct ScriptCommand s_gs180_g3_s0_lives2_dlg0[] = { /* 0x8231518 * { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), WALK_GRID(256, 3), @@ -352,7 +352,7 @@ static const struct ScriptCommand s_gs180_g3_s0_lives3_dlg0[] = { /* 0x82315e8 * { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), ALERT_CUE(5), @@ -360,7 +360,7 @@ static const struct ScriptCommand s_gs180_g3_s0_lives3_dlg0[] = { /* 0x82315e8 * CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), WALK_GRID(256, 3), @@ -375,24 +375,24 @@ static const struct ScriptCommand s_gs180_g3_s0_lives4_dlg0[] = { /* 0x8231718 * { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(9), CALL_SCRIPT(SMILE_START_FUNC), - ROTATE(4, 1, DIRECTION_NORTH), - ROTATE(4, 1, DIRECTION_SOUTH), - ROTATE(4, 1, DIRECTION_NORTH), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SMILE_START_FUNC), - ROTATE(4, 1, DIRECTION_NORTH), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), WALK_GRID(256, 2), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -406,14 +406,14 @@ static const struct ScriptCommand s_gs180_g3_s0_lives5_dlg0[] = { /* 0x82318d8 * { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(10), CALL_SCRIPT(SMILE_START_FUNC), - ROTATE(4, 1, DIRECTION_NORTH), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(10), CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(10), WALK_GRID(256, 2), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -520,4 +520,4 @@ static const struct GroundLink s_gs180_links[] = { /* 0x8231c3c */ /* link 3 */ { { /*x*/ 31, /*y*/ 33, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs180 = { LPARRAY(s_gs180_groups), s_gs180_links }; /* 0x8231c5c */ +const GroundScriptHeader gGroundScript_gs180 = { LPARRAY(s_gs180_groups), s_gs180_links }; /* 0x8231c5c */ diff --git a/src/data/ground/ground_data_d02p02_station.h b/src/data/ground/ground_data_d02p02_station.h index 12d24e42a..f37c9cbfc 100644 --- a/src/data/ground/ground_data_d02p02_station.h +++ b/src/data/ground/ground_data_d02p02_station.h @@ -17,13 +17,13 @@ static const struct ScriptCommand s_gs181_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs181_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs181_g0_s0_station_sref_script }; /* 0x8231cdc */ +static const struct ScriptRef s_gs181_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs181_g0_s0_station_sref_script }; /* 0x8231cdc */ static const struct ScriptCommand s_gs181_g1_s0_station_sref_script[] = { /* 0x8231ce8 */ DEBUGINFO_O(23), SELECT_MAP(181), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(120), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs181_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs181_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs181_g1_s0_station_sref_script }; /* 0x8231d78 */ +static const struct ScriptRef s_gs181_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs181_g1_s0_station_sref_script }; /* 0x8231d78 */ static const struct ScriptCommand s_gs181_g1_s0_lives0_dlg0[] = { /* 0x8231d84 */ DEBUGINFO_O(37), @@ -50,7 +50,7 @@ static const struct ScriptCommand s_gs181_g1_s0_lives0_dlg0[] = { /* 0x8231d84 * ALERT_CUE(3), WAIT(1), WALK_GRID(204, 1), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), HALT, }; @@ -63,7 +63,7 @@ static const struct ScriptCommand s_gs181_g1_s0_lives1_dlg0[] = { /* 0x8231f0c * WALK_GRID(256, 2), AWAIT_CUE(6), WALK_GRID(204, 3), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -125,4 +125,4 @@ static const struct GroundLink s_gs181_links[] = { /* 0x82320f0 */ /* link 3 */ { { /*x*/ 24, /*y*/ 19, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs181 = { LPARRAY(s_gs181_groups), s_gs181_links }; /* 0x8232110 */ +const GroundScriptHeader gGroundScript_gs181 = { LPARRAY(s_gs181_groups), s_gs181_links }; /* 0x8232110 */ diff --git a/src/data/ground/ground_data_d03p01_station.h b/src/data/ground/ground_data_d03p01_station.h index cb0bcc737..aa173e1e4 100644 --- a/src/data/ground/ground_data_d03p01_station.h +++ b/src/data/ground/ground_data_d03p01_station.h @@ -15,20 +15,20 @@ static const struct ScriptCommand s_gs182_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs182_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs182_g0_s0_station_sref_script }; /* 0x8232190 */ +static const struct ScriptRef s_gs182_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs182_g0_s0_station_sref_script }; /* 0x8232190 */ static const struct ScriptCommand s_gs182_g1_s0_station_sref_script[] = { /* 0x823219c */ DEBUGINFO_O(21), SELECT_MAP(182), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(120), + BGM_SWITCH(MUS_MT_STEEL), AWAIT_CUE(3), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs182_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs182_g1_s0_station_sref_script }; /* 0x823221c */ +static const struct ScriptRef s_gs182_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs182_g1_s0_station_sref_script }; /* 0x823221c */ static const struct ScriptCommand s_gs182_g1_s0_lives0_dlg0[] = { /* 0x8232228 */ DEBUGINFO_O(34), @@ -54,7 +54,7 @@ static const struct ScriptCommand s_gs182_g1_s0_lives0_dlg0[] = { /* 0x8232228 * SELECT_ENTITIES(-1, 1), WAIT(15), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(SHOCK_FUNC), WAIT(60), { 0x2d, 0x0a, 0x0000, 0x00000002, 0x00000000, NULL }, @@ -70,7 +70,7 @@ static const struct ScriptCommand s_gs182_g1_s0_lives0_dlg0[] = { /* 0x8232228 * AWAIT_CUE(5), WAIT(30), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(30), PORTRAIT_REP(0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -78,7 +78,7 @@ static const struct ScriptCommand s_gs182_g1_s0_lives0_dlg0[] = { /* 0x8232228 * VARIANT_DEFAULT(_(" ......{WAIT_PRESS}\nUh... Let's go.")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(45), { 0x23, 0x00, 0x0050, 0x00000000, 0x00000000, NULL }, ALERT_CUE(6), @@ -101,14 +101,14 @@ static const struct ScriptCommand s_gs182_g1_s0_lives1_dlg0[] = { /* 0x82326cc * WALK_RELATIVE(256, 0, -100), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), WAIT(15), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -138,13 +138,13 @@ static const struct ScriptCommand s_gs182_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(138), SELECT_MAP(182), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(120), + BGM_SWITCH(MUS_MT_STEEL), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs182_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs182_g2_s0_station_sref_script }; /* 0x823297c */ +static const struct ScriptRef s_gs182_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs182_g2_s0_station_sref_script }; /* 0x823297c */ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 */ DEBUGINFO_O(150), @@ -158,7 +158,7 @@ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 * WALK_RELATIVE(256, 0, -100), WAIT(15), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -173,7 +173,7 @@ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 * SELECT_ENTITIES(-1, 1), WAIT(15), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(SHOCK_FUNC), WAIT(60), { 0x2d, 0x0a, 0x0000, 0x00000002, 0x00000000, NULL }, @@ -189,7 +189,7 @@ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 * AWAIT_CUE(5), WAIT(30), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(30), PORTRAIT_REP(0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -197,7 +197,7 @@ static const struct ScriptCommand s_gs182_g2_s0_lives0_dlg0[] = { /* 0x8232988 * VARIANT_DEFAULT(_(" ......{WAIT_PRESS}\nUh... Let's go.")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(45), { 0x23, 0x00, 0x0050, 0x00000000, 0x00000000, NULL }, ALERT_CUE(6), @@ -219,18 +219,18 @@ static const struct ScriptCommand s_gs182_g2_s0_lives1_dlg0[] = { /* 0x8232e30 * AWAIT_CUE(6), WALK_RELATIVE(256, 0, -100), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), WAIT(15), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -325,4 +325,4 @@ static const struct GroundLink s_gs182_links[] = { /* 0x8233234 */ /* link 1 */ { { /*x*/ 22, /*y*/ 16, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs182 = { LPARRAY(s_gs182_groups), s_gs182_links }; /* 0x8233244 */ +const GroundScriptHeader gGroundScript_gs182 = { LPARRAY(s_gs182_groups), s_gs182_links }; /* 0x8233244 */ diff --git a/src/data/ground/ground_data_d03p02_station.h b/src/data/ground/ground_data_d03p02_station.h index ef3754a36..43799a70b 100644 --- a/src/data/ground/ground_data_d03p02_station.h +++ b/src/data/ground/ground_data_d03p02_station.h @@ -18,20 +18,20 @@ static const struct ScriptCommand s_gs183_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs183_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs183_g0_s0_station_sref_script }; /* 0x82332c4 */ +static const struct ScriptRef s_gs183_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs183_g0_s0_station_sref_script }; /* 0x82332c4 */ static const struct ScriptCommand s_gs183_g1_s0_station_sref_script[] = { /* 0x82332d0 */ DEBUGINFO_O(24), SELECT_MAP(183), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), WAIT(30), RET, }; -static const struct ScriptRef s_gs183_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs183_g1_s0_station_sref_script }; /* 0x8233350 */ +static const struct ScriptRef s_gs183_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs183_g1_s0_station_sref_script }; /* 0x8233350 */ static const struct ScriptCommand s_gs183_g1_s0_eff0_script[] = { /* 0x823335c */ DEBUGINFO_O(37), @@ -153,10 +153,10 @@ static const struct ScriptCommand s_gs183_g1_s0_lives1_dlg0[] = { /* 0x8233bec * ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), HALT, @@ -202,16 +202,16 @@ static const struct ScriptCommand s_gs183_g1_s1_lives0_dlg0[] = { /* 0x8233eec * { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(5), AWAIT_CUE(8), WALK_GRID(128, 4), - { 0x93, 0x04, 0x000a, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 68), ALERT_CUE(5), AWAIT_CUE(8), { 0x52, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, WALK_RELATIVE(76, 0, -16), - { 0x93, 0x04, 0x000a, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 68), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, }; @@ -226,14 +226,14 @@ static const struct ScriptCommand s_gs183_g1_s1_lives1_dlg0[] = { /* 0x823405c * { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(8), WALK_GRID(128, 3), - { 0x93, 0x04, 0x000a, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 68), AWAIT_CUE(8), { 0x52, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, WALK_RELATIVE(76, 0, -16), - { 0x93, 0x04, 0x000a, 0x00000044, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 68), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, }; @@ -293,4 +293,4 @@ static const struct GroundLink s_gs183_links[] = { /* 0x82342b8 */ /* link 4 */ { { /*x*/ 26, /*y*/ 28, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs183 = { LPARRAY(s_gs183_groups), s_gs183_links }; /* 0x82342e0 */ +const GroundScriptHeader gGroundScript_gs183 = { LPARRAY(s_gs183_groups), s_gs183_links }; /* 0x82342e0 */ diff --git a/src/data/ground/ground_data_d04p01_station.h b/src/data/ground/ground_data_d04p01_station.h index c443d261c..1ca8608ee 100644 --- a/src/data/ground/ground_data_d04p01_station.h +++ b/src/data/ground/ground_data_d04p01_station.h @@ -15,20 +15,20 @@ static const struct ScriptCommand s_gs184_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs184_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs184_g0_s0_station_sref_script }; /* 0x8234360 */ +static const struct ScriptRef s_gs184_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs184_g0_s0_station_sref_script }; /* 0x8234360 */ static const struct ScriptCommand s_gs184_g1_s0_station_sref_script[] = { /* 0x823436c */ DEBUGINFO_O(21), SELECT_MAP(MAP_SINISTER_WOODS_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(15), + BGM_SWITCH(MUS_SINISTER_WOODS), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_SINISTER_WOODS), RET, }; -static const struct ScriptRef s_gs184_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs184_g1_s0_station_sref_script }; /* 0x82343ec */ +static const struct ScriptRef s_gs184_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs184_g1_s0_station_sref_script }; /* 0x82343ec */ static const struct ScriptCommand s_gs184_g1_s0_lives0_dlg0[] = { /* 0x82343f8 */ DEBUGINFO_O(34), @@ -39,7 +39,7 @@ static const struct ScriptCommand s_gs184_g1_s0_lives0_dlg0[] = { /* 0x82343f8 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(20), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -67,7 +67,7 @@ static const struct ScriptCommand s_gs184_g1_s0_lives1_dlg0[] = { /* 0x8234714 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(384, 1), @@ -78,14 +78,14 @@ static const struct ScriptCommand s_gs184_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(78), SELECT_MAP(MAP_SINISTER_WOODS_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(15), + BGM_SWITCH(MUS_SINISTER_WOODS), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_SINISTER_WOODS), RET, }; -static const struct ScriptRef s_gs184_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs184_g2_s0_station_sref_script }; /* 0x8234824 */ +static const struct ScriptRef s_gs184_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs184_g2_s0_station_sref_script }; /* 0x8234824 */ static const struct ScriptCommand s_gs184_g2_s0_lives0_dlg0[] = { /* 0x8234830 */ DEBUGINFO_O(91), @@ -180,4 +180,4 @@ static const struct GroundLink s_gs184_links[] = { /* 0x8234c6c */ /* link 1 */ { { /*x*/ 30, /*y*/ 9, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs184 = { LPARRAY(s_gs184_groups), s_gs184_links }; /* 0x8234c7c */ +const GroundScriptHeader gGroundScript_gs184 = { LPARRAY(s_gs184_groups), s_gs184_links }; /* 0x8234c7c */ diff --git a/src/data/ground/ground_data_d04p02_station.h b/src/data/ground/ground_data_d04p02_station.h index d02b792d9..f9bb2d708 100644 --- a/src/data/ground/ground_data_d04p02_station.h +++ b/src/data/ground/ground_data_d04p02_station.h @@ -17,20 +17,20 @@ static const struct ScriptCommand s_gs185_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs185_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs185_g0_s0_station_sref_script }; /* 0x8234cfc */ +static const struct ScriptRef s_gs185_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs185_g0_s0_station_sref_script }; /* 0x8234cfc */ static const struct ScriptCommand s_gs185_g1_s0_station_sref_script[] = { /* 0x8234d08 */ DEBUGINFO_O(23), SELECT_MAP(185), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs185_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs185_g1_s0_station_sref_script }; /* 0x8234d88 */ +static const struct ScriptRef s_gs185_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs185_g1_s0_station_sref_script }; /* 0x8234d88 */ static const struct ScriptCommand s_gs185_g1_s0_lives0_dlg0[] = { /* 0x8234d94 */ DEBUGINFO_O(36), @@ -51,12 +51,12 @@ static const struct ScriptCommand s_gs185_g1_s0_lives0_dlg0[] = { /* 0x8234d94 * WAIT(10), ALERT_CUE(6), ALERT_CUE(11), - ROTATE(10, 2, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(5), WAIT(60), ALERT_CUE(6), ALERT_CUE(11), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000009), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -72,8 +72,8 @@ static const struct ScriptCommand s_gs185_g1_s0_lives0_dlg0[] = { /* 0x8234d94 * ALERT_CUE(11), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x0002, 0x0000005e, 0x00000000, NULL }, - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 94), + WAIT_FANFARE2(465), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_LEFT, 0x0002, 0x00000000), PORTRAIT_POS(2, 0, -3), @@ -81,7 +81,7 @@ static const struct ScriptCommand s_gs185_g1_s0_lives0_dlg0[] = { /* 0x8234d94 * TEXTBOX_CLEAR, WAIT(16), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(1, _(" You must be {NAME_2}.")), MSG_NPC(1, _(" Let's get you home.\nCaterpie was worried about you.")), @@ -109,14 +109,14 @@ static const struct ScriptCommand s_gs185_g1_s0_lives1_dlg0[] = { /* 0x823531c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(10, 2, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - { 0x93, 0x04, 0x0002, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 0), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x0001, 0x0000005e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 94), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -149,7 +149,7 @@ static const struct ScriptCommand s_gs185_g1_s0_lives3_dlg0[] = { /* 0x823550c * { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, FANFARE_PLAY2(457), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x01c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(457), ALERT_CUE(5), AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -182,11 +182,11 @@ static const struct ScriptCommand s_gs185_g1_s0_lives6_dlg0[] = { /* 0x82356cc * DEBUGINFO_O(182), SELECT_ANIMATION(2), AWAIT_CUE(11), - ROTATE(10, 10, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), - { 0x93, 0x04, 0x000a, 0x0000005e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 94), AWAIT_CUE(11), HALT, }; @@ -195,11 +195,11 @@ static const struct ScriptCommand s_gs185_g1_s0_lives7_dlg0[] = { /* 0x823576c * DEBUGINFO_O(195), SELECT_ANIMATION(2), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), - { 0x93, 0x04, 0x000a, 0x0000005e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 94), AWAIT_CUE(11), HALT, }; @@ -278,4 +278,4 @@ static const struct GroundLink s_gs185_links[] = { /* 0x82359d0 */ /* link 3 */ { { /*x*/ 14, /*y*/ 28, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs185 = { LPARRAY(s_gs185_groups), s_gs185_links }; /* 0x82359f0 */ +const GroundScriptHeader gGroundScript_gs185 = { LPARRAY(s_gs185_groups), s_gs185_links }; /* 0x82359f0 */ diff --git a/src/data/ground/ground_data_d05p01_station.h b/src/data/ground/ground_data_d05p01_station.h index ad3405bfc..c1c5593ff 100644 --- a/src/data/ground/ground_data_d05p01_station.h +++ b/src/data/ground/ground_data_d05p01_station.h @@ -16,13 +16,13 @@ static const struct ScriptCommand s_gs186_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs186_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs186_g0_s0_station_sref_script }; /* 0x8235a70 */ +static const struct ScriptRef s_gs186_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs186_g0_s0_station_sref_script }; /* 0x8235a70 */ static const struct ScriptCommand s_gs186_g1_s0_station_sref_script[] = { /* 0x8235a7c */ DEBUGINFO_O(22), SELECT_MAP(MAP_SILENT_CHASM_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(113), + BGM_SWITCH(MUS_SILENT_CHASM), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -30,7 +30,7 @@ static const struct ScriptCommand s_gs186_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs186_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs186_g1_s0_station_sref_script }; /* 0x8235b0c */ +static const struct ScriptRef s_gs186_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs186_g1_s0_station_sref_script }; /* 0x8235b0c */ static const struct ScriptCommand s_gs186_g1_s0_eff0_script[] = { /* 0x8235b18 */ DEBUGINFO_O(36), @@ -61,7 +61,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * WAIT(15), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" So your friend {NAME_2}\nis somewhere deep in this canyon?")), @@ -89,7 +89,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * AWAIT_CUE(5), MSG_NPC(2, _(" ...Wait!")), TEXTBOX_CLEAR, - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), FANFARE_PLAY2(463), ALERT_CUE(6), AWAIT_CUE(5), @@ -124,7 +124,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), PORTRAIT_REP(0x0002, 0x00000041), MSG_NPC(2, _(" Oh!{WAIT_PRESS}\nWhat's wrong?!")), TEXTBOX_CLEAR, @@ -219,7 +219,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), PORTRAIT_REP(0x0001, 0x00000004), MSG_NPC(1, _(" Huh?")), TEXTBOX_CLEAR, @@ -231,7 +231,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * VARIANT_DEFAULT(_(" Uh, yes...")), VARIANT_DEFAULT(_(" Owowow...{WAIT_PRESS}\nI guess the cramping settled down...")), TEXTBOX_CLEAR, - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), ALERT_CUE(6), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), @@ -242,7 +242,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * LABEL(16), /* = 0x10 */ ALERT_CUE(6), WAIT(20), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(15), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -275,7 +275,7 @@ static const struct ScriptCommand s_gs186_g1_s0_lives0_dlg0[] = { /* 0x8235ba8 * VARIANT_DEFAULT(_(" OK! Gotcha!")), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Let's roll, {NAME_0}!")), VARIANT_DEFAULT(_(" Let's get going,\n{NAME_0}!")), @@ -313,23 +313,23 @@ static const struct ScriptCommand s_gs186_g1_s0_lives1_dlg0[] = { /* 0x8237410 * WAIT(30), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, WAIT(16), - ROTATE(8, 1, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(12), - ROTATE(8, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), WAIT(12), - ROTATE(8, 1, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(12), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), WAIT(8), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x0a, 0x0100, 0x00000003, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), @@ -342,15 +342,15 @@ static const struct ScriptCommand s_gs186_g1_s0_lives1_dlg0[] = { /* 0x8237410 * ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), WAIT(30), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), @@ -369,22 +369,22 @@ static const struct ScriptCommand s_gs186_g1_s0_lives1_dlg0[] = { /* 0x8237410 * CALL_SCRIPT(ANGRY_END_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(6), LABEL(1), /* = 0x01 */ - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(128, 1), @@ -407,11 +407,11 @@ static const struct ScriptCommand s_gs186_g1_s0_lives2_dlg0[] = { /* 0x8237920 * ALERT_CUE(5), AWAIT_CUE(7), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), LABEL(0), /* = 0x00 */ - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), HALT, @@ -457,4 +457,4 @@ static const struct GroundLink s_gs186_links[] = { /* 0x8237b4c */ /* link 2 */ { { /*x*/ 28, /*y*/ 16, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs186 = { LPARRAY(s_gs186_groups), s_gs186_links }; /* 0x8237b64 */ +const GroundScriptHeader gGroundScript_gs186 = { LPARRAY(s_gs186_groups), s_gs186_links }; /* 0x8237b64 */ diff --git a/src/data/ground/ground_data_d05p02_station.h b/src/data/ground/ground_data_d05p02_station.h index afa1cc27a..3366ad198 100644 --- a/src/data/ground/ground_data_d05p02_station.h +++ b/src/data/ground/ground_data_d05p02_station.h @@ -1,7 +1,8 @@ - - - +#define NPC_PARTNER 1 +#define NPC_JUMPLUFF 2 +#define NPC_SHIFTRY 3 +#define NPC_ZAPDOS 6 @@ -13,13 +14,13 @@ static const struct ScriptCommand s_gs187_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs187_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs187_g0_s0_station_sref_script }; /* 0x8237be4 */ +static const struct ScriptRef s_gs187_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs187_g0_s0_station_sref_script }; /* 0x8237be4 */ static const struct ScriptCommand s_gs187_g1_s0_station_sref_script[] = { /* 0x8237bf0 */ DEBUGINFO_O(19), SELECT_MAP(187), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +29,7 @@ static const struct ScriptCommand s_gs187_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs187_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs187_g1_s0_station_sref_script }; /* 0x8237c90 */ +static const struct ScriptRef s_gs187_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs187_g1_s0_station_sref_script }; /* 0x8237c90 */ static const struct ScriptCommand s_gs187_g1_s0_eff0_script[] = { /* 0x8237c9c */ DEBUGINFO_O(34), @@ -49,7 +50,7 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * ALERT_CUE(12), { 0x89, 0x50, 0x0100, 0x00000004, 0x00000000, NULL }, WAIT(32), - PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), + PORTRAIT(PLACEMENT_RIGHT, NPC_PARTNER, 0), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_2}'s friend is\nsupposed to be around here, right?")), VARIANT_DEFAULT(_(" Isn't this the place?\nWhere {NAME_2}'s friend is supposed\nto be?")), @@ -58,61 +59,61 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * WAIT(60), ALERT_CUE(6), AWAIT_CUE(5), - PORTRAIT_REP(0x0001, 0x0000000c), - MSG_NPC(1, _(" Oh, hey!")), + PORTRAIT_REP(NPC_PARTNER, 12), + MSG_NPC(NPC_PARTNER, _(" Oh, hey!")), TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(12), { 0x89, 0x20, 0x0100, 0x00000004, 0x00000000, NULL }, - ROTATE(4, 1, DIRECTION_NORTHEAST), - PORTRAIT_REP(0x0001, 0x00000000), - MSG_NPC(1, _(" We came for you!\nAre you all right?")), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), + PORTRAIT_REP(NPC_PARTNER, 0), + MSG_NPC(NPC_PARTNER, _(" We came for you!\nAre you all right?")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0002, 0x00000041), - MSG_NPC(2, _(" Yes...\nI'm fine, but...")), + PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, NPC_JUMPLUFF, 65), + MSG_NPC(NPC_JUMPLUFF, _(" Yes...\nI'm fine, but...")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT_REP(0x0001, 0x00000001), - MSG_NPC(1, _(" Great!\nYour friend is waiting for you.")), + PORTRAIT_REP(NPC_PARTNER, 1), + MSG_NPC(NPC_PARTNER, _(" Great!\nYour friend is waiting for you.")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" {NAME_3} is in the\nback...")), + MSG_NPC(NPC_JUMPLUFF, _(" {NAME_3} is in the\nback...")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT_REP(0x0001, 0x00000000), - MSG_NPC(1, _(" Huh? {NAME_3}?")), + PORTRAIT_REP(NPC_PARTNER, 0), + MSG_NPC(NPC_PARTNER, _(" Huh? {NAME_3}?")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(5), ALERT_CUE(6), ALERT_CUE(12), WAIT(40), - ROTATE(2, 1, DIRECTION_EAST), + ROTATE_TO(2, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(6), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), - MSG_NPC(1, _(" Let's go!")), + PORTRAIT(PLACEMENT_RIGHT, NPC_PARTNER, 0), + MSG_NPC(NPC_PARTNER, _(" Let's go!")), TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(12), ALERT_CUE(4), { 0x89, 0x3c, 0x01cc, 0x00000004, 0x00000000, NULL }, - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(30), - PORTRAIT_REP(0x0001, 0x0000000c), + PORTRAIT_REP(NPC_PARTNER, 12), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hey! Are you all right?\nGet it together!")), VARIANT_DEFAULT(_(" Listen! Are you OK?\nSnap out of it!")), TEXTBOX_CLEAR, WAIT(30), - PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0003, 0x00000041), - MSG_NPC(3, _(" ...Urrrgh.\nForget about me...")), - MSG_NPC(3, _(" Get away from here!")), + PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, NPC_SHIFTRY, 65), + MSG_NPC(NPC_SHIFTRY, _(" ...Urrrgh.\nForget about me...")), + MSG_NPC(NPC_SHIFTRY, _(" Get away from here!")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(1, _(" Get...{WAIT_PRESS}\nGet away?!")), + MSG_NPC(NPC_PARTNER, _(" Get...{WAIT_PRESS}\nGet away?!")), TEXTBOX_CLEAR, BGM_STOP, FANFARE_PLAY2(502), @@ -127,11 +128,11 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), FANFARE_PLAY2(474), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaoooooh!") }, + MSG_OVERHEARD(_("Gyaoooooh!")), WAIT(90), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(3, _(" It's coming!")), + MSG_NPC(NPC_SHIFTRY, _(" It's coming!")), TEXTBOX_CLEAR, FANFARE_PLAY2(502), { 0x27, 0x01, 0x0005, 0x00000002, 0x00000000, NULL }, @@ -155,7 +156,7 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * FANFARE_PLAY2(517), { 0x28, 0x01, 0x0005, 0x00000010, 0x00ffffff, NULL }, WAIT(32), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaooooh!") }, + MSG_OVERHEARD(_("Gyaooooh!")), WAIT(90), TEXTBOX_CLEAR, ALERT_CUE(8), @@ -166,23 +167,23 @@ static const struct ScriptCommand s_gs187_g1_s0_lives0_dlg0[] = { /* 0x8237d1c * WAIT(8), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(30), - MSG_NPC(1, _(" Shi-{NAME_3}'s gone!")), + MSG_NPC(NPC_PARTNER, _(" Shi-{NAME_3}'s gone!")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(6), ALERT_CUE(12), WAIT(15), - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), MSG_NPC(-1, _(" I am {NAME_6}!\nThe embodiment of lightning!")), - PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0006, 0x00000000), - MSG_NPC(6, _(" If you wish to save\n{NAME_3}, then scale {COLOR YELLOW_D}Mt. Thunder{RESET}!")), + PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, NPC_ZAPDOS, 0), + MSG_NPC(NPC_ZAPDOS, _(" If you wish to save\n{NAME_3}, then scale {COLOR YELLOW_D}Mt. Thunder{RESET}!")), TEXTBOX_CLEAR, ALERT_CUE(11), AWAIT_CUE(5), WAIT(30), - PORTRAIT_REP(0x0001, 0x0000000c), - MSG_NPC(1, _(" {NAME_6}...")), - MSG_NPC(1, _(" So that's the legendary\nmonster...")), + PORTRAIT_REP(NPC_PARTNER, 12), + MSG_NPC(NPC_PARTNER, _(" {NAME_6}...")), + MSG_NPC(NPC_PARTNER, _(" So that's the legendary\nmonster...")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -213,21 +214,21 @@ static const struct ScriptCommand s_gs187_g1_s0_lives1_dlg0[] = { /* 0x82389a8 * ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x20, 0x0100, 0x00000004, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x3c, 0x01cc, 0x00000004, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), FANFARE_PLAY2(466), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), HALT, }; @@ -241,17 +242,17 @@ static const struct ScriptCommand s_gs187_g1_s0_lives2_dlg0[] = { /* 0x8238b68 * AWAIT_CUE(12), { 0x89, 0x20, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), { 0x89, 0x3c, 0x01cc, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(15), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), HALT, }; @@ -265,18 +266,18 @@ static const struct ScriptCommand s_gs187_g1_s0_lives3_dlg0[] = { /* 0x8238cb8 * AWAIT_CUE(12), { 0x89, 0x20, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), { 0x89, 0x3c, 0x01cc, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(12), WAIT(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(15), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), HALT, }; @@ -312,7 +313,7 @@ static const struct ScriptCommand s_gs187_g1_s1_lives0_dlg0[] = { /* 0x8238f38 * AWAIT_CUE(11), { 0x70, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, WAIT(16), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaoooooooh!") }, + MSG_OVERHEARD(_("Gyaoooooooh!")), FANFARE_PLAY2(459), { 0x70, 0x00, 0x0400, 0x00000080, 0x00000000, NULL }, WAIT(90), @@ -375,4 +376,4 @@ static const struct GroundLink s_gs187_links[] = { /* 0x823915c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs187 = { LPARRAY(s_gs187_groups), s_gs187_links }; /* 0x8239164 */ +const GroundScriptHeader gGroundScript_gs187 = { LPARRAY(s_gs187_groups), s_gs187_links }; /* 0x8239164 */ diff --git a/src/data/ground/ground_data_d06p01_station.h b/src/data/ground/ground_data_d06p01_station.h index cd994fcf0..1c6fd663a 100644 --- a/src/data/ground/ground_data_d06p01_station.h +++ b/src/data/ground/ground_data_d06p01_station.h @@ -16,13 +16,13 @@ static const struct ScriptCommand s_gs188_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs188_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs188_g0_s0_station_sref_script }; /* 0x82391e4 */ +static const struct ScriptRef s_gs188_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs188_g0_s0_station_sref_script }; /* 0x82391e4 */ static const struct ScriptCommand s_gs188_g1_s0_station_sref_script[] = { /* 0x82391f0 */ DEBUGINFO_O(22), SELECT_MAP(MAP_MT_THUNDER_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(111), + BGM_SWITCH(MUS_MT_THUNDER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -30,7 +30,7 @@ static const struct ScriptCommand s_gs188_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs188_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs188_g1_s0_station_sref_script }; /* 0x8239280 */ +static const struct ScriptRef s_gs188_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs188_g1_s0_station_sref_script }; /* 0x8239280 */ static const struct ScriptCommand s_gs188_g1_s0_eff0_script[] = { /* 0x823928c */ DEBUGINFO_O(36), @@ -67,7 +67,7 @@ static const struct ScriptCommand s_gs188_g1_s0_lives0_dlg0[] = { /* 0x82392cc * TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" But I can't be spooked\nby this.")), @@ -96,7 +96,7 @@ static const struct ScriptCommand s_gs188_g1_s0_lives1_dlg0[] = { /* 0x8239824 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(256, 1), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(8), CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), @@ -105,7 +105,7 @@ static const struct ScriptCommand s_gs188_g1_s0_lives1_dlg0[] = { /* 0x8239824 * WAIT(30), SELECT_ANIMATION(2), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(256, 2), @@ -116,7 +116,7 @@ static const struct ScriptCommand s_gs188_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(116), SELECT_MAP(MAP_MT_THUNDER_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(111), + BGM_SWITCH(MUS_MT_THUNDER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -124,7 +124,7 @@ static const struct ScriptCommand s_gs188_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs188_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs188_g2_s0_station_sref_script }; /* 0x82399e4 */ +static const struct ScriptRef s_gs188_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs188_g2_s0_station_sref_script }; /* 0x82399e4 */ static const struct ScriptCommand s_gs188_g2_s0_eff0_script[] = { /* 0x82399f0 */ DEBUGINFO_O(130), @@ -142,7 +142,7 @@ static const struct ScriptCommand s_gs188_g2_s0_lives0_dlg0[] = { /* 0x8239a30 * ALERT_CUE(6), WALK_GRID(256, 0), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(20), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -167,7 +167,7 @@ static const struct ScriptCommand s_gs188_g2_s0_lives1_dlg0[] = { /* 0x8239c48 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(256, 1), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(8), ALERT_CUE(5), AWAIT_CUE(6), @@ -233,4 +233,4 @@ static const struct GroundLink s_gs188_links[] = { /* 0x8239e24 */ /* link 2 */ { { /*x*/ 25, /*y*/ 11, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs188 = { LPARRAY(s_gs188_groups), s_gs188_links }; /* 0x8239e3c */ +const GroundScriptHeader gGroundScript_gs188 = { LPARRAY(s_gs188_groups), s_gs188_links }; /* 0x8239e3c */ diff --git a/src/data/ground/ground_data_d06p02_station.h b/src/data/ground/ground_data_d06p02_station.h index 2e34c5005..c2ecd8315 100644 --- a/src/data/ground/ground_data_d06p02_station.h +++ b/src/data/ground/ground_data_d06p02_station.h @@ -17,10 +17,10 @@ static const struct ScriptCommand s_gs189_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(1), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -36,11 +36,11 @@ static const struct ScriptCommand s_gs189_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ - BGM_SWITCH(111), + BGM_SWITCH(MUS_MT_THUNDER), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs189_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs189_g0_s0_station_sref_script }; /* 0x823a06c */ +static const struct ScriptRef s_gs189_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs189_g0_s0_station_sref_script }; /* 0x823a06c */ static const struct ScriptCommand s_gs189_g0_s0_evt0_sref_script[] = { /* 0x823a078 */ DEBUGINFO_O(46), @@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs189_g0_s0_evt0_sref_script[] = { /* 0x823a HALT, }; -static const struct ScriptRef s_gs189_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs189_g0_s0_evt0_sref_script }; /* 0x823a164 */ +static const struct ScriptRef s_gs189_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs189_g0_s0_evt0_sref_script }; /* 0x823a164 */ static const struct ScriptCommand s_gs189_g0_s0_evt1_sref_script[] = { /* 0x823a170 */ DEBUGINFO_O(63), @@ -72,11 +72,11 @@ static const struct ScriptCommand s_gs189_g0_s0_evt1_sref_script[] = { /* 0x823a { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, }; -static const struct ScriptRef s_gs189_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs189_g0_s0_evt1_sref_script }; /* 0x823a270 */ +static const struct ScriptRef s_gs189_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs189_g0_s0_evt1_sref_script }; /* 0x823a270 */ static const struct ScriptCommand s_gs189_g0_s0_obj0_dlg2[] = { /* 0x823a27c */ DEBUGINFO_O(82), @@ -132,14 +132,14 @@ static const struct ScriptCommand s_gs189_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_MT_THUNDER_MID), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(111), + BGM_SWITCH(MUS_MT_THUNDER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs189_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs189_g1_s0_station_sref_script }; /* 0x823a4cc */ +static const struct ScriptRef s_gs189_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs189_g1_s0_station_sref_script }; /* 0x823a4cc */ static const struct ScriptCommand s_gs189_g1_s0_lives0_dlg0[] = { /* 0x823a4d8 */ DEBUGINFO_O(145), @@ -262,4 +262,4 @@ static const struct GroundLink s_gs189_links[] = { /* 0x823a9f8 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs189 = { LPARRAY(s_gs189_groups), s_gs189_links }; /* 0x823aa00 */ +const GroundScriptHeader gGroundScript_gs189 = { LPARRAY(s_gs189_groups), s_gs189_links }; /* 0x823aa00 */ diff --git a/src/data/ground/ground_data_d06p03_station.h b/src/data/ground/ground_data_d06p03_station.h index 5dd186296..c27a9d684 100644 --- a/src/data/ground/ground_data_d06p03_station.h +++ b/src/data/ground/ground_data_d06p03_station.h @@ -20,13 +20,13 @@ static const struct ScriptCommand s_gs190_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs190_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs190_g0_s0_station_sref_script }; /* 0x823aa80 */ +static const struct ScriptRef s_gs190_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs190_g0_s0_station_sref_script }; /* 0x823aa80 */ static const struct ScriptCommand s_gs190_g1_s0_station_sref_script[] = { /* 0x823aa8c */ DEBUGINFO_O(26), SELECT_MAP(190), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -34,7 +34,7 @@ static const struct ScriptCommand s_gs190_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs190_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs190_g1_s0_station_sref_script }; /* 0x823ab1c */ +static const struct ScriptRef s_gs190_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs190_g1_s0_station_sref_script }; /* 0x823ab1c */ static const struct ScriptCommand s_gs190_g1_s0_eff0_script[] = { /* 0x823ab28 */ DEBUGINFO_O(40), @@ -141,7 +141,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives0_dlg0[] = { /* 0x823ac18 * ALERT_CUE(10), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_DIRECT(32, 0), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), WAIT(16), PORTRAIT(PLACEMENT_TOP_LEFT, 0x0004, 0x00000000), MSG_NPC(4, _(" Are you OK?")), @@ -171,7 +171,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives0_dlg0[] = { /* 0x823ac18 * MSG_NPC(4, _(" You're awfully strong for\na plain {POKEMON_0}.")), TEXTBOX_CLEAR, WAIT(32), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), WAIT(32), PORTRAIT(PLACEMENT_LEFT_, 0x0003, 0x00000000), MSG_NPC(3, _(" ......")), @@ -252,7 +252,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives0_dlg0[] = { /* 0x823ac18 * ALERT_CUE(6), ALERT_CUE(13), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}, let's roll!\nWe're going to the {COLOR CYAN}Hill of the Ancients{RESET}!")), VARIANT(/* == */ 1, _(" There's no time to lose!\nWe'd better go back quick!")), @@ -285,7 +285,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives0_dlg0[] = { /* 0x823ac18 * ALERT_CUE(13), FANFARE_PLAY2(464), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Don't just stand around.\nLet's go back.")), VARIANT_DEFAULT(_(" Don't just stand there.\nLet's go home.")), @@ -357,7 +357,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives1_dlg0[] = { /* 0x823c670 * AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_DIRECT(32, 1), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(6), CALL_SCRIPT(JUMP_HAPPY_FUNC), CALL_SCRIPT(SMILE_START_FUNC), @@ -365,7 +365,7 @@ static const struct ScriptCommand s_gs190_g1_s0_lives1_dlg0[] = { /* 0x823c670 * CALL_SCRIPT(SMILE_END_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -374,16 +374,16 @@ static const struct ScriptCommand s_gs190_g1_s0_lives1_dlg0[] = { /* 0x823c670 * CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(128, 6), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), { 0x89, 0x90, 0x0080, 0x00000000, 0x00000000, NULL }, @@ -399,19 +399,19 @@ static const struct ScriptCommand s_gs190_g1_s0_lives2_dlg0[] = { /* 0x823c940 * AWAIT_CUE(13), CALL_SCRIPT(JUMP_SURPRISE_FUNC), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(13), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(13), { 0x89, 0x60, 0x0080, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(13), { 0x89, 0x90, 0x0080, 0x00000000, 0x00000000, NULL }, END_DELETE, @@ -426,19 +426,19 @@ static const struct ScriptCommand s_gs190_g1_s0_lives3_dlg0[] = { /* 0x823cac0 * AWAIT_CUE(13), CALL_SCRIPT(JUMP_SURPRISE_FUNC), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(13), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(13), { 0x89, 0x60, 0x0080, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(13), { 0x89, 0x90, 0x0080, 0x00000000, 0x00000000, NULL }, END_DELETE, @@ -467,10 +467,10 @@ static const struct ScriptCommand s_gs190_g1_s0_lives4_dlg0[] = { /* 0x823cc40 * FANFARE_STOP2(491), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), SELECT_ANIMATION(5), WAIT(32), SELECT_ANIMATION(5), @@ -499,17 +499,17 @@ static const struct ScriptCommand s_gs190_g1_s0_lives5_dlg0[] = { /* 0x823ce70 * AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_DIRECT(32, 2), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), HALT, @@ -532,22 +532,22 @@ static const struct ScriptCommand s_gs190_g1_s0_lives6_dlg0[] = { /* 0x823d050 * AWAIT_CUE(9), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x84, 0x00, 0x0180, 0x00000022, -0x0000001a, NULL }, - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(9), WALK_DIRECT(32, 3), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), HALT, @@ -573,14 +573,14 @@ static const struct ScriptCommand s_gs190_g1_s0_lives7_dlg0[] = { /* 0x823d280 * AWAIT_CUE(10), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_DIRECT(32, 4), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(10), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(10), HALT, @@ -604,12 +604,12 @@ static const struct ScriptCommand s_gs190_g1_s1_lives0_dlg0[] = { /* 0x823d4c0 * AWAIT_CUE(11), SELECT_ANIMATION(2), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(11), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(11), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -686,4 +686,4 @@ static const struct GroundLink s_gs190_links[] = { /* 0x823d790 */ /* link 6 */ { { /*x*/ 32, /*y*/ 21, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs190 = { LPARRAY(s_gs190_groups), s_gs190_links }; /* 0x823d7c8 */ +const GroundScriptHeader gGroundScript_gs190 = { LPARRAY(s_gs190_groups), s_gs190_links }; /* 0x823d7c8 */ diff --git a/src/data/ground/ground_data_d07p01_station.h b/src/data/ground/ground_data_d07p01_station.h index d95a1cb48..bdc78939e 100644 --- a/src/data/ground/ground_data_d07p01_station.h +++ b/src/data/ground/ground_data_d07p01_station.h @@ -18,20 +18,20 @@ static const struct ScriptCommand s_gs191_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs191_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs191_g0_s0_station_sref_script }; /* 0x823d848 */ +static const struct ScriptRef s_gs191_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs191_g0_s0_station_sref_script }; /* 0x823d848 */ static const struct ScriptCommand s_gs191_g1_s0_station_sref_script[] = { /* 0x823d854 */ DEBUGINFO_O(24), SELECT_MAP(MAP_GREAT_CANYON_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(20), + BGM_SWITCH(MUS_GREAT_CANYON), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(0, SCRIPT_DUNGEON_GREAT_CANYON), RET, }; -static const struct ScriptRef s_gs191_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs191_g1_s0_station_sref_script }; /* 0x823d8d4 */ +static const struct ScriptRef s_gs191_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs191_g1_s0_station_sref_script }; /* 0x823d8d4 */ static const struct ScriptCommand s_gs191_g1_s0_lives0_dlg0[] = { /* 0x823d8e0 */ DEBUGINFO_O(37), @@ -51,7 +51,7 @@ static const struct ScriptCommand s_gs191_g1_s0_lives0_dlg0[] = { /* 0x823d8e0 * MSG_NPC(1, _(" The peak is called the\n{COLOR CYAN}Hill of the Ancients{RESET}.")), ALERT_CUE(6), WAIT(10), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), { 0x2d, 0x0a, 0x0000, 0x00000009, 0x00000000, NULL }, MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_2} said that\nthe {COLOR CYAN}Hill of the Ancients{RESET} is on {VALUE_0}F.")), @@ -81,7 +81,7 @@ static const struct ScriptCommand s_gs191_g1_s0_lives1_dlg0[] = { /* 0x823dc10 * WAIT(20), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), WALK_GRID(128, 3), HALT, @@ -91,14 +91,14 @@ static const struct ScriptCommand s_gs191_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(91), SELECT_MAP(MAP_GREAT_CANYON_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(20), + BGM_SWITCH(MUS_GREAT_CANYON), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(0, SCRIPT_DUNGEON_GREAT_CANYON), RET, }; -static const struct ScriptRef s_gs191_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs191_g2_s0_station_sref_script }; /* 0x823dda0 */ +static const struct ScriptRef s_gs191_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs191_g2_s0_station_sref_script }; /* 0x823dda0 */ static const struct ScriptCommand s_gs191_g2_s0_lives0_dlg0[] = { /* 0x823ddac */ DEBUGINFO_O(104), @@ -110,7 +110,7 @@ static const struct ScriptCommand s_gs191_g2_s0_lives0_dlg0[] = { /* 0x823ddac * WAIT(30), WALK_GRID(256, 1), WAIT(30), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!\nThis time we'll make it to the peak,\nall right?")), @@ -135,7 +135,7 @@ static const struct ScriptCommand s_gs191_g2_s0_lives1_dlg0[] = { /* 0x823e038 * WAIT(30), WALK_GRID(256, 0), WAIT(30), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), WALK_GRID(204, 4), WALK_GRID(204, 3), @@ -200,4 +200,4 @@ static const struct GroundLink s_gs191_links[] = { /* 0x823e20c */ /* link 4 */ { { /*x*/ 30, /*y*/ 11, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs191 = { LPARRAY(s_gs191_groups), s_gs191_links }; /* 0x823e234 */ +const GroundScriptHeader gGroundScript_gs191 = { LPARRAY(s_gs191_groups), s_gs191_links }; /* 0x823e234 */ diff --git a/src/data/ground/ground_data_d07p02_station.h b/src/data/ground/ground_data_d07p02_station.h index 0de659ba2..450e54de8 100644 --- a/src/data/ground/ground_data_d07p02_station.h +++ b/src/data/ground/ground_data_d07p02_station.h @@ -27,13 +27,13 @@ static const struct ScriptCommand s_gs192_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs192_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs192_g0_s0_station_sref_script }; /* 0x823e2b4 */ +static const struct ScriptRef s_gs192_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs192_g0_s0_station_sref_script }; /* 0x823e2b4 */ static const struct ScriptCommand s_gs192_g1_s0_station_sref_script[] = { /* 0x823e2c0 */ DEBUGINFO_O(33), SELECT_MAP(192), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -42,7 +42,7 @@ static const struct ScriptCommand s_gs192_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs192_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs192_g1_s0_station_sref_script }; /* 0x823e360 */ +static const struct ScriptRef s_gs192_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs192_g1_s0_station_sref_script }; /* 0x823e360 */ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c */ DEBUGINFO_O(48), @@ -70,7 +70,7 @@ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c * TEXTBOX_CLEAR, WAIT(60), ALERT_CUE(7), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _(" {COLOR YELLOW}{RESET}Kwaaaaah!") }, + MSG_OVERHEARD(_(" {COLOR YELLOW}{RESET}Kwaaaaah!")), WAIT(30), ALERT_CUE(7), TEXTBOX_CLEAR, @@ -87,7 +87,7 @@ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c * WAIT(10), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), - { 0xe2, 0x00, 0x01d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(470), ALERT_CUE(7), AWAIT_CUE(5), FANFARE_PLAY2(465), @@ -103,7 +103,7 @@ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c * MSG_NPC(2, _(" To the northwest, there lies\na large island.")), ALERT_CUE(7), WAIT(20), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), MSG_NPC(2, _(" An island known as the\n“Three Fields.”")), MSG_NPC(2, _(" There is one such field.\nThe {COLOR YELLOW_D}Fiery Field{RESET}!")), @@ -111,7 +111,7 @@ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c * TEXTBOX_CLEAR, WAIT(20), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_NPC(2, _(" Go.\nYou must go to the {COLOR YELLOW_D}Fiery Field{RESET}.")), MSG_NPC(2, _(" The answers you seek...\nPerhaps they await you there.")), TEXTBOX_CLEAR, @@ -119,7 +119,7 @@ static const struct ScriptCommand s_gs192_g1_s0_lives0_dlg0[] = { /* 0x823e36c * BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Fiery Field{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -132,25 +132,25 @@ static const struct ScriptCommand s_gs192_g1_s0_lives1_dlg0[] = { /* 0x823ec7c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(7), FANFARE_PLAY2(474), SELECT_ANIMATION(9), AWAIT_CUE(7), SELECT_ANIMATION(2), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), HALT, }; @@ -158,7 +158,7 @@ static const struct ScriptCommand s_gs192_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(158), SELECT_MAP(192), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -166,7 +166,7 @@ static const struct ScriptCommand s_gs192_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs192_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs192_g2_s0_station_sref_script }; /* 0x823ee8c */ +static const struct ScriptRef s_gs192_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs192_g2_s0_station_sref_script }; /* 0x823ee8c */ static const struct ScriptCommand s_gs192_g2_s0_eff0_script[] = { /* 0x823ee98 */ DEBUGINFO_O(172), @@ -191,7 +191,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Yes! We finally made it to\nthe top, {NAME_0}!")), @@ -199,7 +199,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, ALERT_CUE(6), WAIT(10), - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" So this is the {COLOR CYAN}Hill of\nthe Ancients{RESET}...")), @@ -214,7 +214,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * ALERT_CUE(4), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(10), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" {NAME_0}!{WAIT_PRESS}\nIs that {NAME_2} over there?")), @@ -224,7 +224,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * ALERT_CUE(9), ALERT_CUE(4), WALK_DIRECT(60, 2), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(20), MSG_NPC(1, _(" Excuse me?{WAIT_PRESS}\nAre you maybe {NAME_2}?")), TEXTBOX_CLEAR, @@ -250,7 +250,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * WAIT(40), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), MSG_NPC(1, _(" Hellooooooooooooooo?!")), TEXTBOX_CLEAR, WAIT(10), @@ -259,9 +259,9 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * WAIT(60), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), MSG_NPC(1, _(" It's useless.\nHe's not responding at all.")), MSG_NPC(1, _(" Maybe he's sleeping while\non his feet?")), { 0x2e, 0x15, 0x0001, -0x00000002, 0x00000000, NULL }, @@ -279,7 +279,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * VARIANT_DEFAULT(_(" Huh? Tickle him?{WAIT_PRESS}\n...OK. It's worth a try.")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(6), AWAIT_CUE(5), WAIT(20), @@ -326,7 +326,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000005), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" It's useless, {NAME_0}.\nI'm not getting any response.")), @@ -338,7 +338,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000004), MSG_NPC(1, _(" Huh?")), TEXTBOX_CLEAR, @@ -366,7 +366,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * BGM_STOP, ALERT_CUE(7), WAIT(10), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Kwaaaaaaaaah!") }, + MSG_OVERHEARD(_("Kwaaaaaaaaah!")), WAIT(30), ALERT_CUE(7), TEXTBOX_CLEAR, @@ -414,7 +414,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * BGM_FADEOUT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(5, 2, DIRECTION_NORTHEAST), + ROTATE_TO(5, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), WAIT(30), TEXTBOX_AUTO_PRESS(45, 60), @@ -427,14 +427,14 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_AUTO_PRESS(-1, -1), ALERT_CUE(7), WAIT(10), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Kwaaaaaaaaah!") }, + MSG_OVERHEARD(_("Kwaaaaaaaaah!")), WAIT(30), ALERT_CUE(7), TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(9), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - { 0x8b, 0x0a, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 10), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x0000000c), MSG_NPC(1, _(" Yikes!")), TEXTBOX_CLEAR, @@ -499,7 +499,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" This is my friend\n{NAME_0}...")), VARIANT(/* == */ 1, _(" My friend woke up one\nmorning as a Pokémon.")), @@ -509,7 +509,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * VARIANT_DEFAULT(_(" And, without any memory as\na human.")), WAIT(30), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_2}, you can tell,\ncan't you?{WAIT_PRESS}\nCan't you tell us?")), @@ -520,7 +520,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives0_dlg0[] = { /* 0x823ef68 * MSG_NPC(2, _(" The calamities of nature.\nThere have been many in recent times.")), MSG_NPC(2, _(" They occur because the\nworld's balance is upset.")), ALERT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), MSG_NPC(2, _(" And your becoming a\nPokémon...")), MSG_NPC(2, _(" They are tied together.\nInseparably so.")), TEXTBOX_CLEAR, @@ -604,9 +604,9 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WALK_RELATIVE(128, 0, -16), CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), @@ -615,13 +615,13 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(6), WALK_DIRECT(60, 1), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), WALK_DIRECT(40, 5), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(469), @@ -631,11 +631,11 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * WALK_DIRECT(40, 6), WAIT(15), FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(60), WALK_DIRECT(40, 7), WAIT(30), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), @@ -643,19 +643,19 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * WALK_DIRECT(40, 8), WAIT(30), FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(60), WALK_DIRECT(40, 9), ALERT_CUE(5), WALK_RELATIVE(256, 32, 3), WAIT(15), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), AWAIT_CUE(6), WALK_DIRECT(40, 6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(469), @@ -700,9 +700,9 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * WAIT(60), WALK_RELATIVE(256, 0, 18), ALERT_CUE(5), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), @@ -714,9 +714,9 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(15, 1, DIRECTION_NORTHWEST), + ROTATE_TO(15, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(60), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), FANFARE_PLAY2(457), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -726,7 +726,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * ALERT_CUE(5), AWAIT_CUE(6), WALK_DIRECT(40, 5), - { 0x8b, 0x0a, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 10), ALERT_CUE(5), WAIT(100), SELECT_ANIMATION(41), @@ -736,7 +736,7 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), WALK_RELATIVE(256, 24, 2), - { 0x8b, 0x0a, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 10), LABEL(1), /* = 0x01 */ AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), @@ -744,23 +744,23 @@ static const struct ScriptCommand s_gs192_g2_s0_lives1_dlg0[] = { /* 0x8241890 * CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), WALK_DIRECT(20, 5), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), - { 0xe2, 0x00, 0x01c9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(457), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(473), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01d9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(473), ALERT_CUE(5), HALT, }; @@ -839,22 +839,22 @@ static const struct ScriptCommand s_gs192_g2_s0_lives4_dlg0[] = { /* 0x8242520 * AWAIT_CUE(7), SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(10, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(7), SELECT_ANIMATION(24), WAIT(60), @@ -873,7 +873,7 @@ static const struct ScriptCommand s_gs192_g2_s1_lives0_dlg0[] = { /* 0x8242850 * CAMERA_END_PAN, ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), @@ -971,4 +971,4 @@ static const struct GroundLink s_gs192_links[] = { /* 0x8242b34 */ /* link 13 */ { { /*x*/ 20, /*y*/ 57, /*flags*/ CPOS_HALFTILE, 0 }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs192 = { LPARRAY(s_gs192_groups), s_gs192_links }; /* 0x8242ba4 */ +const GroundScriptHeader gGroundScript_gs192 = { LPARRAY(s_gs192_groups), s_gs192_links }; /* 0x8242ba4 */ diff --git a/src/data/ground/ground_data_d08p01_station.h b/src/data/ground/ground_data_d08p01_station.h index a1cd5c454..6c74d9262 100644 --- a/src/data/ground/ground_data_d08p01_station.h +++ b/src/data/ground/ground_data_d08p01_station.h @@ -1,18 +1,8 @@ - - - - - - - - - - static const struct ScriptCommand s_gs193_g0_s0_station_sref_script[] = { /* 0x8242bb8 */ DEBUGINFO_O(13), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), - EXECUTE_STATION(12, 0, 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 0, 0), LABEL(0), /* = 0x00 */ SELECT_MAP(MAP_LAPIS_CAVE_ENTRY), CJUMP_SCENARIO_0(SCENARIO_MAIN), @@ -22,13 +12,13 @@ static const struct ScriptCommand s_gs193_g0_s0_station_sref_script[] = { /* 0x8 CALL_STATION( 3, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 12, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 11, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_LOST, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_11, /* to label */ 6), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -47,11 +37,11 @@ static const struct ScriptCommand s_gs193_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 2), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(102), + BGM_SWITCH(MUS_LAPIS_CAVE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs193_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs193_g0_s0_station_sref_script }; /* 0x8242e54 */ +static const struct ScriptRef s_gs193_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs193_g0_s0_station_sref_script }; /* 0x8242e54 */ static const struct ScriptCommand s_gs193_g0_s0_obj0_dlg2[] = { /* 0x8242e60 */ DEBUGINFO_O(57), @@ -126,7 +116,7 @@ static const struct ScriptCommand s_gs193_g1_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(126), SELECT_MAP(MAP_LAPIS_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -134,7 +124,7 @@ static const struct ScriptCommand s_gs193_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs193_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs193_g1_s0_station_sref_script }; /* 0x8243130 */ +static const struct ScriptRef s_gs193_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs193_g1_s0_station_sref_script }; /* 0x8243130 */ static const struct ScriptCommand s_gs193_g1_s0_lives0_dlg0[] = { /* 0x824313c */ DEBUGINFO_O(140), @@ -148,7 +138,7 @@ static const struct ScriptCommand s_gs193_g1_s0_lives0_dlg0[] = { /* 0x824313c * MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Whew!\nWe sure came a long way out.")), VARIANT_DEFAULT(_(" Whew.\nWe've sure traveled a long way.")), - BGM_SWITCH(102), + BGM_SWITCH(MUS_LAPIS_CAVE), ALERT_CUE(6), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), @@ -177,7 +167,7 @@ static const struct ScriptCommand s_gs193_g1_s0_lives0_dlg0[] = { /* 0x824313c * PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" Huh? I hear voices...")), TEXTBOX_CLEAR, - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(20), MSG_NPC(-1, _(" I think they went this way.")), MSG_NPC(-1, _(" They can't get away.\nNot from all of us.")), @@ -211,13 +201,13 @@ static const struct ScriptCommand s_gs193_g1_s0_lives1_dlg0[] = { /* 0x824389c * AWAIT_CUE(6), WALK_GRID(256, 1), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(2, 1, DIRECTION_NORTHWEST), - ROTATE(2, 2, DIRECTION_SOUTHWEST), - ROTATE(2, 1, DIRECTION_NORTHWEST), - ROTATE(2, 2, DIRECTION_WEST), + ROTATE_TO(2, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), + ROTATE_TO(2, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), + ROTATE_TO(2, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), + ROTATE_TO(2, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), @@ -235,7 +225,7 @@ static const struct ScriptCommand s_gs193_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(235), SELECT_MAP(MAP_LAPIS_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(102), + BGM_SWITCH(MUS_LAPIS_CAVE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -243,7 +233,7 @@ static const struct ScriptCommand s_gs193_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs193_g2_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs193_g2_s0_station_sref_script }; /* 0x8243aac */ +static const struct ScriptRef s_gs193_g2_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs193_g2_s0_station_sref_script }; /* 0x8243aac */ static const struct ScriptCommand s_gs193_g2_s0_lives0_dlg0[] = { /* 0x8243ab8 */ DEBUGINFO_O(249), @@ -287,7 +277,7 @@ static const struct ScriptCommand s_gs193_g2_s0_lives1_dlg0[] = { /* 0x8243e64 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -299,7 +289,7 @@ static const struct ScriptCommand s_gs193_g3_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs193_g3_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs193_g3_s0_station_sref_script }; /* 0x8243f64 */ +static const struct ScriptRef s_gs193_g3_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs193_g3_s0_station_sref_script }; /* 0x8243f64 */ static const struct ScriptCommand s_gs193_g3_s0_lives0_dlg1[] = { /* 0x8243f70 */ DEBUGINFO_O(305), @@ -320,7 +310,7 @@ static const struct ScriptCommand s_gs193_g3_s0_evt0_sref_script[] = { /* 0x8243 HALT, }; -static const struct ScriptRef s_gs193_g3_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs193_g3_s0_evt0_sref_script }; /* 0x8244010 */ +static const struct ScriptRef s_gs193_g3_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs193_g3_s0_evt0_sref_script }; /* 0x8244010 */ static const struct ScriptCommand s_gs193_g3_s1_station_sref_script[] = { /* 0x824401c */ DEBUGINFO_O(326), @@ -330,14 +320,14 @@ static const struct ScriptCommand s_gs193_g3_s1_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs193_g3_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs193_g3_s1_station_sref_script }; /* 0x824406c */ +static const struct ScriptRef s_gs193_g3_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs193_g3_s1_station_sref_script }; /* 0x824406c */ static const struct ScriptCommand s_gs193_g3_s1_lives0_dlg0[] = { /* 0x8244078 */ DEBUGINFO_O(336), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x8e, 0x01, 0x0000, 0x00000022, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 34), ASK3_VAR(FALSE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), VARIANT(/* == */ 1, _(" Hey, {NAME_0}.\nAre you all ready?")), VARIANT_DEFAULT(_(" Hi, {NAME_0}.\nAre you ready?")), @@ -416,18 +406,18 @@ static const struct ScriptCommand s_gs193_g3_s1_lives1_dlg0[] = { /* 0x8244648 * SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), CJUMP_UNK_C8(0), COND_EQUAL(0, /* to label */ 0), COND_EQUAL(1, /* to label */ 0), COND_EQUAL(7, /* to label */ 0), COND_EQUAL(6, /* to label */ 0), - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), WALK_GRID(256, 2), HALT, LABEL(0), /* = 0x00 */ - ROTATE(4, 11, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHEAST), WALK_GRID(256, 2), HALT, }; @@ -436,7 +426,7 @@ static const struct ScriptCommand s_gs193_g4_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(436), SELECT_MAP(MAP_LAPIS_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(102), + BGM_SWITCH(MUS_LAPIS_CAVE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -444,7 +434,7 @@ static const struct ScriptCommand s_gs193_g4_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs193_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs193_g4_s0_station_sref_script }; /* 0x82447f8 */ +static const struct ScriptRef s_gs193_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs193_g4_s0_station_sref_script }; /* 0x82447f8 */ static const struct ScriptCommand s_gs193_g4_s0_lives0_dlg0[] = { /* 0x8244804 */ DEBUGINFO_O(450), @@ -489,11 +479,11 @@ static const struct ScriptCommand s_gs193_g4_s0_lives1_dlg0[] = { /* 0x8244bb4 * { 0x89, 0x30, 0x0100, 0x00000007, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -503,7 +493,7 @@ static const struct ScriptCommand s_gs193_g5_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(503), SELECT_MAP(MAP_LAPIS_CAVE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(102), + BGM_SWITCH(MUS_LAPIS_CAVE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -511,7 +501,7 @@ static const struct ScriptCommand s_gs193_g5_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs193_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs193_g5_s0_station_sref_script }; /* 0x8244d24 */ +static const struct ScriptRef s_gs193_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs193_g5_s0_station_sref_script }; /* 0x8244d24 */ static const struct ScriptCommand s_gs193_g5_s0_lives0_dlg0[] = { /* 0x8244d30 */ DEBUGINFO_O(517), @@ -552,7 +542,7 @@ static const struct ScriptCommand s_gs193_g5_s0_lives1_dlg0[] = { /* 0x8244f58 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -745,4 +735,4 @@ static const struct GroundLink s_gs193_links[] = { /* 0x82454e8 */ /* link 2 */ { { /*x*/ 34, /*y*/ 17, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs193 = { LPARRAY(s_gs193_groups), s_gs193_links }; /* 0x8245500 */ +const GroundScriptHeader gGroundScript_gs193 = { LPARRAY(s_gs193_groups), s_gs193_links }; /* 0x8245500 */ diff --git a/src/data/ground/ground_data_d08p02_station.h b/src/data/ground/ground_data_d08p02_station.h index d35c2efa3..c1d699696 100644 --- a/src/data/ground/ground_data_d08p02_station.h +++ b/src/data/ground/ground_data_d08p02_station.h @@ -15,13 +15,13 @@ static const struct ScriptCommand s_gs194_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs194_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs194_g0_s0_station_sref_script }; /* 0x8245580 */ +static const struct ScriptRef s_gs194_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs194_g0_s0_station_sref_script }; /* 0x8245580 */ static const struct ScriptCommand s_gs194_g1_s0_station_sref_script[] = { /* 0x824558c */ DEBUGINFO_O(21), SELECT_MAP(194), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -36,7 +36,7 @@ static const struct ScriptCommand s_gs194_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs194_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs194_g1_s0_station_sref_script }; /* 0x8245728 */ +static const struct ScriptRef s_gs194_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs194_g1_s0_station_sref_script }; /* 0x8245728 */ @@ -48,12 +48,12 @@ static const struct ScriptCommand s_gs194_g1_s0_lives0_dlg0[] = { /* 0x8245734 * ALERT_CUE(6), WAIT(15), WALK_GRID(153, 0), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(45), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Whew...\nWe finally got through that cave.")), @@ -71,7 +71,7 @@ static const struct ScriptCommand s_gs194_g1_s0_lives0_dlg0[] = { /* 0x8245734 * MSG_NPC(-1, _(" Catch {NAME_0}!")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" Whoa! Here they come!\nRun!")), TEXTBOX_CLEAR, @@ -92,10 +92,10 @@ static const struct ScriptCommand s_gs194_g1_s0_lives1_dlg0[] = { /* 0x8245ab0 * AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(153, 1), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), @@ -103,7 +103,7 @@ static const struct ScriptCommand s_gs194_g1_s0_lives1_dlg0[] = { /* 0x8245ab0 * AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(6), { 0x89, 0x50, 0x0200, 0x00000002, 0x00000000, NULL }, HALT, @@ -145,4 +145,4 @@ static const struct GroundLink s_gs194_links[] = { /* 0x8245ca4 */ /* link 1 */ { { /*x*/ 19, /*y*/ 24, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs194 = { LPARRAY(s_gs194_groups), s_gs194_links }; /* 0x8245cb4 */ +const GroundScriptHeader gGroundScript_gs194 = { LPARRAY(s_gs194_groups), s_gs194_links }; /* 0x8245cb4 */ diff --git a/src/data/ground/ground_data_d09p01_station.h b/src/data/ground/ground_data_d09p01_station.h index 62e19e1bf..611aadfa7 100644 --- a/src/data/ground/ground_data_d09p01_station.h +++ b/src/data/ground/ground_data_d09p01_station.h @@ -1,26 +1,8 @@ - - - - - - - - - - - - - - - - - - static const struct ScriptCommand s_gs195_g0_s0_station_sref_script[] = { /* 0x8245cc8 */ DEBUGINFO_O(21), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), - EXECUTE_STATION(12, 0, 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 0, 0), LABEL(0), /* = 0x00 */ SELECT_MAP(195), CJUMP_SCENARIO_0(SCENARIO_MAIN), @@ -32,13 +14,13 @@ static const struct ScriptCommand s_gs195_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(2, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 12, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 11, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_LOST, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_11, /* to label */ 6), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -57,11 +39,11 @@ static const struct ScriptCommand s_gs195_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 2), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs195_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs195_g0_s0_station_sref_script }; /* 0x8245f84 */ +static const struct ScriptRef s_gs195_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs195_g0_s0_station_sref_script }; /* 0x8245f84 */ static const struct ScriptCommand s_gs195_g0_s0_obj0_dlg2[] = { /* 0x8245f90 */ DEBUGINFO_O(67), @@ -151,9 +133,9 @@ static const struct ScriptCommand s_gs195_g1_s0_station_sref_script[] = { /* 0x8 TEXTBOX_CLEAR, WAIT(15), FANFARE_PLAY2(503), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Tromp, tromp, tromp, tromp, tromp!") }, + MSG_OVERHEARD(_("Tromp, tromp, tromp, tromp, tromp!")), WAIT(120), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("........................") }, + MSG_OVERHEARD(_("........................")), WAIT(120), TEXTBOX_CLEAR, WAIT(60), @@ -161,7 +143,7 @@ static const struct ScriptCommand s_gs195_g1_s0_station_sref_script[] = { /* 0x8 MSG_NPC(1, _(" ........................")), MSG_NPC(1, _(" ...I think...{WAIT_PRESS}\nThey're gone.")), TEXTBOX_CLEAR, - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), { 0x3b, 0x3a, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -170,7 +152,7 @@ static const struct ScriptCommand s_gs195_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs195_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs195_g1_s0_station_sref_script }; /* 0x82464f8 */ +static const struct ScriptRef s_gs195_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs195_g1_s0_station_sref_script }; /* 0x82464f8 */ @@ -199,7 +181,7 @@ static const struct ScriptCommand s_gs195_g1_s0_lives0_dlg0[] = { /* 0x8246544 * WALK_GRID(256, 2), WAIT(10), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(20), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -208,19 +190,19 @@ static const struct ScriptCommand s_gs195_g1_s0_lives0_dlg0[] = { /* 0x8246544 * TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" But...{WAIT_PRESS}\nThere's no point hiding out here.")), VARIANT_DEFAULT(_(" But...{WAIT_PRESS}\nThere isn't any point hiding here.")), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), MSG_NPC(1, _(" We have to get over this\nmountain to get away.")), TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), WAIT(10), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}, we need to\nroll as soon as we're ready.")), VARIANT_DEFAULT(_(" Let's go as soon as we're\nready, {NAME_0}.")), @@ -244,13 +226,13 @@ static const struct ScriptCommand s_gs195_g1_s0_lives1_dlg0[] = { /* 0x824696c * WALK_GRID(256, 5), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -262,7 +244,7 @@ static const struct ScriptCommand s_gs195_g2_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs195_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs195_g2_s0_station_sref_script }; /* 0x8246afc */ +static const struct ScriptRef s_gs195_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs195_g2_s0_station_sref_script }; /* 0x8246afc */ static const struct ScriptCommand s_gs195_g2_s0_lives0_dlg2[] = { /* 0x8246b08 */ DEBUGINFO_O(268), @@ -276,7 +258,7 @@ static const struct ScriptCommand s_gs195_g2_s0_evt0_sref_script[] = { /* 0x8246 HALT, }; -static const struct ScriptRef s_gs195_g2_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs195_g2_s0_evt0_sref_script }; /* 0x8246b68 */ +static const struct ScriptRef s_gs195_g2_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs195_g2_s0_evt0_sref_script }; /* 0x8246b68 */ static const struct ScriptCommand s_gs195_g2_s1_station_sref_script[] = { /* 0x8246b74 */ DEBUGINFO_O(282), @@ -286,14 +268,14 @@ static const struct ScriptCommand s_gs195_g2_s1_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs195_g2_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs195_g2_s1_station_sref_script }; /* 0x8246bc4 */ +static const struct ScriptRef s_gs195_g2_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs195_g2_s1_station_sref_script }; /* 0x8246bc4 */ static const struct ScriptCommand s_gs195_g2_s1_lives0_dlg0[] = { /* 0x8246bd0 */ DEBUGINFO_O(292), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x8e, 0x01, 0x0000, 0x00000022, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 34), ASK3_VAR( TRUE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), VARIANT(/* == */ 1, _(" {NAME_0}, are you ready\nto roll?")), VARIANT_DEFAULT(_(" {NAME_0}, are you\nready?")), @@ -381,7 +363,7 @@ static const struct ScriptCommand s_gs195_g2_s1_lives1_dlg0[] = { /* 0x8247300 * SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), CJUMP_UNK_C8(0), COND_EQUAL(0, /* to label */ 0), @@ -393,7 +375,7 @@ static const struct ScriptCommand s_gs195_g2_s1_lives1_dlg0[] = { /* 0x8247300 * { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, LABEL(0), /* = 0x00 */ - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(153, 6), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -405,14 +387,14 @@ static const struct ScriptCommand s_gs195_g3_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(195), SELECT_WEATHER(13), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs195_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs195_g3_s0_station_sref_script }; /* 0x82474e0 */ +static const struct ScriptRef s_gs195_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs195_g3_s0_station_sref_script }; /* 0x82474e0 */ static const struct ScriptCommand s_gs195_g3_s0_lives0_dlg0[] = { /* 0x82474ec */ DEBUGINFO_O(418), @@ -432,7 +414,7 @@ static const struct ScriptCommand s_gs195_g3_s0_lives0_dlg0[] = { /* 0x82474ec * FANFARE_PLAY2(463), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), PORTRAIT(PLACEMENT_RIGHT_FLIP, 0x0001, 0x0000000c), MSG_NPC(1, _(" Ssh!{WAIT_PRESS}\nSomeone's coming.")), TEXTBOX_CLEAR, @@ -454,9 +436,9 @@ static const struct ScriptCommand s_gs195_g3_s0_lives0_dlg0[] = { /* 0x82474ec * TEXTBOX_CLEAR, WAIT(15), FANFARE_PLAY2(503), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Tromp, tromp, tromp, tromp, tromp!") }, + MSG_OVERHEARD(_("Tromp, tromp, tromp, tromp, tromp!")), WAIT(120), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("........................") }, + MSG_OVERHEARD(_("........................")), WAIT(120), TEXTBOX_CLEAR, WAIT(30), @@ -470,12 +452,12 @@ static const struct ScriptCommand s_gs195_g3_s0_lives0_dlg0[] = { /* 0x82474ec * WALK_GRID(256, 2), WAIT(10), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), WAIT(20), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(1, _(" ...Whew.")), ALERT_CUE(6), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" We'll have to get over this\nmountain to get away from them.")), @@ -499,7 +481,7 @@ static const struct ScriptCommand s_gs195_g3_s0_lives1_dlg0[] = { /* 0x8247b14 * ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), CAMERA_PAN(512, 9), @@ -508,9 +490,9 @@ static const struct ScriptCommand s_gs195_g3_s0_lives1_dlg0[] = { /* 0x8247b14 * WALK_GRID(512, 9), WALK_GRID(256, 5), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(6), HALT, }; @@ -520,14 +502,14 @@ static const struct ScriptCommand s_gs195_g4_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(195), SELECT_WEATHER(13), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs195_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs195_g4_s0_station_sref_script }; /* 0x8247d24 */ +static const struct ScriptRef s_gs195_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs195_g4_s0_station_sref_script }; /* 0x8247d24 */ static const struct ScriptCommand s_gs195_g4_s0_lives0_dlg0[] = { /* 0x8247d30 */ DEBUGINFO_O(533), @@ -570,11 +552,11 @@ static const struct ScriptCommand s_gs195_g4_s0_lives1_dlg0[] = { /* 0x82480b4 * { 0x89, 0x40, 0x0080, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -585,14 +567,14 @@ static const struct ScriptCommand s_gs195_g5_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(195), SELECT_WEATHER(13), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs195_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs195_g5_s0_station_sref_script }; /* 0x8248224 */ +static const struct ScriptRef s_gs195_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs195_g5_s0_station_sref_script }; /* 0x8248224 */ static const struct ScriptCommand s_gs195_g5_s0_lives0_dlg0[] = { /* 0x8248230 */ DEBUGINFO_O(598), @@ -633,7 +615,7 @@ static const struct ScriptCommand s_gs195_g5_s0_lives1_dlg0[] = { /* 0x8248458 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -833,4 +815,4 @@ static const struct GroundLink s_gs195_links[] = { /* 0x82489e8 */ /* link 10 */ { { /*x*/ 4, /*y*/ 36, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs195 = { LPARRAY(s_gs195_groups), s_gs195_links }; /* 0x8248a40 */ +const GroundScriptHeader gGroundScript_gs195 = { LPARRAY(s_gs195_groups), s_gs195_links }; /* 0x8248a40 */ diff --git a/src/data/ground/ground_data_d09p02_station.h b/src/data/ground/ground_data_d09p02_station.h index 90f562784..c08285caa 100644 --- a/src/data/ground/ground_data_d09p02_station.h +++ b/src/data/ground/ground_data_d09p02_station.h @@ -22,10 +22,10 @@ static const struct ScriptCommand s_gs196_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -41,11 +41,11 @@ static const struct ScriptCommand s_gs196_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs196_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs196_g0_s0_station_sref_script }; /* 0x8248cc0 */ +static const struct ScriptRef s_gs196_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs196_g0_s0_station_sref_script }; /* 0x8248cc0 */ static const struct ScriptCommand s_gs196_g0_s0_evt0_sref_script[] = { /* 0x8248ccc */ DEBUGINFO_O(51), @@ -62,11 +62,11 @@ static const struct ScriptCommand s_gs196_g0_s0_evt0_sref_script[] = { /* 0x8248 HALT, }; -static const struct ScriptRef s_gs196_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs196_g0_s0_evt0_sref_script }; /* 0x8248da8 */ +static const struct ScriptRef s_gs196_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs196_g0_s0_evt0_sref_script }; /* 0x8248da8 */ static const struct ScriptCommand s_gs196_g0_s0_evt1_sref_script[] = { /* 0x8248db4 */ DEBUGINFO_O(68), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the rescue team base?")), CHOICE(/* label */ 1, _("Yes.")), CHOICE(/* label */ 2, _("*No.")), @@ -78,7 +78,7 @@ static const struct ScriptCommand s_gs196_g0_s0_evt1_sref_script[] = { /* 0x8248 { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, LABEL(0), /* = 0x00 */ ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the entrance?")), @@ -92,7 +92,7 @@ static const struct ScriptCommand s_gs196_g0_s0_evt1_sref_script[] = { /* 0x8248 HALT, }; -static const struct ScriptRef s_gs196_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs196_g0_s0_evt1_sref_script }; /* 0x8248f7c */ +static const struct ScriptRef s_gs196_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs196_g0_s0_evt1_sref_script }; /* 0x8248f7c */ static const struct ScriptCommand s_gs196_g0_s0_obj0_dlg2[] = { /* 0x8248f88 */ DEBUGINFO_O(98), @@ -148,14 +148,14 @@ static const struct ScriptCommand s_gs196_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_MT_BLAZE_MID), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(25), + BGM_SWITCH(MUS_MT_BLAZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs196_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs196_g1_s0_station_sref_script }; /* 0x82491d8 */ +static const struct ScriptRef s_gs196_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs196_g1_s0_station_sref_script }; /* 0x82491d8 */ static const struct ScriptCommand s_gs196_g1_s0_lives0_dlg0[] = { /* 0x82491e4 */ DEBUGINFO_O(161), @@ -190,7 +190,7 @@ static const struct ScriptCommand s_gs196_g1_s0_lives1_dlg0[] = { /* 0x8249404 * WAIT(15), CALL_SCRIPT(WAKEUP_FUNC), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -278,4 +278,4 @@ static const struct GroundLink s_gs196_links[] = { /* 0x82496e0 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs196 = { LPARRAY(s_gs196_groups), s_gs196_links }; /* 0x82496e8 */ +const GroundScriptHeader gGroundScript_gs196 = { LPARRAY(s_gs196_groups), s_gs196_links }; /* 0x82496e8 */ diff --git a/src/data/ground/ground_data_d09p03_station.h b/src/data/ground/ground_data_d09p03_station.h index 5e9334322..932072c44 100644 --- a/src/data/ground/ground_data_d09p03_station.h +++ b/src/data/ground/ground_data_d09p03_station.h @@ -14,20 +14,20 @@ static const struct ScriptCommand s_gs197_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs197_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs197_g0_s0_station_sref_script }; /* 0x8249768 */ +static const struct ScriptRef s_gs197_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs197_g0_s0_station_sref_script }; /* 0x8249768 */ static const struct ScriptCommand s_gs197_g1_s0_station_sref_script[] = { /* 0x8249774 */ DEBUGINFO_O(20), SELECT_MAP(MAP_MT_BLAZE_END), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs197_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs197_g1_s0_station_sref_script }; /* 0x82497f4 */ +static const struct ScriptRef s_gs197_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs197_g1_s0_station_sref_script }; /* 0x82497f4 */ static const struct ScriptCommand s_gs197_g1_s0_eff0_script[] = { /* 0x8249800 */ DEBUGINFO_O(33), @@ -115,7 +115,7 @@ static const struct ScriptCommand s_gs197_g1_s0_lives0_dlg0[] = { /* 0x82498b0 * TEXTBOX_CLEAR, WAIT(15), ALERT_CUE(7), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaaah!")), WAIT(10), ALERT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -170,7 +170,7 @@ static const struct ScriptCommand s_gs197_g1_s0_lives0_dlg0[] = { /* 0x82498b0 * VARIANT_DEFAULT(_(" ...Of course, that's not\npossible right now, but...")), TEXTBOX_CLEAR, ALERT_CUE(7), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaah!")), WAIT(10), ALERT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -213,7 +213,7 @@ static const struct ScriptCommand s_gs197_g1_s0_lives0_dlg0[] = { /* 0x82498b0 * WAIT(15), ALERT_CUE(7), FANFARE_PLAY2(474), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaaaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaaaaaaah!")), WAIT(10), ALERT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -234,14 +234,14 @@ static const struct ScriptCommand s_gs197_g1_s0_lives0_dlg0[] = { /* 0x82498b0 * CALL_SCRIPT(SWEAT_FUNC), WAIT(15), PORTRAIT_REP(0x0001, 0x00000002), - { 0x34, 0x00, 0x0001, 0x00000000, 0x00000000, _(" Oh...\n(Does it need to do that?)") }, + MSG_NPC(1, _(" Oh...\n(Does it need to do that?)")), TEXTBOX_CLEAR, WAIT(30), MSG_NPC(2, _(" Farewell!")), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaaaaah!")), FANFARE_PLAY2(459), ALERT_CUE(7), ALERT_CUE(4), @@ -254,7 +254,7 @@ static const struct ScriptCommand s_gs197_g1_s0_lives0_dlg0[] = { /* 0x82498b0 * FANFARE_PLAY2(470), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), PORTRAIT_REP(0x0001, 0x00000002), MSG_VAR(2, PARTNER_TALK_KIND, 1), MSG_NPC(1, _(" Whew...")), @@ -330,7 +330,7 @@ static const struct ScriptCommand s_gs197_g1_s0_lives1_dlg0[] = { /* 0x824b53c * AWAIT_CUE(6), CALL_SCRIPT(SWEAT_FUNC), WAIT(30), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -448,4 +448,4 @@ static const struct GroundLink s_gs197_links[] = { /* 0x824bbe0 */ /* link 0 */ { { /*x*/ 21, /*y*/ 26, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs197 = { LPARRAY(s_gs197_groups), s_gs197_links }; /* 0x824bbe8 */ +const GroundScriptHeader gGroundScript_gs197 = { LPARRAY(s_gs197_groups), s_gs197_links }; /* 0x824bbe8 */ diff --git a/src/data/ground/ground_data_d10p01_station.h b/src/data/ground/ground_data_d10p01_station.h index 85d7d6299..9432a4064 100644 --- a/src/data/ground/ground_data_d10p01_station.h +++ b/src/data/ground/ground_data_d10p01_station.h @@ -1,16 +1,8 @@ - - - - - - - - static const struct ScriptCommand s_gs198_g0_s0_station_sref_script[] = { /* 0x824bbfc */ DEBUGINFO_O(11), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), - EXECUTE_STATION(12, 0, 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 0, 0), LABEL(0), /* = 0x00 */ SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), CJUMP_SCENARIO_0(SCENARIO_MAIN), @@ -22,13 +14,13 @@ static const struct ScriptCommand s_gs198_g0_s0_station_sref_script[] = { /* 0x8 CALL_STATION( 2, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 12, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 11, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_LOST, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_11, /* to label */ 6), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -47,11 +39,11 @@ static const struct ScriptCommand s_gs198_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 2), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs198_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs198_g0_s0_station_sref_script }; /* 0x824beb8 */ +static const struct ScriptRef s_gs198_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs198_g0_s0_station_sref_script }; /* 0x824beb8 */ static const struct ScriptCommand s_gs198_g0_s0_obj0_dlg2[] = { /* 0x824bec4 */ DEBUGINFO_O(57), @@ -134,14 +126,14 @@ static const struct ScriptCommand s_gs198_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs198_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs198_g1_s0_station_sref_script }; /* 0x824c204 */ +static const struct ScriptRef s_gs198_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs198_g1_s0_station_sref_script }; /* 0x824c204 */ static const struct ScriptCommand s_gs198_g1_s0_eff0_script[] = { /* 0x824c210 */ DEBUGINFO_O(147), @@ -176,7 +168,7 @@ static const struct ScriptCommand s_gs198_g1_s0_lives0_dlg0[] = { /* 0x824c290 * VARIANT_DEFAULT(_(" But hiding out in this area\nisn't the answer either...")), VARIANT_DEFAULT(_(" We can only go forward.{WAIT_PRESS}\nWe'll just have to keep our spirits up\nand keep going, {NAME_0}!")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(10), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -189,7 +181,7 @@ static const struct ScriptCommand s_gs198_g1_s0_lives1_dlg0[] = { /* 0x824c670 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), HALT, }; @@ -199,7 +191,7 @@ static const struct ScriptCommand s_gs198_g2_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs198_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs198_g2_s0_station_sref_script }; /* 0x824c700 */ +static const struct ScriptRef s_gs198_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs198_g2_s0_station_sref_script }; /* 0x824c700 */ static const struct ScriptCommand s_gs198_g2_s0_lives0_dlg2[] = { /* 0x824c70c */ DEBUGINFO_O(205), @@ -213,7 +205,7 @@ static const struct ScriptCommand s_gs198_g2_s0_evt0_sref_script[] = { /* 0x824c HALT, }; -static const struct ScriptRef s_gs198_g2_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs198_g2_s0_evt0_sref_script }; /* 0x824c76c */ +static const struct ScriptRef s_gs198_g2_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs198_g2_s0_evt0_sref_script }; /* 0x824c76c */ static const struct ScriptCommand s_gs198_g2_s1_station_sref_script[] = { /* 0x824c778 */ DEBUGINFO_O(219), @@ -223,14 +215,14 @@ static const struct ScriptCommand s_gs198_g2_s1_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs198_g2_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs198_g2_s1_station_sref_script }; /* 0x824c7c8 */ +static const struct ScriptRef s_gs198_g2_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs198_g2_s1_station_sref_script }; /* 0x824c7c8 */ static const struct ScriptCommand s_gs198_g2_s1_lives0_dlg0[] = { /* 0x824c7d4 */ DEBUGINFO_O(229), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x8e, 0x01, 0x0000, 0x00000022, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 34), ASK3_VAR( TRUE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), VARIANT(/* == */ 1, _(" {NAME_0}, are you ready\nto roll?")), VARIANT_DEFAULT(_(" {NAME_0}, are you\nready?")), @@ -316,7 +308,7 @@ static const struct ScriptCommand s_gs198_g2_s1_lives1_dlg0[] = { /* 0x824cea4 * SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), CJUMP_UNK_C8(0), COND_EQUAL(0, /* to label */ 0), @@ -343,14 +335,14 @@ static const struct ScriptCommand s_gs198_g3_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs198_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs198_g3_s0_station_sref_script }; /* 0x824d0b4 */ +static const struct ScriptRef s_gs198_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs198_g3_s0_station_sref_script }; /* 0x824d0b4 */ static const struct ScriptCommand s_gs198_g3_s0_lives0_dlg0[] = { /* 0x824d0c0 */ DEBUGINFO_O(356), @@ -391,7 +383,7 @@ static const struct ScriptCommand s_gs198_g3_s0_lives1_dlg0[] = { /* 0x824d364 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(6), HALT, }; @@ -405,14 +397,14 @@ static const struct ScriptCommand s_gs198_g4_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs198_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs198_g4_s0_station_sref_script }; /* 0x824d4f4 */ +static const struct ScriptRef s_gs198_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs198_g4_s0_station_sref_script }; /* 0x824d4f4 */ static const struct ScriptCommand s_gs198_g4_s0_lives0_dlg0[] = { /* 0x824d500 */ DEBUGINFO_O(418), @@ -421,7 +413,7 @@ static const struct ScriptCommand s_gs198_g4_s0_lives0_dlg0[] = { /* 0x824d500 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(WAKEUP_FUNC), SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(30), { 0x2d, 0x09, 0x0002, 0x00000066, 0x00000000, NULL }, PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000002), @@ -450,7 +442,7 @@ static const struct ScriptCommand s_gs198_g4_s0_lives1_dlg0[] = { /* 0x824d834 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(WAKEUP_FUNC), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), HALT, }; @@ -463,14 +455,14 @@ static const struct ScriptCommand s_gs198_g5_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs198_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs198_g5_s0_station_sref_script }; /* 0x824d974 */ +static const struct ScriptRef s_gs198_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs198_g5_s0_station_sref_script }; /* 0x824d974 */ static const struct ScriptCommand s_gs198_g5_s0_lives0_dlg0[] = { /* 0x824d980 */ DEBUGINFO_O(476), @@ -513,11 +505,11 @@ static const struct ScriptCommand s_gs198_g5_s0_lives1_dlg0[] = { /* 0x824dd18 * { 0x89, 0x20, 0x0080, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -532,14 +524,14 @@ static const struct ScriptCommand s_gs198_g6_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs198_g6_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs198_g6_s0_station_sref_script }; /* 0x824dec8 */ +static const struct ScriptRef s_gs198_g6_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs198_g6_s0_station_sref_script }; /* 0x824dec8 */ static const struct ScriptCommand s_gs198_g6_s0_lives0_dlg0[] = { /* 0x824ded4 */ DEBUGINFO_O(545), @@ -550,7 +542,7 @@ static const struct ScriptCommand s_gs198_g6_s0_lives0_dlg0[] = { /* 0x824ded4 * CALL_SCRIPT(WAKEUP_FUNC), CALL_SCRIPT(LOOK_AROUND_RIGHT_FUNC), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000002), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Urrggh...{WAIT_PRESS}\nWe couldn't get through...")), @@ -579,7 +571,7 @@ static const struct ScriptCommand s_gs198_g6_s0_lives1_dlg0[] = { /* 0x824e0f8 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -788,4 +780,4 @@ static const struct GroundLink s_gs198_links[] = { /* 0x824e6f8 */ /* link 0 */ { { /*x*/ 17, /*y*/ 27, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs198 = { LPARRAY(s_gs198_groups), s_gs198_links }; /* 0x824e700 */ +const GroundScriptHeader gGroundScript_gs198 = { LPARRAY(s_gs198_groups), s_gs198_links }; /* 0x824e700 */ diff --git a/src/data/ground/ground_data_d10p02_station.h b/src/data/ground/ground_data_d10p02_station.h index 098b76900..ff7fc7159 100644 --- a/src/data/ground/ground_data_d10p02_station.h +++ b/src/data/ground/ground_data_d10p02_station.h @@ -22,10 +22,10 @@ static const struct ScriptCommand s_gs199_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -41,11 +41,11 @@ static const struct ScriptCommand s_gs199_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ - BGM_SWITCH(104), + BGM_SWITCH(MUS_FROSTY_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs199_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs199_g0_s0_station_sref_script }; /* 0x824e980 */ +static const struct ScriptRef s_gs199_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs199_g0_s0_station_sref_script }; /* 0x824e980 */ static const struct ScriptCommand s_gs199_g0_s0_evt0_sref_script[] = { /* 0x824e98c */ DEBUGINFO_O(51), @@ -62,11 +62,11 @@ static const struct ScriptCommand s_gs199_g0_s0_evt0_sref_script[] = { /* 0x824e HALT, }; -static const struct ScriptRef s_gs199_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs199_g0_s0_evt0_sref_script }; /* 0x824ea68 */ +static const struct ScriptRef s_gs199_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs199_g0_s0_evt0_sref_script }; /* 0x824ea68 */ static const struct ScriptCommand s_gs199_g0_s0_evt1_sref_script[] = { /* 0x824ea74 */ DEBUGINFO_O(68), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the rescue team base?")), CHOICE(/* label */ 1, _("Yes.")), CHOICE(/* label */ 2, _("*No.")), @@ -78,7 +78,7 @@ static const struct ScriptCommand s_gs199_g0_s0_evt1_sref_script[] = { /* 0x824e { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, LABEL(0), /* = 0x00 */ ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the entrance?")), @@ -92,7 +92,7 @@ static const struct ScriptCommand s_gs199_g0_s0_evt1_sref_script[] = { /* 0x824e HALT, }; -static const struct ScriptRef s_gs199_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs199_g0_s0_evt1_sref_script }; /* 0x824ec3c */ +static const struct ScriptRef s_gs199_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs199_g0_s0_evt1_sref_script }; /* 0x824ec3c */ static const struct ScriptCommand s_gs199_g0_s0_obj0_dlg2[] = { /* 0x824ec48 */ DEBUGINFO_O(98), @@ -148,14 +148,14 @@ static const struct ScriptCommand s_gs199_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_MID), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(104), + BGM_SWITCH(MUS_FROSTY_FOREST), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs199_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs199_g1_s0_station_sref_script }; /* 0x824ee98 */ +static const struct ScriptRef s_gs199_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs199_g1_s0_station_sref_script }; /* 0x824ee98 */ static const struct ScriptCommand s_gs199_g1_s0_lives0_dlg0[] = { /* 0x824eea4 */ DEBUGINFO_O(161), @@ -173,7 +173,7 @@ static const struct ScriptCommand s_gs199_g1_s0_lives0_dlg0[] = { /* 0x824eea4 * VARIANT_DEFAULT(_(" Hmm...{WAIT_PRESS}\nThat didn't work out...")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" This is a tough place...")), @@ -201,7 +201,7 @@ static const struct ScriptCommand s_gs199_g1_s0_lives1_dlg0[] = { /* 0x824f190 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -216,14 +216,14 @@ static const struct ScriptCommand s_gs199_g2_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_FROSTY_FOREST_MID), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(104), + BGM_SWITCH(MUS_FROSTY_FOREST), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs199_g2_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs199_g2_s0_station_sref_script }; /* 0x824f330 */ +static const struct ScriptRef s_gs199_g2_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs199_g2_s0_station_sref_script }; /* 0x824f330 */ static const struct ScriptCommand s_gs199_g2_s0_lives0_dlg0[] = { /* 0x824f33c */ DEBUGINFO_O(229), @@ -241,7 +241,7 @@ static const struct ScriptCommand s_gs199_g2_s0_lives0_dlg0[] = { /* 0x824f33c * VARIANT_DEFAULT(_(" Hmm...{WAIT_PRESS}\nWe didn't do well at all...")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" That {NAME_2}...\nHe's one tough customer.")), @@ -269,7 +269,7 @@ static const struct ScriptCommand s_gs199_g2_s0_lives1_dlg0[] = { /* 0x824f6ac * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -375,4 +375,4 @@ static const struct GroundLink s_gs199_links[] = { /* 0x824fa08 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs199 = { LPARRAY(s_gs199_groups), s_gs199_links }; /* 0x824fa10 */ +const GroundScriptHeader gGroundScript_gs199 = { LPARRAY(s_gs199_groups), s_gs199_links }; /* 0x824fa10 */ diff --git a/src/data/ground/ground_data_d10p03_station.h b/src/data/ground/ground_data_d10p03_station.h index 8565f34e4..f35f4aeb3 100644 --- a/src/data/ground/ground_data_d10p03_station.h +++ b/src/data/ground/ground_data_d10p03_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs200_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs200_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs200_g0_s0_station_sref_script }; /* 0x824fa90 */ +static const struct ScriptRef s_gs200_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs200_g0_s0_station_sref_script }; /* 0x824fa90 */ static const struct ScriptCommand s_gs200_g1_s0_station_sref_script[] = { /* 0x824fa9c */ DEBUGINFO_O(19), SELECT_MAP(MAP_FROSTY_FOREST_END), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -40,7 +40,7 @@ static const struct ScriptCommand s_gs200_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs200_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs200_g1_s0_station_sref_script }; /* 0x824fca8 */ +static const struct ScriptRef s_gs200_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs200_g1_s0_station_sref_script }; /* 0x824fca8 */ static const struct ScriptCommand s_gs200_g1_s0_lives0_dlg0[] = { /* 0x824fcb4 */ @@ -233,7 +233,7 @@ static const struct ScriptCommand s_gs200_g1_s0_lives0_dlg0[] = { /* 0x824fcb4 * MSG_NPC(1, _(" Thank you.{WAIT_PRESS}\nYou saved us.")), TEXTBOX_CLEAR, ALERT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0003, 0x00000000), MSG_NPC(3, _(" ..................")), @@ -284,7 +284,7 @@ static const struct ScriptCommand s_gs200_g1_s0_lives0_dlg0[] = { /* 0x824fcb4 * BGM_STOP, FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_3} joined the team!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, { 0x3b, 0x1a, 0x0000, 0x00000000, 0x00000000, NULL }, ASK1(FALSE, /*default*/ -1, /* speaker */ -1, _("Give a nickname to {NAME_3}?")), @@ -347,7 +347,7 @@ static const struct ScriptCommand s_gs200_g1_s0_lives1_dlg0[] = { /* 0x825174c * ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -431,18 +431,18 @@ static const struct ScriptCommand s_gs200_g1_s1_lives0_dlg0[] = { /* 0x8251cac * SELECT_ANIMATION(23), WAIT(32), SELECT_ANIMATION(2), - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(8), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(8), HALT, @@ -493,4 +493,4 @@ static const struct GroundLink s_gs200_links[] = { /* 0x8251f28 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs200 = { LPARRAY(s_gs200_groups), s_gs200_links }; /* 0x8251f30 */ +const GroundScriptHeader gGroundScript_gs200 = { LPARRAY(s_gs200_groups), s_gs200_links }; /* 0x8251f30 */ diff --git a/src/data/ground/ground_data_d11p01_station.h b/src/data/ground/ground_data_d11p01_station.h index 656765528..699ecea63 100644 --- a/src/data/ground/ground_data_d11p01_station.h +++ b/src/data/ground/ground_data_d11p01_station.h @@ -1,17 +1,8 @@ - - - - - - - - - static const struct ScriptCommand s_gs201_g0_s0_station_sref_script[] = { /* 0x8251f44 */ DEBUGINFO_O(12), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), - EXECUTE_STATION(12, 0, 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 0, 0), LABEL(0), /* = 0x00 */ SELECT_MAP(MAP_MT_FREEZE_ENTRY), CJUMP_SCENARIO_0(SCENARIO_MAIN), @@ -24,13 +15,13 @@ static const struct ScriptCommand s_gs201_g0_s0_station_sref_script[] = { /* 0x8 CALL_STATION( 2, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 12, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 11, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_LOST, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_11, /* to label */ 6), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +40,11 @@ static const struct ScriptCommand s_gs201_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 2), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs201_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs201_g0_s0_station_sref_script }; /* 0x8252210 */ +static const struct ScriptRef s_gs201_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs201_g0_s0_station_sref_script }; /* 0x8252210 */ static const struct ScriptCommand s_gs201_g0_s0_obj0_dlg2[] = { /* 0x825221c */ DEBUGINFO_O(59), @@ -134,14 +125,14 @@ static const struct ScriptCommand s_gs201_g1_s0_station_sref_script[] = { /* 0x8 { 0x3b, 0x1c, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_MT_FREEZE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs201_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs201_g1_s0_station_sref_script }; /* 0x825253c */ +static const struct ScriptRef s_gs201_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs201_g1_s0_station_sref_script }; /* 0x825253c */ static const struct ScriptCommand s_gs201_g1_s0_lives0_dlg0[] = { /* 0x8252548 */ DEBUGINFO_O(147), @@ -270,20 +261,20 @@ static const struct ScriptCommand s_gs201_g1_s0_lives1_dlg0[] = { /* 0x825366c * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -295,7 +286,7 @@ static const struct ScriptCommand s_gs201_g2_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs201_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs201_g2_s0_station_sref_script }; /* 0x825383c */ +static const struct ScriptRef s_gs201_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs201_g2_s0_station_sref_script }; /* 0x825383c */ static const struct ScriptCommand s_gs201_g2_s0_lives0_dlg2[] = { /* 0x8253848 */ DEBUGINFO_O(301), @@ -309,7 +300,7 @@ static const struct ScriptCommand s_gs201_g2_s0_evt0_sref_script[] = { /* 0x8253 HALT, }; -static const struct ScriptRef s_gs201_g2_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs201_g2_s0_evt0_sref_script }; /* 0x82538a8 */ +static const struct ScriptRef s_gs201_g2_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs201_g2_s0_evt0_sref_script }; /* 0x82538a8 */ static const struct ScriptCommand s_gs201_g2_s1_station_sref_script[] = { /* 0x82538b4 */ DEBUGINFO_O(315), @@ -319,14 +310,14 @@ static const struct ScriptCommand s_gs201_g2_s1_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs201_g2_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs201_g2_s1_station_sref_script }; /* 0x8253904 */ +static const struct ScriptRef s_gs201_g2_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs201_g2_s1_station_sref_script }; /* 0x8253904 */ static const struct ScriptCommand s_gs201_g2_s1_lives0_dlg0[] = { /* 0x8253910 */ DEBUGINFO_O(325), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x8e, 0x01, 0x0000, 0x00000022, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 34), ASK3_VAR( TRUE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), VARIANT(/* == */ 1, _(" Hey, {NAME_0}.\nAre you all ready?")), VARIANT_DEFAULT(_(" Hi, {NAME_0}.\nAre you ready?")), @@ -411,7 +402,7 @@ static const struct ScriptCommand s_gs201_g2_s1_lives1_dlg0[] = { /* 0x8253f50 * SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), CJUMP_UNK_C8(0), COND_EQUAL(0, /* to label */ 0), @@ -442,14 +433,14 @@ static const struct ScriptCommand s_gs201_g3_s0_station_sref_script[] = { /* 0x8 { 0x3b, 0x1c, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_MT_FREEZE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs201_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs201_g3_s0_station_sref_script }; /* 0x82541a0 */ +static const struct ScriptRef s_gs201_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs201_g3_s0_station_sref_script }; /* 0x82541a0 */ static const struct ScriptCommand s_gs201_g3_s0_lives0_dlg0[] = { /* 0x82541ac */ DEBUGINFO_O(455), @@ -489,7 +480,7 @@ static const struct ScriptCommand s_gs201_g3_s0_lives1_dlg0[] = { /* 0x8254430 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -505,14 +496,14 @@ static const struct ScriptCommand s_gs201_g4_s0_station_sref_script[] = { /* 0x8 { 0x3b, 0x1c, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_MT_FREEZE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs201_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs201_g4_s0_station_sref_script }; /* 0x82545e0 */ +static const struct ScriptRef s_gs201_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs201_g4_s0_station_sref_script }; /* 0x82545e0 */ static const struct ScriptCommand s_gs201_g4_s0_lives0_dlg0[] = { /* 0x82545ec */ DEBUGINFO_O(518), @@ -559,7 +550,7 @@ static const struct ScriptCommand s_gs201_g4_s0_lives1_dlg0[] = { /* 0x825492c * AWAIT_CUE(6), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x0002, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -575,14 +566,14 @@ static const struct ScriptCommand s_gs201_g5_s0_station_sref_script[] = { /* 0x8 { 0x3b, 0x1c, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_MAP(MAP_MT_FREEZE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(36), + BGM_SWITCH(MUS_ESCAPE_THROUGH_THE_SNOW), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 2, 0), RET, }; -static const struct ScriptRef s_gs201_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs201_g5_s0_station_sref_script }; /* 0x8254aec */ +static const struct ScriptRef s_gs201_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs201_g5_s0_station_sref_script }; /* 0x8254aec */ static const struct ScriptCommand s_gs201_g5_s0_lives0_dlg0[] = { /* 0x8254af8 */ DEBUGINFO_O(588), @@ -621,7 +612,7 @@ static const struct ScriptCommand s_gs201_g5_s0_lives1_dlg0[] = { /* 0x8254d64 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -631,13 +622,13 @@ static const struct ScriptCommand s_gs201_g6_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(631), SELECT_MAP(MAP_MT_FREEZE_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(115), + BGM_SWITCH(MUS_MT_FREEZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs201_g6_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs201_g6_s0_station_sref_script }; /* 0x8254ea4 */ +static const struct ScriptRef s_gs201_g6_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs201_g6_s0_station_sref_script }; /* 0x8254ea4 */ static const struct ScriptCommand s_gs201_g6_s0_eff0_script[] = { /* 0x8254eb0 */ DEBUGINFO_O(643), @@ -658,7 +649,7 @@ static const struct ScriptCommand s_gs201_g6_s0_lives0_dlg0[] = { /* 0x8254f30 * ALERT_CUE(7), { 0x89, 0x40, 0x0080, 0x00000003, 0x00000000, NULL }, AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), MSG_NPC(2, _(" You're going to {COLOR YELLOW_D}Mt. Freeze{RESET}?")), MSG_NPC(2, _(" Don't forget to take me,\nkekeh!")), TEXTBOX_CLEAR, @@ -676,7 +667,7 @@ static const struct ScriptCommand s_gs201_g6_s0_lives1_dlg0[] = { /* 0x825508c * { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, SELECT_ANIMATION(2), CAMERA_PAN(256, 1), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(7), WAIT(15), @@ -889,4 +880,4 @@ static const struct GroundLink s_gs201_links[] = { /* 0x825567c */ /* link 1 */ { { /*x*/ 23, /*y*/ 25, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs201 = { LPARRAY(s_gs201_groups), s_gs201_links }; /* 0x825568c */ +const GroundScriptHeader gGroundScript_gs201 = { LPARRAY(s_gs201_groups), s_gs201_links }; /* 0x825568c */ diff --git a/src/data/ground/ground_data_d11p02_station.h b/src/data/ground/ground_data_d11p02_station.h index 294c20726..9e753068e 100644 --- a/src/data/ground/ground_data_d11p02_station.h +++ b/src/data/ground/ground_data_d11p02_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs202_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), JUMP_LABEL(3), LABEL(5), /* = 0x05 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs202_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ - BGM_SWITCH(115), + BGM_SWITCH(MUS_MT_FREEZE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs202_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs202_g0_s0_station_sref_script }; /* 0x825592c */ +static const struct ScriptRef s_gs202_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs202_g0_s0_station_sref_script }; /* 0x825592c */ static const struct ScriptCommand s_gs202_g0_s0_evt0_sref_script[] = { /* 0x8255938 */ DEBUGINFO_O(53), @@ -69,11 +69,11 @@ static const struct ScriptCommand s_gs202_g0_s0_evt0_sref_script[] = { /* 0x8255 HALT, }; -static const struct ScriptRef s_gs202_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs202_g0_s0_evt0_sref_script }; /* 0x8255a64 */ +static const struct ScriptRef s_gs202_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs202_g0_s0_evt0_sref_script }; /* 0x8255a64 */ static const struct ScriptCommand s_gs202_g0_s0_evt1_sref_script[] = { /* 0x8255a70 */ DEBUGINFO_O(75), - JUMPIF_SCENARIOCHECK(5, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK5, /* to label */ 0), ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the rescue team base?")), CHOICE(/* label */ 1, _("Yes.")), CHOICE(/* label */ 2, _("*No.")), @@ -85,7 +85,7 @@ static const struct ScriptCommand s_gs202_g0_s0_evt1_sref_script[] = { /* 0x8255 { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, LABEL(0), /* = 0x00 */ ASK1(FALSE, /*default*/ 0, /* speaker */ -1, _("Return to the entrance?")), @@ -99,7 +99,7 @@ static const struct ScriptCommand s_gs202_g0_s0_evt1_sref_script[] = { /* 0x8255 HALT, }; -static const struct ScriptRef s_gs202_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs202_g0_s0_evt1_sref_script }; /* 0x8255c38 */ +static const struct ScriptRef s_gs202_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs202_g0_s0_evt1_sref_script }; /* 0x8255c38 */ static const struct ScriptCommand s_gs202_g0_s0_obj0_dlg2[] = { /* 0x8255c44 */ DEBUGINFO_O(105), @@ -161,14 +161,14 @@ static const struct ScriptCommand s_gs202_g1_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(MAP_MT_FREEZE_MID), CALL_STATION( 2, 0), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(115), + BGM_SWITCH(MUS_MT_FREEZE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs202_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs202_g1_s0_station_sref_script }; /* 0x8255ef4 */ +static const struct ScriptRef s_gs202_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs202_g1_s0_station_sref_script }; /* 0x8255ef4 */ static const struct ScriptCommand s_gs202_g1_s0_lives0_dlg0[] = { /* 0x8255f00 */ DEBUGINFO_O(174), @@ -211,7 +211,7 @@ static const struct ScriptCommand s_gs202_g1_s0_lives1_dlg0[] = { /* 0x82561ac * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -224,7 +224,7 @@ static const struct ScriptCommand s_gs202_g2_s0_station_sref_script[] = { /* 0x8 RET_DIRECT, }; -static const struct ScriptRef s_gs202_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs202_g2_s0_station_sref_script }; /* 0x82562bc */ +static const struct ScriptRef s_gs202_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs202_g2_s0_station_sref_script }; /* 0x82562bc */ static const struct GroundLivesData s_gs202_g0_s0_lives[] = { /* 0x82562c8 */ /* 0 */ { 145, 0, 0, 0, { 28, 28, CPOS_HALFTILE, CPOS_HALFTILE }, {} }, }; @@ -312,4 +312,4 @@ static const struct GroundLink s_gs202_links[] = { /* 0x8256518 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs202 = { LPARRAY(s_gs202_groups), s_gs202_links }; /* 0x8256520 */ +const GroundScriptHeader gGroundScript_gs202 = { LPARRAY(s_gs202_groups), s_gs202_links }; /* 0x8256520 */ diff --git a/src/data/ground/ground_data_d11p03_station.h b/src/data/ground/ground_data_d11p03_station.h index b7593e129..479052c67 100644 --- a/src/data/ground/ground_data_d11p03_station.h +++ b/src/data/ground/ground_data_d11p03_station.h @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs203_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs203_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs203_g0_s0_station_sref_script }; /* 0x82565a0 */ +static const struct ScriptRef s_gs203_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs203_g0_s0_station_sref_script }; /* 0x82565a0 */ static const struct ScriptCommand s_gs203_g1_s0_station_sref_script[] = { /* 0x82565ac */ DEBUGINFO_O(33), @@ -41,7 +41,7 @@ static const struct ScriptCommand s_gs203_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs203_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs203_g1_s0_station_sref_script }; /* 0x825663c */ +static const struct ScriptRef s_gs203_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs203_g1_s0_station_sref_script }; /* 0x825663c */ static const struct ScriptCommand s_gs203_g1_s0_eff0_script[] = { /* 0x8256648 */ DEBUGINFO_O(47), @@ -82,11 +82,11 @@ static const struct ScriptCommand s_gs203_g1_s0_lives0_dlg0[] = { /* 0x82566f8 * WAIT(30), SELECT_LIVES(-1, 1), { 0x27, 0x01, 0x0005, 0x0000003c, 0x00ffffff, NULL }, - BGM_SWITCH(6), + BGM_SWITCH(MUS_LEGEND_OF_NINETALES), WAIT(30), ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), MSG_NPC(2, _(" Kekeh!\nLong time, Ninetales!")), MSG_NPC(2, _(" Recognize me?")), TEXTBOX_CLEAR, @@ -175,7 +175,7 @@ static const struct ScriptCommand s_gs203_g1_s0_lives0_dlg0[] = { /* 0x82566f8 * WAIT(30), FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_2} received the\n{CENTER_ALIGN}{COLOR GREEN_I}9-Tail Crest{RESET} from {NAME_3}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(8), @@ -198,7 +198,7 @@ static const struct ScriptCommand s_gs203_g1_s0_lives0_dlg0[] = { /* 0x82566f8 * WAIT(20), ALERT_CUE(4), ALERT_CUE(7), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" Hey!\nI kept you waiting!\nLet's get home! Kekeh!")), @@ -248,16 +248,16 @@ static const struct ScriptCommand s_gs203_g1_s0_lives1_dlg0[] = { /* 0x8257a0c * WAIT(20), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -268,7 +268,7 @@ static const struct ScriptCommand s_gs203_g1_s0_lives1_dlg0[] = { /* 0x8257a0c * AWAIT_CUE(7), { 0x89, 0x28, 0x0100, 0x00000000, 0x00000000, NULL }, WAIT(45), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(7), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -283,25 +283,25 @@ static const struct ScriptCommand s_gs203_g1_s1_lives0_dlg0[] = { /* 0x8257c8c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), { 0x84, 0x00, 0x0100, -0x00000011, 0x00000020, NULL }, ALERT_CUE(5), AWAIT_CUE(8), { 0x84, 0x00, 0x0100, 0x00000011, -0x00000020, NULL }, - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), HALT, @@ -317,7 +317,7 @@ static const struct ScriptCommand s_gs203_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs203_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs203_g2_s0_station_sref_script }; /* 0x8257e9c */ +static const struct ScriptRef s_gs203_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs203_g2_s0_station_sref_script }; /* 0x8257e9c */ static const struct ScriptCommand s_gs203_g2_s0_eff0_script[] = { /* 0x8257ea8 */ DEBUGINFO_O(323), @@ -353,11 +353,11 @@ static const struct ScriptCommand s_gs203_g2_s0_lives0_dlg0[] = { /* 0x8257ee8 * TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 1), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(5), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" A-{NAME_2}!")), TEXTBOX_CLEAR, @@ -413,7 +413,7 @@ static const struct ScriptCommand s_gs203_g2_s0_lives0_dlg0[] = { /* 0x8257ee8 * ALERT_CUE(9), WARP_WAYPOINT(0, 2), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(7), @@ -431,11 +431,11 @@ static const struct ScriptCommand s_gs203_g2_s0_lives0_dlg0[] = { /* 0x8257ee8 * WALK_RELATIVE(768, -56, 0), FANFARE_PLAY2(497), { 0x28, 0x01, 0x0005, 0x00000002, 0x00ffffff, NULL }, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(7, 0), WARP_WAYPOINT(0, 3), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), + CMD_UNK_E5(7, 0), AWAIT_CUE(5), { 0x27, 0x00, 0x0005, 0x00000003, 0x00ffffff, NULL }, { 0x7e, 0x00, 0x0400, -0x00000020, 0x00000040, NULL }, @@ -476,12 +476,12 @@ static const struct ScriptCommand s_gs203_g2_s0_lives1_dlg0[] = { /* 0x8258a00 * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), WAIT(3), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000005, NULL }, @@ -490,13 +490,13 @@ static const struct ScriptCommand s_gs203_g2_s0_lives1_dlg0[] = { /* 0x8258a00 * WALK_RELATIVE(512, 0, 16), AWAIT_CUE(6), WARP_WAYPOINT(0, 5), - { 0x8b, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 0), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, { 0x62, 0x00, 0x0400, 0x00000010, 0x00000040, NULL }, { 0x62, 0x00, 0x0100, 0x00000004, 0x00000010, NULL }, { 0x62, 0x00, 0x0080, 0x00000004, 0x00000008, NULL }, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), CAMERA_PAN(76, 6), AWAIT_CUE(6), @@ -511,7 +511,7 @@ static const struct ScriptCommand s_gs203_g2_s0_lives2_dlg0[] = { /* 0x8258c30 * { 0x89, 0x68, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(6), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), CALL_SCRIPT(NOTICE_FUNC), { 0x62, 0x00, 0x0080, 0x00000000, -0x00000028, NULL }, AWAIT_CUE(6), @@ -524,13 +524,13 @@ static const struct ScriptCommand s_gs203_g2_s0_lives2_dlg0[] = { /* 0x8258c30 * AWAIT_CUE(6), WARP_WAYPOINT(0, 11), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 0), AWAIT_CUE(6), { 0x62, 0x00, 0x0400, 0x00000000, 0x00000050, NULL }, { 0x62, 0x00, 0x0100, 0x00000000, 0x00000018, NULL }, { 0x62, 0x00, 0x0080, 0x00000000, 0x00000010, NULL }, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), CAMERA_PAN(76, 12), AWAIT_CUE(6), @@ -551,7 +551,7 @@ static const struct ScriptCommand s_gs203_g2_s1_lives0_dlg0[] = { /* 0x8258e20 * AWAIT_CUE(7), WARP_WAYPOINT(0, 2), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x0400, -0x00000040, 0x00000000, NULL }, @@ -563,7 +563,7 @@ static const struct ScriptCommand s_gs203_g2_s1_lives0_dlg0[] = { /* 0x8258e20 * AWAIT_CUE(7), WARP_WAYPOINT(0, 3), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), AWAIT_CUE(7), ALERT_CUE(5), { 0x7e, 0x00, 0x0400, 0x00000020, -0x00000040, NULL }, @@ -584,10 +584,10 @@ static const struct ScriptCommand s_gs203_g2_s1_lives1_dlg0[] = { /* 0x8259080 * { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x89, 0x50, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), { 0x89, 0x08, 0x0100, 0x00000004, 0x00000000, NULL }, @@ -596,14 +596,14 @@ static const struct ScriptCommand s_gs203_g2_s1_lives1_dlg0[] = { /* 0x8259080 * AWAIT_CUE(8), WARP_WAYPOINT(0, 7), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), AWAIT_CUE(8), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, { 0x62, 0x00, 0x0400, -0x00000020, -0x00000040, NULL }, { 0x62, 0x00, 0x0100, -0x00000008, -0x00000010, NULL }, { 0x62, 0x00, 0x0080, -0x00000004, -0x00000008, NULL }, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(8), CAMERA_PAN(76, 8), AWAIT_CUE(8), @@ -622,14 +622,14 @@ static const struct ScriptCommand s_gs203_g2_s1_lives2_dlg0[] = { /* 0x8259250 * AWAIT_CUE(8), WARP_WAYPOINT(0, 9), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), AWAIT_CUE(8), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, { 0x62, 0x00, 0x0400, 0x00000020, -0x00000040, NULL }, { 0x62, 0x00, 0x0100, 0x00000008, -0x00000010, NULL }, { 0x62, 0x00, 0x0080, -0x00000004, -0x00000008, NULL }, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), CAMERA_PAN(76, 10), AWAIT_CUE(8), @@ -663,7 +663,7 @@ static const struct ScriptCommand s_gs203_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs203_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs203_g3_s0_station_sref_script }; /* 0x825964c */ +static const struct ScriptRef s_gs203_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs203_g3_s0_station_sref_script }; /* 0x825964c */ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 */ @@ -698,7 +698,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(12), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), PORTRAIT(PLACEMENT_TOP_LEFT, 0x0003, 0x00000041), @@ -717,7 +717,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0005, 0x00000000), PORTRAIT_POS(5, 1, -1), - BGM_SWITCH(6), + BGM_SWITCH(MUS_LEGEND_OF_NINETALES), MSG_NPC(5, _(" Cease fighting at once,\n{NAME_2}.")), TEXTBOX_CLEAR, ALERT_CUE(10), @@ -758,7 +758,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * MSG_NPC(5, _(" {NAME_0}...")), MSG_NPC(5, _(" You may relax.\nIt is not you.")), TEXTBOX_CLEAR, - BGM_SWITCH(24), + BGM_SWITCH(MUS_THE_ESCAPE), FANFARE_PLAY2(465), ALERT_CUE(6), AWAIT_CUE(5), @@ -776,7 +776,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000008), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" ............{WAIT_PRESS}\nWhat's wrong with me?{WAIT_PRESS}\nI'm too tensed up to move...")), @@ -786,10 +786,10 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * WAIT(10), ALERT_CUE(6), MSG_NPC(1, _(" Oo-oof...")), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), ALERT_CUE(6), MSG_NPC(1, _(" ...Oof...")), - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), TEXTBOX_CLEAR, ALERT_CUE(6), PORTRAIT_REP(0x0001, 0x00000000), @@ -799,7 +799,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * VARIANT_DEFAULT(_(" Deep breaths...\nIn... Out... In... Out... In... Out...")), VARIANT_DEFAULT(_(" ..................{WAIT_PRESS}Whew...")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), ALERT_CUE(6), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x0000000a), @@ -809,15 +809,15 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * TEXTBOX_CLEAR, ALERT_CUE(6), WAIT(15), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(20), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(20), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(20), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(20), - ROTATE(8, 2, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x0000000a), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -846,7 +846,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * VARIANT_DEFAULT(_(" You were wrong to hound\nand harass {NAME_0}!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(7), ALERT_CUE(8), ALERT_CUE(9), @@ -878,7 +878,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT_REP(0x0001, 0x00000001), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hahaha! Isn't this great?\nI was convinced I was right!")), @@ -914,11 +914,11 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * ALERT_CUE(10), ALERT_CUE(12), WAIT(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(6, 1, DIRECTION_NORTHEAST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(20), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" Waah! The ground's heaving!")), TEXTBOX_CLEAR, @@ -940,7 +940,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(5), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" What?!\nGroudon is rising?!")), @@ -951,7 +951,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives0_dlg0[] = { /* 0x8259658 * TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(5), PORTRAIT_REP(0x0002, 0x00000004), MSG_NPC(1, _(" What is that?{WAIT_PRESS}\nWhat's a Groudon?")), @@ -1045,7 +1045,7 @@ static const struct ScriptCommand s_gs203_g3_s0_lives1_dlg0[] = { /* 0x825bcb4 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), @@ -1059,11 +1059,11 @@ static const struct ScriptCommand s_gs203_g3_s0_lives1_dlg0[] = { /* 0x825bcb4 * { 0x89, 0x10, 0x0080, 0x00000006, 0x00000000, NULL }, AWAIT_CUE(6), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), { 0x54, 0x00, 0x002e, 0x00000000, 0x00000000, NULL }, STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(6), AWAIT_CUE(6), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -1076,68 +1076,68 @@ static const struct ScriptCommand s_gs203_g3_s0_lives1_dlg0[] = { /* 0x825bcb4 * WAIT(4), FANFARE_PLAY2(469), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, - { 0x8b, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHWEST, 0), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x62, 0x00, 0x0100, -0x00000010, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, FANFARE_PLAY2(469), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - { 0x8b, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 0), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), { 0x62, 0x00, 0x0100, 0x00000010, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 0), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, FANFARE_PLAY2(469), - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, - { 0x8b, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHWEST, 0), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x62, 0x00, 0x0100, -0x00000010, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, FANFARE_PLAY2(469), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - { 0x8b, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 0), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), { 0x62, 0x00, 0x0100, 0x00000010, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 0), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000008, NULL }, CALL_SCRIPT(JUMP_ANGRY_FUNC), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), CALL_SCRIPT(ANGRY_START_FUNC), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(ANGRY_END_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(20), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(18), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -1152,27 +1152,27 @@ static const struct ScriptCommand s_gs203_g3_s0_lives2_dlg0[] = { /* 0x825c2f4 * { 0x62, 0x00, 0x0200, 0x00000008, -0x00000008, NULL }, CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(7), { 0x62, 0x00, 0x004c, -0x00000008, 0x00000008, NULL }, ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(7), WAIT(3), - ROTATE(6, 10, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_WEST), WAIT(12), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT(15), - ROTATE(6, 1, DIRECTION_NORTHWEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT(5), - ROTATE(6, 2, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -1185,19 +1185,19 @@ static const struct ScriptCommand s_gs203_g3_s0_lives3_dlg0[] = { /* 0x825c514 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(8), WAIT(6), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(12), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(10), - ROTATE(7, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(7, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x89, 0x50, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -1209,18 +1209,18 @@ static const struct ScriptCommand s_gs203_g3_s0_lives4_dlg0[] = { /* 0x825c664 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), WAIT(7), - ROTATE(6, 2, DIRECTION_NORTH), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(10), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x89, 0x50, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -1231,12 +1231,12 @@ static const struct ScriptCommand s_gs203_g3_s0_lives5_dlg0[] = { /* 0x825c7a4 * DEBUGINFO_O(1231), SELECT_ANIMATION(2), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(12), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(12), HALT, }; @@ -1254,31 +1254,31 @@ static const struct ScriptCommand s_gs203_g3_s1_lives0_dlg0[] = { /* 0x825c854 * SELECT_ANIMATION(23), AWAIT_CUE(10), SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(10), - ROTATE(6, 1, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(10), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(10), HALT, }; @@ -1411,4 +1411,4 @@ static const struct GroundLink s_gs203_links[] = { /* 0x825cdb0 */ /* link 13 */ { { /*x*/ 30, /*y*/ 32, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs203 = { LPARRAY(s_gs203_groups), s_gs203_links }; /* 0x825ce20 */ +const GroundScriptHeader gGroundScript_gs203 = { LPARRAY(s_gs203_groups), s_gs203_links }; /* 0x825ce20 */ diff --git a/src/data/ground/ground_data_d12p01_station.h b/src/data/ground/ground_data_d12p01_station.h index ac63f066b..f23fdf1ac 100644 --- a/src/data/ground/ground_data_d12p01_station.h +++ b/src/data/ground/ground_data_d12p01_station.h @@ -19,10 +19,10 @@ static const struct ScriptCommand s_gs204_g0_s0_station_sref_script[] = { /* 0x8 LABEL(0), /* = 0x00 */ JUMP_LABEL(1), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -38,11 +38,11 @@ static const struct ScriptCommand s_gs204_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ - BGM_SWITCH(108), + BGM_SWITCH(MUS_MAGMA_CAVERN), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs204_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs204_g0_s0_station_sref_script }; /* 0x825d030 */ +static const struct ScriptRef s_gs204_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs204_g0_s0_station_sref_script }; /* 0x825d030 */ static const struct ScriptCommand s_gs204_g0_s1_lives0_dlg0[] = { /* 0x825d03c */ DEBUGINFO_O(48), @@ -88,14 +88,14 @@ static const struct ScriptCommand s_gs204_g1_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(88), SELECT_MAP(MAP_MAGMA_CAVERN_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(108), + BGM_SWITCH(MUS_MAGMA_CAVERN), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_MAGMA_CAVERN), RET, }; -static const struct ScriptRef s_gs204_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs204_g1_s0_station_sref_script }; /* 0x825d21c */ +static const struct ScriptRef s_gs204_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs204_g1_s0_station_sref_script }; /* 0x825d21c */ static const struct ScriptCommand s_gs204_g1_s0_lives0_dlg0[] = { /* 0x825d228 */ DEBUGINFO_O(101), @@ -119,7 +119,7 @@ static const struct ScriptCommand s_gs204_g1_s0_lives0_dlg0[] = { /* 0x825d228 * TEXTBOX_CLEAR, ALERT_CUE(6), WAIT(5), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), WAIT(15), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Other rescue teams should\nalready be inside.")), @@ -146,7 +146,7 @@ static const struct ScriptCommand s_gs204_g1_s0_lives1_dlg0[] = { /* 0x825d6dc * WALK_GRID(256, 1), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(6), WALK_GRID(256, 2), HALT, @@ -156,14 +156,14 @@ static const struct ScriptCommand s_gs204_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(156), SELECT_MAP(MAP_MAGMA_CAVERN_ENTRY), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(108), + BGM_SWITCH(MUS_MAGMA_CAVERN), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_MAGMA_CAVERN), RET, }; -static const struct ScriptRef s_gs204_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs204_g2_s0_station_sref_script }; /* 0x825d80c */ +static const struct ScriptRef s_gs204_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs204_g2_s0_station_sref_script }; /* 0x825d80c */ static const struct ScriptCommand s_gs204_g2_s0_lives0_dlg0[] = { /* 0x825d818 */ DEBUGINFO_O(169), @@ -172,7 +172,7 @@ static const struct ScriptCommand s_gs204_g2_s0_lives0_dlg0[] = { /* 0x825d818 * { 0x2d, 0x09, 0x0002, 0x00000058, 0x00000000, NULL }, ALERT_CUE(6), WALK_GRID(256, 0), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), WAIT(15), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" This time, we'll rescue\n{NAME_2}'s team!\nLet's get it done!")), @@ -193,7 +193,7 @@ static const struct ScriptCommand s_gs204_g2_s0_lives1_dlg0[] = { /* 0x825d9bc * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(256, 1), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(6), WALK_GRID(256, 2), HALT, @@ -288,4 +288,4 @@ static const struct GroundLink s_gs204_links[] = { /* 0x825dc98 */ /* link 3 */ { { /*x*/ 26, /*y*/ 11, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs204 = { LPARRAY(s_gs204_groups), s_gs204_links }; /* 0x825dcb8 */ +const GroundScriptHeader gGroundScript_gs204 = { LPARRAY(s_gs204_groups), s_gs204_links }; /* 0x825dcb8 */ diff --git a/src/data/ground/ground_data_d12p02_station.h b/src/data/ground/ground_data_d12p02_station.h index e3c4feed8..7128e14fb 100644 --- a/src/data/ground/ground_data_d12p02_station.h +++ b/src/data/ground/ground_data_d12p02_station.h @@ -17,10 +17,10 @@ static const struct ScriptCommand s_gs205_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(1), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -36,11 +36,11 @@ static const struct ScriptCommand s_gs205_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ - BGM_SWITCH(108), + BGM_SWITCH(MUS_MAGMA_CAVERN), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs205_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs205_g0_s0_station_sref_script }; /* 0x825dee8 */ +static const struct ScriptRef s_gs205_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs205_g0_s0_station_sref_script }; /* 0x825dee8 */ static const struct ScriptCommand s_gs205_g0_s0_evt0_sref_script[] = { /* 0x825def4 */ DEBUGINFO_O(46), @@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs205_g0_s0_evt0_sref_script[] = { /* 0x825d HALT, }; -static const struct ScriptRef s_gs205_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs205_g0_s0_evt0_sref_script }; /* 0x825dfd0 */ +static const struct ScriptRef s_gs205_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs205_g0_s0_evt0_sref_script }; /* 0x825dfd0 */ static const struct ScriptCommand s_gs205_g0_s0_evt1_sref_script[] = { /* 0x825dfdc */ DEBUGINFO_O(63), @@ -72,11 +72,11 @@ static const struct ScriptCommand s_gs205_g0_s0_evt1_sref_script[] = { /* 0x825d { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, }; -static const struct ScriptRef s_gs205_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs205_g0_s0_evt1_sref_script }; /* 0x825e0dc */ +static const struct ScriptRef s_gs205_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs205_g0_s0_evt1_sref_script }; /* 0x825e0dc */ static const struct ScriptCommand s_gs205_g0_s0_obj0_dlg2[] = { /* 0x825e0e8 */ DEBUGINFO_O(82), @@ -132,14 +132,14 @@ static const struct ScriptCommand s_gs205_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_MAGMA_CAVERN_MID), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(108), + BGM_SWITCH(MUS_MAGMA_CAVERN), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs205_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs205_g1_s0_station_sref_script }; /* 0x825e338 */ +static const struct ScriptRef s_gs205_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs205_g1_s0_station_sref_script }; /* 0x825e338 */ static const struct ScriptCommand s_gs205_g1_s0_lives0_dlg0[] = { /* 0x825e344 */ DEBUGINFO_O(145), @@ -261,4 +261,4 @@ static const struct GroundLink s_gs205_links[] = { /* 0x825e83c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs205 = { LPARRAY(s_gs205_groups), s_gs205_links }; /* 0x825e844 */ +const GroundScriptHeader gGroundScript_gs205 = { LPARRAY(s_gs205_groups), s_gs205_links }; /* 0x825e844 */ diff --git a/src/data/ground/ground_data_d12p04_station.h b/src/data/ground/ground_data_d12p04_station.h index 023039c0c..3d1e2b4db 100644 --- a/src/data/ground/ground_data_d12p04_station.h +++ b/src/data/ground/ground_data_d12p04_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs206_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs206_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs206_g0_s0_station_sref_script }; /* 0x825e8c4 */ +static const struct ScriptRef s_gs206_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs206_g0_s0_station_sref_script }; /* 0x825e8c4 */ static const struct ScriptCommand s_gs206_g1_s0_station_sref_script[] = { /* 0x825e8d0 */ DEBUGINFO_O(19), SELECT_MAP(206), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), FANFARE_FADEOUT2(60, 453), @@ -42,7 +42,7 @@ static const struct ScriptCommand s_gs206_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs206_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs206_g1_s0_station_sref_script }; /* 0x825eacc */ +static const struct ScriptRef s_gs206_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs206_g1_s0_station_sref_script }; /* 0x825eacc */ static const struct ScriptCommand s_gs206_g1_s0_eff0_script[] = { /* 0x825ead8 */ DEBUGINFO_O(48), @@ -69,7 +69,7 @@ static const struct ScriptCommand s_gs206_g1_s0_lives0_dlg0[] = { /* 0x825eb18 * WAIT(30), ALERT_CUE(7), WAIT(20), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Grgaaaaaah!") }, + MSG_OVERHEARD(_("Grgaaaaaah!")), WAIT(120), TEXTBOX_CLEAR, WAIT(90), @@ -83,7 +83,7 @@ static const struct ScriptCommand s_gs206_g1_s0_lives0_dlg0[] = { /* 0x825eb18 * FANFARE_PLAY2(465), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), MSG_NPC(1, _(" Look! It's {NAME_3}!{WAIT_PRESS}\n{NAME_4} and {NAME_5} too!")), TEXTBOX_CLEAR, @@ -159,14 +159,14 @@ static const struct ScriptCommand s_gs206_g1_s0_lives1_dlg0[] = { /* 0x825f2ec * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), WALK_RELATIVE(128, 0, -8), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -260,16 +260,16 @@ static const struct ScriptCommand s_gs206_g1_s1_lives0_dlg0[] = { /* 0x825f71c * WAIT(30), SELECT_ANIMATION(2), WAIT(30), - ROTATE(10, 2, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(20), - ROTATE(10, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), WAIT(10), - ROTATE(10, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(8), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), { 0x89, 0x78, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -296,14 +296,14 @@ static const struct ScriptCommand s_gs206_g1_s1_lives1_dlg0[] = { /* 0x825f91c * WAIT(25), SELECT_ANIMATION(2), WAIT(45), - ROTATE(10, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(20), - ROTATE(10, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(9), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(9), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(9), @@ -338,18 +338,18 @@ static const struct ScriptCommand s_gs206_g1_s1_lives2_dlg0[] = { /* 0x825fb1c * WAIT(40), SELECT_ANIMATION(2), WAIT(40), - ROTATE(10, 1, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(10), - ROTATE(10, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(5), - ROTATE(10, 1, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(10), WAIT(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), WAIT(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(10), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(10), @@ -417,4 +417,4 @@ static const struct GroundLink s_gs206_links[] = { /* 0x825ff4c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs206 = { LPARRAY(s_gs206_groups), s_gs206_links }; /* 0x825ff54 */ +const GroundScriptHeader gGroundScript_gs206 = { LPARRAY(s_gs206_groups), s_gs206_links }; /* 0x825ff54 */ diff --git a/src/data/ground/ground_data_d13p01_station.h b/src/data/ground/ground_data_d13p01_station.h index 0237097a4..d2ceb218d 100644 --- a/src/data/ground/ground_data_d13p01_station.h +++ b/src/data/ground/ground_data_d13p01_station.h @@ -14,7 +14,7 @@ static const struct ScriptCommand s_gs207_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs207_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs207_g0_s0_station_sref_script }; /* 0x825ffd4 */ +static const struct ScriptRef s_gs207_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs207_g0_s0_station_sref_script }; /* 0x825ffd4 */ static const struct ScriptCommand s_gs207_g1_s0_station_sref_script[] = { /* 0x825ffe0 */ DEBUGINFO_O(20), @@ -22,14 +22,14 @@ static const struct ScriptCommand s_gs207_g1_s0_station_sref_script[] = { /* 0x8 WAIT(60), SELECT_MAP(MAP_SKY_TOWER_ENTRY), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs207_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs207_g1_s0_station_sref_script }; /* 0x8260080 */ +static const struct ScriptRef s_gs207_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs207_g1_s0_station_sref_script }; /* 0x8260080 */ static const struct ScriptCommand s_gs207_g1_s0_lives0_dlg0[] = { /* 0x826008c */ DEBUGINFO_O(35), @@ -66,20 +66,20 @@ static const struct ScriptCommand s_gs207_g1_s0_lives0_dlg0[] = { /* 0x826008c * PORTRAIT_REP(0x0001, 0x0000000c), MSG_NPC(1, _(" Wah!\n{NAME_0}, this is cool!{WAIT_PRESS}\nWe're on clouds!")), TEXTBOX_CLEAR, - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(7), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), MSG_NPC(1, _(" Oh, wow!")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(5), MSG_NPC(1, _(" {NAME_0}, look up there!")), TEXTBOX_CLEAR, - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(7), WAIT(30), ALERT_CUE(3), @@ -124,7 +124,7 @@ static const struct ScriptCommand s_gs207_g1_s0_lives1_dlg0[] = { /* 0x8260458 * FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), WAIT(30), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), FANFARE_PLAY2(458), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -152,12 +152,12 @@ static const struct ScriptCommand s_gs207_g1_s0_lives2_dlg0[] = { /* 0x8260738 * AWAIT_CUE(6), WAIT(10), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), HALT, }; @@ -166,14 +166,14 @@ static const struct ScriptCommand s_gs207_g2_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(166), SELECT_MAP(MAP_SKY_TOWER_ENTRY), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_SKY_TOWER), RET, }; -static const struct ScriptRef s_gs207_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs207_g2_s0_station_sref_script }; /* 0x8260928 */ +static const struct ScriptRef s_gs207_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs207_g2_s0_station_sref_script }; /* 0x8260928 */ static const struct ScriptCommand s_gs207_g2_s0_lives0_dlg0[] = { /* 0x8260934 */ DEBUGINFO_O(179), @@ -189,7 +189,7 @@ static const struct ScriptCommand s_gs207_g2_s0_lives0_dlg0[] = { /* 0x8260934 * VARIANT_DEFAULT(_(" That's where {NAME_2}\nis...")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!\nLet's give it our best!")), @@ -209,7 +209,7 @@ static const struct ScriptCommand s_gs207_g2_s0_lives1_dlg0[] = { /* 0x8260b8c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(10), @@ -232,14 +232,14 @@ static const struct ScriptCommand s_gs207_g3_s0_station_sref_script[] = { /* 0x8 DEBUGINFO_O(232), SELECT_MAP(MAP_SKY_TOWER_ENTRY), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), NEXT_DUNGEON(30, SCRIPT_DUNGEON_SKY_TOWER), RET, }; -static const struct ScriptRef s_gs207_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs207_g3_s0_station_sref_script }; /* 0x8260d2c */ +static const struct ScriptRef s_gs207_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs207_g3_s0_station_sref_script }; /* 0x8260d2c */ static const struct ScriptCommand s_gs207_g3_s0_lives0_dlg0[] = { /* 0x8260d38 */ DEBUGINFO_O(245), @@ -270,7 +270,7 @@ static const struct ScriptCommand s_gs207_g3_s0_lives0_dlg0[] = { /* 0x8260d38 * WAIT(10), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Let's storm our way to\nthe top floor!")), VARIANT_DEFAULT(_(" Let's head for the top!\nThis is it!")), @@ -301,9 +301,9 @@ static const struct ScriptCommand s_gs207_g3_s0_lives1_dlg0[] = { /* 0x826104c * { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(10), @@ -327,7 +327,7 @@ static const struct ScriptCommand s_gs207_g3_s0_lives2_dlg0[] = { /* 0x82611dc * { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(179, 0), @@ -418,4 +418,4 @@ static const struct GroundLink s_gs207_links[] = { /* 0x82614f0 */ /* link 0 */ { { /*x*/ 25, /*y*/ 12, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs207 = { LPARRAY(s_gs207_groups), s_gs207_links }; /* 0x82614f8 */ +const GroundScriptHeader gGroundScript_gs207 = { LPARRAY(s_gs207_groups), s_gs207_links }; /* 0x82614f8 */ diff --git a/src/data/ground/ground_data_d13p02_station.h b/src/data/ground/ground_data_d13p02_station.h index 25b320dd4..71de04468 100644 --- a/src/data/ground/ground_data_d13p02_station.h +++ b/src/data/ground/ground_data_d13p02_station.h @@ -17,10 +17,10 @@ static const struct ScriptCommand s_gs208_g0_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), JUMP_LABEL(1), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -36,11 +36,11 @@ static const struct ScriptCommand s_gs208_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs208_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs208_g0_s0_station_sref_script }; /* 0x8261728 */ +static const struct ScriptRef s_gs208_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs208_g0_s0_station_sref_script }; /* 0x8261728 */ static const struct ScriptCommand s_gs208_g0_s0_evt0_sref_script[] = { /* 0x8261734 */ DEBUGINFO_O(46), @@ -57,7 +57,7 @@ static const struct ScriptCommand s_gs208_g0_s0_evt0_sref_script[] = { /* 0x8261 HALT, }; -static const struct ScriptRef s_gs208_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs208_g0_s0_evt0_sref_script }; /* 0x8261810 */ +static const struct ScriptRef s_gs208_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs208_g0_s0_evt0_sref_script }; /* 0x8261810 */ static const struct ScriptCommand s_gs208_g0_s0_evt1_sref_script[] = { /* 0x826181c */ DEBUGINFO_O(63), @@ -72,11 +72,11 @@ static const struct ScriptCommand s_gs208_g0_s0_evt1_sref_script[] = { /* 0x8261 { 0x23, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(DISMISSAL_SALLY_MEMBER4_FUNC), SET_DUNGEON_RES(/* result */ 10, /* enter */ -1), - EXECUTE_STATION(12, 4, 0), + EXECUTE_STATION(MAP_TEAM_BASE_INSIDE, 4, 0), HALT, }; -static const struct ScriptRef s_gs208_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs208_g0_s0_evt1_sref_script }; /* 0x826191c */ +static const struct ScriptRef s_gs208_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs208_g0_s0_evt1_sref_script }; /* 0x826191c */ static const struct ScriptCommand s_gs208_g0_s0_obj0_dlg2[] = { /* 0x8261928 */ DEBUGINFO_O(82), @@ -132,14 +132,14 @@ static const struct ScriptCommand s_gs208_g1_s0_station_sref_script[] = { /* 0x8 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(MAP_SKY_TOWER_MID), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(22), + BGM_SWITCH(MUS_SKY_TOWER), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs208_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs208_g1_s0_station_sref_script }; /* 0x8261b78 */ +static const struct ScriptRef s_gs208_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs208_g1_s0_station_sref_script }; /* 0x8261b78 */ static const struct ScriptCommand s_gs208_g1_s0_lives0_dlg0[] = { /* 0x8261b84 */ DEBUGINFO_O(145), @@ -262,4 +262,4 @@ static const struct GroundLink s_gs208_links[] = { /* 0x826208c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs208 = { LPARRAY(s_gs208_groups), s_gs208_links }; /* 0x8262094 */ +const GroundScriptHeader gGroundScript_gs208 = { LPARRAY(s_gs208_groups), s_gs208_links }; /* 0x8262094 */ diff --git a/src/data/ground/ground_data_d13p03_station.h b/src/data/ground/ground_data_d13p03_station.h index 12ded32f4..e845fce8b 100644 --- a/src/data/ground/ground_data_d13p03_station.h +++ b/src/data/ground/ground_data_d13p03_station.h @@ -1,6 +1,6 @@ - - +#define NPC_PARTNER 1 +#define NPC_RAYQUAZA 2 @@ -8,18 +8,18 @@ static const struct ScriptCommand s_gs209_g0_s0_station_sref_script[] = { /* 0x82620a8 */ DEBUGINFO_O(10), - SELECT_MAP(209), + SELECT_MAP(MAP_SKY_TOWER_END), BGM_STOP, JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs209_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs209_g0_s0_station_sref_script }; /* 0x8262114 */ +static const struct ScriptRef s_gs209_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs209_g0_s0_station_sref_script }; /* 0x8262114 */ static const struct ScriptCommand s_gs209_g1_s0_station_sref_script[] = { /* 0x8262120 */ DEBUGINFO_O(19), - SELECT_MAP(209), + SELECT_MAP(MAP_SKY_TOWER_END), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(26), + BGM_SWITCH(MUS_RAYQUAZAS_DOMAIN), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs209_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs209_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs209_g1_s0_station_sref_script }; /* 0x82621b0 */ +static const struct ScriptRef s_gs209_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs209_g1_s0_station_sref_script }; /* 0x82621b0 */ static const struct ScriptCommand s_gs209_g1_s0_eff0_script[] = { /* 0x82621bc */ DEBUGINFO_O(33), @@ -45,7 +45,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives0_dlg0[] = { /* 0x826223c * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(5), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaaaaaaaaaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaaaaaaaaaaaaah!")), WAIT(30), FANFARE_PLAY2(493), { 0x28, 0x01, 0x0005, 0x00000008, 0x00ffffff, NULL }, @@ -62,7 +62,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives0_dlg0[] = { /* 0x826223c * ALERT_CUE(7), AWAIT_CUE(5), { 0x2e, 0x0f, 0x0002, -0x00000002, 0x00000000, NULL }, - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Gwaargh!") }, + MSG_OVERHEARD(_(" ...Gwaargh!")), WAIT(90), TEXTBOX_CLEAR, WAIT(60), @@ -84,7 +84,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives0_dlg0[] = { /* 0x826223c * ALERT_CUE(10), CALL_SCRIPT(NOTICE_FUNC), WAIT(60), - PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), + PORTRAIT(PLACEMENT_LEFT_, NPC_PARTNER, 12), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Wh-wh-what?! Quake?!{WAIT_PRESS}\nIt can't be!")), VARIANT(/* == */ 1, _(" We're up on clouds...")), @@ -95,8 +95,8 @@ static const struct ScriptCommand s_gs209_g1_s0_lives0_dlg0[] = { /* 0x826223c * FANFARE_PLAY2(465), ALERT_CUE(7), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), - MSG_NPC(2, _(" These are shock waves!{WAIT_PRESS}\nAnd they're huge!")), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, NPC_RAYQUAZA, 0), + MSG_NPC(NPC_RAYQUAZA, _(" These are shock waves!{WAIT_PRESS}\nAnd they're huge!")), TEXTBOX_CLEAR, WAIT(30), FANFARE_PLAY2(465), @@ -109,7 +109,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives0_dlg0[] = { /* 0x826223c * ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(10), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), ALERT_CUE(4), ALERT_CUE(3), @@ -132,7 +132,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives1_dlg0[] = { /* 0x826282c * CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), HALT, }; @@ -145,7 +145,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives2_dlg0[] = { /* 0x826290c * AWAIT_CUE(10), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), HALT, }; @@ -158,7 +158,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives3_dlg0[] = { /* 0x82629ac * AWAIT_CUE(10), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), HALT, }; @@ -200,7 +200,7 @@ static const struct ScriptCommand s_gs209_g1_s0_lives4_dlg0[] = { /* 0x8262a4c * WAIT(30), FANFARE_PLAY2(774), SELECT_ANIMATION(23), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("Gyaaaaaaaaaaaaaah!") }, + MSG_OVERHEARD(_("Gyaaaaaaaaaaaaaah!")), { 0x28, 0x01, 0x0005, 0x00000008, 0x00ffffff, NULL }, WAIT(5), { 0x27, 0x00, 0x0005, 0x00000008, 0x00ffffff, NULL }, @@ -227,9 +227,9 @@ static const struct ScriptCommand s_gs209_g1_s0_lives4_dlg0[] = { /* 0x8262a4c * static const struct ScriptCommand s_gs209_g2_s0_station_sref_script[] = { /* 0x8262e10 */ DEBUGINFO_O(229), - SELECT_MAP(209), + SELECT_MAP(MAP_SKY_TOWER_END), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(26), + BGM_SWITCH(MUS_RAYQUAZAS_DOMAIN), { 0x97, 0x00, 0x0002, 0x00000001, 0x00000001, NULL }, WAIT(15), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -238,7 +238,7 @@ static const struct ScriptCommand s_gs209_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs209_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs209_g2_s0_station_sref_script }; /* 0x8262eb0 */ +static const struct ScriptRef s_gs209_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs209_g2_s0_station_sref_script }; /* 0x8262eb0 */ static const struct ScriptCommand s_gs209_g2_s0_eff0_script[] = { /* 0x8262ebc */ DEBUGINFO_O(244), @@ -261,11 +261,11 @@ static const struct ScriptCommand s_gs209_g2_s0_lives0_dlg0[] = { /* 0x8262f4c * FANFARE_PLAY2(465), ALERT_CUE(7), AWAIT_CUE(5), - PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), - MSG_NPC(2, _(" What is that?!")), + PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, NPC_RAYQUAZA, 0), + MSG_NPC(NPC_RAYQUAZA, _(" What is that?!")), TEXTBOX_CLEAR, WAIT(10), - PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), + PORTRAIT(PLACEMENT_LEFT_, NPC_PARTNER, 12), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" It's a shooting star!\nAnd it's gigantic!")), VARIANT(/* == */ 1, _(" It's going to destroy\nthe world if it isn't stopped!")), @@ -280,7 +280,7 @@ static const struct ScriptCommand s_gs209_g2_s0_lives0_dlg0[] = { /* 0x8262f4c * ALERT_CUE(7), AWAIT_CUE(5), WAIT(15), - MSG_NPC(2, _(" ...So, that is why...")), + MSG_NPC(NPC_RAYQUAZA, _(" ...So, that is why...")), TEXTBOX_CLEAR, WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -288,10 +288,10 @@ static const struct ScriptCommand s_gs209_g2_s0_lives0_dlg0[] = { /* 0x8262f4c * VARIANT_DEFAULT(_(" Yes!\nPlease hurry and destroy it!")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" ............{WAIT_PRESS}Before I try...{WAIT_PRESS}\nI need to know your resolve.")), - MSG_NPC(2, _(" The star has come too close.")), - MSG_NPC(2, _(" If I were to loose my\nHyper Beam here...")), - MSG_NPC(2, _(" You would not escape\nunscathed!")), + MSG_NPC(NPC_RAYQUAZA, _(" ............{WAIT_PRESS}Before I try...{WAIT_PRESS}\nI need to know your resolve.")), + MSG_NPC(NPC_RAYQUAZA, _(" The star has come too close.")), + MSG_NPC(NPC_RAYQUAZA, _(" If I were to loose my\nHyper Beam here...")), + MSG_NPC(NPC_RAYQUAZA, _(" You would not escape\nunscathed!")), TEXTBOX_CLEAR, WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -299,7 +299,7 @@ static const struct ScriptCommand s_gs209_g2_s0_lives0_dlg0[] = { /* 0x8262f4c * VARIANT_DEFAULT(_(" So?!{WAIT_PRESS}\nWe accepted that from the start!")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" Well said!")), + MSG_NPC(NPC_RAYQUAZA, _(" Well said!")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(7), @@ -308,7 +308,7 @@ static const struct ScriptCommand s_gs209_g2_s0_lives0_dlg0[] = { /* 0x8262f4c * FANFARE_PLAY2(664), ALERT_CUE(8), AWAIT_CUE(5), - MSG_NPC(2, _(" Take charge of your destiny!")), + MSG_NPC(NPC_RAYQUAZA, _(" Take charge of your destiny!")), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), @@ -394,9 +394,9 @@ static const struct ScriptCommand s_gs209_g2_s0_eff1_script[] = { /* 0x8263860 * static const struct ScriptCommand s_gs209_g3_s0_station_sref_script[] = { /* 0x8263980 */ DEBUGINFO_O(396), - SELECT_MAP(209), + SELECT_MAP(MAP_SKY_TOWER_END), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(26), + BGM_SWITCH(MUS_RAYQUAZAS_DOMAIN), { 0x97, 0x00, 0x0002, 0x00000005, 0x00000002, NULL }, WAIT(15), { 0x27, 0x00, 0x0005, 0x00000010, 0x00ffffff, NULL }, @@ -410,7 +410,7 @@ static const struct ScriptCommand s_gs209_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs209_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs209_g3_s0_station_sref_script }; /* 0x8263a70 */ +static const struct ScriptRef s_gs209_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs209_g3_s0_station_sref_script }; /* 0x8263a70 */ static const struct ScriptCommand s_gs209_g3_s0_lives0_dlg0[] = { /* 0x8263a7c */ DEBUGINFO_O(416), @@ -420,8 +420,8 @@ static const struct ScriptCommand s_gs209_g3_s0_lives0_dlg0[] = { /* 0x8263a7c * WAIT(30), WAIT(30), TEXTBOX_AUTO_PRESS(15, 15), - PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), - MSG_NPC(1, _(" Waaaaaaaaaaaaaaaaaah!")), + PORTRAIT(PLACEMENT_LEFT_, NPC_PARTNER, 12), + MSG_NPC(NPC_PARTNER, _(" Waaaaaaaaaaaaaaaaaah!")), ALERT_CUE(3), HALT, }; @@ -561,4 +561,4 @@ static const struct GroundLink s_gs209_links[] = { /* 0x8263ec8 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs209 = { LPARRAY(s_gs209_groups), s_gs209_links }; /* 0x8263ed0 */ +const GroundScriptHeader gGroundScript_gs209 = { LPARRAY(s_gs209_groups), s_gs209_links }; /* 0x8263ed0 */ diff --git a/src/data/ground/ground_data_d14p01_station.h b/src/data/ground/ground_data_d14p01_station.h index 181dfc976..a7acc50be 100644 --- a/src/data/ground/ground_data_d14p01_station.h +++ b/src/data/ground/ground_data_d14p01_station.h @@ -13,20 +13,20 @@ static const struct ScriptCommand s_gs210_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs210_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs210_g0_s0_station_sref_script }; /* 0x8263f50 */ +static const struct ScriptRef s_gs210_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs210_g0_s0_station_sref_script }; /* 0x8263f50 */ static const struct ScriptCommand s_gs210_g1_s0_station_sref_script[] = { /* 0x8263f5c */ DEBUGINFO_O(19), SELECT_MAP(210), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs210_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs210_g1_s0_station_sref_script }; /* 0x8263fdc */ +static const struct ScriptRef s_gs210_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs210_g1_s0_station_sref_script }; /* 0x8263fdc */ static const struct ScriptCommand s_gs210_g1_s0_lives0_dlg0[] = { /* 0x8263fe8 */ DEBUGINFO_O(32), @@ -80,4 +80,4 @@ static const struct GroundLink s_gs210_links[] = { /* 0x826413c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs210 = { LPARRAY(s_gs210_groups), s_gs210_links }; /* 0x8264144 */ +const GroundScriptHeader gGroundScript_gs210 = { LPARRAY(s_gs210_groups), s_gs210_links }; /* 0x8264144 */ diff --git a/src/data/ground/ground_data_d15p01_station.h b/src/data/ground/ground_data_d15p01_station.h index 430c7851b..51786838f 100644 --- a/src/data/ground/ground_data_d15p01_station.h +++ b/src/data/ground/ground_data_d15p01_station.h @@ -13,20 +13,20 @@ static const struct ScriptCommand s_gs211_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs211_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs211_g0_s0_station_sref_script }; /* 0x82641c4 */ +static const struct ScriptRef s_gs211_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs211_g0_s0_station_sref_script }; /* 0x82641c4 */ static const struct ScriptCommand s_gs211_g1_s0_station_sref_script[] = { /* 0x82641d0 */ DEBUGINFO_O(19), SELECT_MAP(211), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs211_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs211_g1_s0_station_sref_script }; /* 0x8264250 */ +static const struct ScriptRef s_gs211_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs211_g1_s0_station_sref_script }; /* 0x8264250 */ static const struct ScriptCommand s_gs211_g1_s0_lives0_dlg0[] = { /* 0x826425c */ DEBUGINFO_O(32), @@ -54,11 +54,11 @@ static const struct ScriptCommand s_gs211_g1_s0_lives0_dlg0[] = { /* 0x826425c * TEXTBOX_CLEAR, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} received\n{CENTER_ALIGN}the {COLOR GREEN_I}Sunset Wing{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), MSG_INSTANT(_("{CENTER_ALIGN}And...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Northwind Field{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -111,4 +111,4 @@ static const struct GroundLink s_gs211_links[] = { /* 0x8264818 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs211 = { LPARRAY(s_gs211_groups), s_gs211_links }; /* 0x8264820 */ +const GroundScriptHeader gGroundScript_gs211 = { LPARRAY(s_gs211_groups), s_gs211_links }; /* 0x8264820 */ diff --git a/src/data/ground/ground_data_d16p01_station.h b/src/data/ground/ground_data_d16p01_station.h index 6e51ba7d3..f9cfa5040 100644 --- a/src/data/ground/ground_data_d16p01_station.h +++ b/src/data/ground/ground_data_d16p01_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs212_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs212_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs212_g0_s0_station_sref_script }; /* 0x82648a0 */ +static const struct ScriptRef s_gs212_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs212_g0_s0_station_sref_script }; /* 0x82648a0 */ static const struct ScriptCommand s_gs212_g1_s0_station_sref_script[] = { /* 0x82648ac */ DEBUGINFO_O(19), SELECT_MAP(212), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs212_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs212_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs212_g1_s0_station_sref_script }; /* 0x826494c */ +static const struct ScriptRef s_gs212_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs212_g1_s0_station_sref_script }; /* 0x826494c */ static const struct ScriptCommand s_gs212_g1_s0_eff0_script[] = { /* 0x8264958 */ DEBUGINFO_O(34), @@ -53,13 +53,13 @@ static const struct ScriptCommand s_gs212_g1_s0_lives0_dlg0[] = { /* 0x82649c8 * ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00fa7d7d, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00fa7d7d, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), FANFARE_PLAY2(497), ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00550000, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00550000, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), ALERT_CUE(7), AWAIT_CUE(5), @@ -107,8 +107,8 @@ static const struct ScriptCommand s_gs212_g1_s0_lives0_dlg0[] = { /* 0x82649c8 * CANCEL_OBJECTS(1, 1), SELECT_EFFECTS(1, 1), { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, - { 0xe2, 0x00, 0x01fb, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(114), + WAIT_FANFARE2(507), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), WAIT(60), MSG_NPC(2, _(" Take this and go west!")), MSG_NPC(2, _(" There, you will find\nthe {COLOR YELLOW_D}Lightning Field{RESET}.")), @@ -122,13 +122,13 @@ static const struct ScriptCommand s_gs212_g1_s0_lives0_dlg0[] = { /* 0x82649c8 * BGM_STOP, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} received\n{CENTER_ALIGN}the {COLOR GREEN_I}Red Wing{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(20), MSG_INSTANT(_("{CENTER_ALIGN}And...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Lightning Field{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -160,14 +160,14 @@ static const struct ScriptCommand s_gs212_g1_s0_lives1_dlg0[] = { /* 0x826518c * AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(7), SELECT_ANIMATION(9), WAIT(30), FANFARE_PLAY2(663), { 0x56, 0x00, 0x0000, 0x0000004e, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x0297, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(663), SELECT_ANIMATION(22), WAIT(30), FANFARE_PLAY2(653), @@ -194,7 +194,7 @@ static const struct ScriptCommand s_gs212_g1_s1_obj0_dlg0[] = { /* 0x82653cc */ FANFARE_PLAY2(739), { 0x56, 0x00, 0x0000, 0x0000013d, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x02e3, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(739), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ FANFARE_STOP2(739), @@ -258,4 +258,4 @@ static const struct GroundLink s_gs212_links[] = { /* 0x8265624 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs212 = { LPARRAY(s_gs212_groups), s_gs212_links }; /* 0x826562c */ +const GroundScriptHeader gGroundScript_gs212 = { LPARRAY(s_gs212_groups), s_gs212_links }; /* 0x826562c */ diff --git a/src/data/ground/ground_data_d17p01_station.h b/src/data/ground/ground_data_d17p01_station.h index 5335f7d48..78aef0738 100644 --- a/src/data/ground/ground_data_d17p01_station.h +++ b/src/data/ground/ground_data_d17p01_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs213_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs213_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs213_g0_s0_station_sref_script }; /* 0x82656ac */ +static const struct ScriptRef s_gs213_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs213_g0_s0_station_sref_script }; /* 0x82656ac */ static const struct ScriptCommand s_gs213_g1_s0_station_sref_script[] = { /* 0x82656b8 */ DEBUGINFO_O(19), SELECT_MAP(213), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs213_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs213_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs213_g1_s0_station_sref_script }; /* 0x8265758 */ +static const struct ScriptRef s_gs213_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs213_g1_s0_station_sref_script }; /* 0x8265758 */ static const struct ScriptCommand s_gs213_g1_s0_eff0_script[] = { /* 0x8265764 */ DEBUGINFO_O(34), @@ -53,13 +53,13 @@ static const struct ScriptCommand s_gs213_g1_s0_lives0_dlg0[] = { /* 0x82657d4 * ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00707000, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00707000, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), FANFARE_PLAY2(497), ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00505000, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00505000, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), ALERT_CUE(7), AWAIT_CUE(5), @@ -105,8 +105,8 @@ static const struct ScriptCommand s_gs213_g1_s0_lives0_dlg0[] = { /* 0x82657d4 * CANCEL_OBJECTS(1, 1), SELECT_EFFECTS(1, 1), { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, - { 0xe2, 0x00, 0x01fb, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(114), + WAIT_FANFARE2(507), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), WAIT(60), MSG_INSTANT(_("{CENTER_ALIGN}Its subtle gradation of yellow\n{CENTER_ALIGN}to red is a truly beauteous sight!")), TEXTBOX_CLEAR, @@ -124,13 +124,13 @@ static const struct ScriptCommand s_gs213_g1_s0_lives0_dlg0[] = { /* 0x82657d4 * BGM_STOP, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} received\n{CENTER_ALIGN}the {COLOR GREEN_I}Sunset Wing{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(20), MSG_INSTANT(_("{CENTER_ALIGN}And...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Northwind Field{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -162,18 +162,18 @@ static const struct ScriptCommand s_gs213_g1_s0_lives1_dlg0[] = { /* 0x826604c * AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(7), SELECT_ANIMATION(9), WAIT(30), FANFARE_PLAY2(708), { 0x56, 0x00, 0x0000, 0x00000062, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x02c4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(708), SELECT_ANIMATION(22), WAIT(15), FANFARE_PLAY2(479), - { 0xe2, 0x00, 0x01df, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(479), ALERT_CUE(5), SELECT_ANIMATION(2), HALT, @@ -196,10 +196,10 @@ static const struct ScriptCommand s_gs213_g1_s1_obj0_dlg0[] = { /* 0x826629c */ LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), FANFARE_PLAY2(726), - { 0xe2, 0x00, 0x02d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(726), FANFARE_PLAY2(726), WAIT(45), - { 0xe2, 0x00, 0x02d6, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(726), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ HALT, @@ -257,4 +257,4 @@ static const struct GroundLink s_gs213_links[] = { /* 0x82664b4 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs213 = { LPARRAY(s_gs213_groups), s_gs213_links }; /* 0x82664bc */ +const GroundScriptHeader gGroundScript_gs213 = { LPARRAY(s_gs213_groups), s_gs213_links }; /* 0x82664bc */ diff --git a/src/data/ground/ground_data_d18p01_station.h b/src/data/ground/ground_data_d18p01_station.h index 3a6971f3a..7cd089e2e 100644 --- a/src/data/ground/ground_data_d18p01_station.h +++ b/src/data/ground/ground_data_d18p01_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs214_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs214_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs214_g0_s0_station_sref_script }; /* 0x826653c */ +static const struct ScriptRef s_gs214_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs214_g0_s0_station_sref_script }; /* 0x826653c */ static const struct ScriptCommand s_gs214_g1_s0_station_sref_script[] = { /* 0x8266548 */ DEBUGINFO_O(19), SELECT_MAP(214), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs214_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs214_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs214_g1_s0_station_sref_script }; /* 0x82665e8 */ +static const struct ScriptRef s_gs214_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs214_g1_s0_station_sref_script }; /* 0x82665e8 */ static const struct ScriptCommand s_gs214_g1_s0_eff0_script[] = { /* 0x82665f4 */ DEBUGINFO_O(34), @@ -53,13 +53,13 @@ static const struct ScriptCommand s_gs214_g1_s0_lives0_dlg0[] = { /* 0x8266664 * ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00005077, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00005077, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), FANFARE_PLAY2(497), ALERT_CUE(7), { 0x28, 0x01, 0x0005, 0x00000005, 0x00005077, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00005077, NULL }, - { 0xe2, 0x00, 0x01f1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(497), WAIT(20), ALERT_CUE(7), AWAIT_CUE(5), @@ -107,8 +107,8 @@ static const struct ScriptCommand s_gs214_g1_s0_lives0_dlg0[] = { /* 0x8266664 * CANCEL_OBJECTS(1, 1), SELECT_EFFECTS(1, 1), { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, - { 0xe2, 0x00, 0x01fb, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(114), + WAIT_FANFARE2(507), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), WAIT(60), MSG_INSTANT(_("{CENTER_ALIGN}Glittering in the seven colors\n{CENTER_ALIGN}of the rainbow, this wing is\n{CENTER_ALIGN}beautiful beyond description!")), TEXTBOX_CLEAR, @@ -127,13 +127,13 @@ static const struct ScriptCommand s_gs214_g1_s0_lives0_dlg0[] = { /* 0x8266664 * BGM_STOP, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} received\n{CENTER_ALIGN}the {COLOR GREEN_I}Rainbow Wing{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), TEXTBOX_CLEAR, WAIT(20), MSG_INSTANT(_("{CENTER_ALIGN}And...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}{COLOR YELLOW_D}Mt. Faraway{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(3), @@ -165,7 +165,7 @@ static const struct ScriptCommand s_gs214_g1_s0_lives1_dlg0[] = { /* 0x8266f30 * AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(7), SELECT_ANIMATION(9), ALERT_CUE(5), @@ -173,7 +173,7 @@ static const struct ScriptCommand s_gs214_g1_s0_lives1_dlg0[] = { /* 0x8266f30 * FANFARE_PLAY2(664), { 0x56, 0x00, 0x0000, 0x00000053, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x0298, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(664), SELECT_ANIMATION(22), WAIT(10), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -257,4 +257,4 @@ static const struct GroundLink s_gs214_links[] = { /* 0x82673ac */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs214 = { LPARRAY(s_gs214_groups), s_gs214_links }; /* 0x82673b4 */ +const GroundScriptHeader gGroundScript_gs214 = { LPARRAY(s_gs214_groups), s_gs214_links }; /* 0x82673b4 */ diff --git a/src/data/ground/ground_data_d19p01_station.h b/src/data/ground/ground_data_d19p01_station.h index 5b28f1999..bdc2cf537 100644 --- a/src/data/ground/ground_data_d19p01_station.h +++ b/src/data/ground/ground_data_d19p01_station.h @@ -13,20 +13,20 @@ static const struct ScriptCommand s_gs215_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs215_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs215_g0_s0_station_sref_script }; /* 0x8267434 */ +static const struct ScriptRef s_gs215_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs215_g0_s0_station_sref_script }; /* 0x8267434 */ static const struct ScriptCommand s_gs215_g1_s0_station_sref_script[] = { /* 0x8267440 */ DEBUGINFO_O(19), SELECT_MAP(215), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs215_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs215_g1_s0_station_sref_script }; /* 0x82674c0 */ +static const struct ScriptRef s_gs215_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs215_g1_s0_station_sref_script }; /* 0x82674c0 */ static const struct ScriptCommand s_gs215_g1_s0_lives0_dlg0[] = { /* 0x82674cc */ DEBUGINFO_O(32), @@ -111,4 +111,4 @@ static const struct GroundLink s_gs215_links[] = { /* 0x8267aac */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs215 = { LPARRAY(s_gs215_groups), s_gs215_links }; /* 0x8267ab4 */ +const GroundScriptHeader gGroundScript_gs215 = { LPARRAY(s_gs215_groups), s_gs215_links }; /* 0x8267ab4 */ diff --git a/src/data/ground/ground_data_d20p01_station.h b/src/data/ground/ground_data_d20p01_station.h index 84a0a6e0e..8ff3cfbfc 100644 --- a/src/data/ground/ground_data_d20p01_station.h +++ b/src/data/ground/ground_data_d20p01_station.h @@ -11,26 +11,26 @@ static const struct ScriptCommand s_gs216_g0_s0_station_sref_script[] = { /* 0x8267ac8 */ DEBUGINFO_O(13), - SELECT_MAP(216), + SELECT_MAP(MAP_D20), BGM_STOP, JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs216_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs216_g0_s0_station_sref_script }; /* 0x8267b34 */ +static const struct ScriptRef s_gs216_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs216_g0_s0_station_sref_script }; /* 0x8267b34 */ static const struct ScriptCommand s_gs216_g1_s0_station_sref_script[] = { /* 0x8267b40 */ DEBUGINFO_O(22), BGM_STOP, { 0x23, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x26, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, - SELECT_MAP(216), + SELECT_MAP(MAP_D20), MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}One day...")), MSG_ON_BG_AUTO(30, _("{CENTER_ALIGN}In a small cave\n{CENTER_ALIGN}in the distant west...")), TEXTBOX_CLEAR, WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x28, 0x01, 0x0002, 0x0000003c, 0x00ffffff, NULL }, @@ -41,7 +41,7 @@ static const struct ScriptCommand s_gs216_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs216_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs216_g1_s0_station_sref_script }; /* 0x8267cbc */ +static const struct ScriptRef s_gs216_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs216_g1_s0_station_sref_script }; /* 0x8267cbc */ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 */ @@ -51,7 +51,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(30), WALK_GRID(256, 0), - { 0x93, 0x04, 0x0001, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 104), WAIT(30), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, PORTRAIT(PLACEMENT_TOP_LEFT, 0x0000, 0x00000000), @@ -60,7 +60,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000003), MSG_NPC(1, _(" Gasp, gasp...{WAIT_PRESS}\nThis is rough going...")), @@ -118,7 +118,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), WAIT(60), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), MSG_NPC(0, _(" Hm?{WAIT_PRESS} What's wrong?{WAIT_PRESS}\nAre you still wiped out?")), TEXTBOX_CLEAR, @@ -129,30 +129,30 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * MSG_NPC(1, _(" I thought I heard a voice...")), TEXTBOX_CLEAR, WAIT(10), - { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT2), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT2), WAIT(30), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), MSG_NPC(0, _(" ...No?{WAIT_PRESS}\nI don't hear anything.")), TEXTBOX_CLEAR, WAIT(10), - BGM_SWITCH(35), + BGM_SWITCH(MUS_FRIEND_AREA_CRYPTIC_CAVE), TEXTBOX_AUTO_PRESS(60, 60), MSG_NPC(-1, _(" ............{WAIT_PRESS}Is it{WAIT_PRESS} \nyou...?")), MSG_NPC(-1, _(" ......Who...disturbs...my sleep...{WAIT_PRESS}\nIs it{WAIT_PRESS} you?!\n")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT2), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(30), TEXTBOX_AUTO_PRESS(-1, -1), MSG_NPC(0, _(" Wh-who's there?!")), @@ -185,7 +185,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives0_dlg0[] = { /* 0x8267cc8 * FANFARE_PLAY2(877), { 0x28, 0x01, 0x0001, 0x00000005, 0x00ffffff, NULL }, WAIT(10), - BGM_SWITCH(11), + BGM_SWITCH(MUS_BOSS_BATTLE), { 0x27, 0x01, 0x0001, 0x00000005, 0x00ffffff, NULL }, { 0x23, 0x01, 0x000a, 0x00000000, 0x00000000, NULL }, TEXTBOX_AUTO_PRESS(120, 120), @@ -237,14 +237,14 @@ static const struct ScriptCommand s_gs216_g1_s0_lives1_dlg0[] = { /* 0x8268c90 * { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WALK_GRID(76, 1), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(30), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), - { 0x93, 0x08, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 89), ALERT_CUE(5), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005e, 0x00000000, NULL }, @@ -255,7 +255,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives1_dlg0[] = { /* 0x8268c90 * SELECT_ANIMATION(9), WAIT(120), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), SELECT_ANIMATION(18), { 0x56, 0x00, 0x0000, 0x00000054, 0x00000000, NULL }, @@ -266,7 +266,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives1_dlg0[] = { /* 0x8268c90 * ALERT_CUE(7), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(15), SELECT_ANIMATION(18), { 0x56, 0x00, 0x0000, 0x00000054, 0x00000000, NULL }, @@ -277,7 +277,7 @@ static const struct ScriptCommand s_gs216_g1_s0_lives1_dlg0[] = { /* 0x8268c90 * ALERT_CUE(7), AWAIT_CUE(6), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(15), SELECT_ANIMATION(18), { 0x56, 0x00, 0x0000, 0x00000054, 0x00000000, NULL }, @@ -288,32 +288,32 @@ static const struct ScriptCommand s_gs216_g1_s0_lives1_dlg0[] = { /* 0x8268c90 * ALERT_CUE(7), AWAIT_CUE(6), SELECT_ANIMATION(2), - { 0x93, 0x08, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 89), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0001, 0x00000003, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT2), AWAIT_CUE(6), FANFARE_PLAY2(786), - { 0xe2, 0x00, 0x0312, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(786), FANFARE_PLAY2(831), - { 0xe2, 0x00, 0x033f, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(831), FANFARE_PLAY2(787), - { 0xe2, 0x00, 0x0313, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(787), FANFARE_PLAY2(831), - { 0xe2, 0x00, 0x033f, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(831), WAIT(15), FANFARE_PLAY2(786), - { 0xe2, 0x00, 0x0312, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(786), FANFARE_PLAY2(831), - { 0xe2, 0x00, 0x033f, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(831), HALT, }; @@ -322,7 +322,7 @@ static const struct ScriptCommand s_gs216_g1_s0_eff1_script[] = { /* 0x82691d0 * { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(7), { 0x59, 0x00, 0x0004, -0x00000018, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), { 0x56, 0x00, 0x0000, 0x00000150, 0x00000000, NULL }, WALK_RELATIVE(512, 0, -120), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -331,7 +331,7 @@ static const struct ScriptCommand s_gs216_g1_s0_eff1_script[] = { /* 0x82691d0 * AWAIT_CUE(7), { 0x59, 0x00, 0x000c, 0x00000000, 0x00000000, NULL }, { 0x56, 0x00, 0x0000, 0x00000150, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), WALK_RELATIVE(512, 120, 120), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WARP_WAYPOINT(0, 2), @@ -339,7 +339,7 @@ static const struct ScriptCommand s_gs216_g1_s0_eff1_script[] = { /* 0x82691d0 * AWAIT_CUE(7), { 0x59, 0x00, -0x000c, 0x00000000, 0x00000000, NULL }, { 0x56, 0x00, 0x0000, 0x00000150, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHWEST, 0), WALK_RELATIVE(512, -120, 120), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WARP_WAYPOINT(0, 2), @@ -439,4 +439,4 @@ static const struct GroundLink s_gs216_links[] = { /* 0x8269728 */ /* link 2 */ { { /*x*/ 25, /*y*/ 19, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs216 = { LPARRAY(s_gs216_groups), s_gs216_links }; /* 0x8269740 */ +const GroundScriptHeader gGroundScript_gs216 = { LPARRAY(s_gs216_groups), s_gs216_links }; /* 0x8269740 */ diff --git a/src/data/ground/ground_data_d21p01_station.h b/src/data/ground/ground_data_d21p01_station.h index 8ecc5ed62..4d1e1fe0d 100644 --- a/src/data/ground/ground_data_d21p01_station.h +++ b/src/data/ground/ground_data_d21p01_station.h @@ -13,13 +13,13 @@ static const struct ScriptCommand s_gs217_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs217_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs217_g0_s0_station_sref_script }; /* 0x82697c0 */ +static const struct ScriptRef s_gs217_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs217_g0_s0_station_sref_script }; /* 0x82697c0 */ static const struct ScriptCommand s_gs217_g1_s0_station_sref_script[] = { /* 0x82697cc */ DEBUGINFO_O(19), SELECT_MAP(217), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs217_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs217_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs217_g1_s0_station_sref_script }; /* 0x826986c */ +static const struct ScriptRef s_gs217_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs217_g1_s0_station_sref_script }; /* 0x826986c */ static const struct ScriptCommand s_gs217_g1_s0_lives0_dlg0[] = { /* 0x8269878 */ DEBUGINFO_O(34), @@ -41,7 +41,7 @@ static const struct ScriptCommand s_gs217_g1_s0_lives0_dlg0[] = { /* 0x8269878 * WAIT(10), { 0x28, 0x01, 0x0005, 0x00000005, 0x00ffffff, NULL }, { 0x27, 0x01, 0x0005, 0x00000005, 0x00ffffff, NULL }, - { 0xe2, 0x00, 0x01db, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(475), AWAIT_CUE(5), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" Urghgh...")), @@ -82,14 +82,14 @@ static const struct ScriptCommand s_gs217_g1_s0_lives1_dlg0[] = { /* 0x8269b04 * WAIT(30), FANFARE_PLAY2(475), SELECT_ANIMATION(9), - { 0xe2, 0x00, 0x01db, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(475), FANFARE_PLAY2(779), { 0x54, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, WAIT(50), { 0x54, 0x00, 0x001a, 0x00000000, 0x00000000, NULL }, WAIT(40), FANFARE_PLAY2(682), - { 0xe2, 0x00, 0x02aa, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(682), ALERT_CUE(5), HALT, }; @@ -129,4 +129,4 @@ static const struct GroundLink s_gs217_links[] = { /* 0x8269d58 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs217 = { LPARRAY(s_gs217_groups), s_gs217_links }; /* 0x8269d60 */ +const GroundScriptHeader gGroundScript_gs217 = { LPARRAY(s_gs217_groups), s_gs217_links }; /* 0x8269d60 */ diff --git a/src/data/ground/ground_data_d22p01_station.h b/src/data/ground/ground_data_d22p01_station.h index c9a745f9b..3f0701562 100644 --- a/src/data/ground/ground_data_d22p01_station.h +++ b/src/data/ground/ground_data_d22p01_station.h @@ -15,7 +15,7 @@ static const struct ScriptCommand s_gs218_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs218_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs218_g0_s0_station_sref_script }; /* 0x8269de0 */ +static const struct ScriptRef s_gs218_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs218_g0_s0_station_sref_script }; /* 0x8269de0 */ static const struct ScriptCommand s_gs218_g1_s0_station_sref_script[] = { /* 0x8269dec */ DEBUGINFO_O(21), @@ -28,7 +28,7 @@ static const struct ScriptCommand s_gs218_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs218_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs218_g1_s0_station_sref_script }; /* 0x8269e6c */ +static const struct ScriptRef s_gs218_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs218_g1_s0_station_sref_script }; /* 0x8269e6c */ static const struct ScriptCommand s_gs218_g1_s0_eff1_script[] = { /* 0x8269e78 */ DEBUGINFO_O(34), @@ -105,7 +105,7 @@ static const struct ScriptCommand s_gs218_g1_s0_lives0_dlg0[] = { /* 0x826a108 * WALK_RELATIVE(256, 8, 0), WALK_GRID(256, 0), ALERT_CUE(7), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(30), BGM_FADEOUT(90), FANFARE_PLAY2(500), @@ -126,7 +126,7 @@ static const struct ScriptCommand s_gs218_g1_s0_lives1_dlg0[] = { /* 0x826a408 * SELECT_ANIMATION(4), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(30), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -174,4 +174,4 @@ static const struct GroundLink s_gs218_links[] = { /* 0x826a580 */ /* link 1 */ { { /*x*/ 25, /*y*/ 27, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs218 = { LPARRAY(s_gs218_groups), s_gs218_links }; /* 0x826a590 */ +const GroundScriptHeader gGroundScript_gs218 = { LPARRAY(s_gs218_groups), s_gs218_links }; /* 0x826a590 */ diff --git a/src/data/ground/ground_data_d23p01_station.h b/src/data/ground/ground_data_d23p01_station.h index 7e48ccacd..1baa7cf70 100644 --- a/src/data/ground/ground_data_d23p01_station.h +++ b/src/data/ground/ground_data_d23p01_station.h @@ -17,13 +17,13 @@ static const struct ScriptCommand s_gs219_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs219_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs219_g0_s0_station_sref_script }; /* 0x826a610 */ +static const struct ScriptRef s_gs219_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs219_g0_s0_station_sref_script }; /* 0x826a610 */ static const struct ScriptCommand s_gs219_g1_s0_station_sref_script[] = { /* 0x826a61c */ DEBUGINFO_O(23), SELECT_MAP(219), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(120), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs219_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs219_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs219_g1_s0_station_sref_script }; /* 0x826a6ac */ +static const struct ScriptRef s_gs219_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs219_g1_s0_station_sref_script }; /* 0x826a6ac */ static const struct ScriptCommand s_gs219_g1_s0_lives0_dlg0[] = { /* 0x826a6b8 */ DEBUGINFO_O(37), @@ -50,7 +50,7 @@ static const struct ScriptCommand s_gs219_g1_s0_lives0_dlg0[] = { /* 0x826a6b8 * ALERT_CUE(3), WAIT(1), WALK_GRID(204, 1), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), HALT, }; @@ -63,7 +63,7 @@ static const struct ScriptCommand s_gs219_g1_s0_lives1_dlg0[] = { /* 0x826a84c * WALK_GRID(256, 2), AWAIT_CUE(6), WALK_GRID(204, 3), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -115,4 +115,4 @@ static const struct GroundLink s_gs219_links[] = { /* 0x826a9d8 */ /* link 3 */ { { /*x*/ 24, /*y*/ 19, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs219 = { LPARRAY(s_gs219_groups), s_gs219_links }; /* 0x826a9f8 */ +const GroundScriptHeader gGroundScript_gs219 = { LPARRAY(s_gs219_groups), s_gs219_links }; /* 0x826a9f8 */ diff --git a/src/data/ground/ground_data_d24p01_station.h b/src/data/ground/ground_data_d24p01_station.h index 6e45c299a..d3354b6d8 100644 --- a/src/data/ground/ground_data_d24p01_station.h +++ b/src/data/ground/ground_data_d24p01_station.h @@ -16,13 +16,13 @@ static const struct ScriptCommand s_gs220_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs220_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs220_g0_s0_station_sref_script }; /* 0x826aa78 */ +static const struct ScriptRef s_gs220_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs220_g0_s0_station_sref_script }; /* 0x826aa78 */ static const struct ScriptCommand s_gs220_g1_s0_station_sref_script[] = { /* 0x826aa84 */ DEBUGINFO_O(22), SELECT_MAP(220), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(90), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs220_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs220_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs220_g1_s0_station_sref_script }; /* 0x826ab24 */ +static const struct ScriptRef s_gs220_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs220_g1_s0_station_sref_script }; /* 0x826ab24 */ static const struct ScriptCommand s_gs220_g1_s0_eff0_script[] = { /* 0x826ab30 */ DEBUGINFO_O(37), @@ -117,14 +117,14 @@ static const struct ScriptCommand s_gs220_g1_s0_lives0_dlg0[] = { /* 0x826abb0 * TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(468), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(5), FANFARE_PLAY2(468), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), ALERT_CUE(7), AWAIT_CUE(5), @@ -132,50 +132,50 @@ static const struct ScriptCommand s_gs220_g1_s0_lives0_dlg0[] = { /* 0x826abb0 * MSG_NPC(2, _(" That's odd...\nI could've sworn I heard something...")), TEXTBOX_CLEAR, WAIT(60), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}...Wel...co...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}...Wel...co...")), TEXTBOX_CLEAR, WAIT(60), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}...W...e...lc...ome...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}...W...e...lc...ome...")), TEXTBOX_CLEAR, WAIT(45), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Welcome to\n{CENTER_ALIGN}the Murky Cave!") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Welcome to\n{CENTER_ALIGN}the Murky Cave!")), TEXTBOX_CLEAR, FANFARE_PLAY2(469), ALERT_CUE(7), - ROTATE(8, 1, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), WAIT(10), FANFARE_PLAY2(469), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(10), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), MSG_NPC(2, _(" What? What?!\nWhere is that voice coming from?")), MSG_NPC(2, _(" Who are you?")), TEXTBOX_CLEAR, WAIT(10), - BGM_SWITCH(6), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I am the\n{CENTER_ALIGN}judge of darkness.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You have nothing to fear from me.\n{CENTER_ALIGN}I mean you no harm.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Just now, a key was\n{CENTER_ALIGN}inserted to break a curse.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}The curse...\n{CENTER_ALIGN}It is the one on {NAME_3}?") }, + BGM_SWITCH(MUS_LEGEND_OF_NINETALES), + MSG_QUIET(-1, _("{CENTER_ALIGN}I am the\n{CENTER_ALIGN}judge of darkness.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}You have nothing to fear from me.\n{CENTER_ALIGN}I mean you no harm.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Just now, a key was\n{CENTER_ALIGN}inserted to break a curse.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}The curse...\n{CENTER_ALIGN}It is the one on {NAME_3}?")), TEXTBOX_CLEAR, WAIT(10), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" Kekeh! Exactly!{WAIT_PRESS}\nPlease lift the curse now!")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I cannot allow that right away.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I must first know if you\n{CENTER_ALIGN}have earned the right.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I must evaluate you.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You must bare your\n{CENTER_ALIGN}true feelings to me.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}I cannot allow that right away.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}I must first know if you\n{CENTER_ALIGN}have earned the right.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}I must evaluate you.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}You must bare your\n{CENTER_ALIGN}true feelings to me.")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Kekeh? What?{WAIT_PRESS}\nYou're going to test me?")), MSG_NPC(2, _(" What, I have to fight some\nboss creature?")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Oh, no.\n{CENTER_ALIGN}Nothing so barbaric.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}All that I need is for some\n{CENTER_ALIGN}questions to be answered.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}However...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}Oh, no.\n{CENTER_ALIGN}Nothing so barbaric.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}All that I need is for some\n{CENTER_ALIGN}questions to be answered.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}However...")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(502), @@ -194,16 +194,16 @@ static const struct ScriptCommand s_gs220_g1_s0_lives0_dlg0[] = { /* 0x826abb0 * MSG_NPC(2, _(" Gegeh?! What the...?!{WAIT_PRESS}\nI can't move!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_2}, you will not\n{CENTER_ALIGN}be doing the answering...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_0}.") }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_2}, you will not\n{CENTER_ALIGN}be doing the answering...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_0}.")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_0}.\n{CENTER_ALIGN}You will answer.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_0}.\n{CENTER_ALIGN}You will answer.")), TEXTBOX_CLEAR, WAIT(60), WALK_GRID(128, 1), @@ -220,15 +220,15 @@ static const struct ScriptCommand s_gs220_g1_s0_lives0_dlg0[] = { /* 0x826abb0 * WAIT(10), ALERT_CUE(7), AWAIT_CUE(5), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_2}.{WAIT_PRESS}\n{CENTER_ALIGN}Your heart is interwoven\n{CENTER_ALIGN}with conflicting emotions.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}You will probably never show\n{CENTER_ALIGN}the truth within your heart.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_2}.{WAIT_PRESS}\n{CENTER_ALIGN}Your heart is interwoven\n{CENTER_ALIGN}with conflicting emotions.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}You will probably never show\n{CENTER_ALIGN}the truth within your heart.")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Kekeh?!\nWhat?!")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_0} will enter\n{CENTER_ALIGN}{NAME_2}'s heart.") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}Please navigate carefully\n{CENTER_ALIGN}through {NAME_2}'s emotions.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_0} will enter\n{CENTER_ALIGN}{NAME_2}'s heart.")), + MSG_QUIET(-1, _("{CENTER_ALIGN}Please navigate carefully\n{CENTER_ALIGN}through {NAME_2}'s emotions.")), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -274,10 +274,10 @@ static const struct ScriptCommand s_gs220_g1_s0_lives1_dlg0[] = { /* 0x826be2c * CALL_SCRIPT(LOOK_AROUND_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(LOOK_AROUND_FUNC), @@ -320,7 +320,7 @@ static const struct ScriptCommand s_gs220_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs220_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs220_g2_s0_station_sref_script }; /* 0x826c22c */ +static const struct ScriptRef s_gs220_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs220_g2_s0_station_sref_script }; /* 0x826c22c */ static const struct ScriptCommand s_gs220_g2_s0_eff0_script[] = { /* 0x826c238 */ DEBUGINFO_O(326), @@ -337,21 +337,21 @@ static const struct ScriptCommand s_gs220_g2_s0_lives0_dlg0[] = { /* 0x826c278 * { 0x2d, 0x09, 0x0003, 0x00000052, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(80), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}{NAME_2}.\n{CENTER_ALIGN}Whether you have the right\n{CENTER_ALIGN}to break the curse or not...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}I will now render\n{CENTER_ALIGN}my judgment.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}{NAME_2}.\n{CENTER_ALIGN}Whether you have the right\n{CENTER_ALIGN}to break the curse or not...")), + MSG_QUIET(-1, _("{CENTER_ALIGN}I will now render\n{CENTER_ALIGN}my judgment.")), TEXTBOX_CLEAR, WAIT(60), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}The curse...{WAIT_PRESS}\n{CENTER_ALIGN}could not be lifted.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}The curse...{WAIT_PRESS}\n{CENTER_ALIGN}could not be lifted.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000043), MSG_NPC(2, _(" W-wait...")), TEXTBOX_CLEAR, WAIT(10), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}It is most regrettable, but\n{CENTER_ALIGN}the curse on {NAME_3}\n{CENTER_ALIGN}will last all eternity...") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}It is most regrettable, but\n{CENTER_ALIGN}the curse on {NAME_3}\n{CENTER_ALIGN}will last all eternity...")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" Wait!\nWait a minute!")), @@ -363,7 +363,7 @@ static const struct ScriptCommand s_gs220_g2_s0_lives0_dlg0[] = { /* 0x826c278 * WAIT(120), ALERT_CUE(7), WALK_RELATIVE(256, -24, 0), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(20), MSG_NPC(2, _(" Let me...{WAIT_PRESS}\nLet me say something!")), TEXTBOX_CLEAR, @@ -415,7 +415,7 @@ static const struct ScriptCommand s_gs220_g2_s0_lives0_dlg0[] = { /* 0x826c278 * ALERT_CUE(7), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(15), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("{CENTER_ALIGN}The lock bearing the curse...{WAIT_PRESS}\n{CENTER_ALIGN}It has opened.") }, + MSG_QUIET(-1, _("{CENTER_ALIGN}The lock bearing the curse...{WAIT_PRESS}\n{CENTER_ALIGN}It has opened.")), TEXTBOX_CLEAR, WAIT(10), FANFARE_PLAY2(506), @@ -427,7 +427,7 @@ static const struct ScriptCommand s_gs220_g2_s0_lives0_dlg0[] = { /* 0x826c278 * FANFARE_PLAY2(465), ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), PORTRAIT_REP(0x0002, 0x00000046), MSG_NPC(2, _(" Ga-{NAME_3}!")), TEXTBOX_CLEAR, @@ -441,7 +441,7 @@ static const struct ScriptCommand s_gs220_g2_s0_lives0_dlg0[] = { /* 0x826c278 * TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000044), MSG_NPC(2, _(" N-{NAME_5}!")), @@ -513,12 +513,12 @@ static const struct ScriptCommand s_gs220_g2_s0_lives1_dlg0[] = { /* 0x826d210 * AWAIT_CUE(7), { 0x89, 0x10, 0x0100, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), HALT, @@ -618,4 +618,4 @@ static const struct GroundLink s_gs220_links[] = { /* 0x826d708 */ /* link 2 */ { { /*x*/ 25, /*y*/ 24, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs220 = { LPARRAY(s_gs220_groups), s_gs220_links }; /* 0x826d720 */ +const GroundScriptHeader gGroundScript_gs220 = { LPARRAY(s_gs220_groups), s_gs220_links }; /* 0x826d720 */ diff --git a/src/data/ground/ground_data_d24p02_station.h b/src/data/ground/ground_data_d24p02_station.h index e080d2a56..5dfc787aa 100644 --- a/src/data/ground/ground_data_d24p02_station.h +++ b/src/data/ground/ground_data_d24p02_station.h @@ -13,19 +13,19 @@ static const struct ScriptCommand s_gs221_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs221_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs221_g0_s0_station_sref_script }; /* 0x826d7a0 */ +static const struct ScriptRef s_gs221_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs221_g0_s0_station_sref_script }; /* 0x826d7a0 */ static const struct ScriptCommand s_gs221_g1_s0_station_sref_script[] = { /* 0x826d7ac */ DEBUGINFO_O(19), SELECT_MAP(221), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(21), + BGM_SWITCH(MUS_STORMY_SEA), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs221_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs221_g1_s0_station_sref_script }; /* 0x826d81c */ +static const struct ScriptRef s_gs221_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs221_g1_s0_station_sref_script }; /* 0x826d81c */ static const struct ScriptCommand s_gs221_g1_s0_eff0_script[] = { /* 0x826d828 */ DEBUGINFO_O(31), @@ -44,7 +44,7 @@ static const struct ScriptCommand s_gs221_g1_s0_lives0_dlg0[] = { /* 0x826d898 * ALERT_CUE(7), { 0x89, 0x50, 0x0099, 0x00000004, 0x00000000, NULL }, AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), MSG_NPC(2, _(" You're going to the\n{COLOR YELLOW_D}Murky Cave{RESET}?")), MSG_NPC(2, _(" Don't forget to take me,\nkekeh!")), TEXTBOX_CLEAR, @@ -101,4 +101,4 @@ static const struct GroundLink s_gs221_links[] = { /* 0x826dafc */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs221 = { LPARRAY(s_gs221_groups), s_gs221_links }; /* 0x826db04 */ +const GroundScriptHeader gGroundScript_gs221 = { LPARRAY(s_gs221_groups), s_gs221_links }; /* 0x826db04 */ diff --git a/src/data/ground/ground_data_d25p01_station.h b/src/data/ground/ground_data_d25p01_station.h index b8d9dc5b0..7c5bd6cfd 100644 --- a/src/data/ground/ground_data_d25p01_station.h +++ b/src/data/ground/ground_data_d25p01_station.h @@ -17,13 +17,13 @@ static const struct ScriptCommand s_gs222_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs222_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs222_g0_s0_station_sref_script }; /* 0x826db84 */ +static const struct ScriptRef s_gs222_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs222_g0_s0_station_sref_script }; /* 0x826db84 */ static const struct ScriptCommand s_gs222_g1_s0_station_sref_script[] = { /* 0x826db90 */ DEBUGINFO_O(23), SELECT_MAP(222), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(120), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs222_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs222_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs222_g1_s0_station_sref_script }; /* 0x826dc20 */ +static const struct ScriptRef s_gs222_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs222_g1_s0_station_sref_script }; /* 0x826dc20 */ static const struct ScriptCommand s_gs222_g1_s0_lives0_dlg0[] = { /* 0x826dc2c */ DEBUGINFO_O(37), @@ -50,7 +50,7 @@ static const struct ScriptCommand s_gs222_g1_s0_lives0_dlg0[] = { /* 0x826dc2c * ALERT_CUE(3), WAIT(1), WALK_GRID(204, 1), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), HALT, }; @@ -63,7 +63,7 @@ static const struct ScriptCommand s_gs222_g1_s0_lives1_dlg0[] = { /* 0x826ddc0 * WALK_GRID(256, 2), AWAIT_CUE(6), WALK_GRID(204, 3), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -115,4 +115,4 @@ static const struct GroundLink s_gs222_links[] = { /* 0x826df4c */ /* link 3 */ { { /*x*/ 24, /*y*/ 19, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs222 = { LPARRAY(s_gs222_groups), s_gs222_links }; /* 0x826df6c */ +const GroundScriptHeader gGroundScript_gs222 = { LPARRAY(s_gs222_groups), s_gs222_links }; /* 0x826df6c */ diff --git a/src/data/ground/ground_data_h01p01_station.h b/src/data/ground/ground_data_h01p01_station.h index 78fb60085..4561d349f 100644 --- a/src/data/ground/ground_data_h01p01_station.h +++ b/src/data/ground/ground_data_h01p01_station.h @@ -21,10 +21,10 @@ static const struct ScriptCommand s_gs105_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(1), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -40,11 +40,11 @@ static const struct ScriptCommand s_gs105_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs105_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs105_g0_s0_station_sref_script }; /* 0x81ee3f4 */ +static const struct ScriptRef s_gs105_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs105_g0_s0_station_sref_script }; /* 0x81ee3f4 */ static const struct ScriptCommand s_gs105_g0_s1_lives0_dlg0[] = { /* 0x81ee400 */ @@ -253,8 +253,8 @@ static const struct GroundLivesData s_gs105_g1_s0_lives[] = { /* 0x81ee8c0 */ }; static const struct GroundEventData s_gs105_g0_s0_evts[] = { /* 0x81ee998 */ - /* 0 */ { 58, 1, 0, 0, { 0, 29, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 58, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 58, 1, 0, 0, { 0, 29, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 58, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81ee9b0 */ @@ -290,4 +290,4 @@ static const struct GroundLink s_gs105_links[] = { /* 0x81eeab4 */ /* link 8 */ { { /*x*/ 32, /*y*/ 13, /*flags*/ CPOS_HALFTILE, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs105 = { LPARRAY(s_gs105_groups), s_gs105_links }; /* 0x81eeafc */ +const GroundScriptHeader gGroundScript_gs105 = { LPARRAY(s_gs105_groups), s_gs105_links }; /* 0x81eeafc */ diff --git a/src/data/ground/ground_data_h01p02_station.h b/src/data/ground/ground_data_h01p02_station.h index 73cef5a49..bab8e73bc 100644 --- a/src/data/ground/ground_data_h01p02_station.h +++ b/src/data/ground/ground_data_h01p02_station.h @@ -33,10 +33,10 @@ static const struct ScriptCommand s_gs106_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -52,11 +52,11 @@ static const struct ScriptCommand s_gs106_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs106_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs106_g0_s0_station_sref_script }; /* 0x81eed8c */ +static const struct ScriptRef s_gs106_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs106_g0_s0_station_sref_script }; /* 0x81eed8c */ static const struct ScriptCommand s_gs106_g0_s1_lives0_dlg0[] = { /* 0x81eed98 */ DEBUGINFO_O(62), @@ -279,10 +279,10 @@ static const struct GroundLivesData s_gs106_g1_s0_lives[] = { /* 0x81ef2a8 */ }; static const struct GroundEventData s_gs106_g0_s0_evts[] = { /* 0x81ef398 */ - /* 0 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 60, 1, 0, 0, { 1, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 60, 1, 0, 0, { 1, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81ef3c8 */ @@ -320,4 +320,4 @@ static const struct GroundLink s_gs106_links[] = { /* 0x81ef4d4 */ /* link 9 */ { { /*x*/ 43, /*y*/ 17, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs106 = { LPARRAY(s_gs106_groups), s_gs106_links }; /* 0x81ef524 */ +const GroundScriptHeader gGroundScript_gs106 = { LPARRAY(s_gs106_groups), s_gs106_links }; /* 0x81ef524 */ diff --git a/src/data/ground/ground_data_h01p03_station.h b/src/data/ground/ground_data_h01p03_station.h index d89199c82..c627c5cfc 100644 --- a/src/data/ground/ground_data_h01p03_station.h +++ b/src/data/ground/ground_data_h01p03_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs107_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs107_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs107_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs107_g0_s0_station_sref_script }; /* 0x81ef7b4 */ +static const struct ScriptRef s_gs107_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs107_g0_s0_station_sref_script }; /* 0x81ef7b4 */ static const struct ScriptCommand s_gs107_g0_s1_lives0_dlg0[] = { /* 0x81ef7c0 */ DEBUGINFO_O(56), @@ -183,10 +183,10 @@ static const struct GroundLivesData s_gs107_g1_s0_lives[] = { /* 0x81efaf0 */ }; static const struct GroundEventData s_gs107_g0_s0_evts[] = { /* 0x81efb50 */ - /* 0 */ { 66, 3, 0, 0, { 0, 42, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 3, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 45, 0, 0, { 63, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 66, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 66, 3, 0, 0, { 0, 42, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 3, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 45, 0, 0, { 63, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 66, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81efb80 */ @@ -218,4 +218,4 @@ static const struct GroundLink s_gs107_links[] = { /* 0x81efc8c */ /* link 3 */ { { /*x*/ 24, /*y*/ 13, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs107 = { LPARRAY(s_gs107_groups), s_gs107_links }; /* 0x81efcac */ +const GroundScriptHeader gGroundScript_gs107 = { LPARRAY(s_gs107_groups), s_gs107_links }; /* 0x81efcac */ diff --git a/src/data/ground/ground_data_h02p01_station.h b/src/data/ground/ground_data_h02p01_station.h index 6c719e929..b6d2ce36e 100644 --- a/src/data/ground/ground_data_h02p01_station.h +++ b/src/data/ground/ground_data_h02p01_station.h @@ -35,10 +35,10 @@ static const struct ScriptCommand s_gs108_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -54,11 +54,11 @@ static const struct ScriptCommand s_gs108_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs108_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs108_g0_s0_station_sref_script }; /* 0x81eff3c */ +static const struct ScriptRef s_gs108_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs108_g0_s0_station_sref_script }; /* 0x81eff3c */ static const struct ScriptCommand s_gs108_g0_s1_lives0_dlg0[] = { /* 0x81eff48 */ DEBUGINFO_O(64), @@ -311,10 +311,10 @@ static const struct GroundLivesData s_gs108_g1_s0_lives[] = { /* 0x81f04f8 */ }; static const struct GroundEventData s_gs108_g0_s0_evts[] = { /* 0x81f0618 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f0648 */ @@ -354,4 +354,4 @@ static const struct GroundLink s_gs108_links[] = { /* 0x81f0754 */ /* link 11 */ { { /*x*/ 23, /*y*/ 27, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs108 = { LPARRAY(s_gs108_groups), s_gs108_links }; /* 0x81f07b4 */ +const GroundScriptHeader gGroundScript_gs108 = { LPARRAY(s_gs108_groups), s_gs108_links }; /* 0x81f07b4 */ diff --git a/src/data/ground/ground_data_h02p02_station.h b/src/data/ground/ground_data_h02p02_station.h index 181b89c62..56926b64e 100644 --- a/src/data/ground/ground_data_h02p02_station.h +++ b/src/data/ground/ground_data_h02p02_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs109_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs109_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(30), + BGM_SWITCH(MUS_FRIEND_AREA_DEEPSEA_CURRENT), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs109_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs109_g0_s0_station_sref_script }; /* 0x81f0a44 */ +static const struct ScriptRef s_gs109_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs109_g0_s0_station_sref_script }; /* 0x81f0a44 */ static const struct ScriptCommand s_gs109_g0_s1_lives0_dlg0[] = { /* 0x81f0a50 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs109_g1_s0_lives[] = { /* 0x81f0c90 */ }; static const struct GroundEventData s_gs109_g0_s0_evts[] = { /* 0x81f0ca8 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 39, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 39, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f0cd8 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs109_links[] = { /* 0x81f0de4 */ /* link 0 */ { { /*x*/ 23, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 10, /*h*/ 7, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs109 = { LPARRAY(s_gs109_groups), s_gs109_links }; /* 0x81f0dec */ +const GroundScriptHeader gGroundScript_gs109 = { LPARRAY(s_gs109_groups), s_gs109_links }; /* 0x81f0dec */ diff --git a/src/data/ground/ground_data_h02p03_station.h b/src/data/ground/ground_data_h02p03_station.h index f4f9608e0..bf1f32676 100644 --- a/src/data/ground/ground_data_h02p03_station.h +++ b/src/data/ground/ground_data_h02p03_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs110_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs110_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(31), + BGM_SWITCH(MUS_FRIEND_AREA_SEAFLOOR_CAVE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs110_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs110_g0_s0_station_sref_script }; /* 0x81f107c */ +static const struct ScriptRef s_gs110_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs110_g0_s0_station_sref_script }; /* 0x81f107c */ static const struct ScriptCommand s_gs110_g0_s1_lives0_dlg0[] = { /* 0x81f1088 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs110_g1_s0_lives[] = { /* 0x81f12c8 */ }; static const struct GroundEventData s_gs110_g0_s0_evts[] = { /* 0x81f12e0 */ - /* 0 */ { 45, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 42, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 45, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 45, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 42, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 45, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f1310 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs110_links[] = { /* 0x81f141c */ /* link 0 */ { { /*x*/ 19, /*y*/ 10, /*flags*/ 0, 0 }, /*w*/ 7, /*h*/ 7, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs110 = { LPARRAY(s_gs110_groups), s_gs110_links }; /* 0x81f1424 */ +const GroundScriptHeader gGroundScript_gs110 = { LPARRAY(s_gs110_groups), s_gs110_links }; /* 0x81f1424 */ diff --git a/src/data/ground/ground_data_h03p01_station.h b/src/data/ground/ground_data_h03p01_station.h index 8991e3359..dd8c24db2 100644 --- a/src/data/ground/ground_data_h03p01_station.h +++ b/src/data/ground/ground_data_h03p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs111_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs111_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(16), + BGM_SWITCH(MUS_FRIEND_AREA_POND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs111_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs111_g0_s0_station_sref_script }; /* 0x81f16b4 */ +static const struct ScriptRef s_gs111_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs111_g0_s0_station_sref_script }; /* 0x81f16b4 */ static const struct ScriptCommand s_gs111_g0_s1_lives0_dlg0[] = { /* 0x81f16c0 */ DEBUGINFO_O(58), @@ -215,10 +215,10 @@ static const struct GroundLivesData s_gs111_g1_s0_lives[] = { /* 0x81f1a90 */ }; static const struct GroundEventData s_gs111_g0_s0_evts[] = { /* 0x81f1b20 */ - /* 0 */ { 69, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 69, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 68, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 69, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 69, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 68, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f1b50 */ @@ -252,4 +252,4 @@ static const struct GroundLink s_gs111_links[] = { /* 0x81f1c5c */ /* link 5 */ { { /*x*/ 28, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs111 = { LPARRAY(s_gs111_groups), s_gs111_links }; /* 0x81f1c8c */ +const GroundScriptHeader gGroundScript_gs111 = { LPARRAY(s_gs111_groups), s_gs111_links }; /* 0x81f1c8c */ diff --git a/src/data/ground/ground_data_h04p01_station.h b/src/data/ground/ground_data_h04p01_station.h index 10268f647..12f40f799 100644 --- a/src/data/ground/ground_data_h04p01_station.h +++ b/src/data/ground/ground_data_h04p01_station.h @@ -35,10 +35,10 @@ static const struct ScriptCommand s_gs112_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -54,11 +54,11 @@ static const struct ScriptCommand s_gs112_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(105), + BGM_SWITCH(MUS_FRIEND_AREA_STEPPE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs112_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs112_g0_s0_station_sref_script }; /* 0x81f1f1c */ +static const struct ScriptRef s_gs112_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs112_g0_s0_station_sref_script }; /* 0x81f1f1c */ static const struct ScriptCommand s_gs112_g0_s1_lives0_dlg0[] = { /* 0x81f1f28 */ DEBUGINFO_O(64), @@ -311,7 +311,7 @@ static const struct GroundLivesData s_gs112_g1_s0_lives[] = { /* 0x81f24d8 */ }; static const struct GroundEventData s_gs112_g0_s0_evts[] = { /* 0x81f25f8 */ - /* 0 */ { 63, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 63, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f2604 */ @@ -351,4 +351,4 @@ static const struct GroundLink s_gs112_links[] = { /* 0x81f2710 */ /* link 11 */ { { /*x*/ 9, /*y*/ 21, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs112 = { LPARRAY(s_gs112_groups), s_gs112_links }; /* 0x81f2770 */ +const GroundScriptHeader gGroundScript_gs112 = { LPARRAY(s_gs112_groups), s_gs112_links }; /* 0x81f2770 */ diff --git a/src/data/ground/ground_data_h04p02_station.h b/src/data/ground/ground_data_h04p02_station.h index 551f77813..2da8094e3 100644 --- a/src/data/ground/ground_data_h04p02_station.h +++ b/src/data/ground/ground_data_h04p02_station.h @@ -32,10 +32,10 @@ static const struct ScriptCommand s_gs113_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -51,11 +51,11 @@ static const struct ScriptCommand s_gs113_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(107), + BGM_SWITCH(MUS_FRIEND_AREA_FIELD), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs113_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs113_g0_s0_station_sref_script }; /* 0x81f2a00 */ +static const struct ScriptRef s_gs113_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs113_g0_s0_station_sref_script }; /* 0x81f2a00 */ static const struct ScriptCommand s_gs113_g0_s1_lives0_dlg0[] = { /* 0x81f2a0c */ DEBUGINFO_O(61), @@ -263,8 +263,8 @@ static const struct GroundLivesData s_gs113_g1_s0_lives[] = { /* 0x81f2ecc */ }; static const struct GroundEventData s_gs113_g0_s0_evts[] = { /* 0x81f2fa4 */ - /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f2fbc */ @@ -301,4 +301,4 @@ static const struct GroundLink s_gs113_links[] = { /* 0x81f30c8 */ /* link 8 */ { { /*x*/ 9, /*y*/ 26, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs113 = { LPARRAY(s_gs113_groups), s_gs113_links }; /* 0x81f3110 */ +const GroundScriptHeader gGroundScript_gs113 = { LPARRAY(s_gs113_groups), s_gs113_links }; /* 0x81f3110 */ diff --git a/src/data/ground/ground_data_h05p01_station.h b/src/data/ground/ground_data_h05p01_station.h index 8159128a8..2ab2ac5d0 100644 --- a/src/data/ground/ground_data_h05p01_station.h +++ b/src/data/ground/ground_data_h05p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs114_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs114_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs114_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs114_g0_s0_station_sref_script }; /* 0x81f33a0 */ +static const struct ScriptRef s_gs114_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs114_g0_s0_station_sref_script }; /* 0x81f33a0 */ static const struct ScriptCommand s_gs114_g0_s1_lives0_dlg0[] = { /* 0x81f33ac */ DEBUGINFO_O(58), @@ -215,7 +215,7 @@ static const struct GroundLivesData s_gs114_g1_s0_lives[] = { /* 0x81f377c */ }; static const struct GroundEventData s_gs114_g0_s0_evts[] = { /* 0x81f380c */ - /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f3818 */ @@ -249,4 +249,4 @@ static const struct GroundLink s_gs114_links[] = { /* 0x81f3924 */ /* link 5 */ { { /*x*/ 24, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs114 = { LPARRAY(s_gs114_groups), s_gs114_links }; /* 0x81f3954 */ +const GroundScriptHeader gGroundScript_gs114 = { LPARRAY(s_gs114_groups), s_gs114_links }; /* 0x81f3954 */ diff --git a/src/data/ground/ground_data_h05p02_station.h b/src/data/ground/ground_data_h05p02_station.h index 33d0b919b..f2577e3a3 100644 --- a/src/data/ground/ground_data_h05p02_station.h +++ b/src/data/ground/ground_data_h05p02_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs115_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs115_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(28), + BGM_SWITCH(MUS_FRIEND_AREA_RAINBOW_PEAK), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs115_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs115_g0_s0_station_sref_script }; /* 0x81f3be4 */ +static const struct ScriptRef s_gs115_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs115_g0_s0_station_sref_script }; /* 0x81f3be4 */ static const struct ScriptCommand s_gs115_g0_s1_lives0_dlg0[] = { /* 0x81f3bf0 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs115_g1_s0_lives[] = { /* 0x81f3e30 */ }; static const struct GroundEventData s_gs115_g0_s0_evts[] = { /* 0x81f3e48 */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f3e78 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs115_links[] = { /* 0x81f3f84 */ /* link 0 */ { { /*x*/ 24, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 9, /*h*/ 5, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs115 = { LPARRAY(s_gs115_groups), s_gs115_links }; /* 0x81f3f8c */ +const GroundScriptHeader gGroundScript_gs115 = { LPARRAY(s_gs115_groups), s_gs115_links }; /* 0x81f3f8c */ diff --git a/src/data/ground/ground_data_h06p01_station.h b/src/data/ground/ground_data_h06p01_station.h index 524569d8b..b5bc33c4d 100644 --- a/src/data/ground/ground_data_h06p01_station.h +++ b/src/data/ground/ground_data_h06p01_station.h @@ -36,10 +36,10 @@ static const struct ScriptCommand s_gs116_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -55,11 +55,11 @@ static const struct ScriptCommand s_gs116_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(107), + BGM_SWITCH(MUS_FRIEND_AREA_FIELD), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs116_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs116_g0_s0_station_sref_script }; /* 0x81f421c */ +static const struct ScriptRef s_gs116_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs116_g0_s0_station_sref_script }; /* 0x81f421c */ static const struct ScriptCommand s_gs116_g0_s1_lives0_dlg0[] = { /* 0x81f4228 */ DEBUGINFO_O(65), @@ -327,10 +327,10 @@ static const struct GroundLivesData s_gs116_g1_s0_lives[] = { /* 0x81f4828 */ }; static const struct GroundEventData s_gs116_g0_s0_evts[] = { /* 0x81f4960 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f4990 */ @@ -371,4 +371,4 @@ static const struct GroundLink s_gs116_links[] = { /* 0x81f4a9c */ /* link 12 */ { { /*x*/ 15, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs116 = { LPARRAY(s_gs116_groups), s_gs116_links }; /* 0x81f4b04 */ +const GroundScriptHeader gGroundScript_gs116 = { LPARRAY(s_gs116_groups), s_gs116_links }; /* 0x81f4b04 */ diff --git a/src/data/ground/ground_data_h06p02_station.h b/src/data/ground/ground_data_h06p02_station.h index e821d17c0..c5472fd53 100644 --- a/src/data/ground/ground_data_h06p02_station.h +++ b/src/data/ground/ground_data_h06p02_station.h @@ -35,10 +35,10 @@ static const struct ScriptCommand s_gs117_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -54,11 +54,11 @@ static const struct ScriptCommand s_gs117_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(107), + BGM_SWITCH(MUS_FRIEND_AREA_FIELD), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs117_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs117_g0_s0_station_sref_script }; /* 0x81f4d94 */ +static const struct ScriptRef s_gs117_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs117_g0_s0_station_sref_script }; /* 0x81f4d94 */ static const struct ScriptCommand s_gs117_g0_s1_lives0_dlg0[] = { /* 0x81f4da0 */ DEBUGINFO_O(64), @@ -311,10 +311,10 @@ static const struct GroundLivesData s_gs117_g1_s0_lives[] = { /* 0x81f5350 */ }; static const struct GroundEventData s_gs117_g0_s0_evts[] = { /* 0x81f5470 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f54a0 */ @@ -354,4 +354,4 @@ static const struct GroundLink s_gs117_links[] = { /* 0x81f55ac */ /* link 11 */ { { /*x*/ 27, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs117 = { LPARRAY(s_gs117_groups), s_gs117_links }; /* 0x81f560c */ +const GroundScriptHeader gGroundScript_gs117 = { LPARRAY(s_gs117_groups), s_gs117_links }; /* 0x81f560c */ diff --git a/src/data/ground/ground_data_h06p03_station.h b/src/data/ground/ground_data_h06p03_station.h index 1453a6daf..2606d7a7d 100644 --- a/src/data/ground/ground_data_h06p03_station.h +++ b/src/data/ground/ground_data_h06p03_station.h @@ -36,10 +36,10 @@ static const struct ScriptCommand s_gs118_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -55,11 +55,11 @@ static const struct ScriptCommand s_gs118_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(105), + BGM_SWITCH(MUS_FRIEND_AREA_STEPPE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs118_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs118_g0_s0_station_sref_script }; /* 0x81f589c */ +static const struct ScriptRef s_gs118_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs118_g0_s0_station_sref_script }; /* 0x81f589c */ static const struct ScriptCommand s_gs118_g0_s1_lives0_dlg0[] = { /* 0x81f58a8 */ DEBUGINFO_O(65), @@ -327,10 +327,10 @@ static const struct GroundLivesData s_gs118_g1_s0_lives[] = { /* 0x81f5ea8 */ }; static const struct GroundEventData s_gs118_g0_s0_evts[] = { /* 0x81f5fe0 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f6010 */ @@ -371,4 +371,4 @@ static const struct GroundLink s_gs118_links[] = { /* 0x81f611c */ /* link 12 */ { { /*x*/ 15, /*y*/ 26, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs118 = { LPARRAY(s_gs118_groups), s_gs118_links }; /* 0x81f6184 */ +const GroundScriptHeader gGroundScript_gs118 = { LPARRAY(s_gs118_groups), s_gs118_links }; /* 0x81f6184 */ diff --git a/src/data/ground/ground_data_h06p04_station.h b/src/data/ground/ground_data_h06p04_station.h index b88821362..539bf6a70 100644 --- a/src/data/ground/ground_data_h06p04_station.h +++ b/src/data/ground/ground_data_h06p04_station.h @@ -38,10 +38,10 @@ static const struct ScriptCommand s_gs119_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -57,11 +57,11 @@ static const struct ScriptCommand s_gs119_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(105), + BGM_SWITCH(MUS_FRIEND_AREA_STEPPE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs119_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs119_g0_s0_station_sref_script }; /* 0x81f6414 */ +static const struct ScriptRef s_gs119_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs119_g0_s0_station_sref_script }; /* 0x81f6414 */ static const struct ScriptCommand s_gs119_g0_s1_lives0_dlg0[] = { /* 0x81f6420 */ DEBUGINFO_O(67), @@ -359,10 +359,10 @@ static const struct GroundLivesData s_gs119_g1_s0_lives[] = { /* 0x81f6ac0 */ }; static const struct GroundEventData s_gs119_g0_s0_evts[] = { /* 0x81f6c28 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 40, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 40, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f6c58 */ @@ -405,4 +405,4 @@ static const struct GroundLink s_gs119_links[] = { /* 0x81f6d64 */ /* link 14 */ { { /*x*/ 26, /*y*/ 25, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs119 = { LPARRAY(s_gs119_groups), s_gs119_links }; /* 0x81f6ddc */ +const GroundScriptHeader gGroundScript_gs119 = { LPARRAY(s_gs119_groups), s_gs119_links }; /* 0x81f6ddc */ diff --git a/src/data/ground/ground_data_h06p05_station.h b/src/data/ground/ground_data_h06p05_station.h index 6321e8acd..fda58db97 100644 --- a/src/data/ground/ground_data_h06p05_station.h +++ b/src/data/ground/ground_data_h06p05_station.h @@ -33,10 +33,10 @@ static const struct ScriptCommand s_gs120_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -52,11 +52,11 @@ static const struct ScriptCommand s_gs120_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(107), + BGM_SWITCH(MUS_FRIEND_AREA_FIELD), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs120_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs120_g0_s0_station_sref_script }; /* 0x81f706c */ +static const struct ScriptRef s_gs120_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs120_g0_s0_station_sref_script }; /* 0x81f706c */ static const struct ScriptCommand s_gs120_g0_s1_lives0_dlg0[] = { /* 0x81f7078 */ DEBUGINFO_O(62), @@ -279,10 +279,10 @@ static const struct GroundLivesData s_gs120_g1_s0_lives[] = { /* 0x81f7588 */ }; static const struct GroundEventData s_gs120_g0_s0_evts[] = { /* 0x81f7678 */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 39, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 42, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 39, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 42, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f76a8 */ @@ -320,4 +320,4 @@ static const struct GroundLink s_gs120_links[] = { /* 0x81f77b4 */ /* link 9 */ { { /*x*/ 25, /*y*/ 16, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs120 = { LPARRAY(s_gs120_groups), s_gs120_links }; /* 0x81f7804 */ +const GroundScriptHeader gGroundScript_gs120 = { LPARRAY(s_gs120_groups), s_gs120_links }; /* 0x81f7804 */ diff --git a/src/data/ground/ground_data_h06p06_station.h b/src/data/ground/ground_data_h06p06_station.h index bfea15eb1..eed98e2f9 100644 --- a/src/data/ground/ground_data_h06p06_station.h +++ b/src/data/ground/ground_data_h06p06_station.h @@ -26,10 +26,10 @@ static const struct ScriptCommand s_gs121_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -45,11 +45,11 @@ static const struct ScriptCommand s_gs121_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(107), + BGM_SWITCH(MUS_FRIEND_AREA_FIELD), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs121_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs121_g0_s0_station_sref_script }; /* 0x81f7a94 */ +static const struct ScriptRef s_gs121_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs121_g0_s0_station_sref_script }; /* 0x81f7a94 */ static const struct ScriptCommand s_gs121_g0_s1_lives0_dlg0[] = { /* 0x81f7aa0 */ DEBUGINFO_O(55), @@ -167,10 +167,10 @@ static const struct GroundLivesData s_gs121_g1_s0_lives[] = { /* 0x81f7d80 */ }; static const struct GroundEventData s_gs121_g0_s0_evts[] = { /* 0x81f7dc8 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 39, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 39, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f7df8 */ @@ -201,4 +201,4 @@ static const struct GroundLink s_gs121_links[] = { /* 0x81f7f04 */ /* link 2 */ { { /*x*/ 48, /*y*/ 15, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs121 = { LPARRAY(s_gs121_groups), s_gs121_links }; /* 0x81f7f1c */ +const GroundScriptHeader gGroundScript_gs121 = { LPARRAY(s_gs121_groups), s_gs121_links }; /* 0x81f7f1c */ diff --git a/src/data/ground/ground_data_h07p01_station.h b/src/data/ground/ground_data_h07p01_station.h index 63de72e35..51f1291d2 100644 --- a/src/data/ground/ground_data_h07p01_station.h +++ b/src/data/ground/ground_data_h07p01_station.h @@ -37,10 +37,10 @@ static const struct ScriptCommand s_gs122_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -56,11 +56,11 @@ static const struct ScriptCommand s_gs122_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs122_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs122_g0_s0_station_sref_script }; /* 0x81f81ac */ +static const struct ScriptRef s_gs122_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs122_g0_s0_station_sref_script }; /* 0x81f81ac */ static const struct ScriptCommand s_gs122_g0_s1_lives0_dlg0[] = { /* 0x81f81b8 */ DEBUGINFO_O(66), @@ -343,10 +343,10 @@ static const struct GroundLivesData s_gs122_g1_s0_lives[] = { /* 0x81f8808 */ }; static const struct GroundEventData s_gs122_g0_s0_evts[] = { /* 0x81f8958 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f8988 */ @@ -388,4 +388,4 @@ static const struct GroundLink s_gs122_links[] = { /* 0x81f8a94 */ /* link 13 */ { { /*x*/ 20, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs122 = { LPARRAY(s_gs122_groups), s_gs122_links }; /* 0x81f8b04 */ +const GroundScriptHeader gGroundScript_gs122 = { LPARRAY(s_gs122_groups), s_gs122_links }; /* 0x81f8b04 */ diff --git a/src/data/ground/ground_data_h07p02_station.h b/src/data/ground/ground_data_h07p02_station.h index 7103293a9..114927d14 100644 --- a/src/data/ground/ground_data_h07p02_station.h +++ b/src/data/ground/ground_data_h07p02_station.h @@ -35,10 +35,10 @@ static const struct ScriptCommand s_gs123_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -54,11 +54,11 @@ static const struct ScriptCommand s_gs123_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs123_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs123_g0_s0_station_sref_script }; /* 0x81f8d94 */ +static const struct ScriptRef s_gs123_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs123_g0_s0_station_sref_script }; /* 0x81f8d94 */ static const struct ScriptCommand s_gs123_g0_s1_lives0_dlg0[] = { /* 0x81f8da0 */ DEBUGINFO_O(64), @@ -311,8 +311,8 @@ static const struct GroundLivesData s_gs123_g1_s0_lives[] = { /* 0x81f9350 */ }; static const struct GroundEventData s_gs123_g0_s0_evts[] = { /* 0x81f9470 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f9488 */ @@ -352,4 +352,4 @@ static const struct GroundLink s_gs123_links[] = { /* 0x81f9594 */ /* link 11 */ { { /*x*/ 25, /*y*/ 7, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs123 = { LPARRAY(s_gs123_groups), s_gs123_links }; /* 0x81f95f4 */ +const GroundScriptHeader gGroundScript_gs123 = { LPARRAY(s_gs123_groups), s_gs123_links }; /* 0x81f95f4 */ diff --git a/src/data/ground/ground_data_h07p03_station.h b/src/data/ground/ground_data_h07p03_station.h index 8fee19ca0..59a1ee402 100644 --- a/src/data/ground/ground_data_h07p03_station.h +++ b/src/data/ground/ground_data_h07p03_station.h @@ -32,10 +32,10 @@ static const struct ScriptCommand s_gs124_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -51,11 +51,11 @@ static const struct ScriptCommand s_gs124_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs124_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs124_g0_s0_station_sref_script }; /* 0x81f9884 */ +static const struct ScriptRef s_gs124_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs124_g0_s0_station_sref_script }; /* 0x81f9884 */ static const struct ScriptCommand s_gs124_g0_s1_lives0_dlg0[] = { /* 0x81f9890 */ DEBUGINFO_O(61), @@ -263,7 +263,7 @@ static const struct GroundLivesData s_gs124_g1_s0_lives[] = { /* 0x81f9d50 */ }; static const struct GroundEventData s_gs124_g0_s0_evts[] = { /* 0x81f9e28 */ - /* 0 */ { 60, 1, 0, 0, { 1, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 1, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81f9e34 */ @@ -300,4 +300,4 @@ static const struct GroundLink s_gs124_links[] = { /* 0x81f9f40 */ /* link 8 */ { { /*x*/ 24, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs124 = { LPARRAY(s_gs124_groups), s_gs124_links }; /* 0x81f9f88 */ +const GroundScriptHeader gGroundScript_gs124 = { LPARRAY(s_gs124_groups), s_gs124_links }; /* 0x81f9f88 */ diff --git a/src/data/ground/ground_data_h07p04_station.h b/src/data/ground/ground_data_h07p04_station.h index 050669806..9f59d49d3 100644 --- a/src/data/ground/ground_data_h07p04_station.h +++ b/src/data/ground/ground_data_h07p04_station.h @@ -39,10 +39,10 @@ static const struct ScriptCommand s_gs125_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -58,11 +58,11 @@ static const struct ScriptCommand s_gs125_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs125_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs125_g0_s0_station_sref_script }; /* 0x81fa218 */ +static const struct ScriptRef s_gs125_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs125_g0_s0_station_sref_script }; /* 0x81fa218 */ static const struct ScriptCommand s_gs125_g0_s1_lives0_dlg0[] = { /* 0x81fa224 */ DEBUGINFO_O(68), @@ -375,7 +375,7 @@ static const struct GroundLivesData s_gs125_g1_s0_lives[] = { /* 0x81fa914 */ }; static const struct GroundEventData s_gs125_g0_s0_evts[] = { /* 0x81faa94 */ - /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81faaa0 */ @@ -419,4 +419,4 @@ static const struct GroundLink s_gs125_links[] = { /* 0x81fabac */ /* link 15 */ { { /*x*/ 28, /*y*/ 29, /*flags*/ 0, 0 }, /*w*/ 4, /*h*/ 4, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs125 = { LPARRAY(s_gs125_groups), s_gs125_links }; /* 0x81fac2c */ +const GroundScriptHeader gGroundScript_gs125 = { LPARRAY(s_gs125_groups), s_gs125_links }; /* 0x81fac2c */ diff --git a/src/data/ground/ground_data_h07p05_station.h b/src/data/ground/ground_data_h07p05_station.h index f51f2fe56..43bb8d4c3 100644 --- a/src/data/ground/ground_data_h07p05_station.h +++ b/src/data/ground/ground_data_h07p05_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs126_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(3), LABEL(3), /* = 0x03 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs126_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs126_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs126_g0_s0_station_sref_script }; /* 0x81fae8c */ +static const struct ScriptRef s_gs126_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs126_g0_s0_station_sref_script }; /* 0x81fae8c */ static const struct ScriptCommand s_gs126_g0_s1_lives0_dlg0[] = { /* 0x81fae98 */ @@ -229,10 +229,10 @@ static const struct GroundLivesData s_gs126_g1_s0_lives[] = { /* 0x81fb2b8 */ }; static const struct GroundEventData s_gs126_g0_s0_evts[] = { /* 0x81fb360 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fb390 */ @@ -267,4 +267,4 @@ static const struct GroundLink s_gs126_links[] = { /* 0x81fb49c */ /* link 6 */ { { /*x*/ 19, /*y*/ 29, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs126 = { LPARRAY(s_gs126_groups), s_gs126_links }; /* 0x81fb4d4 */ +const GroundScriptHeader gGroundScript_gs126 = { LPARRAY(s_gs126_groups), s_gs126_links }; /* 0x81fb4d4 */ diff --git a/src/data/ground/ground_data_h07p06_station.h b/src/data/ground/ground_data_h07p06_station.h index 77b237d4d..e0151fc7f 100644 --- a/src/data/ground/ground_data_h07p06_station.h +++ b/src/data/ground/ground_data_h07p06_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs127_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,25 +43,25 @@ static const struct ScriptCommand s_gs127_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(127), + BGM_SWITCH(MUS_FRIEND_AREA_HEALING_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs127_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs127_g0_s0_station_sref_script }; /* 0x81fb764 */ +static const struct ScriptRef s_gs127_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs127_g0_s0_station_sref_script }; /* 0x81fb764 */ static const struct ScriptCommand s_gs127_g0_s0_evt1_sref_script[] = { /* 0x81fb770 */ DEBUGINFO_O(53), JUMP_SCRIPT(GETOUT_HABITAT), }; -static const struct ScriptRef s_gs127_g0_s0_evt1_sref = { 358, 2, NULL /* GETOUT_HABITAT */, s_gs127_g0_s0_evt1_sref_script }; /* 0x81fb790 */ +static const struct ScriptRef s_gs127_g0_s0_evt1_sref = { GETOUT_HABITAT, 2, NULL, s_gs127_g0_s0_evt1_sref_script }; /* 0x81fb790 */ static const struct ScriptCommand s_gs127_g0_s0_evt2_sref_script[] = { /* 0x81fb79c */ DEBUGINFO_O(60), JUMP_SCRIPT(GETOUT_HABITAT), }; -static const struct ScriptRef s_gs127_g0_s0_evt2_sref = { 358, 2, NULL /* GETOUT_HABITAT */, s_gs127_g0_s0_evt2_sref_script }; /* 0x81fb7bc */ +static const struct ScriptRef s_gs127_g0_s0_evt2_sref = { GETOUT_HABITAT, 2, NULL, s_gs127_g0_s0_evt2_sref_script }; /* 0x81fb7bc */ static const struct ScriptCommand s_gs127_g0_s1_lives0_dlg0[] = { /* 0x81fb7c8 */ DEBUGINFO_O(67), @@ -149,10 +149,10 @@ static const struct GroundLivesData s_gs127_g1_s0_lives[] = { /* 0x81fba08 */ }; static const struct GroundEventData s_gs127_g0_s0_evts[] = { /* 0x81fba20 */ - /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, /* 1 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &s_gs127_g0_s0_evt1_sref }, /* 2 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &s_gs127_g0_s0_evt2_sref }, - /* 3 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 3 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fba50 */ @@ -181,4 +181,4 @@ static const struct GroundLink s_gs127_links[] = { /* 0x81fbb5c */ /* link 0 */ { { /*x*/ 27, /*y*/ 19, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs127 = { LPARRAY(s_gs127_groups), s_gs127_links }; /* 0x81fbb64 */ +const GroundScriptHeader gGroundScript_gs127 = { LPARRAY(s_gs127_groups), s_gs127_links }; /* 0x81fbb64 */ diff --git a/src/data/ground/ground_data_h07p07_station.h b/src/data/ground/ground_data_h07p07_station.h index b6927e439..449e78b3e 100644 --- a/src/data/ground/ground_data_h07p07_station.h +++ b/src/data/ground/ground_data_h07p07_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs128_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,25 +48,25 @@ static const struct ScriptCommand s_gs128_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs128_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs128_g0_s0_station_sref_script }; /* 0x81fbdf4 */ +static const struct ScriptRef s_gs128_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs128_g0_s0_station_sref_script }; /* 0x81fbdf4 */ static const struct ScriptCommand s_gs128_g0_s0_evt2_sref_script[] = { /* 0x81fbe00 */ DEBUGINFO_O(58), JUMP_SCRIPT(GETOUT_HABITAT), }; -static const struct ScriptRef s_gs128_g0_s0_evt2_sref = { 358, 2, NULL /* GETOUT_HABITAT */, s_gs128_g0_s0_evt2_sref_script }; /* 0x81fbe20 */ +static const struct ScriptRef s_gs128_g0_s0_evt2_sref = { GETOUT_HABITAT, 2, NULL, s_gs128_g0_s0_evt2_sref_script }; /* 0x81fbe20 */ static const struct ScriptCommand s_gs128_g0_s0_evt3_sref_script[] = { /* 0x81fbe2c */ DEBUGINFO_O(65), JUMP_SCRIPT(GETOUT_HABITAT), }; -static const struct ScriptRef s_gs128_g0_s0_evt3_sref = { 358, 2, NULL /* GETOUT_HABITAT */, s_gs128_g0_s0_evt3_sref_script }; /* 0x81fbe4c */ +static const struct ScriptRef s_gs128_g0_s0_evt3_sref = { GETOUT_HABITAT, 2, NULL, s_gs128_g0_s0_evt3_sref_script }; /* 0x81fbe4c */ static const struct ScriptCommand s_gs128_g0_s1_lives0_dlg0[] = { /* 0x81fbe58 */ DEBUGINFO_O(72), @@ -222,8 +222,8 @@ static const struct GroundLivesData s_gs128_g1_s0_lives[] = { /* 0x81fc1f8 */ }; static const struct GroundEventData s_gs128_g0_s0_evts[] = { /* 0x81fc288 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &s_gs128_g0_s0_evt2_sref }, /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &s_gs128_g0_s0_evt3_sref }, }; @@ -259,4 +259,4 @@ static const struct GroundLink s_gs128_links[] = { /* 0x81fc3c4 */ /* link 5 */ { { /*x*/ 27, /*y*/ 26, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs128 = { LPARRAY(s_gs128_groups), s_gs128_links }; /* 0x81fc3f4 */ +const GroundScriptHeader gGroundScript_gs128 = { LPARRAY(s_gs128_groups), s_gs128_links }; /* 0x81fc3f4 */ diff --git a/src/data/ground/ground_data_h07p08_station.h b/src/data/ground/ground_data_h07p08_station.h index b7e835f03..7568664c4 100644 --- a/src/data/ground/ground_data_h07p08_station.h +++ b/src/data/ground/ground_data_h07p08_station.h @@ -32,10 +32,10 @@ static const struct ScriptCommand s_gs129_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -51,11 +51,11 @@ static const struct ScriptCommand s_gs129_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(121), + BGM_SWITCH(MUS_FRIEND_AREA_FOREST), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs129_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs129_g0_s0_station_sref_script }; /* 0x81fc684 */ +static const struct ScriptRef s_gs129_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs129_g0_s0_station_sref_script }; /* 0x81fc684 */ static const struct ScriptCommand s_gs129_g0_s1_lives0_dlg0[] = { /* 0x81fc690 */ DEBUGINFO_O(61), @@ -263,10 +263,10 @@ static const struct GroundLivesData s_gs129_g1_s0_lives[] = { /* 0x81fcb50 */ }; static const struct GroundEventData s_gs129_g0_s0_evts[] = { /* 0x81fcc28 */ - /* 0 */ { 84, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 84, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fcc58 */ @@ -303,4 +303,4 @@ static const struct GroundLink s_gs129_links[] = { /* 0x81fcd64 */ /* link 8 */ { { /*x*/ 26, /*y*/ 22, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs129 = { LPARRAY(s_gs129_groups), s_gs129_links }; /* 0x81fcdac */ +const GroundScriptHeader gGroundScript_gs129 = { LPARRAY(s_gs129_groups), s_gs129_links }; /* 0x81fcdac */ diff --git a/src/data/ground/ground_data_h08p01_station.h b/src/data/ground/ground_data_h08p01_station.h index 1f599c9d8..829d22dcc 100644 --- a/src/data/ground/ground_data_h08p01_station.h +++ b/src/data/ground/ground_data_h08p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs130_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs130_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(16), + BGM_SWITCH(MUS_FRIEND_AREA_POND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs130_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs130_g0_s0_station_sref_script }; /* 0x81fd03c */ +static const struct ScriptRef s_gs130_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs130_g0_s0_station_sref_script }; /* 0x81fd03c */ static const struct ScriptCommand s_gs130_g0_s1_lives0_dlg0[] = { /* 0x81fd048 */ DEBUGINFO_O(59), @@ -244,10 +244,10 @@ static const struct GroundLivesData s_gs130_g1_s0_lives[] = { /* 0x81fd538 */ }; static const struct GroundEventData s_gs130_g0_s0_evts[] = { /* 0x81fd5e0 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fd610 */ @@ -282,4 +282,4 @@ static const struct GroundLink s_gs130_links[] = { /* 0x81fd71c */ /* link 6 */ { { /*x*/ 23, /*y*/ 23, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs130 = { LPARRAY(s_gs130_groups), s_gs130_links }; /* 0x81fd754 */ +const GroundScriptHeader gGroundScript_gs130 = { LPARRAY(s_gs130_groups), s_gs130_links }; /* 0x81fd754 */ diff --git a/src/data/ground/ground_data_h09p01_station.h b/src/data/ground/ground_data_h09p01_station.h index 6224647ec..5e278bac9 100644 --- a/src/data/ground/ground_data_h09p01_station.h +++ b/src/data/ground/ground_data_h09p01_station.h @@ -32,10 +32,10 @@ static const struct ScriptCommand s_gs131_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -51,11 +51,11 @@ static const struct ScriptCommand s_gs131_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(16), + BGM_SWITCH(MUS_FRIEND_AREA_POND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs131_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs131_g0_s0_station_sref_script }; /* 0x81fd9e4 */ +static const struct ScriptRef s_gs131_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs131_g0_s0_station_sref_script }; /* 0x81fd9e4 */ static const struct ScriptCommand s_gs131_g0_s1_lives0_dlg0[] = { /* 0x81fd9f0 */ DEBUGINFO_O(61), @@ -263,7 +263,7 @@ static const struct GroundLivesData s_gs131_g1_s0_lives[] = { /* 0x81fdeb0 */ }; static const struct GroundEventData s_gs131_g0_s0_evts[] = { /* 0x81fdf88 */ - /* 0 */ { 63, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 63, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fdf94 */ @@ -300,4 +300,4 @@ static const struct GroundLink s_gs131_links[] = { /* 0x81fe0a0 */ /* link 8 */ { { /*x*/ 22, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs131 = { LPARRAY(s_gs131_groups), s_gs131_links }; /* 0x81fe0e8 */ +const GroundScriptHeader gGroundScript_gs131 = { LPARRAY(s_gs131_groups), s_gs131_links }; /* 0x81fe0e8 */ diff --git a/src/data/ground/ground_data_h09p02_station.h b/src/data/ground/ground_data_h09p02_station.h index d4a15df2b..458dcfe45 100644 --- a/src/data/ground/ground_data_h09p02_station.h +++ b/src/data/ground/ground_data_h09p02_station.h @@ -33,10 +33,10 @@ static const struct ScriptCommand s_gs132_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -52,11 +52,11 @@ static const struct ScriptCommand s_gs132_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(16), + BGM_SWITCH(MUS_FRIEND_AREA_POND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs132_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs132_g0_s0_station_sref_script }; /* 0x81fe378 */ +static const struct ScriptRef s_gs132_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs132_g0_s0_station_sref_script }; /* 0x81fe378 */ static const struct ScriptCommand s_gs132_g0_s1_lives0_dlg0[] = { /* 0x81fe384 */ DEBUGINFO_O(62), @@ -279,10 +279,10 @@ static const struct GroundLivesData s_gs132_g1_s0_lives[] = { /* 0x81fe894 */ }; static const struct GroundEventData s_gs132_g0_s0_evts[] = { /* 0x81fe984 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81fe9b4 */ @@ -320,4 +320,4 @@ static const struct GroundLink s_gs132_links[] = { /* 0x81feac0 */ /* link 9 */ { { /*x*/ 27, /*y*/ 9, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs132 = { LPARRAY(s_gs132_groups), s_gs132_links }; /* 0x81feb10 */ +const GroundScriptHeader gGroundScript_gs132 = { LPARRAY(s_gs132_groups), s_gs132_links }; /* 0x81feb10 */ diff --git a/src/data/ground/ground_data_h10p01_station.h b/src/data/ground/ground_data_h10p01_station.h index 1928d49d5..e4c411446 100644 --- a/src/data/ground/ground_data_h10p01_station.h +++ b/src/data/ground/ground_data_h10p01_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs133_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs133_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs133_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs133_g0_s0_station_sref_script }; /* 0x81feda0 */ +static const struct ScriptRef s_gs133_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs133_g0_s0_station_sref_script }; /* 0x81feda0 */ static const struct ScriptCommand s_gs133_g0_s1_lives0_dlg0[] = { /* 0x81fedac */ DEBUGINFO_O(56), @@ -183,7 +183,7 @@ static const struct GroundLivesData s_gs133_g1_s0_lives[] = { /* 0x81ff0dc */ }; static const struct GroundEventData s_gs133_g0_s0_evts[] = { /* 0x81ff13c */ - /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81ff148 */ @@ -215,4 +215,4 @@ static const struct GroundLink s_gs133_links[] = { /* 0x81ff254 */ /* link 3 */ { { /*x*/ 27, /*y*/ 18, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs133 = { LPARRAY(s_gs133_groups), s_gs133_links }; /* 0x81ff274 */ +const GroundScriptHeader gGroundScript_gs133 = { LPARRAY(s_gs133_groups), s_gs133_links }; /* 0x81ff274 */ diff --git a/src/data/ground/ground_data_h10p02_station.h b/src/data/ground/ground_data_h10p02_station.h index d4a9d8d8c..1bae0d5a8 100644 --- a/src/data/ground/ground_data_h10p02_station.h +++ b/src/data/ground/ground_data_h10p02_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs134_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs134_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(16), + BGM_SWITCH(MUS_FRIEND_AREA_POND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs134_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs134_g0_s0_station_sref_script }; /* 0x81ff504 */ +static const struct ScriptRef s_gs134_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs134_g0_s0_station_sref_script }; /* 0x81ff504 */ static const struct ScriptCommand s_gs134_g0_s1_lives0_dlg0[] = { /* 0x81ff510 */ DEBUGINFO_O(56), @@ -193,10 +193,10 @@ static const struct GroundLivesData s_gs134_g1_s0_lives[] = { /* 0x81ff8e0 */ }; static const struct GroundEventData s_gs134_g0_s0_evts[] = { /* 0x81ff940 */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 1, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 39, 0, 0, { 56, 1, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 1, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 39, 0, 0, { 56, 1, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x81ff970 */ @@ -228,4 +228,4 @@ static const struct GroundLink s_gs134_links[] = { /* 0x81ffa7c */ /* link 3 */ { { /*x*/ 11, /*y*/ 10, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs134 = { LPARRAY(s_gs134_groups), s_gs134_links }; /* 0x81ffa9c */ +const GroundScriptHeader gGroundScript_gs134 = { LPARRAY(s_gs134_groups), s_gs134_links }; /* 0x81ffa9c */ diff --git a/src/data/ground/ground_data_h11p01_station.h b/src/data/ground/ground_data_h11p01_station.h index 9bf830ed0..55e82a4ae 100644 --- a/src/data/ground/ground_data_h11p01_station.h +++ b/src/data/ground/ground_data_h11p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs135_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs135_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(2), + BGM_SWITCH(MUS_FRIEND_AREA_SWAMP), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs135_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs135_g0_s0_station_sref_script }; /* 0x81ffd2c */ +static const struct ScriptRef s_gs135_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs135_g0_s0_station_sref_script }; /* 0x81ffd2c */ static const struct ScriptCommand s_gs135_g0_s1_lives0_dlg0[] = { /* 0x81ffd38 */ DEBUGINFO_O(59), @@ -231,10 +231,10 @@ static const struct GroundLivesData s_gs135_g1_s0_lives[] = { /* 0x8200158 */ }; static const struct GroundEventData s_gs135_g0_s0_evts[] = { /* 0x8200200 */ - /* 0 */ { 66, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 66, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 65, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 66, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 66, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 65, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8200230 */ @@ -269,4 +269,4 @@ static const struct GroundLink s_gs135_links[] = { /* 0x820033c */ /* link 6 */ { { /*x*/ 12, /*y*/ 17, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs135 = { LPARRAY(s_gs135_groups), s_gs135_links }; /* 0x8200374 */ +const GroundScriptHeader gGroundScript_gs135 = { LPARRAY(s_gs135_groups), s_gs135_links }; /* 0x8200374 */ diff --git a/src/data/ground/ground_data_h12p01_station.h b/src/data/ground/ground_data_h12p01_station.h index 947b116ad..8ed7b7625 100644 --- a/src/data/ground/ground_data_h12p01_station.h +++ b/src/data/ground/ground_data_h12p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs136_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs136_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(2), + BGM_SWITCH(MUS_FRIEND_AREA_SWAMP), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs136_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs136_g0_s0_station_sref_script }; /* 0x8200604 */ +static const struct ScriptRef s_gs136_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs136_g0_s0_station_sref_script }; /* 0x8200604 */ static const struct ScriptCommand s_gs136_g0_s1_lives0_dlg0[] = { /* 0x8200610 */ DEBUGINFO_O(58), @@ -215,10 +215,10 @@ static const struct GroundLivesData s_gs136_g1_s0_lives[] = { /* 0x82009e0 */ }; static const struct GroundEventData s_gs136_g0_s0_evts[] = { /* 0x8200a70 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8200aa0 */ @@ -252,4 +252,4 @@ static const struct GroundLink s_gs136_links[] = { /* 0x8200bac */ /* link 5 */ { { /*x*/ 31, /*y*/ 9, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs136 = { LPARRAY(s_gs136_groups), s_gs136_links }; /* 0x8200bdc */ +const GroundScriptHeader gGroundScript_gs136 = { LPARRAY(s_gs136_groups), s_gs136_links }; /* 0x8200bdc */ diff --git a/src/data/ground/ground_data_h13p01_station.h b/src/data/ground/ground_data_h13p01_station.h index 99b3b03e8..5fd716fa7 100644 --- a/src/data/ground/ground_data_h13p01_station.h +++ b/src/data/ground/ground_data_h13p01_station.h @@ -34,10 +34,10 @@ static const struct ScriptCommand s_gs137_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -53,11 +53,11 @@ static const struct ScriptCommand s_gs137_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs137_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs137_g0_s0_station_sref_script }; /* 0x8200e6c */ +static const struct ScriptRef s_gs137_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs137_g0_s0_station_sref_script }; /* 0x8200e6c */ static const struct ScriptCommand s_gs137_g0_s1_lives0_dlg0[] = { /* 0x8200e78 */ DEBUGINFO_O(63), @@ -295,10 +295,10 @@ static const struct GroundLivesData s_gs137_g1_s0_lives[] = { /* 0x82013d8 */ }; static const struct GroundEventData s_gs137_g0_s0_evts[] = { /* 0x82014e0 */ - /* 0 */ { 63, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 63, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 45, 0, 0, { 60, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 63, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 63, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 45, 0, 0, { 60, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8201510 */ @@ -337,4 +337,4 @@ static const struct GroundLink s_gs137_links[] = { /* 0x820161c */ /* link 10 */ { { /*x*/ 29, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs137 = { LPARRAY(s_gs137_groups), s_gs137_links }; /* 0x8201674 */ +const GroundScriptHeader gGroundScript_gs137 = { LPARRAY(s_gs137_groups), s_gs137_links }; /* 0x8201674 */ diff --git a/src/data/ground/ground_data_h13p02_station.h b/src/data/ground/ground_data_h13p02_station.h index 668fcabec..7c7c94a43 100644 --- a/src/data/ground/ground_data_h13p02_station.h +++ b/src/data/ground/ground_data_h13p02_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs138_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs138_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(35), + BGM_SWITCH(MUS_FRIEND_AREA_CRYPTIC_CAVE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs138_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs138_g0_s0_station_sref_script }; /* 0x8201904 */ +static const struct ScriptRef s_gs138_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs138_g0_s0_station_sref_script }; /* 0x8201904 */ static const struct ScriptCommand s_gs138_g0_s1_lives0_dlg0[] = { /* 0x8201910 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs138_g1_s0_lives[] = { /* 0x8201b50 */ }; static const struct GroundEventData s_gs138_g0_s0_evts[] = { /* 0x8201b68 */ - /* 0 */ { 45, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 45, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 42, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 45, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 45, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 42, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8201b98 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs138_links[] = { /* 0x8201ca4 */ /* link 0 */ { { /*x*/ 19, /*y*/ 9, /*flags*/ 0, 0 }, /*w*/ 7, /*h*/ 3, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs138 = { LPARRAY(s_gs138_groups), s_gs138_links }; /* 0x8201cac */ +const GroundScriptHeader gGroundScript_gs138 = { LPARRAY(s_gs138_groups), s_gs138_links }; /* 0x8201cac */ diff --git a/src/data/ground/ground_data_h13p03_station.h b/src/data/ground/ground_data_h13p03_station.h index 2049b2d96..a1f735c78 100644 --- a/src/data/ground/ground_data_h13p03_station.h +++ b/src/data/ground/ground_data_h13p03_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs139_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs139_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs139_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs139_g0_s0_station_sref_script }; /* 0x8201f3c */ +static const struct ScriptRef s_gs139_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs139_g0_s0_station_sref_script }; /* 0x8201f3c */ static const struct ScriptCommand s_gs139_g0_s1_lives0_dlg0[] = { /* 0x8201f48 */ DEBUGINFO_O(56), @@ -183,10 +183,10 @@ static const struct GroundLivesData s_gs139_g1_s0_lives[] = { /* 0x8202278 */ }; static const struct GroundEventData s_gs139_g0_s0_evts[] = { /* 0x82022d8 */ - /* 0 */ { 58, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 58, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 40, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 40, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 58, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 58, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 40, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 40, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8202308 */ @@ -218,4 +218,4 @@ static const struct GroundLink s_gs139_links[] = { /* 0x8202414 */ /* link 3 */ { { /*x*/ 26, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs139 = { LPARRAY(s_gs139_groups), s_gs139_links }; /* 0x8202434 */ +const GroundScriptHeader gGroundScript_gs139 = { LPARRAY(s_gs139_groups), s_gs139_links }; /* 0x8202434 */ diff --git a/src/data/ground/ground_data_h13p04_station.h b/src/data/ground/ground_data_h13p04_station.h index 3bc7d811b..0d6187aa2 100644 --- a/src/data/ground/ground_data_h13p04_station.h +++ b/src/data/ground/ground_data_h13p04_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs140_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs140_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs140_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs140_g0_s0_station_sref_script }; /* 0x82026c4 */ +static const struct ScriptRef s_gs140_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs140_g0_s0_station_sref_script }; /* 0x82026c4 */ static const struct ScriptCommand s_gs140_g0_s1_lives0_dlg0[] = { /* 0x82026d0 */ DEBUGINFO_O(56), @@ -183,8 +183,8 @@ static const struct GroundLivesData s_gs140_g1_s0_lives[] = { /* 0x8202a00 */ }; static const struct GroundEventData s_gs140_g0_s0_evts[] = { /* 0x8202a60 */ - /* 0 */ { 63, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 63, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 63, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 63, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8202a78 */ @@ -216,4 +216,4 @@ static const struct GroundLink s_gs140_links[] = { /* 0x8202b84 */ /* link 3 */ { { /*x*/ 25, /*y*/ 8, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs140 = { LPARRAY(s_gs140_groups), s_gs140_links }; /* 0x8202ba4 */ +const GroundScriptHeader gGroundScript_gs140 = { LPARRAY(s_gs140_groups), s_gs140_links }; /* 0x8202ba4 */ diff --git a/src/data/ground/ground_data_h14p01_station.h b/src/data/ground/ground_data_h14p01_station.h index abf3bbbfa..c5c233afe 100644 --- a/src/data/ground/ground_data_h14p01_station.h +++ b/src/data/ground/ground_data_h14p01_station.h @@ -36,10 +36,10 @@ static const struct ScriptCommand s_gs141_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -55,11 +55,11 @@ static const struct ScriptCommand s_gs141_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs141_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs141_g0_s0_station_sref_script }; /* 0x8202e34 */ +static const struct ScriptRef s_gs141_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs141_g0_s0_station_sref_script }; /* 0x8202e34 */ static const struct ScriptCommand s_gs141_g0_s1_lives0_dlg0[] = { /* 0x8202e40 */ DEBUGINFO_O(65), @@ -327,10 +327,10 @@ static const struct GroundLivesData s_gs141_g1_s0_lives[] = { /* 0x8203440 */ }; static const struct GroundEventData s_gs141_g0_s0_evts[] = { /* 0x8203578 */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x82035a8 */ @@ -371,4 +371,4 @@ static const struct GroundLink s_gs141_links[] = { /* 0x82036b4 */ /* link 12 */ { { /*x*/ 26, /*y*/ 25, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs141 = { LPARRAY(s_gs141_groups), s_gs141_links }; /* 0x820371c */ +const GroundScriptHeader gGroundScript_gs141 = { LPARRAY(s_gs141_groups), s_gs141_links }; /* 0x820371c */ diff --git a/src/data/ground/ground_data_h15p01_station.h b/src/data/ground/ground_data_h15p01_station.h index 75d76c7b3..24e814fc4 100644 --- a/src/data/ground/ground_data_h15p01_station.h +++ b/src/data/ground/ground_data_h15p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs142_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs142_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(112), + BGM_SWITCH(MUS_FRIEND_AREA_LAB), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs142_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs142_g0_s0_station_sref_script }; /* 0x82039ac */ +static const struct ScriptRef s_gs142_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs142_g0_s0_station_sref_script }; /* 0x82039ac */ static const struct ScriptCommand s_gs142_g0_s1_lives0_dlg0[] = { /* 0x82039b8 */ DEBUGINFO_O(59), @@ -231,7 +231,7 @@ static const struct GroundLivesData s_gs142_g1_s0_lives[] = { /* 0x8203dd8 */ }; static const struct GroundEventData s_gs142_g0_s0_evts[] = { /* 0x8203e80 */ - /* 0 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8203e8c */ @@ -266,4 +266,4 @@ static const struct GroundLink s_gs142_links[] = { /* 0x8203f98 */ /* link 6 */ { { /*x*/ 14, /*y*/ 27, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs142 = { LPARRAY(s_gs142_groups), s_gs142_links }; /* 0x8203fd0 */ +const GroundScriptHeader gGroundScript_gs142 = { LPARRAY(s_gs142_groups), s_gs142_links }; /* 0x8203fd0 */ diff --git a/src/data/ground/ground_data_h16p01_station.h b/src/data/ground/ground_data_h16p01_station.h index 505730f6d..4235ce939 100644 --- a/src/data/ground/ground_data_h16p01_station.h +++ b/src/data/ground/ground_data_h16p01_station.h @@ -34,10 +34,10 @@ static const struct ScriptCommand s_gs143_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -53,11 +53,11 @@ static const struct ScriptCommand s_gs143_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs143_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs143_g0_s0_station_sref_script }; /* 0x8204260 */ +static const struct ScriptRef s_gs143_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs143_g0_s0_station_sref_script }; /* 0x8204260 */ static const struct ScriptCommand s_gs143_g0_s1_lives0_dlg0[] = { /* 0x820426c */ DEBUGINFO_O(63), @@ -295,10 +295,10 @@ static const struct GroundLivesData s_gs143_g1_s0_lives[] = { /* 0x82047cc */ }; static const struct GroundEventData s_gs143_g0_s0_evts[] = { /* 0x82048d4 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8204904 */ @@ -337,4 +337,4 @@ static const struct GroundLink s_gs143_links[] = { /* 0x8204a10 */ /* link 10 */ { { /*x*/ 27, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs143 = { LPARRAY(s_gs143_groups), s_gs143_links }; /* 0x8204a68 */ +const GroundScriptHeader gGroundScript_gs143 = { LPARRAY(s_gs143_groups), s_gs143_links }; /* 0x8204a68 */ diff --git a/src/data/ground/ground_data_h17p01_station.h b/src/data/ground/ground_data_h17p01_station.h index 22ac10135..80198ed28 100644 --- a/src/data/ground/ground_data_h17p01_station.h +++ b/src/data/ground/ground_data_h17p01_station.h @@ -34,10 +34,10 @@ static const struct ScriptCommand s_gs144_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -53,11 +53,11 @@ static const struct ScriptCommand s_gs144_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs144_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs144_g0_s0_station_sref_script }; /* 0x8204cf8 */ +static const struct ScriptRef s_gs144_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs144_g0_s0_station_sref_script }; /* 0x8204cf8 */ static const struct ScriptCommand s_gs144_g0_s1_lives0_dlg0[] = { /* 0x8204d04 */ DEBUGINFO_O(63), @@ -295,10 +295,10 @@ static const struct GroundLivesData s_gs144_g1_s0_lives[] = { /* 0x8205264 */ }; static const struct GroundEventData s_gs144_g0_s0_evts[] = { /* 0x820536c */ - /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820539c */ @@ -337,4 +337,4 @@ static const struct GroundLink s_gs144_links[] = { /* 0x82054a8 */ /* link 10 */ { { /*x*/ 19, /*y*/ 29, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs144 = { LPARRAY(s_gs144_groups), s_gs144_links }; /* 0x8205500 */ +const GroundScriptHeader gGroundScript_gs144 = { LPARRAY(s_gs144_groups), s_gs144_links }; /* 0x8205500 */ diff --git a/src/data/ground/ground_data_h18p01_station.h b/src/data/ground/ground_data_h18p01_station.h index 4bf1dc679..32b6be27d 100644 --- a/src/data/ground/ground_data_h18p01_station.h +++ b/src/data/ground/ground_data_h18p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs145_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs145_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(112), + BGM_SWITCH(MUS_FRIEND_AREA_LAB), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs145_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs145_g0_s0_station_sref_script }; /* 0x8205790 */ +static const struct ScriptRef s_gs145_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs145_g0_s0_station_sref_script }; /* 0x8205790 */ static const struct ScriptCommand s_gs145_g0_s1_lives0_dlg0[] = { /* 0x820579c */ DEBUGINFO_O(59), @@ -231,10 +231,10 @@ static const struct GroundLivesData s_gs145_g1_s0_lives[] = { /* 0x8205bbc */ }; static const struct GroundEventData s_gs145_g0_s0_evts[] = { /* 0x8205c64 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8205c94 */ @@ -269,4 +269,4 @@ static const struct GroundLink s_gs145_links[] = { /* 0x8205da0 */ /* link 6 */ { { /*x*/ 26, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs145 = { LPARRAY(s_gs145_groups), s_gs145_links }; /* 0x8205dd8 */ +const GroundScriptHeader gGroundScript_gs145 = { LPARRAY(s_gs145_groups), s_gs145_links }; /* 0x8205dd8 */ diff --git a/src/data/ground/ground_data_h19p01_station.h b/src/data/ground/ground_data_h19p01_station.h index b927988a3..9f82eb1cd 100644 --- a/src/data/ground/ground_data_h19p01_station.h +++ b/src/data/ground/ground_data_h19p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs146_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs146_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs146_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs146_g0_s0_station_sref_script }; /* 0x8206068 */ +static const struct ScriptRef s_gs146_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs146_g0_s0_station_sref_script }; /* 0x8206068 */ static const struct ScriptCommand s_gs146_g0_s1_lives0_dlg0[] = { /* 0x8206074 */ DEBUGINFO_O(59), @@ -231,10 +231,10 @@ static const struct GroundLivesData s_gs146_g1_s0_lives[] = { /* 0x8206494 */ }; static const struct GroundEventData s_gs146_g0_s0_evts[] = { /* 0x820653c */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 54, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820656c */ @@ -269,4 +269,4 @@ static const struct GroundLink s_gs146_links[] = { /* 0x8206678 */ /* link 6 */ { { /*x*/ 26, /*y*/ 23, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs146 = { LPARRAY(s_gs146_groups), s_gs146_links }; /* 0x82066b0 */ +const GroundScriptHeader gGroundScript_gs146 = { LPARRAY(s_gs146_groups), s_gs146_links }; /* 0x82066b0 */ diff --git a/src/data/ground/ground_data_h20p01_station.h b/src/data/ground/ground_data_h20p01_station.h index f8aa685e3..bae621786 100644 --- a/src/data/ground/ground_data_h20p01_station.h +++ b/src/data/ground/ground_data_h20p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs147_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs147_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs147_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs147_g0_s0_station_sref_script }; /* 0x8206940 */ +static const struct ScriptRef s_gs147_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs147_g0_s0_station_sref_script }; /* 0x8206940 */ static const struct ScriptCommand s_gs147_g0_s1_lives0_dlg0[] = { /* 0x820694c */ DEBUGINFO_O(59), @@ -231,10 +231,10 @@ static const struct GroundLivesData s_gs147_g1_s0_lives[] = { /* 0x8206d6c */ }; static const struct GroundEventData s_gs147_g0_s0_evts[] = { /* 0x8206e14 */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 42, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8206e44 */ @@ -269,4 +269,4 @@ static const struct GroundLink s_gs147_links[] = { /* 0x8206f50 */ /* link 6 */ { { /*x*/ 20, /*y*/ 28, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs147 = { LPARRAY(s_gs147_groups), s_gs147_links }; /* 0x8206f88 */ +const GroundScriptHeader gGroundScript_gs147 = { LPARRAY(s_gs147_groups), s_gs147_links }; /* 0x8206f88 */ diff --git a/src/data/ground/ground_data_h21p01_station.h b/src/data/ground/ground_data_h21p01_station.h index 774d81194..a441901be 100644 --- a/src/data/ground/ground_data_h21p01_station.h +++ b/src/data/ground/ground_data_h21p01_station.h @@ -37,10 +37,10 @@ static const struct ScriptCommand s_gs148_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -56,11 +56,11 @@ static const struct ScriptCommand s_gs148_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs148_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs148_g0_s0_station_sref_script }; /* 0x8207218 */ +static const struct ScriptRef s_gs148_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs148_g0_s0_station_sref_script }; /* 0x8207218 */ static const struct ScriptCommand s_gs148_g0_s1_lives0_dlg0[] = { /* 0x8207224 */ DEBUGINFO_O(66), @@ -343,8 +343,8 @@ static const struct GroundLivesData s_gs148_g1_s0_lives[] = { /* 0x8207874 */ }; static const struct GroundEventData s_gs148_g0_s0_evts[] = { /* 0x82079c4 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x82079dc */ @@ -386,4 +386,4 @@ static const struct GroundLink s_gs148_links[] = { /* 0x8207ae8 */ /* link 13 */ { { /*x*/ 50, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs148 = { LPARRAY(s_gs148_groups), s_gs148_links }; /* 0x8207b58 */ +const GroundScriptHeader gGroundScript_gs148 = { LPARRAY(s_gs148_groups), s_gs148_links }; /* 0x8207b58 */ diff --git a/src/data/ground/ground_data_h21p02_station.h b/src/data/ground/ground_data_h21p02_station.h index 76a377d68..675e957f9 100644 --- a/src/data/ground/ground_data_h21p02_station.h +++ b/src/data/ground/ground_data_h21p02_station.h @@ -37,10 +37,10 @@ static const struct ScriptCommand s_gs149_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -56,11 +56,11 @@ static const struct ScriptCommand s_gs149_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs149_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs149_g0_s0_station_sref_script }; /* 0x8207de8 */ +static const struct ScriptRef s_gs149_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs149_g0_s0_station_sref_script }; /* 0x8207de8 */ static const struct ScriptCommand s_gs149_g0_s1_lives0_dlg0[] = { /* 0x8207df4 */ DEBUGINFO_O(66), @@ -343,8 +343,8 @@ static const struct GroundLivesData s_gs149_g1_s0_lives[] = { /* 0x8208444 */ }; static const struct GroundEventData s_gs149_g0_s0_evts[] = { /* 0x8208594 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x82085ac */ @@ -386,4 +386,4 @@ static const struct GroundLink s_gs149_links[] = { /* 0x82086b8 */ /* link 13 */ { { /*x*/ 27, /*y*/ 19, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs149 = { LPARRAY(s_gs149_groups), s_gs149_links }; /* 0x8208728 */ +const GroundScriptHeader gGroundScript_gs149 = { LPARRAY(s_gs149_groups), s_gs149_links }; /* 0x8208728 */ diff --git a/src/data/ground/ground_data_h22p01_station.h b/src/data/ground/ground_data_h22p01_station.h index 50ee1f0da..2b2876cac 100644 --- a/src/data/ground/ground_data_h22p01_station.h +++ b/src/data/ground/ground_data_h22p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs150_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs150_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(3), + BGM_SWITCH(MUS_FRIEND_AREA_CAVES), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs150_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs150_g0_s0_station_sref_script }; /* 0x82089b8 */ +static const struct ScriptRef s_gs150_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs150_g0_s0_station_sref_script }; /* 0x82089b8 */ static const struct ScriptCommand s_gs150_g0_s1_lives0_dlg0[] = { /* 0x82089c4 */ DEBUGINFO_O(58), @@ -215,10 +215,10 @@ static const struct GroundLivesData s_gs150_g1_s0_lives[] = { /* 0x8208d94 */ }; static const struct GroundEventData s_gs150_g0_s0_evts[] = { /* 0x8208e24 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8208e54 */ @@ -252,4 +252,4 @@ static const struct GroundLink s_gs150_links[] = { /* 0x8208f60 */ /* link 5 */ { { /*x*/ 27, /*y*/ 24, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs150 = { LPARRAY(s_gs150_groups), s_gs150_links }; /* 0x8208f90 */ +const GroundScriptHeader gGroundScript_gs150 = { LPARRAY(s_gs150_groups), s_gs150_links }; /* 0x8208f90 */ diff --git a/src/data/ground/ground_data_h23p01_station.h b/src/data/ground/ground_data_h23p01_station.h index 53a1cd948..22ce254b5 100644 --- a/src/data/ground/ground_data_h23p01_station.h +++ b/src/data/ground/ground_data_h23p01_station.h @@ -36,10 +36,10 @@ static const struct ScriptCommand s_gs151_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -55,11 +55,11 @@ static const struct ScriptCommand s_gs151_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(2), + BGM_SWITCH(MUS_FRIEND_AREA_SWAMP), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs151_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs151_g0_s0_station_sref_script }; /* 0x8209220 */ +static const struct ScriptRef s_gs151_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs151_g0_s0_station_sref_script }; /* 0x8209220 */ static const struct ScriptCommand s_gs151_g0_s1_lives0_dlg0[] = { /* 0x820922c */ DEBUGINFO_O(65), @@ -327,10 +327,10 @@ static const struct GroundLivesData s_gs151_g1_s0_lives[] = { /* 0x820982c */ }; static const struct GroundEventData s_gs151_g0_s0_evts[] = { /* 0x8209964 */ - /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 39, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 57, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 57, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 39, 0, 0, { 56, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x8209994 */ @@ -371,4 +371,4 @@ static const struct GroundLink s_gs151_links[] = { /* 0x8209aa0 */ /* link 12 */ { { /*x*/ 30, /*y*/ 22, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs151 = { LPARRAY(s_gs151_groups), s_gs151_links }; /* 0x8209b08 */ +const GroundScriptHeader gGroundScript_gs151 = { LPARRAY(s_gs151_groups), s_gs151_links }; /* 0x8209b08 */ diff --git a/src/data/ground/ground_data_h24p01_station.h b/src/data/ground/ground_data_h24p01_station.h index e142825ff..669583f80 100644 --- a/src/data/ground/ground_data_h24p01_station.h +++ b/src/data/ground/ground_data_h24p01_station.h @@ -30,10 +30,10 @@ static const struct ScriptCommand s_gs152_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -49,11 +49,11 @@ static const struct ScriptCommand s_gs152_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs152_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs152_g0_s0_station_sref_script }; /* 0x8209d98 */ +static const struct ScriptRef s_gs152_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs152_g0_s0_station_sref_script }; /* 0x8209d98 */ static const struct ScriptCommand s_gs152_g0_s1_lives0_dlg0[] = { /* 0x8209da4 */ DEBUGINFO_O(59), @@ -231,10 +231,10 @@ static const struct GroundLivesData s_gs152_g1_s0_lives[] = { /* 0x820a1c4 */ }; static const struct GroundEventData s_gs152_g0_s0_evts[] = { /* 0x820a26c */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 45, 0, 0, { 59, 1, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 44, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 45, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 45, 0, 0, { 59, 1, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820a29c */ @@ -269,4 +269,4 @@ static const struct GroundLink s_gs152_links[] = { /* 0x820a3a8 */ /* link 6 */ { { /*x*/ 27, /*y*/ 21, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs152 = { LPARRAY(s_gs152_groups), s_gs152_links }; /* 0x820a3e0 */ +const GroundScriptHeader gGroundScript_gs152 = { LPARRAY(s_gs152_groups), s_gs152_links }; /* 0x820a3e0 */ diff --git a/src/data/ground/ground_data_h25p01_station.h b/src/data/ground/ground_data_h25p01_station.h index 214a8214c..e8d709fee 100644 --- a/src/data/ground/ground_data_h25p01_station.h +++ b/src/data/ground/ground_data_h25p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs153_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs153_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(106), + BGM_SWITCH(MUS_FRIEND_AREA_OCEANIC), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs153_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs153_g0_s0_station_sref_script }; /* 0x820a670 */ +static const struct ScriptRef s_gs153_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs153_g0_s0_station_sref_script }; /* 0x820a670 */ static const struct ScriptCommand s_gs153_g0_s1_lives0_dlg0[] = { /* 0x820a67c */ DEBUGINFO_O(58), @@ -215,10 +215,10 @@ static const struct GroundLivesData s_gs153_g1_s0_lives[] = { /* 0x820aa4c */ }; static const struct GroundEventData s_gs153_g0_s0_evts[] = { /* 0x820aadc */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 35, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 36, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 36, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 35, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 36, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 36, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820ab0c */ @@ -252,4 +252,4 @@ static const struct GroundLink s_gs153_links[] = { /* 0x820ac18 */ /* link 5 */ { { /*x*/ 26, /*y*/ 21, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs153 = { LPARRAY(s_gs153_groups), s_gs153_links }; /* 0x820ac48 */ +const GroundScriptHeader gGroundScript_gs153 = { LPARRAY(s_gs153_groups), s_gs153_links }; /* 0x820ac48 */ diff --git a/src/data/ground/ground_data_h26p01_station.h b/src/data/ground/ground_data_h26p01_station.h index b2f9af001..e6f52e766 100644 --- a/src/data/ground/ground_data_h26p01_station.h +++ b/src/data/ground/ground_data_h26p01_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs154_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs154_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(34), + BGM_SWITCH(MUS_FRIEND_AREA_VOLCANIC_PIT), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs154_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs154_g0_s0_station_sref_script }; /* 0x820aed8 */ +static const struct ScriptRef s_gs154_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs154_g0_s0_station_sref_script }; /* 0x820aed8 */ static const struct ScriptCommand s_gs154_g0_s1_lives0_dlg0[] = { /* 0x820aee4 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs154_g1_s0_lives[] = { /* 0x820b124 */ }; static const struct GroundEventData s_gs154_g0_s0_evts[] = { /* 0x820b13c */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820b16c */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs154_links[] = { /* 0x820b278 */ /* link 0 */ { { /*x*/ 27, /*y*/ 17, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs154 = { LPARRAY(s_gs154_groups), s_gs154_links }; /* 0x820b280 */ +const GroundScriptHeader gGroundScript_gs154 = { LPARRAY(s_gs154_groups), s_gs154_links }; /* 0x820b280 */ diff --git a/src/data/ground/ground_data_h27p01_station.h b/src/data/ground/ground_data_h27p01_station.h index 9c86fc528..c52de7b18 100644 --- a/src/data/ground/ground_data_h27p01_station.h +++ b/src/data/ground/ground_data_h27p01_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs155_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs155_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(27), + BGM_SWITCH(MUS_FRIEND_AREA_STRATOS_LOOKOUT), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs155_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs155_g0_s0_station_sref_script }; /* 0x820b510 */ +static const struct ScriptRef s_gs155_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs155_g0_s0_station_sref_script }; /* 0x820b510 */ static const struct ScriptCommand s_gs155_g0_s1_lives0_dlg0[] = { /* 0x820b51c */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs155_g1_s0_lives[] = { /* 0x820b75c */ }; static const struct GroundEventData s_gs155_g0_s0_evts[] = { /* 0x820b774 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820b7a4 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs155_links[] = { /* 0x820b8b0 */ /* link 0 */ { { /*x*/ 26, /*y*/ 9, /*flags*/ 0, 0 }, /*w*/ 8, /*h*/ 5, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs155 = { LPARRAY(s_gs155_groups), s_gs155_links }; /* 0x820b8b8 */ +const GroundScriptHeader gGroundScript_gs155 = { LPARRAY(s_gs155_groups), s_gs155_links }; /* 0x820b8b8 */ diff --git a/src/data/ground/ground_data_h28p01_station.h b/src/data/ground/ground_data_h28p01_station.h index 70f8c4179..3068713b4 100644 --- a/src/data/ground/ground_data_h28p01_station.h +++ b/src/data/ground/ground_data_h28p01_station.h @@ -29,10 +29,10 @@ static const struct ScriptCommand s_gs156_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -48,11 +48,11 @@ static const struct ScriptCommand s_gs156_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs156_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs156_g0_s0_station_sref_script }; /* 0x820bb48 */ +static const struct ScriptRef s_gs156_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs156_g0_s0_station_sref_script }; /* 0x820bb48 */ static const struct ScriptCommand s_gs156_g0_s1_lives0_dlg0[] = { /* 0x820bb54 */ DEBUGINFO_O(58), @@ -215,10 +215,10 @@ static const struct GroundLivesData s_gs156_g1_s0_lives[] = { /* 0x820bf24 */ }; static const struct GroundEventData s_gs156_g0_s0_evts[] = { /* 0x820bfb4 */ - /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820bfe4 */ @@ -252,4 +252,4 @@ static const struct GroundLink s_gs156_links[] = { /* 0x820c0f0 */ /* link 5 */ { { /*x*/ 29, /*y*/ 20, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs156 = { LPARRAY(s_gs156_groups), s_gs156_links }; /* 0x820c120 */ +const GroundScriptHeader gGroundScript_gs156 = { LPARRAY(s_gs156_groups), s_gs156_links }; /* 0x820c120 */ diff --git a/src/data/ground/ground_data_h28p02_station.h b/src/data/ground/ground_data_h28p02_station.h index a96b2d307..9f6f589f8 100644 --- a/src/data/ground/ground_data_h28p02_station.h +++ b/src/data/ground/ground_data_h28p02_station.h @@ -27,10 +27,10 @@ static const struct ScriptCommand s_gs157_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -46,11 +46,11 @@ static const struct ScriptCommand s_gs157_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(116), + BGM_SWITCH(MUS_FRIEND_AREA_WILDS), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs157_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs157_g0_s0_station_sref_script }; /* 0x820c3b0 */ +static const struct ScriptRef s_gs157_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs157_g0_s0_station_sref_script }; /* 0x820c3b0 */ static const struct ScriptCommand s_gs157_g0_s1_lives0_dlg0[] = { /* 0x820c3bc */ DEBUGINFO_O(56), @@ -183,7 +183,7 @@ static const struct GroundLivesData s_gs157_g1_s0_lives[] = { /* 0x820c6ec */ }; static const struct GroundEventData s_gs157_g0_s0_evts[] = { /* 0x820c74c */ - /* 0 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820c758 */ @@ -215,4 +215,4 @@ static const struct GroundLink s_gs157_links[] = { /* 0x820c864 */ /* link 3 */ { { /*x*/ 27, /*y*/ 29, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs157 = { LPARRAY(s_gs157_groups), s_gs157_links }; /* 0x820c884 */ +const GroundScriptHeader gGroundScript_gs157 = { LPARRAY(s_gs157_groups), s_gs157_links }; /* 0x820c884 */ diff --git a/src/data/ground/ground_data_h29p01_station.h b/src/data/ground/ground_data_h29p01_station.h index 8a4103bb8..9b9dc0276 100644 --- a/src/data/ground/ground_data_h29p01_station.h +++ b/src/data/ground/ground_data_h29p01_station.h @@ -1,27 +1,11 @@ - - - - - - - - - - - - - - - - - - - +#define NPC_ARTICUNO 1 +#define NPC_ZAPDOS 2 +#define NPC_MOLTRES 3 static const struct ScriptCommand s_gs158_g0_s0_station_sref_script[] = { /* 0x820c898 */ DEBUGINFO_O(23), - SELECT_MAP(158), + SELECT_MAP(MAP_FRIEND_AREA_LEGENDARY_ISLAND), JUMPIF_SCENE_EQ(SCENARIO_SUB2, 34, 2, /* to label */ 0), CJUMP_SCENARIO_0(SCENARIO_MAIN), COND(JUDGE_EQ, 3, /* to label */ 1), @@ -42,10 +26,10 @@ static const struct ScriptCommand s_gs158_g0_s0_station_sref_script[] = { /* 0x8 COND_EQUAL(0, /* to label */ 2), JUMP_SCRIPT(EVENT_S02E02A_L002), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 7), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 7), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 7), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 7), JUMP_LABEL(5), LABEL(7), /* = 0x07 */ CJUMP_VAR(GROUND_GETOUT), @@ -61,11 +45,11 @@ static const struct ScriptCommand s_gs158_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(9), LABEL(9), /* = 0x09 */ - BGM_SWITCH(117), + BGM_SWITCH(MUS_FRIEND_AREA_LEGENDARY_ISLAND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs158_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs158_g0_s0_station_sref_script }; /* 0x820cb74 */ +static const struct ScriptRef s_gs158_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs158_g0_s0_station_sref_script }; /* 0x820cb74 */ static const struct ScriptCommand s_gs158_g0_s1_lives0_dlg0[] = { /* 0x820cb80 */ DEBUGINFO_O(71), @@ -187,9 +171,9 @@ static const struct ScriptCommand s_gs158_g1_s0_lives2_dlg2[] = { /* 0x820d080 * static const struct ScriptCommand s_gs158_g2_s0_station_sref_script[] = { /* 0x820d0a0 */ DEBUGINFO_O(189), - SELECT_MAP(158), + SELECT_MAP(MAP_FRIEND_AREA_LEGENDARY_ISLAND), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(117), + BGM_SWITCH(MUS_FRIEND_AREA_LEGENDARY_ISLAND), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), WAIT(60), @@ -199,7 +183,7 @@ static const struct ScriptCommand s_gs158_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs158_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs158_g2_s0_station_sref_script }; /* 0x820d150 */ +static const struct ScriptRef s_gs158_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs158_g2_s0_station_sref_script }; /* 0x820d150 */ static const struct ScriptCommand s_gs158_g2_s0_eff0_script[] = { /* 0x820d15c */ DEBUGINFO_O(205), @@ -224,91 +208,104 @@ static const struct ScriptCommand s_gs158_g2_s0_lives0_dlg0[] = { /* 0x820d22c * { 0x52, 0x00, 0x0000, 0x00040000, 0x00000000, NULL }, { 0x89, 0x30, 0x0100, 0x00000004, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + // Our character looks around WAIT(30), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(60), - { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + // TODO: Find out how: + // Fade to black + // Fade in, camera shows Moltres (west), moltres floats up, fade to black + // Fade in, camera shows Zapdos (east), zapdos floats up, fade to black + // Fade in, camera shows Articuno (north), moltres and zapdos glide down + // Shadows appear, moltres faces east and zapdos faces west + // Moltres anim speeds up, attacks east, red flash + // Zapdos anim speeds up, attacks west, yellow flash + // Articuno anim speeds up, attacks south, white flash + // Fade in (slow), vortex stone appears with flashing white circle + // Our character walks north + { 0x23, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade out black? + SET_DIR_WAIT(DIRECTION_NORTHWEST, 0), ALERT_CUE(4), AWAIT_CUE(5), - { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - ALERT_CUE(8), + { 0x22, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade in black? + ALERT_CUE(8), // Moltres float AWAIT_CUE(5), - { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + { 0x23, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade out black? + SET_DIR_WAIT(DIRECTION_NORTHEAST, 0), ALERT_CUE(4), AWAIT_CUE(5), - { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - ALERT_CUE(7), + { 0x22, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade in black? + ALERT_CUE(7), // Zapdos float AWAIT_CUE(5), - { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + { 0x23, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade out black? + SET_DIR_WAIT(DIRECTION_NORTH, 0), ALERT_CUE(4), AWAIT_CUE(5), - { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, - ALERT_CUE(8), - ALERT_CUE(7), + { 0x22, 0x01, 30, 0x00000000, 0x00000000, NULL }, // Fade in black? + ALERT_CUE(8), // Moltres glide + ALERT_CUE(7), // Zapdos glide AWAIT_CUE(5), WAIT(60), - ALERT_CUE(8), + ALERT_CUE(8), // Moltres attack AWAIT_CUE(5), - { 0x28, 0x01, 0x0001, 0x00000005, 0x00ff1010, NULL }, + { 0x28, 0x01, 0x0001, 0x00000005, 0x00ff1010, NULL }, // Flash to red? FANFARE_PLAY2(502), - { 0x27, 0x01, 0x0001, 0x00000005, 0x00ff1010, NULL }, - ALERT_CUE(7), + { 0x27, 0x01, 0x0001, 0x00000005, 0x00ff1010, NULL }, // Flash from red? + ALERT_CUE(7), // Zapdos attack AWAIT_CUE(5), - { 0x28, 0x01, 0x0001, 0x00000005, 0x00ffff10, NULL }, + { 0x28, 0x01, 0x0001, 0x00000005, 0x00ffff10, NULL }, // Flash to yellow? FANFARE_PLAY2(502), - { 0x27, 0x01, 0x0001, 0x00000005, 0x00ffff10, NULL }, - ALERT_CUE(6), + { 0x27, 0x01, 0x0001, 0x00000005, 0x00ffff10, NULL }, // Flash from yellow? + ALERT_CUE(6), // Articuno attack AWAIT_CUE(5), FANFARE_PLAY2(506), - { 0x28, 0x01, 0x0001, 0x00000005, 0x00ffffff, NULL }, - ALERT_CUE(6), - ALERT_CUE(7), - ALERT_CUE(8), - ALERT_CUE(10), + { 0x28, 0x01, 0x0001, 0x00000005, 0x00ffffff, NULL }, // Flash to white? + ALERT_CUE(6), // Articuno something? + ALERT_CUE(7), // Zapdos something? + ALERT_CUE(8), // Moltres something? + ALERT_CUE(10), // Vortex stone or circle? WAIT(60), - { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, - ALERT_CUE(10), + { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, // Flash from white? + ALERT_CUE(10), // Vortex stone or circle? AWAIT_CUE(5), WAIT(60), - WALK_GRID(256, 6), - ALERT_CUE(7), - ALERT_CUE(8), + WALK_GRID(256, 6), // Our character walks up + ALERT_CUE(7), // Zapdos faces SouthWest + ALERT_CUE(8), // Moltres faces SouthEast WAIT(60), - PORTRAIT(PLACEMENT_TOP, 0x0001, 0x00000000), - PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), - PORTRAIT(PLACEMENT_LEFT_, 0x0003, 0x00000000), - MSG_NPC(3, _(" Fire, ice, and electricity...")), + PORTRAIT(PLACEMENT_TOP, NPC_ARTICUNO, 0), + PORTRAIT(PLACEMENT_RIGHT, NPC_ZAPDOS, 0), + PORTRAIT(PLACEMENT_LEFT_, NPC_MOLTRES, 0), + // Moltres speaks first. + MSG_NPC(NPC_MOLTRES, _(" Fire, ice, and electricity...")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(1, _(" When the three powers\nmerge as one...")), + MSG_NPC(NPC_ARTICUNO, _(" When the three powers\nmerge as one...")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" The guardian of the sea is\nsaid to arise.")), + MSG_NPC(NPC_ZAPDOS, _(" The guardian of the sea is\nsaid to arise.")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(3, _(" Our arrival at the\n{COLOR GREEN_H}Legendary Island{RESET}...")), + MSG_NPC(NPC_MOLTRES, _(" Our arrival at the\n{COLOR GREEN_H}Legendary Island{RESET}...")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" The three of us caused\nthe sea guardian to awaken.")), - MSG_NPC(2, _(" It is what caused whirlpools\nto grow into tornadoes.")), + MSG_NPC(NPC_ZAPDOS, _(" The three of us caused\nthe sea guardian to awaken.")), + MSG_NPC(NPC_ZAPDOS, _(" It is what caused whirlpools\nto grow into tornadoes.")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(1, _(" I have here the\n{COLOR GREEN}Vortex Stone{RESET}.")), - MSG_NPC(1, _(" Bearing it, you will gain\npassage through the sea's tornadoes...")), - MSG_NPC(1, _(" It will lead you to a place\ncalled the {COLOR YELLOW_D}Silver Trench{RESET}.")), + MSG_NPC(NPC_ARTICUNO, _(" I have here the\n{COLOR GREEN}Vortex Stone{RESET}.")), + MSG_NPC(NPC_ARTICUNO, _(" Bearing it, you will gain\npassage through the sea's tornadoes...")), + MSG_NPC(NPC_ARTICUNO, _(" It will lead you to a place\ncalled the {COLOR YELLOW_D}Silver Trench{RESET}.")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(2, _(" There, you will find the\nguardian of the sea.")), + MSG_NPC(NPC_ZAPDOS, _(" There, you will find the\nguardian of the sea.")), TEXTBOX_CLEAR, WAIT(10), - MSG_NPC(3, _(" Now go.\nThe guardian of the sea awaits you.")), + MSG_NPC(NPC_MOLTRES, _(" Now go.\nThe guardian of the sea awaits you.")), TEXTBOX_CLEAR, WAIT(30), WALK_RELATIVE(128, 0, -16), @@ -317,12 +314,14 @@ static const struct ScriptCommand s_gs158_g2_s0_lives0_dlg0[] = { /* 0x820d22c * BGM_STOP, FANFARE_PLAY(212), MSG_INSTANT(_("{CENTER_ALIGN}Obtained the {COLOR GREEN}Vortex Stone{RESET}.")), - { 0xe1, 0x00, 0x00d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(212), MSG_INSTANT(_("{CENTER_ALIGN}And...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Silver Trench{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, + // TODO: Find out how: + // Fades to black, then you wake up in your bed... ALERT_CUE(3), HALT, }; @@ -343,7 +342,7 @@ static const struct ScriptCommand s_gs158_g2_s0_lives1_dlg0[] = { /* 0x820db5c * ALERT_CUE(5), AWAIT_CUE(6), SELECT_ANIMATION(2), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), AWAIT_CUE(6), { 0x70, 0x00, 0x0080, 0x0000000a, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, @@ -370,13 +369,13 @@ static const struct ScriptCommand s_gs158_g2_s0_lives2_dlg0[] = { /* 0x820dccc * AWAIT_CUE(7), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, WARP_WAYPOINT(0, 7), - { 0x8b, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 4), { 0x70, 0x00, 0x0100, 0x00000014, 0x00000000, NULL }, { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, { 0x52, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x70, 0x00, 0x0080, 0x00000000, 0x00000000, NULL }, WAIT(30), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), { 0x54, 0x00, 0x0400, 0x00000000, 0x00000000, NULL }, WAIT(60), @@ -388,7 +387,7 @@ static const struct ScriptCommand s_gs158_g2_s0_lives2_dlg0[] = { /* 0x820dccc * AWAIT_CUE(7), SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(7), HALT, }; @@ -409,12 +408,12 @@ static const struct ScriptCommand s_gs158_g2_s0_lives3_dlg0[] = { /* 0x820df0c * AWAIT_CUE(8), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, WARP_WAYPOINT(0, 8), - { 0x8b, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 4), { 0x70, 0x00, 0x0100, 0x00000014, 0x00000000, NULL }, { 0x52, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x70, 0x00, 0x0080, 0x00000000, 0x00000000, NULL }, WAIT(30), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(8), { 0x54, 0x00, 0x0400, 0x00000000, 0x00000000, NULL }, @@ -427,7 +426,7 @@ static const struct ScriptCommand s_gs158_g2_s0_lives3_dlg0[] = { /* 0x820df0c * AWAIT_CUE(8), SELECT_ANIMATION(2), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(8), HALT, }; @@ -605,10 +604,10 @@ static const struct GroundEffectData s_gs158_g2_s0_effs[] = { /* 0x820e81c */ }; static const struct GroundEventData s_gs158_g0_s0_evts[] = { /* 0x820e834 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 32, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 1, 33, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 1, 33, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 32, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 1, 33, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 1, 33, 0, 0, { 59, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820e864 */ @@ -654,4 +653,4 @@ static const struct GroundLink s_gs158_links[] = { /* 0x820e99c */ /* link 12 */ { { /*x*/ 30, /*y*/ 16, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs158 = { LPARRAY(s_gs158_groups), s_gs158_links }; /* 0x820ea04 */ +const GroundScriptHeader gGroundScript_gs158 = { LPARRAY(s_gs158_groups), s_gs158_links }; /* 0x820ea04 */ diff --git a/src/data/ground/ground_data_h29p02_station.h b/src/data/ground/ground_data_h29p02_station.h index 22c5e36e7..748ba733e 100644 --- a/src/data/ground/ground_data_h29p02_station.h +++ b/src/data/ground/ground_data_h29p02_station.h @@ -25,10 +25,10 @@ static const struct ScriptCommand s_gs159_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -44,11 +44,11 @@ static const struct ScriptCommand s_gs159_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(118), + BGM_SWITCH(MUS_FRIEND_AREA_SOUTHERN_ISLAND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs159_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs159_g0_s0_station_sref_script }; /* 0x820ec94 */ +static const struct ScriptRef s_gs159_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs159_g0_s0_station_sref_script }; /* 0x820ec94 */ static const struct ScriptCommand s_gs159_g0_s1_lives0_dlg0[] = { /* 0x820eca0 */ DEBUGINFO_O(54), @@ -151,10 +151,10 @@ static const struct GroundLivesData s_gs159_g1_s0_lives[] = { /* 0x820ef30 */ }; static const struct GroundEventData s_gs159_g0_s0_evts[] = { /* 0x820ef60 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820ef90 */ @@ -184,4 +184,4 @@ static const struct GroundLink s_gs159_links[] = { /* 0x820f09c */ /* link 1 */ { { /*x*/ 34, /*y*/ 18, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs159 = { LPARRAY(s_gs159_groups), s_gs159_links }; /* 0x820f0ac */ +const GroundScriptHeader gGroundScript_gs159 = { LPARRAY(s_gs159_groups), s_gs159_links }; /* 0x820f0ac */ diff --git a/src/data/ground/ground_data_h29p03_station.h b/src/data/ground/ground_data_h29p03_station.h index ee07e72c3..4a168e278 100644 --- a/src/data/ground/ground_data_h29p03_station.h +++ b/src/data/ground/ground_data_h29p03_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs160_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs160_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(119), + BGM_SWITCH(MUS_FRIEND_AREA_ENCLOSED_ISLAND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs160_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs160_g0_s0_station_sref_script }; /* 0x820f33c */ +static const struct ScriptRef s_gs160_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs160_g0_s0_station_sref_script }; /* 0x820f33c */ static const struct ScriptCommand s_gs160_g0_s1_lives0_dlg0[] = { /* 0x820f348 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs160_g1_s0_lives[] = { /* 0x820f588 */ }; static const struct GroundEventData s_gs160_g0_s0_evts[] = { /* 0x820f5a0 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 1, 41, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 1, 41, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 42, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 42, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820f5d0 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs160_links[] = { /* 0x820f6dc */ /* link 0 */ { { /*x*/ 27, /*y*/ 16, /*flags*/ 0, 0 }, /*w*/ 6, /*h*/ 5, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs160 = { LPARRAY(s_gs160_groups), s_gs160_links }; /* 0x820f6e4 */ +const GroundScriptHeader gGroundScript_gs160 = { LPARRAY(s_gs160_groups), s_gs160_links }; /* 0x820f6e4 */ diff --git a/src/data/ground/ground_data_h29p04_station.h b/src/data/ground/ground_data_h29p04_station.h index 8d9951a22..b242625d9 100644 --- a/src/data/ground/ground_data_h29p04_station.h +++ b/src/data/ground/ground_data_h29p04_station.h @@ -24,10 +24,10 @@ static const struct ScriptCommand s_gs161_g0_s0_station_sref_script[] = { /* 0x8 SELECT_ENTITIES(1, 0), JUMP_LABEL(2), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), JUMP_LABEL(4), LABEL(6), /* = 0x06 */ CJUMP_VAR(GROUND_GETOUT), @@ -43,11 +43,11 @@ static const struct ScriptCommand s_gs161_g0_s0_station_sref_script[] = { /* 0x8 SELECT_LIVES(0, 1), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ - BGM_SWITCH(122), + BGM_SWITCH(MUS_FRIEND_AREA_FINAL_ISLAND), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs161_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs161_g0_s0_station_sref_script }; /* 0x820f974 */ +static const struct ScriptRef s_gs161_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs161_g0_s0_station_sref_script }; /* 0x820f974 */ static const struct ScriptCommand s_gs161_g0_s1_lives0_dlg0[] = { /* 0x820f980 */ DEBUGINFO_O(53), @@ -135,10 +135,10 @@ static const struct GroundLivesData s_gs161_g1_s0_lives[] = { /* 0x820fbc0 */ }; static const struct GroundEventData s_gs161_g0_s0_evts[] = { /* 0x820fbd8 */ - /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[358] }, - /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[358] }, - /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[358] }, + /* 0 */ { 60, 3, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 1 */ { 60, 1, 0, 0, { 0, 38, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 2 */ { 3, 39, 0, 0, { 0, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, + /* 3 */ { 3, 39, 0, 0, { 57, 0, 0, 0 }, &gFunctionScriptTable[GETOUT_HABITAT] }, }; static const struct ScriptRef * const (sStationScripts[]) = { /* 0x820fc08 */ @@ -167,4 +167,4 @@ static const struct GroundLink s_gs161_links[] = { /* 0x820fd14 */ /* link 0 */ { { /*x*/ 26, /*y*/ 8, /*flags*/ 0, 0 }, /*w*/ 8, /*h*/ 6, /*ret*/ 3, /*?*/ 2 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs161 = { LPARRAY(s_gs161_groups), s_gs161_links }; /* 0x820fd1c */ +const GroundScriptHeader gGroundScript_gs161 = { LPARRAY(s_gs161_groups), s_gs161_links }; /* 0x820fd1c */ diff --git a/src/data/ground/ground_data_s01_station.h b/src/data/ground/ground_data_s01_station.h index 16cb28fa5..bde960a7c 100644 --- a/src/data/ground/ground_data_s01_station.h +++ b/src/data/ground/ground_data_s01_station.h @@ -13,7 +13,7 @@ static const struct ScriptCommand s_gs223_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs223_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs223_g0_s0_station_sref_script }; /* 0x826dfec */ +static const struct ScriptRef s_gs223_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs223_g0_s0_station_sref_script }; /* 0x826dfec */ static const struct ScriptCommand s_gs223_g1_s0_station_sref_script[] = { /* 0x826dff8 - PART 1 0:00:31-0:00:45 - New game intro to personality test */ DEBUGINFO_O(19), @@ -27,7 +27,7 @@ static const struct ScriptCommand s_gs223_g1_s0_station_sref_script[] = { /* 0x8 MSG_ON_BG(_("{CENTER_ALIGN}OK...{WAIT_PRESS}\n{CENTER_ALIGN}Let the interview begin!")), TEXTBOX_CLEAR, SELECT_ENTITIES(-1, 0), - BGM_SWITCH(12), + BGM_SWITCH(MUS_WELCOME_TO_THE_WORLD_OF_POKEMON), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, SPECIAL_TEXT(SPECIAL_TEXT_PERSONALITY_QUIZ, 0, 0), BGM_FADEOUT(30), @@ -35,7 +35,7 @@ static const struct ScriptCommand s_gs223_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs223_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs223_g1_s0_station_sref_script }; /* 0x826e200 */ +static const struct ScriptRef s_gs223_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs223_g1_s0_station_sref_script }; /* 0x826e200 */ static const struct GroundEffectData s_gs223_g1_s0_effs[] = { /* 0x826e20c */ /* 0 */ { 0, 0, 1, 1, { 30, 19, CPOS_HALFTILE, CPOS_HALFTILE }, NULL }, }; @@ -62,4 +62,4 @@ static const struct GroundLink s_gs223_links[] = { /* 0x826e280 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs223 = { LPARRAY(s_gs223_groups), s_gs223_links }; /* 0x826e288 */ +const GroundScriptHeader gGroundScript_gs223 = { LPARRAY(s_gs223_groups), s_gs223_links }; /* 0x826e288 */ diff --git a/src/data/ground/ground_data_s02_station.h b/src/data/ground/ground_data_s02_station.h index 8ab862a34..1425487f9 100644 --- a/src/data/ground/ground_data_s02_station.h +++ b/src/data/ground/ground_data_s02_station.h @@ -24,7 +24,7 @@ static const struct ScriptCommand s_gs224_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs224_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs224_g0_s0_station_sref_script }; /* 0x826e308 */ +static const struct ScriptRef s_gs224_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs224_g0_s0_station_sref_script }; /* 0x826e308 */ static const struct ScriptCommand s_gs224_g1_s0_obj0_dlg1[] = { /* 0x826e314 */ DEBUGINFO_O(30), @@ -43,7 +43,7 @@ static const struct ScriptCommand s_gs224_g2_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(224), SELECT_ENTITIES(1, 0), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(46), + BGM_SWITCH(MUS_OPENING_TITLE), WAIT(60), { 0x22, 0x01, 0x003c, 0x00000000, 0x00000000, NULL }, WAIT(480), @@ -52,14 +52,14 @@ static const struct ScriptCommand s_gs224_g2_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs224_g2_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs224_g2_s0_station_sref_script }; /* 0x826e454 */ +static const struct ScriptRef s_gs224_g2_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs224_g2_s0_station_sref_script }; /* 0x826e454 */ static const struct ScriptCommand s_gs224_g3_s0_station_sref_script[] = { /* 0x826e460 */ DEBUGINFO_O(58), SELECT_MAP(224), SELECT_ENTITIES(1, 0), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(43), + BGM_SWITCH(MUS_TITLE_SCREEN), { 0x27, 0x01, 0x0001, 0x0000003c, 0x00ffffff, NULL }, SELECT_ENTITIES(-1, 1), SELECT_ENTITIES(-1, 2), @@ -74,7 +74,7 @@ static const struct ScriptCommand s_gs224_g3_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs224_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs224_g3_s0_station_sref_script }; /* 0x826e570 */ +static const struct ScriptRef s_gs224_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs224_g3_s0_station_sref_script }; /* 0x826e570 */ static const struct ScriptCommand s_gs224_g3_s0_eff0_script[] = { /* 0x826e57c */ DEBUGINFO_O(80), @@ -98,7 +98,7 @@ static const struct ScriptCommand s_gs224_g3_s1_lives0_dlg0[] = { /* 0x826e60c * { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, AWAIT_CUE(5), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), { 0x80, 0x00, 0x0200, 0x00000004, 0x00000000, NULL }, ALERT_CUE(6), END_DELETE, @@ -145,7 +145,7 @@ static const struct ScriptCommand s_gs224_g4_s0_station_sref_script[] = { /* 0x8 SELECT_MAP(224), SELECT_ENTITIES(1, 0), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(43), + BGM_SWITCH(MUS_TITLE_SCREEN), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, WAIT(120), ALERT_CUE(4), @@ -155,7 +155,7 @@ static const struct ScriptCommand s_gs224_g4_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs224_g4_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs224_g4_s0_station_sref_script }; /* 0x826e97c */ +static const struct ScriptRef s_gs224_g4_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs224_g4_s0_station_sref_script }; /* 0x826e97c */ static const struct ScriptCommand s_gs224_g4_s0_eff0_script[] = { /* 0x826e988 */ DEBUGINFO_O(161), @@ -256,4 +256,4 @@ static const struct GroundLink s_gs224_links[] = { /* 0x826ebec */ /* link 10 */ { { /*x*/ 26, /*y*/ 12, /*flags*/ 0, 0 }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs224 = { LPARRAY(s_gs224_groups), s_gs224_links }; /* 0x826ec44 */ +const GroundScriptHeader gGroundScript_gs224 = { LPARRAY(s_gs224_groups), s_gs224_links }; /* 0x826ec44 */ diff --git a/src/data/ground/ground_data_s03_station.h b/src/data/ground/ground_data_s03_station.h index 9e5decbe9..985f53278 100644 --- a/src/data/ground/ground_data_s03_station.h +++ b/src/data/ground/ground_data_s03_station.h @@ -25,13 +25,13 @@ static const struct ScriptCommand s_gs225_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs225_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs225_g0_s0_station_sref_script }; /* 0x826ecc4 */ +static const struct ScriptRef s_gs225_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs225_g0_s0_station_sref_script }; /* 0x826ecc4 */ static const struct ScriptCommand s_gs225_g1_s0_station_sref_script[] = { /* 0x826ecd0 */ DEBUGINFO_O(31), SELECT_MAP(225), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(40), + BGM_SWITCH(MUS_INTRO), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, WAIT(4), ALERT_CUE(5), @@ -45,7 +45,7 @@ static const struct ScriptCommand s_gs225_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs225_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs225_g1_s0_station_sref_script }; /* 0x826edc0 */ +static const struct ScriptRef s_gs225_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs225_g1_s0_station_sref_script }; /* 0x826edc0 */ static const struct ScriptCommand s_gs225_g1_s0_eff0_script[] = { /* 0x826edcc */ DEBUGINFO_O(51), @@ -147,4 +147,4 @@ static const struct GroundLink s_gs225_links[] = { /* 0x826f140 */ /* link 11 */ { { /*x*/ 13, /*y*/ 38, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs225 = { LPARRAY(s_gs225_groups), s_gs225_links }; /* 0x826f1a0 */ +const GroundScriptHeader gGroundScript_gs225 = { LPARRAY(s_gs225_groups), s_gs225_links }; /* 0x826f1a0 */ diff --git a/src/data/ground/ground_data_s04_station.h b/src/data/ground/ground_data_s04_station.h index af2f2494e..4d427913a 100644 --- a/src/data/ground/ground_data_s04_station.h +++ b/src/data/ground/ground_data_s04_station.h @@ -16,7 +16,7 @@ static const struct ScriptCommand s_gs226_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs226_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs226_g0_s0_station_sref_script }; /* 0x826f220 */ +static const struct ScriptRef s_gs226_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs226_g0_s0_station_sref_script }; /* 0x826f220 */ static const struct ScriptCommand s_gs226_g1_s0_station_sref_script[] = { /* 0x826f22c */ DEBUGINFO_O(22), @@ -38,7 +38,7 @@ static const struct ScriptCommand s_gs226_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs226_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs226_g1_s0_station_sref_script }; /* 0x826f33c */ +static const struct ScriptRef s_gs226_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs226_g1_s0_station_sref_script }; /* 0x826f33c */ static const struct ScriptCommand s_gs226_g1_s0_eff0_script[] = { /* 0x826f348 */ DEBUGINFO_O(44), @@ -103,4 +103,4 @@ static const struct GroundLink s_gs226_links[] = { /* 0x826f588 */ /* link 2 */ { { /*x*/ 15, /*y*/ 71, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs226 = { LPARRAY(s_gs226_groups), s_gs226_links }; /* 0x826f5a0 */ +const GroundScriptHeader gGroundScript_gs226 = { LPARRAY(s_gs226_groups), s_gs226_links }; /* 0x826f5a0 */ diff --git a/src/data/ground/ground_data_s05_station.h b/src/data/ground/ground_data_s05_station.h index b0ff638e2..8d77c2ae8 100644 --- a/src/data/ground/ground_data_s05_station.h +++ b/src/data/ground/ground_data_s05_station.h @@ -15,7 +15,7 @@ static const struct ScriptCommand s_gs227_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs227_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs227_g0_s0_station_sref_script }; /* 0x826f620 */ +static const struct ScriptRef s_gs227_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs227_g0_s0_station_sref_script }; /* 0x826f620 */ static const struct ScriptCommand s_gs227_g1_s0_station_sref_script[] = { /* 0x826f62c */ DEBUGINFO_O(21), @@ -31,7 +31,7 @@ static const struct ScriptCommand s_gs227_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs227_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs227_g1_s0_station_sref_script }; /* 0x826f6dc */ +static const struct ScriptRef s_gs227_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs227_g1_s0_station_sref_script }; /* 0x826f6dc */ static const struct ScriptCommand s_gs227_g1_s0_eff0_script[] = { /* 0x826f6e8 */ DEBUGINFO_O(37), @@ -72,4 +72,4 @@ static const struct GroundLink s_gs227_links[] = { /* 0x826f7ec */ /* link 1 */ { { /*x*/ 15, /*y*/ 31, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs227 = { LPARRAY(s_gs227_groups), s_gs227_links }; /* 0x826f7fc */ +const GroundScriptHeader gGroundScript_gs227 = { LPARRAY(s_gs227_groups), s_gs227_links }; /* 0x826f7fc */ diff --git a/src/data/ground/ground_data_s06_station.h b/src/data/ground/ground_data_s06_station.h index 5a15e4c8a..3d8ccada8 100644 --- a/src/data/ground/ground_data_s06_station.h +++ b/src/data/ground/ground_data_s06_station.h @@ -13,7 +13,7 @@ static const struct ScriptCommand s_gs228_g0_s0_station_sref_script[] = { /* 0x8 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs228_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs228_g0_s0_station_sref_script }; /* 0x826f87c */ +static const struct ScriptRef s_gs228_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs228_g0_s0_station_sref_script }; /* 0x826f87c */ static const struct ScriptCommand s_gs228_g1_s0_station_sref_script[] = { /* 0x826f888 */ DEBUGINFO_O(19), @@ -25,7 +25,7 @@ static const struct ScriptCommand s_gs228_g1_s0_station_sref_script[] = { /* 0x8 RET, }; -static const struct ScriptRef s_gs228_g1_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs228_g1_s0_station_sref_script }; /* 0x826f8f8 */ +static const struct ScriptRef s_gs228_g1_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs228_g1_s0_station_sref_script }; /* 0x826f8f8 */ static const struct GroundEffectData s_gs228_g1_s0_effs[] = { /* 0x826f904 */ /* 0 */ { 0, 0, 1, 1, { 15, 11, 0, CPOS_HALFTILE }, NULL }, }; @@ -52,4 +52,4 @@ static const struct GroundLink s_gs228_links[] = { /* 0x826f978 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs228 = { LPARRAY(s_gs228_groups), s_gs228_links }; /* 0x826f980 */ +const GroundScriptHeader gGroundScript_gs228 = { LPARRAY(s_gs228_groups), s_gs228_links }; /* 0x826f980 */ diff --git a/src/data/ground/ground_data_t00p01_station.h b/src/data/ground/ground_data_t00p01_station.h index ce1b802f3..abad7970b 100644 --- a/src/data/ground/ground_data_t00p01_station.h +++ b/src/data/ground/ground_data_t00p01_station.h @@ -10,10 +10,10 @@ static const struct ScriptCommand s_gs0_g0_s0_station_sref_script[] = { /* 0x813 DEBUGINFO_O(10), SELECT_MAP(0), SELECT_ENTITIES(1, 0), - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), JUMP_LABEL(2), LABEL(4), /* = 0x04 */ CJUMP_VAR(GROUND_GETOUT), @@ -36,11 +36,11 @@ static const struct ScriptCommand s_gs0_g0_s0_station_sref_script[] = { /* 0x813 SELECT_LIVES(0, 3), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs0_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs0_g0_s0_station_sref_script }; /* 0x8132918 */ +static const struct ScriptRef s_gs0_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs0_g0_s0_station_sref_script }; /* 0x8132918 */ @@ -50,21 +50,21 @@ static const struct ScriptCommand s_gs0_g0_s0_evt0_sref_script[] = { /* 0x813292 RET, }; -static const struct ScriptRef s_gs0_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs0_g0_s0_evt0_sref_script }; /* 0x8132944 */ +static const struct ScriptRef s_gs0_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs0_g0_s0_evt0_sref_script }; /* 0x8132944 */ static const struct ScriptCommand s_gs0_g0_s0_evt1_sref_script[] = { /* 0x8132950 */ DEBUGINFO_O(56), RET, }; -static const struct ScriptRef s_gs0_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs0_g0_s0_evt1_sref_script }; /* 0x8132970 */ +static const struct ScriptRef s_gs0_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs0_g0_s0_evt1_sref_script }; /* 0x8132970 */ static const struct ScriptCommand s_gs0_g0_s0_evt2_sref_script[] = { /* 0x813297c */ DEBUGINFO_O(63), RET, }; -static const struct ScriptRef s_gs0_g0_s0_evt2_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs0_g0_s0_evt2_sref_script }; /* 0x813299c */ +static const struct ScriptRef s_gs0_g0_s0_evt2_sref = { GETOUT_NORMAL, 2, NULL, s_gs0_g0_s0_evt2_sref_script }; /* 0x813299c */ static const struct ScriptCommand s_gs0_g0_s1_lives0_dlg0[] = { /* 0x81329a8 */ DEBUGINFO_O(70), @@ -1484,4 +1484,4 @@ static const struct GroundLink s_gs0_links[] = { /* 0x813824c */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs0 = { LPARRAY(s_gs0_groups), s_gs0_links }; /* 0x8138254 */ +const GroundScriptHeader gGroundScript_gs0 = { LPARRAY(s_gs0_groups), s_gs0_links }; /* 0x8138254 */ diff --git a/src/data/ground/ground_data_t01p01_station.h b/src/data/ground/ground_data_t01p01_station.h index 436379922..420628642 100644 --- a/src/data/ground/ground_data_t01p01_station.h +++ b/src/data/ground/ground_data_t01p01_station.h @@ -292,10 +292,10 @@ static const struct ScriptCommand s_gs1_g0_s0_station_sref_script[] = { /* 0x813 CALL_STATION( 1, 0), JUMP_LABEL(0), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 1, /* to label */ 34), - JUMPIF_EQUAL(START_MODE, 3, /* to label */ 35), - JUMPIF_EQUAL(START_MODE, 2, /* to label */ 36), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 36), + JUMPIF_EQUAL(START_MODE, STARTMODE_CONTINUE_GAME, /* to label */ 34), + JUMPIF_EQUAL(START_MODE, STARTMODE_3, /* to label */ 35), + JUMPIF_EQUAL(START_MODE, STARTMODE_GROUND, /* to label */ 36), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 36), JUMP_LABEL(34), LABEL(36), /* = 0x24 */ CJUMP_VAR(GROUND_GETOUT), @@ -329,11 +329,11 @@ static const struct ScriptCommand s_gs1_g0_s0_station_sref_script[] = { /* 0x813 SELECT_LIVES(0, 4), JUMP_LABEL(41), LABEL(41), /* = 0x29 */ - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs1_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs1_g0_s0_station_sref_script }; /* 0x8138db4 */ +static const struct ScriptRef s_gs1_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs1_g0_s0_station_sref_script }; /* 0x8138db4 */ static const struct ScriptCommand s_gs1_g0_s0_evt0_sref_script[] = { /* 0x8138dc0 */ DEBUGINFO_O(339), @@ -358,7 +358,7 @@ static const struct ScriptCommand s_gs1_g0_s0_evt0_sref_script[] = { /* 0x8138dc HALT, }; -static const struct ScriptRef s_gs1_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs1_g0_s0_evt0_sref_script }; /* 0x8138f00 */ +static const struct ScriptRef s_gs1_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs1_g0_s0_evt0_sref_script }; /* 0x8138f00 */ static const struct ScriptCommand s_gs1_g0_s0_evt1_sref_script[] = { /* 0x8138f0c */ @@ -367,7 +367,7 @@ static const struct ScriptCommand s_gs1_g0_s0_evt1_sref_script[] = { /* 0x8138f0 HALT, }; -static const struct ScriptRef s_gs1_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs1_g0_s0_evt1_sref_script }; /* 0x8138f3c */ +static const struct ScriptRef s_gs1_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs1_g0_s0_evt1_sref_script }; /* 0x8138f3c */ static const struct ScriptCommand s_gs1_g0_s0_evt2_sref_script[] = { /* 0x8138f48 */ DEBUGINFO_O(373), @@ -375,7 +375,7 @@ static const struct ScriptCommand s_gs1_g0_s0_evt2_sref_script[] = { /* 0x8138f4 HALT, }; -static const struct ScriptRef s_gs1_g0_s0_evt2_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs1_g0_s0_evt2_sref_script }; /* 0x8138f78 */ +static const struct ScriptRef s_gs1_g0_s0_evt2_sref = { GETOUT_NORMAL, 2, NULL, s_gs1_g0_s0_evt2_sref_script }; /* 0x8138f78 */ static const struct ScriptCommand s_gs1_g0_s0_evt3_sref_script[] = { /* 0x8138f84 */ DEBUGINFO_O(381), @@ -383,7 +383,7 @@ static const struct ScriptCommand s_gs1_g0_s0_evt3_sref_script[] = { /* 0x8138f8 HALT, }; -static const struct ScriptRef s_gs1_g0_s0_evt3_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs1_g0_s0_evt3_sref_script }; /* 0x8138fb4 */ +static const struct ScriptRef s_gs1_g0_s0_evt3_sref = { GETOUT_NORMAL, 2, NULL, s_gs1_g0_s0_evt3_sref_script }; /* 0x8138fb4 */ static const struct ScriptCommand s_gs1_g0_s0_obj0_dlg2[] = { /* 0x8138fc0 */ DEBUGINFO_O(389), @@ -508,7 +508,7 @@ static const struct ScriptCommand s_gs1_g1_s0_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g1_s0_station_sref_script }; /* 0x8139514 */ +static const struct ScriptRef s_gs1_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g1_s0_station_sref_script }; /* 0x8139514 */ static const struct ScriptCommand s_gs1_g1_s0_lives0_dlg2[] = { /* 0x8139520 */ DEBUGINFO_O(514), @@ -750,7 +750,7 @@ static const struct ScriptCommand s_gs1_g2_s0_station_sref_script[] = { /* 0x813 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g2_s0_station_sref_script }; /* 0x813a604 */ +static const struct ScriptRef s_gs1_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g2_s0_station_sref_script }; /* 0x813a604 */ @@ -822,7 +822,7 @@ static const struct ScriptCommand s_gs1_g4_s1_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g4_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g4_s1_station_sref_script }; /* 0x813a9a8 */ +static const struct ScriptRef s_gs1_g4_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g4_s1_station_sref_script }; /* 0x813a9a8 */ static const struct ScriptCommand s_gs1_g4_s1_lives0_dlg0[] = { /* 0x813a9b4 */ DEBUGINFO_O(828), @@ -834,7 +834,7 @@ static const struct ScriptCommand s_gs1_g4_s1_lives0_dlg0[] = { /* 0x813a9b4 */ PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), AWAIT_CUE(5), FANFARE_PLAY2(515), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _(" ...Grrruummmmmbbbbblle...!") }, + MSG_OVERHEARD(_(" ...Grrruummmmmbbbbblle...!")), WAIT(60), TEXTBOX_CLEAR, WAIT(1), @@ -843,7 +843,7 @@ static const struct ScriptCommand s_gs1_g4_s1_lives0_dlg0[] = { /* 0x813a9b4 */ ALERT_CUE(6), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), WAIT(60), MSG_NPC(2, _(" ....................................\n................................................\n................................................")), MSG_NPC(2, _(" ...Belly...rumbling...{WAIT_PRESS}\nHungry...")), @@ -862,7 +862,7 @@ static const struct ScriptCommand s_gs1_g4_s1_lives1_dlg0[] = { /* 0x813ac3c */ AWAIT_CUE(6), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -875,7 +875,7 @@ static const struct ScriptCommand s_gs1_g4_s1_lives2_dlg0[] = { /* 0x813acdc */ FANFARE_PLAY2(465), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x3c, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 60), ALERT_CUE(5), HALT, }; @@ -885,7 +885,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives0_dlg0[] = { /* 0x813ad6c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -894,7 +894,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives1_dlg0[] = { /* 0x813adcc */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -903,7 +903,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives2_dlg0[] = { /* 0x813ae2c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -912,7 +912,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives3_dlg0[] = { /* 0x813ae8c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -921,7 +921,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives4_dlg0[] = { /* 0x813aeec */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -930,7 +930,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives5_dlg0[] = { /* 0x813af4c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -939,7 +939,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives6_dlg0[] = { /* 0x813afac */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -948,7 +948,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives7_dlg0[] = { /* 0x813b00c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -957,7 +957,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives8_dlg0[] = { /* 0x813b06c */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -966,7 +966,7 @@ static const struct ScriptCommand s_gs1_g4_s2_lives9_dlg0[] = { /* 0x813b0cc */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1024,8 +1024,8 @@ static const struct ScriptCommand s_gs1_g4_s3_lives0_dlg2[] = { /* 0x813b1ac */ ALERT_CUE(6), AWAIT_CUE(5), FANFARE_PLAY2(516), - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("Munch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch...") }, - { 0x33, 0x00, -0x0001, 0x00000000, 0x00000000, _("Munch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch...") }, + MSG_QUIET(-1, _("Munch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch...")), + MSG_QUIET(-1, _("Munch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch,\nmunch, munch, munch, munch, munch...")), FANFARE_STOP2(516), ALERT_CUE(6), AWAIT_CUE(5), @@ -1058,7 +1058,7 @@ static const struct ScriptCommand s_gs1_g4_s3_lives0_dlg3[] = { /* 0x813b7d8 */ DEBUGINFO_O(1058), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(6), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), AWAIT_CUE(2), @@ -1066,7 +1066,7 @@ static const struct ScriptCommand s_gs1_g4_s3_lives0_dlg3[] = { /* 0x813b7d8 */ RET, LABEL(0), /* = 0x00 */ AWAIT_CUE(6), - { 0x8b, 0x0a, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 10), { 0x54, 0x00, 0x001f, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), @@ -1074,7 +1074,7 @@ static const struct ScriptCommand s_gs1_g4_s3_lives0_dlg3[] = { /* 0x813b7d8 */ WAIT(10), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -1135,7 +1135,7 @@ static const struct ScriptCommand s_gs1_g5_s1_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g5_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g5_s1_station_sref_script }; /* 0x813bbe4 */ +static const struct ScriptRef s_gs1_g5_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g5_s1_station_sref_script }; /* 0x813bbe4 */ static const struct ScriptCommand s_gs1_g5_s1_lives0_dlg0[] = { /* 0x813bbf0 */ DEBUGINFO_O(1141), @@ -1147,7 +1147,7 @@ static const struct ScriptCommand s_gs1_g5_s1_lives0_dlg0[] = { /* 0x813bbf0 */ PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), AWAIT_CUE(5), FANFARE_PLAY2(400), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _(" Flump!") }, + MSG_OVERHEARD(_(" Flump!")), AWAIT_CUE(5), FANFARE_PLAY2(900), SELECT_OBJECTS(-1, 1), @@ -1159,7 +1159,7 @@ static const struct ScriptCommand s_gs1_g5_s1_lives0_dlg0[] = { /* 0x813bbf0 */ ALERT_CUE(6), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), WAIT(60), PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000045), MSG_NPC(2, _(" ....................................")), @@ -1181,7 +1181,7 @@ static const struct ScriptCommand s_gs1_g5_s1_lives1_dlg0[] = { /* 0x813be18 */ AWAIT_CUE(6), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -1192,9 +1192,9 @@ static const struct ScriptCommand s_gs1_g5_s1_lives2_dlg0[] = { /* 0x813beb8 */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(19), WAIT(4), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), WAIT(8), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), WAIT(60), STOP_ANIMATION_ON_CURRENT_FRAME, ALERT_CUE(5), @@ -1290,7 +1290,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives0_dlg0[] = { /* 0x813c2f8 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1299,7 +1299,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives1_dlg0[] = { /* 0x813c358 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1308,7 +1308,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives2_dlg0[] = { /* 0x813c3b8 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1317,7 +1317,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives3_dlg0[] = { /* 0x813c418 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1326,7 +1326,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives4_dlg0[] = { /* 0x813c478 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1335,7 +1335,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives5_dlg0[] = { /* 0x813c4d8 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1344,7 +1344,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives6_dlg0[] = { /* 0x813c538 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1353,7 +1353,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives7_dlg0[] = { /* 0x813c598 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1362,7 +1362,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives8_dlg0[] = { /* 0x813c5f8 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1371,7 +1371,7 @@ static const struct ScriptCommand s_gs1_g5_s2_lives9_dlg0[] = { /* 0x813c658 */ SELECT_ANIMATION(2), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 127), HALT, }; @@ -1402,14 +1402,14 @@ static const struct ScriptCommand s_gs1_g5_s4_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g5_s4_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g5_s4_station_sref_script }; /* 0x813c7d8 */ +static const struct ScriptRef s_gs1_g5_s4_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g5_s4_station_sref_script }; /* 0x813c7d8 */ static const struct ScriptCommand s_gs1_g5_s4_lives0_dlg0[] = { /* 0x813c7e4 */ DEBUGINFO_O(1408), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(5), - { 0x93, 0x08, 0x000a, 0x0000007f, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 127), PORTRAIT_REP(0x0002, 0x00000000), ASK3(FALSE, /*default*/ -1, /* speaker */ 2, _(" ............{WAIT_PRESS}Hey.{WAIT_PRESS}\nThat belong to Munchlax.{WAIT_PRESS}\nMunchlax want back.")), CHOICE(/* label */ 1, _("Return it.")), @@ -1490,7 +1490,7 @@ static const struct ScriptCommand s_gs1_g5_s4_lives2_dlg0[] = { /* 0x813cdf0 */ { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), { 0x56, 0x00, -0x0001, 0x00000058, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -1501,7 +1501,7 @@ static const struct ScriptCommand s_gs1_g5_s4_lives2_dlg0[] = { /* 0x813cdf0 */ HALT, LABEL(1), /* = 0x01 */ AWAIT_CUE(7), - { 0x8b, 0x0a, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 10), SELECT_ANIMATION(32), AWAIT_CUE(7), { 0x54, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -1512,7 +1512,7 @@ static const struct ScriptCommand s_gs1_g5_s4_lives2_dlg0[] = { /* 0x813cdf0 */ WAIT(30), ALERT_CUE(5), AWAIT_CUE(7), - { 0x95, 0x08, 0x000a, 0x00000003, 0x00000000, NULL }, + CMD_UNK_95(8, DIR_TRANS_10, 3), SELECT_ANIMATION(33), { 0x53, 0x00, 0x0000, 0x00000004, 0x00000000, NULL }, WALK_RELATIVE(128, 32, 0), @@ -1527,11 +1527,11 @@ static const struct ScriptCommand s_gs1_g5_s4_lives2_dlg0[] = { /* 0x813cdf0 */ { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), WAIT(10), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), { 0x52, 0x00, 0x0000, 0x00000004, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(7), - { 0x95, 0x04, 0x000a, 0x00000003, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 3), WAIT(10), ALERT_CUE(5), HALT, @@ -1578,14 +1578,14 @@ static const struct ScriptCommand s_gs1_g6_s0_station_sref_script[] = { /* 0x813 SELECT_MAP(1), SELECT_ENTITIES(-1, 0), SELECT_ENTITIES(7, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs1_g6_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs1_g6_s0_station_sref_script }; /* 0x813d310 */ +static const struct ScriptRef s_gs1_g6_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs1_g6_s0_station_sref_script }; /* 0x813d310 */ static const struct ScriptCommand s_gs1_g6_s0_eff0_script[] = { /* 0x813d31c */ DEBUGINFO_O(1591), @@ -1695,19 +1695,19 @@ static const struct ScriptCommand s_gs1_g6_s0_lives1_dlg0[] = { /* 0x813df88 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, WALK_GRID(128, 8), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x8e, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_10, 0), SELECT_ANIMATION(4), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(2), AWAIT_CUE(6), - { 0x8e, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -1722,7 +1722,7 @@ static const struct ScriptCommand s_gs1_g7_s0_station_sref_script[] = { /* 0x813 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g7_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g7_s0_station_sref_script }; /* 0x813e128 */ +static const struct ScriptRef s_gs1_g7_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g7_s0_station_sref_script }; /* 0x813e128 */ static const struct ScriptCommand s_gs1_g7_s0_lives0_dlg2[] = { /* 0x813e134 */ DEBUGINFO_O(1728), @@ -1826,10 +1826,10 @@ static const struct ScriptCommand s_gs1_g7_s0_lives7_dlg3[] = { /* 0x813e794 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), CALL_SCRIPT(WAIT_END_TALK_FUNC), RET, @@ -1841,7 +1841,7 @@ static const struct ScriptCommand s_gs1_g7_s1_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g7_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g7_s1_station_sref_script }; /* 0x813e874 */ +static const struct ScriptRef s_gs1_g7_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g7_s1_station_sref_script }; /* 0x813e874 */ static const struct ScriptCommand s_gs1_g7_s1_lives0_dlg0[] = { /* 0x813e880 */ DEBUGINFO_O(1847), @@ -1852,7 +1852,7 @@ static const struct ScriptCommand s_gs1_g7_s1_lives0_dlg0[] = { /* 0x813e880 */ PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(1, _(" Huh?\nAre you going home already?")), TEXTBOX_CLEAR, - { 0x93, 0x08, 0x000a, 0x00000004, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 4), WAIT(10), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" We haven't gone to the\n{COLOR CYAN}Pelipper Post Office{RESET} yet?")), @@ -1871,7 +1871,7 @@ static const struct ScriptCommand s_gs1_g7_s1_lives1_dlg0[] = { /* 0x813ead4 */ DEBUGINFO_O(1871), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -1889,7 +1889,7 @@ static const struct ScriptCommand s_gs1_g8_s0_station_sref_script[] = { /* 0x813 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g8_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g8_s0_station_sref_script }; /* 0x813ebd4 */ +static const struct ScriptRef s_gs1_g8_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g8_s0_station_sref_script }; /* 0x813ebd4 */ static const struct ScriptCommand s_gs1_g8_s0_lives0_dlg2[] = { /* 0x813ebe0 */ DEBUGINFO_O(1895), @@ -1990,7 +1990,7 @@ static const struct ScriptCommand s_gs1_g8_s1_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g8_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g8_s1_station_sref_script }; /* 0x813f0d0 */ +static const struct ScriptRef s_gs1_g8_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g8_s1_station_sref_script }; /* 0x813f0d0 */ static const struct ScriptCommand s_gs1_g8_s1_lives0_dlg0[] = { /* 0x813f0dc */ DEBUGINFO_O(1996), @@ -2001,7 +2001,7 @@ static const struct ScriptCommand s_gs1_g8_s1_lives0_dlg0[] = { /* 0x813f0dc */ PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(1, _(" Huh?\nYou want to go home already?")), TEXTBOX_CLEAR, - { 0x93, 0x08, 0x000a, 0x00000004, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 4), WAIT(10), MSG_NPC(1, _(" We're already here.\nLet me show you around a bit more.")), TEXTBOX_CLEAR, @@ -2015,7 +2015,7 @@ static const struct ScriptCommand s_gs1_g8_s1_lives1_dlg0[] = { /* 0x813f23c */ DEBUGINFO_O(2015), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -2100,7 +2100,7 @@ static const struct ScriptCommand s_gs1_g8_s2_evt0_sref_script[] = { /* 0x813f55 HALT, }; -static const struct ScriptRef s_gs1_g8_s2_evt0_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs1_g8_s2_evt0_sref_script }; /* 0x813f58c */ +static const struct ScriptRef s_gs1_g8_s2_evt0_sref = { NORMAL_EVENT, 7, NULL, s_gs1_g8_s2_evt0_sref_script }; /* 0x813f58c */ static const struct ScriptCommand s_gs1_g9_s0_station_sref_script[] = { /* 0x813f598 */ DEBUGINFO_O(2106), @@ -2112,7 +2112,7 @@ static const struct ScriptCommand s_gs1_g9_s0_station_sref_script[] = { /* 0x813 RET, }; -static const struct ScriptRef s_gs1_g9_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g9_s0_station_sref_script }; /* 0x813f608 */ +static const struct ScriptRef s_gs1_g9_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g9_s0_station_sref_script }; /* 0x813f608 */ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ DEBUGINFO_O(2118), @@ -2121,7 +2121,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ WAIT(1), ALERT_CUE(6), WALK_GRID(256, 18), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_NPC(2, _(" Friends are my treasures!\nWelcome to {NAME_2} Club--a circle\nof friends! ")), @@ -2136,7 +2136,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ { 0x27, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, { 0x28, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, { 0x27, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, - { 0xe2, 0x00, 0x025b, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(603), FANFARE_PLAY(206), { 0x3b, 0x17, 0x0000, 0x00000000, 0x00000000, NULL }, MSG_NPC(2, _(" Congratulations!{WAIT_PRESS}\nYou can go to the {COLOR GREEN_H}Wild Plains{RESET} now.")), @@ -2151,7 +2151,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ WAIT(1), WAIT(15), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(7), PORTRAIT(PLACEMENT_TOP_LEFT, 0x0003, 0x00000000), MSG_NPC(3, _(" BZBZBZZT!{WAIT_PRESS}\nIF YOU'RE GIVING FRIEND AREAS AWAY...")), @@ -2165,7 +2165,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_NPC(2, _(" I'm giving it away today!{WAIT_PRESS}\nWigglytuff〜♪ Wigglytuff〜♪{WAIT_PRESS}\nLet's be friends... Taaaaaaah!")), TEXTBOX_CLEAR, FANFARE_PLAY2(603), @@ -2173,7 +2173,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ { 0x27, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, { 0x28, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, { 0x27, 0x01, 0x0005, 0x00000002, 0x00808010, NULL }, - { 0xe2, 0x00, 0x025b, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(603), FANFARE_PLAY(206), MSG_NPC(2, _(" Congratulations!{WAIT_PRESS}\nYou can go to the {COLOR GREEN_H}Power Plant{RESET} now.")), TEXTBOX_CLEAR, @@ -2192,7 +2192,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), PORTRAIT_REP(0x0003, 0x00000000), MSG_NPC(3, _(" SORRY.{WAIT_PRESS}\nI KNOW MY FRIEND TURNED DOWN YOUR\nOFFER TO JOIN YOUR TEAM YESTERDAY...")), TEXTBOX_CLEAR, @@ -2229,7 +2229,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ WAIT(30), FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_4} became a team member!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, WAIT(30), { 0x3b, 0x18, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -2258,7 +2258,7 @@ static const struct ScriptCommand s_gs1_g9_s0_lives0_dlg0[] = { /* 0x813f614 */ ALERT_CUE(7), WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_NPC(2, _(" You can go to your Friend\nAreas by taking the left path from your\nrescue team base.")), MSG_NPC(2, _(" There's a sign on the path\nto the left of your rescue team base,\nso you shouldn't have any trouble.")), MSG_NPC(2, _(" That's all the giveaways\ntoday!{WAIT_PRESS} If you want more Friend Areas,\nyou'll have to buy them now.")), @@ -2276,17 +2276,17 @@ static const struct ScriptCommand s_gs1_g9_s0_lives1_dlg0[] = { /* 0x81408d0 */ AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_GRID(256, 19), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), WAIT(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -2297,12 +2297,12 @@ static const struct ScriptCommand s_gs1_g9_s0_lives2_dlg0[] = { /* 0x8140a10 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), AWAIT_CUE(3), RET, @@ -2328,7 +2328,7 @@ static const struct ScriptCommand s_gs1_g9_s1_lives0_dlg0[] = { /* 0x8140ba0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, WALK_GRID(384, 20), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -2338,20 +2338,20 @@ static const struct ScriptCommand s_gs1_g9_s1_lives0_dlg0[] = { /* 0x8140ba0 */ { 0x89, 0x10, 0x0080, 0x00000002, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), CALL_SCRIPT(JUMP_HAPPY_FUNC), CALL_SCRIPT(SMILE_START_FUNC), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(8), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x89, 0x88, 0x0100, 0x00000006, 0x00000000, NULL }, @@ -2365,7 +2365,7 @@ static const struct ScriptCommand s_gs1_g9_s1_lives1_dlg0[] = { /* 0x8140dc0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, WALK_GRID(384, 21), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(9), CALL_SCRIPT(SMILE_START_FUNC), WAIT(7), @@ -2373,15 +2373,15 @@ static const struct ScriptCommand s_gs1_g9_s1_lives1_dlg0[] = { /* 0x8140dc0 */ AWAIT_CUE(9), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(SMILE_START_FUNC), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(9), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(9), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x89, 0x88, 0x0100, 0x00000006, 0x00000000, NULL }, @@ -2393,7 +2393,7 @@ static const struct ScriptCommand s_gs1_g10_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(2393), SELECT_ENTITIES(-1, 0), CANCEL_ENTITIES(8, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), AWAIT_CUE(3), SELECT_ENTITIES(-1, 1), ALERT_CUE(5), @@ -2406,7 +2406,7 @@ static const struct ScriptCommand s_gs1_g10_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g10_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g10_s0_station_sref_script }; /* 0x8141040 */ +static const struct ScriptRef s_gs1_g10_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g10_s0_station_sref_script }; /* 0x8141040 */ static const struct ScriptCommand s_gs1_g10_s0_eff0_script[] = { /* 0x814104c */ DEBUGINFO_O(2412), @@ -2464,7 +2464,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ ALERT_CUE(4), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 22), - { 0x93, 0x04, 0x000b, 0x0000004e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 78), ALERT_CUE(6), WAIT(30), AWAIT_CUE(5), @@ -2490,7 +2490,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ VARIANT_DEFAULT(_(" Hi, what's going on?")), TEXTBOX_CLEAR, WAIT(10), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), ALERT_CUE(9), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_RIGHT, 0x0004, 0x00000000), @@ -2504,7 +2504,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ TEXTBOX_CLEAR, WAIT(4), ALERT_CUE(4), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), ALERT_CUE(6), AWAIT_CUE(5), { 0x2e, 0x00, 0x0004, -0x00000002, 0x00000000, NULL }, @@ -2514,7 +2514,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ ALERT_CUE(4), AWAIT_CUE(5), ALERT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(6), PORTRAIT(PLACEMENT_MIDDLE_RIGHT, 0x0004, 0x00000000), MSG_NPC(4, _(" But his team's greedy.\nThey don't work unless they get paid\nroyally.")), @@ -2533,7 +2533,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ ALERT_CUE(13), ALERT_CUE(14), WAIT(20), - { 0x93, 0x04, 0x000b, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 88), WAIT(1), ALERT_CUE(6), WAIT(1), @@ -2591,7 +2591,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ VARIANT_DEFAULT(_(" Say, who are they?")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(9), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_RIGHT, 0x0004, 0x00000000), @@ -2601,7 +2601,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ WAIT(4), ALERT_CUE(9), WAIT(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(6), WAIT(20), ALERT_CUE(4), @@ -2644,11 +2644,11 @@ static const struct ScriptCommand s_gs1_g10_s0_lives2_dlg0[] = { /* 0x81412bc */ ALERT_CUE(13), ALERT_CUE(14), WAIT(46), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("{COLOR YELLOW}{SPEECH_BUBBLE}{RESET}: C-cool...") }, + MSG_OVERHEARD(_("{COLOR YELLOW}{SPEECH_BUBBLE}{RESET}: C-cool...")), WAIT(60), - { 0x36, 0x00, -0x0001, 0x00000000, 0x00000000, _("{COLOR YELLOW}{SPEECH_BUBBLE}{RESET}: I wouldn't expect less from a Gold\nRank rescue team.") }, + MSG_OVERHEARD(_("{COLOR YELLOW}{SPEECH_BUBBLE}{RESET}: I wouldn't expect less from a Gold\nRank rescue team.")), WAIT(40), - ROTATE(10, 11, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_11, DIRECTION_EAST), ALERT_CUE(6), ALERT_CUE(9), WAIT(70), @@ -2760,39 +2760,39 @@ static const struct ScriptCommand s_gs1_g10_s0_lives3_dlg0[] = { /* 0x8142cf4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x0000004e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 78), ALERT_CUE(5), AWAIT_CUE(6), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, CAMERA_PAN(256, 23), - { 0x8e, 0x01, 0x0000, 0x0000004e, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 78), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(6), WAIT(3), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 88), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 88), AWAIT_CUE(6), - ROTATE(10, 2, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(6), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - { 0x90, 0x20, 0x0000, 0x0000001c, 0x00000000, NULL }, + CMD_UNK_90(32, DIR_TRANS_NONE, 28), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, }; @@ -2803,26 +2803,26 @@ static const struct ScriptCommand s_gs1_g10_s0_lives4_dlg0[] = { /* 0x8142f64 */ { 0x2d, 0x07, 0x0009, 0x00000000, 0x00000000, NULL }, WAIT(1), AWAIT_CUE(14), - { 0x93, 0x04, 0x000b, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 88), AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(14), CALL_SCRIPT(SHOCK_FUNC), - ROTATE(1, 1, DIRECTION_WEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), { 0x61, 0x00, 0x0400, 0x00000230, 0x00000108, NULL }, WAIT(30), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(14), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(14), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(14), WAIT(150), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(60), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), HALT, }; @@ -2831,22 +2831,22 @@ static const struct ScriptCommand s_gs1_g10_s0_lives5_dlg0[] = { /* 0x8143104 */ SELECT_ANIMATION(3), { 0x2d, 0x07, 0x0009, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(14), WAIT(10), AWAIT_CUE(14), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(14), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(14), WAIT(150), - ROTATE(8, 1, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(60), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), HALT, }; @@ -2856,25 +2856,25 @@ static const struct ScriptCommand s_gs1_g10_s0_lives6_dlg0[] = { /* 0x8143254 */ { 0x2d, 0x07, 0x0008, 0x00000000, 0x00000000, NULL }, WAIT(1), AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x00000058, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 88), AWAIT_CUE(13), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(13), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), AWAIT_CUE(13), CALL_SCRIPT(SHOCK_FUNC), WAIT(65), - ROTATE(1, 2, DIRECTION_EAST), + ROTATE_TO(1, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), { 0x61, 0x00, 0x0400, 0x000001d0, 0x00000108, NULL }, WAIT(30), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(13), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(13), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(13), WAIT(120), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), HALT, }; @@ -2897,9 +2897,9 @@ static const struct ScriptCommand s_gs1_g10_s0_lives7_dlg0[] = { /* 0x81433e4 */ ALERT_CUE(5), AWAIT_CUE(7), { 0x89, 0x08, 0x0100, 0x00000003, 0x00000000, NULL }, - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), WAIT(50), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), WAIT(70), { 0x89, 0x30, 0x0100, 0x00000002, 0x00000000, NULL }, AWAIT_CUE(7), @@ -2911,26 +2911,26 @@ static const struct ScriptCommand s_gs1_g10_s0_lives8_dlg0[] = { /* 0x8143574 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x8e, 0x01, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 88), AWAIT_CUE(8), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), FANFARE_STOP2(465), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), FANFARE_PLAY2(468), WAIT(48), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), WAIT(40), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), FANFARE_PLAY2(468), WAIT(40), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), FANFARE_PLAY2(468), WAIT(40), FANFARE_STOP2(468), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), WAIT(16), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), @@ -2951,7 +2951,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives9_dlg0[] = { /* 0x81437d4 */ DEBUGINFO_O(2951), SELECT_ANIMATION(2), AWAIT_CUE(7), - { 0x8e, 0x01, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 88), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000005, 0x00000000, NULL }, AWAIT_CUE(7), @@ -2965,7 +2965,7 @@ static const struct ScriptCommand s_gs1_g10_s0_lives10_dlg0[] = { /* 0x8143884 * DEBUGINFO_O(2965), SELECT_ANIMATION(2), AWAIT_CUE(7), - { 0x8e, 0x01, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 88), AWAIT_CUE(7), { 0x62, 0x00, 0x0100, 0x00000005, 0x00000000, NULL }, AWAIT_CUE(7), @@ -2980,27 +2980,27 @@ static const struct ScriptCommand s_gs1_g10_s0_lives11_dlg0[] = { /* 0x8143934 * SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - { 0x8e, 0x01, 0x0000, 0x00000004, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 4), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x0002, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 85), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(9), WAIT(3), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(9), - { 0x8e, 0x01, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 88), AWAIT_CUE(9), - { 0x8e, 0x01, 0x0000, 0x00000004, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 4), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - { 0x8e, 0x01, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 88), AWAIT_CUE(9), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(9), FANFARE_PLAY2(455), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -3029,11 +3029,11 @@ static const struct ScriptCommand s_gs1_g10_s1_lives0_dlg0[] = { /* 0x8143b44 */ ALERT_CUE(5), WAIT(10), AWAIT_CUE(10), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(10), - { 0x8e, 0x10, 0x0000, 0x00000059, 0x00000000, NULL }, + CMD_UNK_8E(16, DIR_TRANS_NONE, 89), WAIT(16), - { 0x8e, 0x10, 0x0000, 0x0000005a, 0x00000000, NULL }, + CMD_UNK_8E(16, DIR_TRANS_NONE, 90), WAIT(16), ALERT_CUE(5), AWAIT_CUE(10), @@ -3054,7 +3054,7 @@ static const struct ScriptCommand s_gs1_g10_s1_lives1_dlg0[] = { /* 0x8143d14 */ WALK_DIRECT(240, 30), AWAIT_CUE(11), WAIT(5), - { 0x8e, 0x10, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(16, DIR_TRANS_NONE, 88), WAIT(16), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), @@ -3078,7 +3078,7 @@ static const struct ScriptCommand s_gs1_g10_s1_lives2_dlg0[] = { /* 0x8143e74 */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WALK_DIRECT(240, 33), AWAIT_CUE(12), - { 0x8e, 0x10, 0x0000, 0x00000058, 0x00000000, NULL }, + CMD_UNK_8E(16, DIR_TRANS_NONE, 88), WAIT(16), AWAIT_CUE(12), WALK_DIRECT(136, 34), @@ -3091,9 +3091,9 @@ static const struct ScriptCommand s_gs1_g10_s2_lives0_dlg0[] = { /* 0x8143f74 */ DEBUGINFO_O(3091), SELECT_ANIMATION(2), { 0x2d, 0x01, 0x0005, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x04, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_NONE, 0), AWAIT_CUE(10), - ROTATE(10, 10, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), SELECT_ANIMATION(24), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -3111,7 +3111,7 @@ static const struct ScriptCommand s_gs1_g11_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g11_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g11_s0_station_sref_script }; /* 0x8144094 */ +static const struct ScriptRef s_gs1_g11_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g11_s0_station_sref_script }; /* 0x8144094 */ static const struct ScriptCommand s_gs1_g11_s0_lives0_dlg2[] = { /* 0x81440a0 */ DEBUGINFO_O(3117), @@ -3192,7 +3192,7 @@ static const struct ScriptCommand s_gs1_g11_s0_lives6_dlg2[] = { /* 0x8144320 */ static const struct ScriptCommand s_gs1_g11_s0_lives7_dlg1[] = { /* 0x8144578 */ DEBUGINFO_O(3193), SELECT_ANIMATION(1), - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), RET, }; @@ -3220,10 +3220,10 @@ static const struct ScriptCommand s_gs1_g11_s0_lives7_dlg3[] = { /* 0x8144888 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), CALL_SCRIPT(WAIT_END_TALK_FUNC), RET, @@ -3261,7 +3261,7 @@ static const struct ScriptCommand s_gs1_g12_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g12_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g12_s0_station_sref_script }; /* 0x8144c80 */ +static const struct ScriptRef s_gs1_g12_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g12_s0_station_sref_script }; /* 0x8144c80 */ static const struct ScriptCommand s_gs1_g12_s0_lives0_dlg0[] = { /* 0x8144c8c */ DEBUGINFO_O(3267), @@ -3347,7 +3347,7 @@ static const struct ScriptCommand s_gs1_g13_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g13_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g13_s0_station_sref_script }; /* 0x8144f8c */ +static const struct ScriptRef s_gs1_g13_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g13_s0_station_sref_script }; /* 0x8144f8c */ static const struct ScriptCommand s_gs1_g13_s0_lives0_dlg2[] = { /* 0x8144f98 */ DEBUGINFO_O(3353), @@ -3444,7 +3444,7 @@ static const struct ScriptCommand s_gs1_g14_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g14_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g14_s0_station_sref_script }; /* 0x8145488 */ +static const struct ScriptRef s_gs1_g14_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g14_s0_station_sref_script }; /* 0x8145488 */ static const struct ScriptCommand s_gs1_g14_s0_lives0_dlg2[] = { /* 0x8145494 */ DEBUGINFO_O(3450), @@ -3618,7 +3618,7 @@ static const struct ScriptCommand s_gs1_g15_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g15_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g15_s0_station_sref_script }; /* 0x8145d94 */ +static const struct ScriptRef s_gs1_g15_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g15_s0_station_sref_script }; /* 0x8145d94 */ static const struct ScriptCommand s_gs1_g15_s0_lives0_dlg2[] = { /* 0x8145da0 */ DEBUGINFO_O(3624), @@ -3734,7 +3734,7 @@ static const struct ScriptCommand s_gs1_g16_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g16_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g16_s0_station_sref_script }; /* 0x8146380 */ +static const struct ScriptRef s_gs1_g16_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g16_s0_station_sref_script }; /* 0x8146380 */ static const struct ScriptCommand s_gs1_g16_s0_lives0_dlg2[] = { /* 0x814638c */ DEBUGINFO_O(3740), @@ -3796,7 +3796,7 @@ static const struct ScriptCommand s_gs1_g16_s0_evt0_sref_script[] = { /* 0x81465 HALT, }; -static const struct ScriptRef s_gs1_g16_s0_evt0_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs1_g16_s0_evt0_sref_script }; /* 0x81465fc */ +static const struct ScriptRef s_gs1_g16_s0_evt0_sref = { NORMAL_EVENT, 7, NULL, s_gs1_g16_s0_evt0_sref_script }; /* 0x81465fc */ static const struct ScriptCommand s_gs1_g17_s0_station_sref_script[] = { /* 0x8146608 */ DEBUGINFO_O(3802), @@ -3808,7 +3808,7 @@ static const struct ScriptCommand s_gs1_g17_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g17_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g17_s0_station_sref_script }; /* 0x8146678 */ +static const struct ScriptRef s_gs1_g17_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g17_s0_station_sref_script }; /* 0x8146678 */ static const struct ScriptCommand s_gs1_g17_s0_eff0_script[] = { /* 0x8146684 */ DEBUGINFO_O(3814), @@ -3828,12 +3828,12 @@ static const struct ScriptCommand s_gs1_g17_s0_lives0_dlg0[] = { /* 0x8146704 */ { 0x2d, 0x09, 0x0005, 0x00000062, 0x00000000, NULL }, { 0x2d, 0x09, 0x0006, 0x00000063, 0x00000000, NULL }, WAIT(30), - { 0x93, 0x04, 0x0001, 0x00000004, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 4), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hah?{WAIT_PRESS}\nWhat are those guys talking about?")), VARIANT_DEFAULT(_(" Huh?{WAIT_PRESS}\nWhat are they chatting about?")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(4), ALERT_CUE(7), AWAIT_CUE(5), @@ -3868,7 +3868,7 @@ static const struct ScriptCommand s_gs1_g17_s0_lives0_dlg0[] = { /* 0x8146704 */ WAIT(10), ALERT_CUE(6), WALK_RELATIVE(256, 16, 0), - ROTATE(8, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000004), MSG_NPC(1, _(" The {NAME_6} legend?{WAIT_PRESS}\nWhat's that?")), @@ -3889,14 +3889,14 @@ static const struct ScriptCommand s_gs1_g17_s0_lives0_dlg0[] = { /* 0x8146704 */ WAIT(10), MSG_NPC(3, _(" Well, it is still a mere\nrumor.")), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), MSG_NPC(3, _(" I wouldn't put too much\nstock in that story if I were you.")), MSG_NPC(3, _(" Personally, I don't believe\nin rumors of that sort.")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(2, _(" If you want to know more\nabout the {NAME_6} legend...")), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), MSG_NPC(2, _(" You should go see a\nPokémon named {NAME_5}.\nHe knows the story well.")), TEXTBOX_CLEAR, WAIT(10), @@ -3907,12 +3907,12 @@ static const struct ScriptCommand s_gs1_g17_s0_lives0_dlg0[] = { /* 0x8146704 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(60), ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_TOP_FLIP, 0x0002, 0x00000000), MSG_NPC(2, _(" You should visit him if you\nwant to know more.")), TEXTBOX_CLEAR, @@ -3934,27 +3934,27 @@ static const struct ScriptCommand s_gs1_g17_s0_lives1_dlg0[] = { /* 0x8147160 */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, FANFARE_PLAY2(464), CALL_SCRIPT(NOTICE_FUNC), - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), WALK_GRID(256, 44), ALERT_CUE(5), AWAIT_CUE(6), WALK_RELATIVE(256, 16, 0), - ROTATE(8, 2, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), WAIT(20), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -3972,18 +3972,18 @@ static const struct ScriptCommand s_gs1_g17_s0_lives2_dlg0[] = { /* 0x8147330 */ AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), HALT, }; @@ -3991,16 +3991,16 @@ static const struct ScriptCommand s_gs1_g17_s0_lives2_dlg0[] = { /* 0x8147330 */ static const struct ScriptCommand s_gs1_g17_s0_lives3_dlg0[] = { /* 0x81474c0 */ DEBUGINFO_O(3992), SELECT_ANIMATION(2), - { 0x8b, 0x01, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHWEST, 1), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), HALT, }; @@ -4010,9 +4010,9 @@ static const struct ScriptCommand s_gs1_g17_s0_lives4_dlg0[] = { /* 0x8147590 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), CALL_SCRIPT(NOTICE_FUNC), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), HALT, }; @@ -4022,7 +4022,7 @@ static const struct ScriptCommand s_gs1_g18_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g18_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g18_s0_station_sref_script }; /* 0x8147650 */ +static const struct ScriptRef s_gs1_g18_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g18_s0_station_sref_script }; /* 0x8147650 */ static const struct ScriptCommand s_gs1_g18_s0_lives0_dlg2[] = { /* 0x814765c */ DEBUGINFO_O(4028), @@ -4118,7 +4118,7 @@ static const struct ScriptCommand s_gs1_g19_s0_station_sref_script[] = { /* 0x81 HALT, }; -static const struct ScriptRef s_gs1_g19_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g19_s0_station_sref_script }; /* 0x8147ae8 */ +static const struct ScriptRef s_gs1_g19_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g19_s0_station_sref_script }; /* 0x8147ae8 */ static const struct ScriptCommand s_gs1_g19_s0_lives0_dlg0[] = { /* 0x8147af4 */ DEBUGINFO_O(4124), @@ -4132,7 +4132,7 @@ static const struct ScriptCommand s_gs1_g19_s0_lives0_dlg0[] = { /* 0x8147af4 */ VARIANT(/* == */ 1, _(" ...Listen, {NAME_0}.")), VARIANT_DEFAULT(_(" ...Say, {NAME_0}.")), TEXTBOX_CLEAR, - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(10), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000005), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -4148,7 +4148,7 @@ static const struct ScriptCommand s_gs1_g19_s0_lives1_dlg0[] = { /* 0x8147cf0 */ DEBUGINFO_O(4148), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x08, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 0), ALERT_CUE(5), HALT, }; @@ -4162,12 +4162,12 @@ static const struct ScriptCommand s_gs1_g20_s0_station_sref_script[] = { /* 0x81 { 0x22, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, WAIT(120), { 0x23, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(4, 0), AWAIT_CUE(3), { 0x22, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, WAIT(120), { 0x23, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(4, 0), AWAIT_CUE(3), { 0x22, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), @@ -4177,7 +4177,7 @@ static const struct ScriptCommand s_gs1_g20_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g20_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g20_s0_station_sref_script }; /* 0x8147ea0 */ +static const struct ScriptRef s_gs1_g20_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g20_s0_station_sref_script }; /* 0x8147ea0 */ static const struct ScriptCommand s_gs1_g20_s0_eff0_script[] = { /* 0x8147eac */ DEBUGINFO_O(4183), @@ -4186,11 +4186,11 @@ static const struct ScriptCommand s_gs1_g20_s0_eff0_script[] = { /* 0x8147eac */ AWAIT_CUE(4), WALK_DIRECT(180, 47), AWAIT_CUE(4), - { 0xe5, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(3, 0), WARP_WAYPOINT(0, 48), { 0x6c, 0xb4, 0x0100, 0x00000031, 0x00000000, NULL }, AWAIT_CUE(4), - { 0xe5, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(3, 0), WARP_WAYPOINT(0, 50), { 0x62, 0x00, 0x0100, -0x00000050, 0x00000000, NULL }, HALT, @@ -4208,17 +4208,17 @@ static const struct ScriptCommand s_gs1_g20_s0_lives0_dlg0[] = { /* 0x8147f8c */ PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000004), MSG_NPC(1, _(" Huh?")), TEXTBOX_CLEAR, - ROTATE(5, 10, DIRECTION_NORTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(6), WAIT(20), - ROTATE(10, 1, DIRECTION_EAST), + ROTATE_TO(10, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(5), MSG_NPC(1, _(" The town's atmosphere\nfeels different somehow...")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_NPC(1, _(" Maybe something's happened.")), MSG_NPC(1, _(" {NAME_0}, let's check\nit out!")), @@ -4242,15 +4242,15 @@ static const struct ScriptCommand s_gs1_g20_s0_lives1_dlg0[] = { /* 0x81481f8 */ ALERT_CUE(5), AWAIT_CUE(6), WALK_RELATIVE(256, 72, 0), - ROTATE(5, 10, DIRECTION_NORTH), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), - ROTATE(5, 1, DIRECTION_SOUTH), + ROTATE_TO(5, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(15), - ROTATE(5, 10, DIRECTION_EAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_EAST), WAIT(15), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), WALK_RELATIVE(256, 120, 0), @@ -4269,7 +4269,7 @@ static const struct ScriptCommand s_gs1_g21_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g21_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g21_s0_station_sref_script }; /* 0x81483f8 */ +static const struct ScriptRef s_gs1_g21_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g21_s0_station_sref_script }; /* 0x81483f8 */ static const struct ScriptCommand s_gs1_g21_s0_eff0_script[] = { /* 0x8148404 */ DEBUGINFO_O(4275), @@ -4335,14 +4335,14 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ ALERT_CUE(6), FANFARE_PLAY2(463), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x05, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 54), MSG_NPC(1, _(" Oh, hi, {NAME_3}!")), TEXTBOX_CLEAR, ALERT_CUE(8), AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(10), - { 0x93, 0x0a, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(10, DIR_TRANS_10, 54), WAIT(30), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000001), MSG_NPC(1, _(" Even you came out,\n{NAME_3}?")), @@ -4372,7 +4372,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ ALERT_CUE(6), ALERT_CUE(10), ALERT_CUE(11), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), WAIT(15), ALERT_CUE(4), WAIT(30), @@ -4384,7 +4384,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ WAIT(10), ALERT_CUE(6), WALK_DIRECT(150, 55), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), WAIT(30), FANFARE_PLAY2(473), ALERT_CUE(6), @@ -4393,7 +4393,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ MSG_NPC(1, _(" Ge-{NAME_2}?!")), TEXTBOX_CLEAR, WAIT(10), - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), ALERT_CUE(7), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" ...So I went up to the\n{COLOR CYAN}Hill of the Ancients{RESET}.")), @@ -4418,7 +4418,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ CALL_LABEL(15), FANFARE_PLAY2(464), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x05, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_TOP_LEFT, 0x0005, 0x00000000), MSG_NPC(5, _(" What?!")), TEXTBOX_CLEAR, @@ -4456,7 +4456,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ ALERT_CUE(6), CALL_LABEL(15), FANFARE_PLAY2(473), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), MSG_NPC(4, _(" Wh-what?")), TEXTBOX_CLEAR, WAIT(10), @@ -4496,7 +4496,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ ALERT_CUE(11), ALERT_CUE(6), WAIT(15), - { 0xe5, 0x00, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(9, 0), AWAIT_CUE(5), MSG_NPC(4, _(" Th-that's true!")), TEXTBOX_CLEAR, @@ -4543,7 +4543,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ PORTRAIT(PLACEMENT_RIGHT, 0x0006, 0x00000000), MSG_NPC(6, _(" Is that true?\nHey!")), TEXTBOX_CLEAR, - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x0000000c), @@ -4592,7 +4592,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ ALERT_CUE(11), ALERT_CUE(6), CALL_LABEL(15), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), WAIT(60), ALERT_CUE(7), AWAIT_CUE(5), @@ -4620,11 +4620,11 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ VARIANT_DEFAULT(_(" E-everyone, what's gotten\ninto you?{WAIT_PRESS}\nWhat are you going to do?")), TEXTBOX_CLEAR, ALERT_CUE(6), - ROTATE(5, 2, DIRECTION_NORTH), + ROTATE_TO(5, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(15), - ROTATE(5, 1, DIRECTION_SOUTH), + ROTATE_TO(5, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(15), - ROTATE(5, 2, DIRECTION_EAST), + ROTATE_TO(5, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), { 0x62, 0x00, 0x004c, -0x00000008, 0x00000000, NULL }, AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0004, 0x00000000), @@ -4634,7 +4634,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ WAIT(20), ALERT_CUE(8), ALERT_CUE(6), - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), FANFARE_PLAY2(497), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, @@ -4654,15 +4654,15 @@ static const struct ScriptCommand s_gs1_g21_s0_lives0_dlg0[] = { /* 0x81484d4 */ AWAIT_CUE(5), MSG_NPC(1, _(" Waaaaah!{WAIT_PRESS}\n{NAME_0}, run!")), TEXTBOX_CLEAR, - { 0xe5, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x02, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_E5(6, 0), + CMD_UNK_93(2, DIR_TRANS_10, 34), ALERT_CUE(9), ALERT_CUE(10), ALERT_CUE(11), ALERT_CUE(7), CALL_LABEL(15), WAIT(15), - { 0xe5, 0x00, 0x0008, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(8, 0), WALK_RELATIVE(768, -120, 0), WAIT(30), PORTRAIT_REP(0x0002, 0x00000000), @@ -4737,29 +4737,29 @@ static const struct ScriptCommand s_gs1_g21_s0_lives1_dlg0[] = { /* 0x814a970 */ AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(6), - ROTATE(5, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - { 0x93, 0x0a, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(10, DIR_TRANS_10, 91), AWAIT_CUE(6), WALK_DIRECT(150, 54), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), WAIT(15), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(6), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(6), AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), LABEL(0), /* = 0x00 */ - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(15), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), @@ -4767,7 +4767,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives1_dlg0[] = { /* 0x814a970 */ LABEL(1), /* = 0x01 */ WAIT(15), WALK_RELATIVE(256, 16, 0), - { 0x93, 0x05, 0x000a, 0x00000050, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 80), ALERT_CUE(5), AWAIT_CUE(6), { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, @@ -4777,33 +4777,33 @@ static const struct ScriptCommand s_gs1_g21_s0_lives1_dlg0[] = { /* 0x814a970 */ WAIT(60), SELECT_ANIMATION(2), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, SELECT_ANIMATION(4), - ROTATE(4, 10, DIRECTION_NORTHEAST), - ROTATE(4, 10, DIRECTION_SOUTH), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), SELECT_ANIMATION(2), { 0x62, 0x00, 0x004c, -0x00000008, -0x00000008, NULL }, { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, - ROTATE(2, 2, DIRECTION_NORTH), + ROTATE_TO(2, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), WAIT(15), { 0x62, 0x00, 0x004c, -0x00000008, 0x00000008, NULL }, AWAIT_CUE(6), - { 0x93, 0x02, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(2, DIR_TRANS_10, 0), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), CALL_SCRIPT(SHOCK_FUNC), WALK_GRID(512, 55), - ROTATE(2, 10, DIRECTION_EAST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(2, DIR_TRANS_10, DIRECTION_EAST), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - ROTATE(2, 10, DIRECTION_NORTHWEST), + ROTATE_TO(2, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), ALERT_CUE(5), AWAIT_CUE(6), @@ -4822,15 +4822,15 @@ static const struct ScriptCommand s_gs1_g21_s0_lives2_dlg0[] = { /* 0x814aee0 */ AWAIT_CUE(7), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(7), - { 0x93, 0x05, 0x000a, 0x0000004d, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 77), + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(5, 10, DIRECTION_SOUTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(10, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHWEST), SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), CALL_SCRIPT(SMILE_START_FUNC), CALL_SCRIPT(JUMP_HAPPY_FUNC), @@ -4838,26 +4838,26 @@ static const struct ScriptCommand s_gs1_g21_s0_lives2_dlg0[] = { /* 0x814aee0 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(6, 1, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(15), - ROTATE(6, 2, DIRECTION_EAST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(15), - ROTATE(6, 10, DIRECTION_SOUTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(6, DIR_TRANS_10, DIRECTION_SOUTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(5, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTHWEST), CALL_SCRIPT(SMILE_START_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), CALL_SCRIPT(SMILE_END_FUNC), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x62, 0x00, 0x004c, 0x00000000, -0x00000010, NULL }, - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - ROTATE(5, 10, DIRECTION_WEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_WEST), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(7), HALT, @@ -4869,7 +4869,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives3_dlg0[] = { /* 0x814b1e0 */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -4878,13 +4878,13 @@ static const struct ScriptCommand s_gs1_g21_s0_lives3_dlg0[] = { /* 0x814b1e0 */ WALK_GRID(256, 61), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x0a, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(10, DIR_TRANS_10, 91), WAIT(30), ALERT_CUE(5), AWAIT_CUE(8), WALK_GRID(128, 62), WALK_GRID(128, 53), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), @@ -4899,16 +4899,16 @@ static const struct ScriptCommand s_gs1_g21_s0_lives3_dlg0[] = { /* 0x814b1e0 */ COND_EQUAL(2, /* to label */ 4), COND_EQUAL(3, /* to label */ 5), LABEL(2), /* = 0x02 */ - ROTATE(5, 10, DIRECTION_NORTH), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTH), JUMP_LABEL(6), LABEL(3), /* = 0x03 */ - ROTATE(5, 10, DIRECTION_NORTHEAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHEAST), JUMP_LABEL(6), LABEL(4), /* = 0x04 */ - ROTATE(5, 10, DIRECTION_NORTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(6), LABEL(5), /* = 0x05 */ - ROTATE(5, 10, DIRECTION_EAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_EAST), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ WAIT_RANDOM(15, 90), @@ -4916,28 +4916,28 @@ static const struct ScriptCommand s_gs1_g21_s0_lives3_dlg0[] = { /* 0x814b1e0 */ LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(8), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - ROTATE(5, 10, DIRECTION_NORTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(8), - ROTATE(8, 2, DIRECTION_NORTHWEST), - ROTATE(8, 1, DIRECTION_NORTHEAST), - ROTATE(8, 2, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0003, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHEAST, 0), { 0x62, 0x00, 0x0080, -0x00000010, 0x00000010, NULL }, WAIT(30), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(8), WAIT(15), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, }; @@ -4960,16 +4960,16 @@ static const struct ScriptCommand s_gs1_g21_s0_lives4_dlg0[] = { /* 0x814b6a0 */ COND_EQUAL(2, /* to label */ 5), COND_EQUAL(3, /* to label */ 6), LABEL(3), /* = 0x03 */ - ROTATE(5, 10, DIRECTION_NORTH), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTH), JUMP_LABEL(7), LABEL(4), /* = 0x04 */ - ROTATE(5, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTHWEST), JUMP_LABEL(7), LABEL(5), /* = 0x05 */ - ROTATE(5, 10, DIRECTION_NORTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(7), LABEL(6), /* = 0x06 */ - ROTATE(5, 10, DIRECTION_WEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_WEST), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ WAIT_RANDOM(15, 90), @@ -4977,25 +4977,25 @@ static const struct ScriptCommand s_gs1_g21_s0_lives4_dlg0[] = { /* 0x814b6a0 */ LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(9), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(9), - { 0x93, 0x05, 0x000a, 0x00000050, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 80), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(9), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(9), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(9), WALK_GRID(128, 57), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(9), WALK_DIRECT(30, 55), { 0x57, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, @@ -5022,7 +5022,7 @@ static const struct ScriptCommand s_gs1_g21_s0_lives5_dlg0[] = { /* 0x814bad0 */ FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(15), WALK_GRID(204, 59), ALERT_CUE(5), @@ -5031,15 +5031,15 @@ static const struct ScriptCommand s_gs1_g21_s0_lives5_dlg0[] = { /* 0x814bad0 */ SELECT_ANIMATION(4), AWAIT_CUE(10), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x0002, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 54), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 54), AWAIT_CUE(10), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(10), WALK_GRID(128, 60), WALK_GRID(128, 56), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(10), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(10), @@ -5054,16 +5054,16 @@ static const struct ScriptCommand s_gs1_g21_s0_lives5_dlg0[] = { /* 0x814bad0 */ COND_EQUAL(2, /* to label */ 5), COND_EQUAL(3, /* to label */ 6), LABEL(3), /* = 0x03 */ - ROTATE(5, 10, DIRECTION_EAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_EAST), JUMP_LABEL(7), LABEL(4), /* = 0x04 */ - ROTATE(5, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTHEAST), JUMP_LABEL(7), LABEL(5), /* = 0x05 */ - ROTATE(5, 10, DIRECTION_SOUTH), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTH), JUMP_LABEL(7), LABEL(6), /* = 0x06 */ - ROTATE(5, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_SOUTHWEST), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ WAIT_RANDOM(15, 90), @@ -5071,23 +5071,23 @@ static const struct ScriptCommand s_gs1_g21_s0_lives5_dlg0[] = { /* 0x814bad0 */ LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(10), AWAIT_CUE(10), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(10), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(10), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(10), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x62, 0x00, 0x004c, -0x00000008, 0x00000000, NULL }, AWAIT_CUE(10), { 0x62, 0x00, 0x004c, 0x00000000, 0x00000008, NULL }, AWAIT_CUE(10), - ROTATE(5, 1, DIRECTION_WEST), + ROTATE_TO(5, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(15), { 0x62, 0x00, 0x0200, -0x00000008, 0x00000008, NULL }, { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -5100,16 +5100,16 @@ static const struct ScriptCommand s_gs1_g21_s0_lives6_dlg0[] = { /* 0x814bfb0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), - { 0x93, 0x02, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(2, DIR_TRANS_10, 34), CALL_SCRIPT(ANGRY_START_FUNC), ALERT_CUE(5), AWAIT_CUE(11), CALL_SCRIPT(ANGRY_END_FUNC), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(11), WALK_GRID(128, 52), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(11), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(11), @@ -5124,16 +5124,16 @@ static const struct ScriptCommand s_gs1_g21_s0_lives6_dlg0[] = { /* 0x814bfb0 */ COND_EQUAL(2, /* to label */ 5), COND_EQUAL(3, /* to label */ 6), LABEL(3), /* = 0x03 */ - ROTATE(5, 10, DIRECTION_NORTH), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTH), JUMP_LABEL(7), LABEL(4), /* = 0x04 */ - ROTATE(5, 10, DIRECTION_NORTHEAST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHEAST), JUMP_LABEL(7), LABEL(5), /* = 0x05 */ - ROTATE(5, 10, DIRECTION_NORTHWEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(7), LABEL(6), /* = 0x06 */ - ROTATE(5, 10, DIRECTION_WEST), + ROTATE_TO(5, DIR_TRANS_10, DIRECTION_WEST), JUMP_LABEL(7), LABEL(7), /* = 0x07 */ WAIT_RANDOM(15, 90), @@ -5141,38 +5141,38 @@ static const struct ScriptCommand s_gs1_g21_s0_lives6_dlg0[] = { /* 0x814bfb0 */ LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(11), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 77), ALERT_CUE(5), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(11), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(11), CALL_SCRIPT(ANGRY_START_FUNC), - { 0x93, 0x05, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 34), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), CALL_SCRIPT(ANGRY_END_FUNC), WAIT(30), ALERT_CUE(5), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 91), AWAIT_CUE(11), - { 0x93, 0x05, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(5, DIR_TRANS_10, 0), AWAIT_CUE(11), WALK_RELATIVE(76, -24, 0), - { 0x8b, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTHWEST, 0), SELECT_ANIMATION(7), AWAIT_CUE(11), { 0x62, 0x00, 0x004c, -0x00000008, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(5, 2, DIRECTION_WEST), + ROTATE_TO(5, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT(15), { 0x62, 0x00, 0x0200, -0x00000008, -0x00000008, NULL }, HALT, @@ -5190,32 +5190,32 @@ static const struct ScriptCommand s_gs1_g21_s0_lives7_dlg0[] = { /* 0x814c4b0 */ LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(6, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(6, 1, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(12), CALL_LABEL(2), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(12), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(12), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(12), CALL_LABEL(2), WALK_RELATIVE(128, -64, -8), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(12), CALL_LABEL(2), WALK_RELATIVE(768, -16, 8), @@ -5237,32 +5237,32 @@ static const struct ScriptCommand s_gs1_g21_s0_lives8_dlg0[] = { /* 0x814c770 */ LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(6, 1, DIRECTION_NORTHEAST), + ROTATE_TO(6, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(6, 2, DIRECTION_WEST), + ROTATE_TO(6, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(13), CALL_LABEL(2), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(13), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(13), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(13), CALL_LABEL(2), WALK_RELATIVE(128, -24, -8), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(13), CALL_LABEL(2), { 0x62, 0x00, 0x0300, -0x00000008, 0x00000000, NULL }, @@ -5297,23 +5297,23 @@ static const struct ScriptCommand s_gs1_g21_s0_lives9_dlg0[] = { /* 0x814ca30 */ LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(14), CALL_LABEL(3), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(14), CALL_LABEL(3), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(14), CALL_LABEL(3), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(14), CALL_LABEL(3), WALK_RELATIVE(128, -32, 0), WALK_RELATIVE(128, -32, 24), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(14), CALL_LABEL(3), { 0x62, 0x00, 0x0100, -0x00000020, 0x00000000, NULL }, @@ -5346,23 +5346,23 @@ static const struct ScriptCommand s_gs1_g21_s0_lives10_dlg0[] = { /* 0x814cd40 * LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(15), CALL_LABEL(2), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(15), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(15), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(15), CALL_LABEL(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(15), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(15), LABEL(2), /* = 0x02 */ WAIT_RANDOM(0, 30), @@ -5380,32 +5380,32 @@ static const struct ScriptCommand s_gs1_g21_s0_lives11_dlg0[] = { /* 0x814cfe0 * { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(15), - { 0x93, 0x04, 0x000a, 0x00000047, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 71), SELECT_ANIMATION(4), AWAIT_CUE(16), CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(16), CALL_LABEL(0), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(16), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(16), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(16), WAIT(15), WALK_RELATIVE(76, -24, -16), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(16), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x00000047, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 71), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(16), LABEL(0), /* = 0x00 */ @@ -5424,31 +5424,31 @@ static const struct ScriptCommand s_gs1_g21_s0_lives12_dlg0[] = { /* 0x814d270 * { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), WAIT(15), - { 0x93, 0x04, 0x000a, 0x00000046, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 70), SELECT_ANIMATION(4), AWAIT_CUE(17), CALL_SCRIPT(NOTICE_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(17), CALL_LABEL(0), CALL_SCRIPT(SHOCK_FUNC), { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(17), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(17), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(17), WAIT(30), WALK_RELATIVE(76, -16, -8), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(17), CALL_LABEL(0), - { 0x93, 0x04, 0x000a, 0x00000046, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 70), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(17), LABEL(0), /* = 0x00 */ @@ -5463,7 +5463,7 @@ static const struct ScriptCommand s_gs1_g22_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g22_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g22_s0_station_sref_script }; /* 0x814d520 */ +static const struct ScriptRef s_gs1_g22_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g22_s0_station_sref_script }; /* 0x814d520 */ static const struct ScriptCommand s_gs1_g22_s0_lives0_dlg1[] = { /* 0x814d52c */ DEBUGINFO_O(5469), @@ -5616,7 +5616,7 @@ static const struct ScriptCommand s_gs1_g23_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g23_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g23_s0_station_sref_script }; /* 0x814db38 */ +static const struct ScriptRef s_gs1_g23_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g23_s0_station_sref_script }; /* 0x814db38 */ static const struct ScriptCommand s_gs1_g23_s0_eff0_script[] = { /* 0x814db44 */ @@ -5791,7 +5791,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ WALK_GRID(256, 64), AWAIT_CUE(5), WAIT(30), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000001), MSG_NPC(1, _(" Hi, everyone!\nWe're back!")), PORTRAIT_REP(0x0001, 0x00000000), @@ -5810,13 +5810,13 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ ALERT_CUE(6), AWAIT_CUE(5), PORTRAIT_REP(0x0001, 0x00000003), - { 0x93, 0x01, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(1, DIR_TRANS_11, 91), MSG_NPC(1, _(" Hm! Oh, it's you,\n{NAME_2}.\nIt's been a while.")), TEXTBOX_CLEAR, PORTRAIT_REP(0x0002, 0x00000044), - { 0x34, 0x00, 0x0002, 0x00000000, 0x00000000, _(" (Kekeh! What's with that\nsmug confidence?)") }, + MSG_NPC(2, _(" (Kekeh! What's with that\nsmug confidence?)")), ALERT_CUE(7), - { 0x34, 0x00, 0x0002, 0x00000000, 0x00000000, _(" (Kekeh! Maybe...)\n") }, + MSG_NPC(2, _(" (Kekeh! Maybe...)\n")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), @@ -5884,7 +5884,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ ALERT_CUE(12), ALERT_CUE(13), AWAIT_CUE(5), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), WAIT(45), PORTRAIT_REP(0x0002, 0x00000041), MSG_NPC(2, _(" That's right.\nSome hard evidence! Kekeh!")), @@ -5920,7 +5920,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ ALERT_CUE(11), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_LEFT_, 0x0006, 0x00000000), MSG_NPC(6, _(" I...{WAIT_PRESS}\nI always believed in {NAME_0}!")), ALERT_CUE(11), @@ -5939,7 +5939,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ ALERT_CUE(9), ALERT_CUE(10), AWAIT_CUE(5), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), WAIT(30), ALERT_CUE(7), ALERT_CUE(12), @@ -5992,7 +5992,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ ALERT_CUE(11), ALERT_CUE(12), ALERT_CUE(13), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(15), WAIT(15), TEXTBOX_AUTO_PRESS(210, 210), @@ -6000,10 +6000,10 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ MSG_NPC(9, _(" Extra! Extra!\nRead all about it!")), TEXTBOX_CLEAR2, TEXTBOX_AUTO_PRESS(-1, -1), - ROTATE(10, 10, DIRECTION_NORTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), WAIT(20), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), WAIT(90), FANFARE_PLAY2(468), @@ -6064,7 +6064,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ WAIT(10), ALERT_CUE(6), ALERT_CUE(16), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), WAIT(80), FANFARE_PLAY2(471), ALERT_CUE(8), @@ -6082,7 +6082,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ WAIT(30), ALERT_CUE(6), ALERT_CUE(16), - { 0x93, 0x08, 0x000b, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 54), WAIT(30), PORTRAIT(PLACEMENT_RIGHT, 0x0006, 0x00000000), MSG_NPC(6, _(" Welcome back!")), @@ -6099,7 +6099,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives0_dlg0[] = { /* 0x814dc14 */ TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" All right, {NAME_0}.")), @@ -6167,12 +6167,12 @@ static const struct ScriptCommand s_gs1_g23_s0_lives1_dlg0[] = { /* 0x8150a08 */ ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(256, 66), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(JUMP_ANGRY_FUNC), @@ -6182,23 +6182,23 @@ static const struct ScriptCommand s_gs1_g23_s0_lives1_dlg0[] = { /* 0x8150a08 */ ALERT_CUE(5), AWAIT_CUE(6), WAIT(5), - { 0x93, 0x04, 0x000b, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 54), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(210), - ROTATE(10, 10, DIRECTION_NORTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), WAIT(45), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 54), AWAIT_CUE(6), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -6213,15 +6213,15 @@ static const struct ScriptCommand s_gs1_g23_s0_lives2_dlg0[] = { /* 0x8150cb8 */ WALK_GRID(256, 68), AWAIT_CUE(16), WAIT(220), - ROTATE(12, 10, DIRECTION_NORTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(16), WAIT(45), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(16), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(16), WAIT(5), - { 0x93, 0x08, 0x000a, 0x00000036, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 54), AWAIT_CUE(16), HALT, }; @@ -6234,7 +6234,7 @@ static const struct ScriptCommand s_gs1_g23_s0_lives3_dlg0[] = { /* 0x8150de8 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(7), WAIT(6), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(7), CALL_SCRIPT(ANGRY_START_FUNC), WAIT(60), @@ -6243,10 +6243,10 @@ static const struct ScriptCommand s_gs1_g23_s0_lives3_dlg0[] = { /* 0x8150de8 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x08, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 77), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000b, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 93), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), @@ -6254,11 +6254,11 @@ static const struct ScriptCommand s_gs1_g23_s0_lives3_dlg0[] = { /* 0x8150de8 */ CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(7), WAIT(65), WALK_GRID(153, 72), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(7), { 0x89, 0x08, 0x0100, 0x00000007, 0x00000000, NULL }, ALERT_CUE(5), @@ -6277,11 +6277,11 @@ static const struct ScriptCommand s_gs1_g23_s0_lives3_dlg0[] = { /* 0x8150de8 */ CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(15), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(QUESTION_FUNC), @@ -6291,26 +6291,26 @@ static const struct ScriptCommand s_gs1_g23_s0_lives3_dlg0[] = { /* 0x8150de8 */ CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x08, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 77), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(LOOK_AROUND_FUNC), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(180), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), WAIT(10), CALL_SCRIPT(LOOK_AROUND_FUNC), WAIT(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(7), WAIT(20), { 0x62, 0x00, 0x0100, 0x00000000, -0x0000000c, NULL }, @@ -6329,45 +6329,45 @@ static const struct ScriptCommand s_gs1_g23_s0_lives4_dlg0[] = { /* 0x81513c8 */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), WAIT(10), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), AWAIT_CUE(8), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(8), WAIT(5), - { 0x93, 0x04, 0x000b, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 93), AWAIT_CUE(8), WAIT(5), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(8), WAIT(5), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), AWAIT_CUE(8), WAIT(5), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(140), - ROTATE(10, 10, DIRECTION_NORTHWEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), WAIT(15), - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), WAIT(20), - ROTATE(10, 10, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), { 0x89, 0x10, 0x0099, 0x00000000, 0x00000000, NULL }, - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(8), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), @@ -6381,52 +6381,52 @@ static const struct ScriptCommand s_gs1_g23_s0_lives5_dlg0[] = { /* 0x81516e8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - { 0x93, 0x04, 0x000b, 0x00000050, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 80), AWAIT_CUE(9), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(9), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(9), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), CALL_SCRIPT(ANGRY_START_FUNC), WAIT(30), CALL_SCRIPT(ANGRY_END_FUNC), ALERT_CUE(5), AWAIT_CUE(9), WAIT(2), - { 0x93, 0x3c, 0x000b, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(60, DIR_TRANS_11, 93), AWAIT_CUE(9), WAIT(2), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(9), WAIT(62), WALK_GRID(153, 71), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(9), WAIT(2), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(9), WAIT(5), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), + CMD_UNK_E5(5, 0), AWAIT_CUE(9), WAIT(8), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), + CMD_UNK_E5(5, 0), AWAIT_CUE(9), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), + CMD_UNK_E5(5, 0), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(160), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(9), WAIT(12), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(15), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(9), { 0x89, 0x30, 0x0099, 0x00000004, 0x00000000, NULL }, { 0x54, 0x00, 0x001f, 0x00000000, 0x00000000, NULL }, @@ -6434,10 +6434,10 @@ static const struct ScriptCommand s_gs1_g23_s0_lives5_dlg0[] = { /* 0x81516e8 */ ALERT_CUE(17), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(9), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), FANFARE_PLAY2(471), CALL_SCRIPT(ANGRY_START_FUNC), WAIT(45), @@ -6455,42 +6455,42 @@ static const struct ScriptCommand s_gs1_g23_s0_lives6_dlg0[] = { /* 0x8151b48 */ { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), WAIT(5), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), AWAIT_CUE(10), WAIT(5), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(10), WAIT(2), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(10), WAIT(6), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), WAIT(60), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(10), WAIT(8), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(10), CALL_SCRIPT(NOTICE_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(10), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), AWAIT_CUE(10), WAIT(8), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), AWAIT_CUE(10), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(150), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(10), { 0x89, 0x06, 0x0100, 0x00000005, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), AWAIT_CUE(10), WAIT(20), { 0x89, 0x38, 0x0200, 0x00000004, 0x00000000, NULL }, @@ -6503,52 +6503,52 @@ static const struct ScriptCommand s_gs1_g23_s0_lives7_dlg0[] = { /* 0x8151e18 */ { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), WAIT(8), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), WAIT(45), - ROTATE(4, 11, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTH), AWAIT_CUE(11), WAIT(8), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(11), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(11), WAIT(60), WALK_GRID(153, 69), - ROTATE(4, 11, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_NORTHWEST), AWAIT_CUE(11), WAIT(5), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(11), WAIT(2), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(11), WAIT(2), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), AWAIT_CUE(11), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), { 0x89, 0x08, 0x0100, 0x00000004, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(11), CALL_SCRIPT(JUMP_ANGRY_FUNC), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(200), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(11), WAIT(13), - ROTATE(10, 10, DIRECTION_NORTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(10), - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(11), { 0x89, 0x08, 0x0080, 0x00000003, 0x00000000, NULL }, AWAIT_CUE(11), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), AWAIT_CUE(11), { 0x89, 0x18, 0x0080, 0x00000004, 0x00000000, NULL }, { 0x89, 0x05, 0x0080, 0x00000006, 0x00000000, NULL }, @@ -6565,55 +6565,55 @@ static const struct ScriptCommand s_gs1_g23_s0_lives8_dlg0[] = { /* 0x81521a8 */ WALK_GRID(512, 73), ALERT_CUE(5), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 91), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(12), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), ALERT_CUE(5), AWAIT_CUE(12), WAIT(55), WALK_GRID(153, 74), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(12), WAIT(5), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(12), WAIT(2), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), AWAIT_CUE(12), CALL_SCRIPT(SMILE_START_FUNC), WAIT(20), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_EAST), WAIT(45), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(12), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(12), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(12), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), AWAIT_CUE(12), WAIT(30), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(230), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(120), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(12), CALL_SCRIPT(SWEAT_FUNC), AWAIT_CUE(12), @@ -6630,53 +6630,53 @@ static const struct ScriptCommand s_gs1_g23_s0_lives9_dlg0[] = { /* 0x81525b8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0008, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 93), WAIT(45), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(13), WAIT(5), - { 0x93, 0x04, 0x000b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 0), AWAIT_CUE(13), WAIT(45), - ROTATE(4, 11, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHWEST), AWAIT_CUE(13), - { 0x93, 0x08, 0x000b, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_11, 91), AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 34), AWAIT_CUE(13), CALL_SCRIPT(SMILE_START_FUNC), WAIT(20), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(13), - ROTATE(4, 11, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_WEST), WAIT(45), - ROTATE(4, 11, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTH), WAIT(10), CALL_SCRIPT(QUESTION_FUNC), AWAIT_CUE(13), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 85), AWAIT_CUE(13), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(13), - { 0x93, 0x04, 0x000b, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_11, 77), AWAIT_CUE(13), WAIT(15), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(13), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(215), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(13), WAIT(10), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(10, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(13), - ROTATE(4, 11, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_11, DIRECTION_SOUTHEAST), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(13), @@ -6696,10 +6696,10 @@ static const struct ScriptCommand s_gs1_g23_s1_lives0_dlg0[] = { /* 0x8152988 */ FANFARE_PLAY2(451), SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0x8b, 0x00, 0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTHEAST, 0), SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, FANFARE_STOP2(451), @@ -6724,7 +6724,7 @@ static const struct ScriptCommand s_gs1_g23_s1_eff0_script[] = { /* 0x8152a68 */ { 0x52, 0x00, 0x0000, 0x00020000, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x56, 0x00, 0x0000, 0x00000066, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(15), END_DELETE, }; @@ -6747,7 +6747,7 @@ static const struct ScriptCommand s_gs1_g24_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g24_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g24_s0_station_sref_script }; /* 0x8152c68 */ +static const struct ScriptRef s_gs1_g24_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g24_s0_station_sref_script }; /* 0x8152c68 */ static const struct ScriptCommand s_gs1_g24_s0_lives0_dlg2[] = { /* 0x8152c74 */ DEBUGINFO_O(6753), @@ -6909,7 +6909,7 @@ static const struct ScriptCommand s_gs1_g24_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g24_s1_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g24_s1_station_sref_script }; /* 0x8153888 */ +static const struct ScriptRef s_gs1_g24_s1_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g24_s1_station_sref_script }; /* 0x8153888 */ static const struct ScriptCommand s_gs1_g24_s1_lives0_dlg0[] = { /* 0x8153894 */ DEBUGINFO_O(6915), @@ -6953,10 +6953,10 @@ static const struct ScriptCommand s_gs1_g24_s1_lives2_dlg0[] = { /* 0x8153c34 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), RET, }; @@ -6983,10 +6983,10 @@ static const struct ScriptCommand s_gs1_g24_s1_lives3_dlg0[] = { /* 0x8153db4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), RET, @@ -7013,7 +7013,7 @@ static const struct ScriptCommand s_gs1_g25_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g25_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g25_s0_station_sref_script }; /* 0x8153f54 */ +static const struct ScriptRef s_gs1_g25_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g25_s0_station_sref_script }; /* 0x8153f54 */ static const struct ScriptCommand s_gs1_g25_s0_lives0_dlg2[] = { /* 0x8153f60 */ DEBUGINFO_O(7019), @@ -7143,7 +7143,7 @@ static const struct ScriptCommand s_gs1_g26_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g26_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g26_s0_station_sref_script }; /* 0x8154678 */ +static const struct ScriptRef s_gs1_g26_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g26_s0_station_sref_script }; /* 0x8154678 */ static const struct ScriptCommand s_gs1_g26_s0_eff0_script[] = { /* 0x8154684 */ DEBUGINFO_O(7149), @@ -7185,7 +7185,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" Looks like they sent out\nto a lot of rescue teams for help.")), @@ -7194,7 +7194,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(60), ALERT_CUE(4), AWAIT_CUE(5), @@ -7209,7 +7209,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, WAIT(30), MSG_NPC(3, _(" ...Sorry.\nThis isn't the time for that!")), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), PORTRAIT_REP(0x0003, 0x00000001), MSG_NPC(3, _(" There's big trouble!{WAIT_PRESS}\n{NAME_8}'s team went underground...")), MSG_NPC(3, _(" But they haven't returned!")), @@ -7233,28 +7233,28 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, ALERT_CUE(20), WAIT(90), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), MSG_NPC(-1, _(" No idea?{WAIT_PRESS}\nHow is that possible?!{WAIT_PRESS}\nThis is {NAME_8} you're talking about?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(-1, _(" But they haven't come back.\nThat's for real!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), MSG_NPC(-1, _(" That's right...\nAnd it sounds as if {NAME_9} is out of\nour league...")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(-1, _(" What? It's that tough?\nThis Pokémon named {NAME_9}?")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), MSG_NPC(-1, _(" Why don't you go underground and\nsee for yourself?")), TEXTBOX_CLEAR, WAIT(10), MSG_NPC(-1, _(" Hunh?!\nYou've gotta be kidding me!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), MSG_NPC(-1, _(" There's magma flowing everywhere\nunderground.{WAIT_PRESS}\nI'd burn up if I went anywhere like that!")), TEXTBOX_CLEAR, WAIT(10), @@ -7262,7 +7262,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, ALERT_CUE(20), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(60), MSG_NPC(3, _(" There's no denying that\nit is dangerous underground.")), MSG_NPC(3, _(" It's not a place where just\nanyone can go.")), @@ -7280,7 +7280,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(4), AWAIT_CUE(5), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(5), ALERT_CUE(7), AWAIT_CUE(5), @@ -7290,7 +7290,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ TEXTBOX_CLEAR, ALERT_CUE(7), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), { 0x62, 0x00, 0x0100, -0x00000010, 0x00000000, NULL }, AWAIT_CUE(5), MSG_NPC(2, _(" Don't bother, you guys.")), @@ -7311,7 +7311,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(7), WAIT(30), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(4), AWAIT_CUE(5), WAIT(30), @@ -7330,9 +7330,9 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(10), ALERT_CUE(11), ALERT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(60), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), MSG_NPC(-1, _(" Whoa!")), TEXTBOX_CLEAR, WAIT(10), @@ -7363,7 +7363,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(9), ALERT_CUE(11), ALERT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(60), MSG_NPC(-1, _(" Woohoo! It's {NAME_5}!")), TEXTBOX_CLEAR, @@ -7392,7 +7392,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(9), ALERT_CUE(10), ALERT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(60), MSG_NPC(-1, _(" Wow! {NAME_6}!")), TEXTBOX_CLEAR, @@ -7456,8 +7456,8 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(7), WALK_GRID(256, 84), WALK_GRID(256, 85), - ROTATE(4, 10, DIRECTION_EAST), - ROTATE(30, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), + ROTATE_TO(30, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(5), MSG_NPC(-1, _(" Win it for us!")), TEXTBOX_CLEAR, @@ -7470,14 +7470,14 @@ static const struct ScriptCommand s_gs1_g26_s0_lives0_dlg0[] = { /* 0x8154794 */ ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), MSG_NPC(2, _(" See?\nThey look pretty tough, eh?")), MSG_NPC(2, _(" Let them handle things.")), TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(7), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" OK...\nI guess we can't say anything,\n{NAME_0}.")), @@ -7522,55 +7522,55 @@ static const struct ScriptCommand s_gs1_g26_s0_lives1_dlg0[] = { /* 0x8156884 */ AWAIT_CUE(6), WALK_GRID(256, 86), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(10), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x62, 0x00, 0x0100, 0x00000000, -0x00000010, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(15), CALL_SCRIPT(JUMP_ANGRY_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), WAIT(30), WALK_GRID(256, 84), WALK_GRID(256, 87), - ROTATE(4, 10, DIRECTION_EAST), - ROTATE(20, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), + ROTATE_TO(20, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -7585,35 +7585,35 @@ static const struct ScriptCommand s_gs1_g26_s0_lives2_dlg0[] = { /* 0x8156c44 */ AWAIT_CUE(7), WALK_GRID(256, 88), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(5), AWAIT_CUE(7), WALK_RELATIVE(256, 0, 8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(7), WALK_GRID(256, 89), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), - ROTATE(30, 10, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), WALK_RELATIVE(256, 0, 16), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(7), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -7624,31 +7624,31 @@ static const struct ScriptCommand s_gs1_g26_s0_lives3_dlg0[] = { /* 0x8156eb4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), AWAIT_CUE(8), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(5), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), AWAIT_CUE(8), @@ -7674,66 +7674,66 @@ static const struct ScriptCommand s_gs1_g26_s0_lives4_dlg0[] = { /* 0x81570c4 */ COND_EQUAL(1, /* to label */ 4), COND_EQUAL(2, /* to label */ 5), LABEL(3), /* = 0x03 */ - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), JUMP_LABEL(6), LABEL(4), /* = 0x04 */ - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), JUMP_LABEL(6), LABEL(5), /* = 0x05 */ - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(6), LABEL(6), /* = 0x06 */ WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(7), /* = 0x07 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 8), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 8), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), JUMP_LABEL(7), LABEL(8), /* = 0x08 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), ALERT_CUE(5), AWAIT_CUE(9), WALK_RELATIVE(76, 8, 0), AWAIT_CUE(9), WALK_GRID(76, 90), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), + CMD_UNK_E5(5, 0), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(9), LABEL(9), /* = 0x09 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 9), AWAIT_CUE(9), LABEL(10), /* = 0x0a */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 10), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(30), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(30), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(9), WALK_GRID(256, 91), @@ -7760,58 +7760,58 @@ static const struct ScriptCommand s_gs1_g26_s0_lives5_dlg0[] = { /* 0x81575e4 */ COND_EQUAL(1, /* to label */ 3), COND_EQUAL(2, /* to label */ 4), LABEL(2), /* = 0x02 */ - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), JUMP_LABEL(5), LABEL(3), /* = 0x03 */ - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), JUMP_LABEL(5), LABEL(4), /* = 0x04 */ - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), LABEL(5), /* = 0x05 */ WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(6), /* = 0x06 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), - ROTATE(8, 2, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), - ROTATE(8, 1, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), JUMP_LABEL(6), LABEL(7), /* = 0x07 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(10), LABEL(8), /* = 0x08 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 8), AWAIT_CUE(10), WALK_GRID(76, 92), - ROTATE(4, 10, DIRECTION_EAST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), + CMD_UNK_E5(5, 0), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(10), LABEL(9), /* = 0x09 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 9), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), WALK_GRID(256, 91), AWAIT_CUE(10), @@ -7835,58 +7835,58 @@ static const struct ScriptCommand s_gs1_g26_s0_lives6_dlg0[] = { /* 0x8157a64 */ COND_EQUAL(1, /* to label */ 3), COND_EQUAL(2, /* to label */ 4), LABEL(2), /* = 0x02 */ - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), JUMP_LABEL(5), LABEL(3), /* = 0x03 */ - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(5), LABEL(4), /* = 0x04 */ - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), LABEL(5), /* = 0x05 */ WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(6), /* = 0x06 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), - ROTATE(8, 2, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), - ROTATE(8, 1, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), JUMP_LABEL(6), LABEL(7), /* = 0x07 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(11), LABEL(8), /* = 0x08 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 8), AWAIT_CUE(11), LABEL(9), /* = 0x09 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 9), AWAIT_CUE(11), WALK_GRID(76, 93), - ROTATE(4, 10, DIRECTION_EAST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), + CMD_UNK_E5(5, 0), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(60), WALK_GRID(256, 91), AWAIT_CUE(11), @@ -7914,40 +7914,40 @@ static const struct ScriptCommand s_gs1_g26_s0_lives7_dlg0[] = { /* 0x8157ee4 */ COND_EQUAL(1, /* to label */ 3), COND_EQUAL(2, /* to label */ 4), LABEL(2), /* = 0x02 */ - ROTATE(8, 1, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), JUMP_LABEL(5), LABEL(3), /* = 0x03 */ - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), JUMP_LABEL(5), LABEL(4), /* = 0x04 */ - ROTATE(8, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), LABEL(5), /* = 0x05 */ WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(6), /* = 0x06 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 6), AWAIT_CUE(20), LABEL(7), /* = 0x07 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), AWAIT_CUE(20), LABEL(8), /* = 0x08 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 8), @@ -7957,7 +7957,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives7_dlg0[] = { /* 0x8157ee4 */ { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(9), /* = 0x09 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 9), @@ -7978,33 +7978,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives8_dlg0[] = { /* 0x8158324 */ SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8014,7 +8014,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives8_dlg0[] = { /* 0x8158324 */ { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8031,43 +8031,43 @@ static const struct ScriptCommand s_gs1_g26_s0_lives9_dlg0[] = { /* 0x8158684 */ LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT_RANDOM(15, 90), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(4), /* = 0x04 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 4), AWAIT_CUE(20), LABEL(5), /* = 0x05 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 5), AWAIT_CUE(20), LABEL(6), /* = 0x06 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 6), @@ -8077,7 +8077,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives9_dlg0[] = { /* 0x8158684 */ { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(7), /* = 0x07 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), @@ -8098,33 +8098,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives10_dlg0[] = { /* 0x8158a44 * SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8134,7 +8134,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives10_dlg0[] = { /* 0x8158a44 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8155,33 +8155,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives11_dlg0[] = { /* 0x8158da4 * SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8191,7 +8191,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives11_dlg0[] = { /* 0x8158da4 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8212,33 +8212,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives12_dlg0[] = { /* 0x8159104 * SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8248,7 +8248,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives12_dlg0[] = { /* 0x8159104 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8269,33 +8269,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives13_dlg0[] = { /* 0x8159464 * SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8305,11 +8305,11 @@ static const struct ScriptCommand s_gs1_g26_s0_lives13_dlg0[] = { /* 0x8159464 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), WALK_GRID(128, 95), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8324,33 +8324,33 @@ static const struct ScriptCommand s_gs1_g26_s0_lives14_dlg0[] = { /* 0x8159804 * CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), @@ -8360,7 +8360,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives14_dlg0[] = { /* 0x8159804 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8381,46 +8381,46 @@ static const struct ScriptCommand s_gs1_g26_s0_lives15_dlg0[] = { /* 0x8159b04 * SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), WAIT_RANDOM(0, 60), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), SELECT_ANIMATION(4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), SELECT_ANIMATION(2), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), AWAIT_CUE(20), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 2), AWAIT_CUE(15), CAMERA_PAN(256, 94), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 120), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), @@ -8437,43 +8437,43 @@ static const struct ScriptCommand s_gs1_g26_s0_lives16_dlg0[] = { /* 0x8159e94 * LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), LABEL(4), /* = 0x04 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 4), AWAIT_CUE(20), LABEL(5), /* = 0x05 */ - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), WAIT(60), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 5), AWAIT_CUE(20), LABEL(6), /* = 0x06 */ - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), WAIT(60), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 6), @@ -8483,7 +8483,7 @@ static const struct ScriptCommand s_gs1_g26_s0_lives16_dlg0[] = { /* 0x8159e94 * { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(7), /* = 0x07 */ - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), WAIT(30), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 7), @@ -8498,7 +8498,7 @@ static const struct ScriptCommand s_gs1_g27_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g27_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g27_s0_station_sref_script }; /* 0x815a294 */ +static const struct ScriptRef s_gs1_g27_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g27_s0_station_sref_script }; /* 0x815a294 */ static const struct ScriptCommand s_gs1_g27_s0_lives0_dlg2[] = { /* 0x815a2a0 */ DEBUGINFO_O(8504), @@ -8626,7 +8626,7 @@ static const struct ScriptCommand s_gs1_g28_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g28_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g28_s0_station_sref_script }; /* 0x815a9a4 */ +static const struct ScriptRef s_gs1_g28_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g28_s0_station_sref_script }; /* 0x815a9a4 */ static const struct ScriptCommand s_gs1_g28_s0_eff0_script[] = { /* 0x815a9b0 */ DEBUGINFO_O(8632), @@ -8662,7 +8662,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hey, {NAME_2}!")), VARIANT(/* == */ 1, _(" What's up here?")), @@ -8681,19 +8681,19 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(7), ALERT_CUE(6), WALK_GRID(256, 100), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(4), AWAIT_CUE(5), ALERT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(5), - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x0000000c), MSG_NPC(1, _(" Look!\nIt's {NAME_5}!")), TEXTBOX_CLEAR, WAIT(60), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_3}!{WAIT_PRESS}\nWhat's going on here?!")), @@ -8715,7 +8715,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(10), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0006, 0x00000000), PORTRAIT_POS(6, 0, -1), @@ -8730,17 +8730,17 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ TEXTBOX_CLEAR, ALERT_CUE(6), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(60), ALERT_CUE(8), WAIT(30), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), MSG_NPC(3, _(" ...It appears the dungeon\nunderground...{WAIT_PRESS}\nis far worse than we'd imagined...")), TEXTBOX_CLEAR, BGM_FADEOUT(60), WAIT(60), - BGM_SWITCH(10), + BGM_SWITCH(MUS_THERES_TROUBLE), MSG_NPC(-1, _(" Kekekekekeh!")), TEXTBOX_CLEAR, ALERT_CUE(9), @@ -8749,7 +8749,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(13), ALERT_CUE(8), ALERT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(5), CALL_SCRIPT(SHOCK_FUNC), WAIT(30), @@ -8769,7 +8769,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0004, 0x00000000), MSG_NPC(4, _(" Kekeh!\nYou really find thinking hard, don't you?")), @@ -8783,7 +8783,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(20), ALERT_CUE(6), ALERT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), ALERT_CUE(4), AWAIT_CUE(5), @@ -8807,7 +8807,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0004, 0x00000000), MSG_NPC(4, _(" You see?\nEven they finally seem to understand\ntheir situation. Kekeh!")), @@ -8822,7 +8822,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), WAIT(15), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x00000005), PORTRAIT_POS(1, -2, 0), @@ -8843,7 +8843,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ MSG_NPC(4, _(" ............Huh?{WAIT_PRESS}\nDid I say something profound?\nKekekekekekekeh!")), TEXTBOX_CLEAR, ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(30), PORTRAIT(PLACEMENT_TOP_RIGHT, 0x0001, 0x00000005), MSG_NPC(1, _(" Urf...")), @@ -8851,7 +8851,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ WAIT(30), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), BGM_FADEOUT(150), WAIT(30), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -8884,8 +8884,8 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(6), AWAIT_CUE(5), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), - BGM_SWITCH(7), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), + BGM_SWITCH(MUS_POKEMON_SQUARE), PORTRAIT_REP(0x0001, 0x00000000), MSG_NPC(1, _(" Everyone, listen!")), TEXTBOX_CLEAR, @@ -8961,7 +8961,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT_FLIP, 0x0004, 0x00000000), MSG_NPC(4, _(" Why don't you do like\neveryone else and wise up?")), TEXTBOX_CLEAR, @@ -8974,7 +8974,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(9), ALERT_CUE(20), ALERT_CUE(6), - { 0x93, 0x04, 0x0001, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 85), AWAIT_CUE(5), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0004, 0x00000003), MSG_NPC(4, _(" ...Ugeh?")), @@ -8986,7 +8986,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), ALERT_CUE(9), AWAIT_CUE(5), @@ -9024,7 +9024,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(6), ALERT_CUE(9), ALERT_CUE(20), - { 0x93, 0x04, 0x0001, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 104), WAIT(60), MSG_NPC(5, _(" ...We've only failed once.")), TEXTBOX_CLEAR, @@ -9048,7 +9048,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(6), ALERT_CUE(8), ALERT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), MSG_NPC(6, _(" Yes, no more wallowing in\nwoe-is-me self-pity.")), TEXTBOX_CLEAR, WAIT(60), @@ -9058,14 +9058,14 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(6), ALERT_CUE(8), ALERT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), MSG_NPC(7, _(" If we give up, that's how\nit ends. Not for me.")), TEXTBOX_CLEAR, WAIT(30), ALERT_CUE(6), ALERT_CUE(8), ALERT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), PORTRAIT(PLACEMENT_MIDDLE_TOP_LEFT, 0x0001, 0x0000000b), MSG_NPC(1, _(" {NAME_6}!\nAnd {NAME_7} too!")), @@ -9082,21 +9082,21 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), MSG_NPC(-1, _(" There've got to be ways we can\nget through!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), MSG_NPC(-1, _(" If we all pull together, we'll be sure\nto find a way!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(9), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), MSG_NPC(-1, _(" We'll conquer the dungeon by\nhaving all the rescue teams cooperate!")), WAIT(30), ALERT_CUE(20), @@ -9109,7 +9109,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(20), ALERT_CUE(8), ALERT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), ALERT_CUE(9), AWAIT_CUE(5), MSG_NPC(4, _(" Don't say I didn't warn you\nwhen you get into a world of pain!\nUgegegegeh!")), @@ -9118,7 +9118,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ ALERT_CUE(16), ALERT_CUE(9), ALERT_CUE(6), - ROTATE(10, 10, DIRECTION_NORTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(5), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), WAIT(30), @@ -9126,7 +9126,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives0_dlg0[] = { /* 0x815aae0 */ AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(5), ALERT_CUE(20), WAIT(60), @@ -9198,105 +9198,105 @@ static const struct ScriptCommand s_gs1_g28_s0_lives1_dlg0[] = { /* 0x815dbb8 */ WALK_GRID(256, 101), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), ALERT_CUE(5), AWAIT_CUE(6), WAIT(30), WALK_GRID(256, 102), WALK_GRID(256, 103), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), FANFARE_PLAY2(464), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), ALERT_CUE(5), AWAIT_CUE(6), FANFARE_PLAY2(463), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(5), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x0002, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 85), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 1, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), WAIT(30), - ROTATE(8, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(8, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), - { 0x93, 0x04, 0x0002, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 85), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x0002, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINLEFT1, 104), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(6), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -9307,31 +9307,31 @@ static const struct ScriptCommand s_gs1_g28_s0_lives2_dlg0[] = { /* 0x815e298 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(8), HALT, }; @@ -9343,96 +9343,96 @@ static const struct ScriptCommand s_gs1_g28_s0_lives3_dlg0[] = { /* 0x815e488 */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), WALK_GRID(256, 104), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), ALERT_CUE(5), AWAIT_CUE(9), WALK_GRID(256, 105), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), WAIT(30), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(15), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(15), CALL_SCRIPT(JUMP_SURPRISE_FUNC), CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000069, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 105), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000006a, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 106), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(30), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(9), WALK_GRID(768, 106), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(9), HALT, }; @@ -9448,10 +9448,10 @@ static const struct ScriptCommand s_gs1_g28_s0_lives4_dlg0[] = { /* 0x815eaa8 */ SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(10), HALT, @@ -9466,7 +9466,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives5_dlg0[] = { /* 0x815ebb8 */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(11), HALT, @@ -9481,7 +9481,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives6_dlg0[] = { /* 0x815ec78 */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(12), HALT, @@ -9492,56 +9492,56 @@ static const struct ScriptCommand s_gs1_g28_s0_lives7_dlg0[] = { /* 0x815ed38 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x0001, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 34), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(60), - { 0x93, 0x04, 0x0001, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_SPINRIGHT1, 34), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9556,46 +9556,46 @@ static const struct ScriptCommand s_gs1_g28_s0_lives8_dlg0[] = { /* 0x815f118 */ DEBUGINFO_O(9556), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9609,14 +9609,14 @@ static const struct ScriptCommand s_gs1_g28_s0_lives9_dlg0[] = { /* 0x815f428 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), WALK_GRID(128, 107), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), SELECT_ANIMATION(4), @@ -9625,7 +9625,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives9_dlg0[] = { /* 0x815f428 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), WALK_GRID(128, 108), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), SELECT_ANIMATION(4), @@ -9634,50 +9634,50 @@ static const struct ScriptCommand s_gs1_g28_s0_lives9_dlg0[] = { /* 0x815f428 */ JUMP_LABEL(0), LABEL(1), /* = 0x01 */ WALK_GRID(128, 109), - ROTATE(4, 10, DIRECTION_SOUTHEAST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), + CMD_UNK_E5(5, 0), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), WAIT(30), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(30), WALK_GRID(76, 110), - { 0x93, 0x04, 0x000a, 0x0000008e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 142), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000008e, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 142), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(16), { 0x62, 0x00, 0x0100, -0x00000010, 0x00000000, NULL }, LABEL(2), /* = 0x02 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 2), AWAIT_CUE(20), WALK_RELATIVE(128, 16, 0), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9691,46 +9691,46 @@ static const struct ScriptCommand s_gs1_g28_s0_lives10_dlg0[] = { /* 0x815f928 * DEBUGINFO_O(9691), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9745,13 +9745,13 @@ static const struct ScriptCommand s_gs1_g28_s0_lives11_dlg0[] = { /* 0x815fc58 * DEBUGINFO_O(9745), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), SELECT_ANIMATION(4), @@ -9759,7 +9759,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives11_dlg0[] = { /* 0x815fc58 * SELECT_ANIMATION(2), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), SELECT_ANIMATION(4), @@ -9767,14 +9767,14 @@ static const struct ScriptCommand s_gs1_g28_s0_lives11_dlg0[] = { /* 0x815fc58 * SELECT_ANIMATION(2), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), SELECT_ANIMATION(4), @@ -9782,7 +9782,7 @@ static const struct ScriptCommand s_gs1_g28_s0_lives11_dlg0[] = { /* 0x815fc58 * SELECT_ANIMATION(2), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), SELECT_ANIMATION(4), @@ -9790,32 +9790,32 @@ static const struct ScriptCommand s_gs1_g28_s0_lives11_dlg0[] = { /* 0x815fc58 * SELECT_ANIMATION(2), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(4), /* = 0x04 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9828,64 +9828,64 @@ static const struct ScriptCommand s_gs1_g28_s0_lives12_dlg0[] = { /* 0x8160158 * DEBUGINFO_O(9828), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), LABEL(0), /* = 0x00 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 1), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT_RANDOM(15, 90), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), LABEL(2), /* = 0x02 */ CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT_RANDOM(15, 90), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 3), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT_RANDOM(15, 90), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(4), /* = 0x04 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 4), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9898,46 +9898,46 @@ static const struct ScriptCommand s_gs1_g28_s0_lives13_dlg0[] = { /* 0x8160588 * DEBUGINFO_O(9898), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -9950,59 +9950,59 @@ static const struct ScriptCommand s_gs1_g28_s0_lives14_dlg0[] = { /* 0x8160898 * DEBUGINFO_O(9950), SELECT_ANIMATION(2), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), SELECT_ANIMATION(2), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - { 0x93, 0x08, 0x000a, 0x00000088, 0x00000000, NULL }, + CMD_UNK_93(8, DIR_TRANS_10, 136), WAIT(30), WALK_GRID(128, 111), SELECT_ANIMATION(4), ALERT_CUE(5), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000088, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 136), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(16), { 0x62, 0x00, 0x0100, 0x00000010, 0x00000000, NULL }, LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -10015,52 +10015,52 @@ static const struct ScriptCommand s_gs1_g28_s0_lives15_dlg0[] = { /* 0x8160c78 * DEBUGINFO_O(10015), SELECT_ANIMATION(2), AWAIT_CUE(13), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), { 0x62, 0x00, 0x0100, 0x00000000, 0x00000010, NULL }, - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), WALK_RELATIVE(256, -16, 16), WALK_RELATIVE(256, -8, 0), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000055, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 85), AWAIT_CUE(20), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), SELECT_ANIMATION(4), AWAIT_CUE(20), WAIT(30), SELECT_ANIMATION(2), - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(20), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005b, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 91), WAIT(15), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(0, /* to label */ 0), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), AWAIT_CUE(20), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(20), { 0x56, 0x00, 0x0000, 0x0000005a, 0x00000000, NULL }, WAIT_RANDOM(30, 90), @@ -10078,7 +10078,7 @@ static const struct ScriptCommand s_gs1_g29_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g29_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g29_s0_station_sref_script }; /* 0x8161048 */ +static const struct ScriptRef s_gs1_g29_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g29_s0_station_sref_script }; /* 0x8161048 */ static const struct ScriptCommand s_gs1_g29_s0_lives0_dlg2[] = { /* 0x8161054 */ DEBUGINFO_O(10084), @@ -10329,7 +10329,7 @@ static const struct ScriptCommand s_gs1_g29_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g29_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g29_s1_station_sref_script }; /* 0x8162184 */ +static const struct ScriptRef s_gs1_g29_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g29_s1_station_sref_script }; /* 0x8162184 */ static const struct ScriptCommand s_gs1_g29_s1_lives0_dlg0[] = { /* 0x8162190 */ DEBUGINFO_O(10335), @@ -10375,10 +10375,10 @@ static const struct ScriptCommand s_gs1_g29_s1_lives2_dlg0[] = { /* 0x81624e0 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), RET, }; @@ -10405,10 +10405,10 @@ static const struct ScriptCommand s_gs1_g29_s1_lives3_dlg0[] = { /* 0x8162660 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), RET, @@ -10435,7 +10435,7 @@ static const struct ScriptCommand s_gs1_g30_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g30_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g30_s0_station_sref_script }; /* 0x8162800 */ +static const struct ScriptRef s_gs1_g30_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g30_s0_station_sref_script }; /* 0x8162800 */ static const struct ScriptCommand s_gs1_g30_s0_lives0_dlg2[] = { /* 0x816280c */ DEBUGINFO_O(10441), @@ -10657,13 +10657,13 @@ static const struct ScriptCommand s_gs1_g30_s0_lives9_dlg1[] = { /* 0x81634b0 */ SELECT_ANIMATION(5), WALK_RELATIVE(256, -16, 0), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(90), WALK_RELATIVE(256, 16, 0), WAIT(90), WALK_RELATIVE(256, 16, 0), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(90), WALK_RELATIVE(256, -16, 0), WAIT(90), @@ -10723,7 +10723,7 @@ static const struct ScriptCommand s_gs1_g30_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g30_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g30_s1_station_sref_script }; /* 0x8163b18 */ +static const struct ScriptRef s_gs1_g30_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g30_s1_station_sref_script }; /* 0x8163b18 */ static const struct ScriptCommand s_gs1_g30_s1_lives0_dlg0[] = { /* 0x8163b24 */ DEBUGINFO_O(10729), @@ -10769,10 +10769,10 @@ static const struct ScriptCommand s_gs1_g30_s1_lives2_dlg0[] = { /* 0x8163d34 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), RET, }; @@ -10799,10 +10799,10 @@ static const struct ScriptCommand s_gs1_g30_s1_lives3_dlg0[] = { /* 0x8163eb4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), RET, @@ -10833,7 +10833,7 @@ static const struct ScriptCommand s_gs1_g31_s0_station_sref_script[] = { /* 0x81 WAIT(1), { 0x25, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x28, 0x01, 0x0005, 0x00000014, 0x00ffffff, NULL }, @@ -10841,7 +10841,7 @@ static const struct ScriptCommand s_gs1_g31_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g31_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g31_s0_station_sref_script }; /* 0x816412c */ +static const struct ScriptRef s_gs1_g31_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g31_s0_station_sref_script }; /* 0x816412c */ static const struct ScriptCommand s_gs1_g31_s0_eff0_script[] = { /* 0x8164138 */ @@ -10946,14 +10946,14 @@ static const struct ScriptCommand s_gs1_g31_s0_lives0_dlg0[] = { /* 0x81641b8 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), MSG_NPC(8, _(" You've earned everyone's\nrespect now.")), MSG_NPC(8, _(" Your {COLOR CYAN}Team {TEAM_NAME}{RESET}\nis a first-class rescue team.")), MSG_NPC(8, _(" Take pride in that.{WAIT_PRESS}\n{NAME_1}, {NAME_0}.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(5), PORTRAIT_REP(0x0001, 0x00000008), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -11001,7 +11001,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives0_dlg0[] = { /* 0x81641b8 */ { 0x27, 0x01, 0x0001, 0x0000000f, 0x00ffffff, NULL }, WAIT(60), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), MSG_NPC(3, _(" No. I heard it too.")), TEXTBOX_CLEAR, WAIT(10), @@ -11028,7 +11028,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives0_dlg0[] = { /* 0x81641b8 */ { 0x2d, 0x09, 0x0009, 0x00000061, 0x00000000, NULL }, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Th-this voice...{WAIT_PRESS}\nI remember this voice.")), @@ -11038,7 +11038,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives0_dlg0[] = { /* 0x81641b8 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), MSG_NPC(8, _(" {NAME_9}?{WAIT_PRESS}\nAh, that's it! Telepathy!")), MSG_NPC(8, _(" {NAME_9} is calling out\nto us using telepathy!")), TEXTBOX_CLEAR, @@ -11047,7 +11047,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives0_dlg0[] = { /* 0x81641b8 */ { 0x28, 0x01, 0x0001, 0x0000000f, 0x00ffffff, NULL }, { 0x27, 0x01, 0x0001, 0x0000000f, 0x00ffffff, NULL }, WAIT(30), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x2e, 0x00, 0x0009, -0x00000002, 0x00000000, NULL }, MSG_NPC(9, _(" ...To all Pokémon!\nCalling all Pokémon!")), MSG_NPC(9, _(" Terrible, it is!{WAIT_PRESS}\nFrom the sky...{WAIT_PRESS} Falls a star...")), @@ -11083,23 +11083,23 @@ static const struct ScriptCommand s_gs1_g31_s0_lives1_dlg0[] = { /* 0x8165464 */ ALERT_CUE(5), AWAIT_CUE(6), WAIT(3), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), WAIT(5), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(6), WAIT(5), CALL_SCRIPT(LOOK_AROUND_FUNC), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11110,13 +11110,13 @@ static const struct ScriptCommand s_gs1_g31_s0_lives2_dlg0[] = { /* 0x8165654 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(7), WALK_GRID(256, 123), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(7), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(7), @@ -11139,22 +11139,22 @@ static const struct ScriptCommand s_gs1_g31_s0_lives3_dlg0[] = { /* 0x8165794 */ AWAIT_CUE(8), WALK_GRID(256, 121), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), WALK_RELATIVE(128, -8, 8), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(10), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(15), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(8), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11165,12 +11165,12 @@ static const struct ScriptCommand s_gs1_g31_s0_lives4_dlg0[] = { /* 0x8165964 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(9), WALK_GRID(256, 122), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(9), CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), @@ -11189,24 +11189,24 @@ static const struct ScriptCommand s_gs1_g31_s0_lives5_dlg0[] = { /* 0x8165ab4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), WALK_GRID(256, 124), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(10), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(45), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(45), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), HALT, }; @@ -11216,22 +11216,22 @@ static const struct ScriptCommand s_gs1_g31_s0_lives6_dlg0[] = { /* 0x8165c34 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(11), WALK_GRID(256, 125), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(50), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), - ROTATE(8, 10, DIRECTION_NORTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTH), WAIT(50), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(11), HALT, }; @@ -11241,13 +11241,13 @@ static const struct ScriptCommand s_gs1_g31_s0_lives7_dlg0[] = { /* 0x8165d94 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0007, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(12), WALK_GRID(256, 126), AWAIT_CUE(12), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(12), CALL_SCRIPT(LOOK_AROUND_FUNC), AWAIT_CUE(12), @@ -11275,13 +11275,13 @@ static const struct ScriptCommand s_gs1_g31_s0_lives9_dlg0[] = { /* 0x8165f34 */ AWAIT_CUE(15), WALK_GRID(204, 119), AWAIT_CUE(15), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(45), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(15), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(45), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(15), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11294,13 +11294,13 @@ static const struct ScriptCommand s_gs1_g31_s0_lives10_dlg0[] = { /* 0x8166034 * AWAIT_CUE(16), WALK_GRID(204, 120), AWAIT_CUE(16), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(16), - ROTATE(12, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(16), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11319,14 +11319,14 @@ static const struct ScriptCommand s_gs1_g31_s0_lives11_dlg0[] = { /* 0x8166134 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(20), WAIT(10), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(12, 10, DIRECTION_NORTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(20), WAIT(10), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(30), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11339,7 +11339,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives12_dlg0[] = { /* 0x81662a4 * AWAIT_CUE(20), WAIT(45), WALK_GRID(256, 134), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(20), WAIT(3), CALL_SCRIPT(SMILE_START_FUNC), @@ -11347,18 +11347,18 @@ static const struct ScriptCommand s_gs1_g31_s0_lives12_dlg0[] = { /* 0x81662a4 * CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(20), WAIT(5), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(15), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(12, 10, DIRECTION_NORTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), WAIT(5), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(15), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(20), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11377,13 +11377,13 @@ static const struct ScriptCommand s_gs1_g31_s0_lives13_dlg0[] = { /* 0x8166474 * AWAIT_CUE(20), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(20), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(45), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), - ROTATE(8, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), WAIT(45), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(20), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11400,14 +11400,14 @@ static const struct ScriptCommand s_gs1_g31_s0_lives14_dlg0[] = { /* 0x81665d4 * WAIT(5), AWAIT_CUE(20), WAIT(7), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(12, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(20), WAIT(7), - ROTATE(12, 10, DIRECTION_WEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_WEST), WAIT(30), - ROTATE(12, 10, DIRECTION_SOUTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(20), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11451,7 +11451,7 @@ static const struct ScriptCommand s_gs1_g31_s0_lives17_dlg0[] = { /* 0x81668b4 * AWAIT_CUE(20), WAIT(45), WALK_GRID(256, 130), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(20), WAIT(2), CALL_SCRIPT(SMILE_START_FUNC), @@ -11472,21 +11472,21 @@ static const struct ScriptCommand s_gs1_g31_s0_lives18_dlg0[] = { /* 0x81669d4 * AWAIT_CUE(20), WAIT(60), WALK_GRID(256, 131), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(20), CALL_SCRIPT(SMILE_START_FUNC), AWAIT_CUE(20), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(20), WAIT(12), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), WAIT(20), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(20), WAIT(12), - ROTATE(12, 10, DIRECTION_EAST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_EAST), WAIT(20), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(20), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, HALT, @@ -11518,14 +11518,14 @@ static const struct ScriptCommand s_gs1_g32_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(11518), SELECT_MAP(1), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x27, 0x00, 0x0005, 0x00000020, 0x00ffffff, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs1_g32_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g32_s0_station_sref_script }; /* 0x8166c74 */ +static const struct ScriptRef s_gs1_g32_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g32_s0_station_sref_script }; /* 0x8166c74 */ static const struct ScriptCommand s_gs1_g32_s0_lives0_dlg0[] = { /* 0x8166c80 */ DEBUGINFO_O(11531), @@ -11611,7 +11611,7 @@ static const struct ScriptCommand s_gs1_g32_s0_lives0_dlg0[] = { /* 0x8166c80 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hey, {NAME_0}!\nLet's get it done!")), VARIANT_DEFAULT(_(" Right, {NAME_0}?\nLet's get it done!")), @@ -11643,7 +11643,7 @@ static const struct ScriptCommand s_gs1_g32_s0_lives1_dlg0[] = { /* 0x8167744 */ CALL_SCRIPT(JUMP_HAPPY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(6), HALT, }; @@ -11779,12 +11779,12 @@ static const struct ScriptCommand s_gs1_g33_s0_station_sref_script[] = { /* 0x81 SELECT_ENTITIES(-1, 0), SELECT_ENTITIES(0, 0), CALL_STATION( 34, 0), - BGM_SWITCH(19), + BGM_SWITCH(MUS_WORLD_CALAMITY), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs1_g33_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs1_g33_s0_station_sref_script }; /* 0x8167d34 */ +static const struct ScriptRef s_gs1_g33_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs1_g33_s0_station_sref_script }; /* 0x8167d34 */ static const struct ScriptCommand s_gs1_g33_s0_lives0_dlg0[] = { /* 0x8167d40 */ DEBUGINFO_O(11790), @@ -11799,7 +11799,7 @@ static const struct ScriptCommand s_gs1_g34_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs1_g34_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g34_s0_station_sref_script }; /* 0x8167db0 */ +static const struct ScriptRef s_gs1_g34_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g34_s0_station_sref_script }; /* 0x8167db0 */ static const struct ScriptCommand s_gs1_g34_s0_lives0_dlg2[] = { /* 0x8167dbc */ DEBUGINFO_O(11805), @@ -12020,7 +12020,7 @@ static const struct ScriptCommand s_gs1_g35_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g35_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g35_s0_station_sref_script }; /* 0x8168e58 */ +static const struct ScriptRef s_gs1_g35_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g35_s0_station_sref_script }; /* 0x8168e58 */ static const struct ScriptCommand s_gs1_g35_s0_lives0_dlg2[] = { /* 0x8168e64 */ DEBUGINFO_O(12026), @@ -12196,7 +12196,7 @@ static const struct ScriptCommand s_gs1_g36_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g36_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g36_s0_station_sref_script }; /* 0x81698ec */ +static const struct ScriptRef s_gs1_g36_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g36_s0_station_sref_script }; /* 0x81698ec */ static const struct ScriptCommand s_gs1_g36_s0_lives0_dlg2[] = { /* 0x81698f8 */ DEBUGINFO_O(12202), @@ -12376,7 +12376,7 @@ static const struct ScriptCommand s_gs1_g37_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g37_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g37_s0_station_sref_script }; /* 0x816a440 */ +static const struct ScriptRef s_gs1_g37_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g37_s0_station_sref_script }; /* 0x816a440 */ static const struct ScriptCommand s_gs1_g37_s0_eff0_script[] = { /* 0x816a44c */ DEBUGINFO_O(12382), @@ -12392,7 +12392,7 @@ static const struct ScriptCommand s_gs1_g38_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g38_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs1_g38_s0_station_sref_script }; /* 0x816a4cc */ +static const struct ScriptRef s_gs1_g38_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs1_g38_s0_station_sref_script }; /* 0x816a4cc */ static const struct ScriptCommand s_gs1_g38_s0_lives0_dlg2[] = { /* 0x816a4d8 */ DEBUGINFO_O(12398), @@ -12569,7 +12569,7 @@ static const struct ScriptCommand s_gs1_g38_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g38_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g38_s1_station_sref_script }; /* 0x816b144 */ +static const struct ScriptRef s_gs1_g38_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g38_s1_station_sref_script }; /* 0x816b144 */ static const struct ScriptCommand s_gs1_g38_s1_lives0_dlg0[] = { /* 0x816b150 */ DEBUGINFO_O(12575), @@ -12607,10 +12607,10 @@ static const struct ScriptCommand s_gs1_g38_s1_lives1_dlg0[] = { /* 0x816b424 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(7), SELECT_ANIMATION(4), RET, @@ -12637,10 +12637,10 @@ static const struct ScriptCommand s_gs1_g38_s1_lives2_dlg0[] = { /* 0x816b620 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(8), WAIT(30), @@ -12676,7 +12676,7 @@ static const struct ScriptCommand s_gs1_g39_s0_lives0_dlg2[] = { /* 0x816b7a0 */ MSG_NPC(1, _(" Thank you!")), FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_1} \n{CENTER_ALIGN}became a member!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, { 0x3b, 0x1e, 0x0000, 0x00000000, 0x00000000, NULL }, ASK1(FALSE, /*default*/ -1, /* speaker */ -1, _("Give a nickname to {NAME_1}?")), @@ -12796,12 +12796,12 @@ static const struct ScriptCommand s_gs1_g40_s0_lives0_dlg3[] = { /* 0x816c390 */ CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - { 0x92, 0x04, 0x000b, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 11, DIR_TRANS_FLIP), AWAIT_CUE(6), - { 0x92, 0x04, 0x000b, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 11, DIR_TRANS_FLIP), CALL_SCRIPT(NOTICE_FUNC), LABEL(0), /* = 0x00 */ - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, @@ -12854,14 +12854,14 @@ static const struct ScriptCommand s_gs1_g41_s0_lives0_dlg3[] = { /* 0x816c958 */ DEBUGINFO_O(12854), { 0x52, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, { 0x52, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, - { 0x8d, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(0, DIR_TRANS_NONE), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, @@ -12947,7 +12947,7 @@ static const struct ScriptCommand s_gs1_g42_s0_evt0_sref_script[] = { /* 0x816ce HALT, }; -static const struct ScriptRef s_gs1_g42_s0_evt0_sref = { 57, 7, NULL /* NORMAL_EVENT */, s_gs1_g42_s0_evt0_sref_script }; /* 0x816ce64 */ +static const struct ScriptRef s_gs1_g42_s0_evt0_sref = { NORMAL_EVENT, 7, NULL, s_gs1_g42_s0_evt0_sref_script }; /* 0x816ce64 */ static const struct ScriptCommand s_gs1_g43_s0_station_sref_script[] = { /* 0x816ce70 */ DEBUGINFO_O(12953), @@ -12960,7 +12960,7 @@ static const struct ScriptCommand s_gs1_g43_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g43_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g43_s0_station_sref_script }; /* 0x816cef0 */ +static const struct ScriptRef s_gs1_g43_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g43_s0_station_sref_script }; /* 0x816cef0 */ static const struct ScriptCommand s_gs1_g43_s0_eff0_script[] = { /* 0x816cefc */ DEBUGINFO_O(12966), @@ -12982,7 +12982,7 @@ static const struct ScriptCommand s_gs1_g43_s0_lives0_dlg0[] = { /* 0x816cf4c */ MSG_NPC(3, _(" Who is that? Over there.")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(7), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_FLIP, 0x0002, 0x00000000), @@ -12991,7 +12991,7 @@ static const struct ScriptCommand s_gs1_g43_s0_lives0_dlg0[] = { /* 0x816cf4c */ BGM_FADEOUT(120), WAIT(10), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(20), ALERT_CUE(4), ALERT_CUE(9), @@ -13025,9 +13025,9 @@ static const struct ScriptCommand s_gs1_g43_s0_lives1_dlg0[] = { /* 0x816d2cc */ DEBUGINFO_O(13025), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(6), { 0x58, 0x01, 0x0000, 0x000001d0, 0x00000150, NULL }, AWAIT_CUE(6), @@ -13042,11 +13042,11 @@ static const struct ScriptCommand s_gs1_g43_s0_lives2_dlg0[] = { /* 0x816d39c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(10), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), ALERT_CUE(5), AWAIT_CUE(7), { 0x58, 0x01, 0x0000, 0x000001f0, 0x00000138, NULL }, @@ -13062,8 +13062,8 @@ static const struct ScriptCommand s_gs1_g43_s0_lives3_dlg0[] = { /* 0x816d48c */ AWAIT_CUE(8), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, - ROTATE(4, 10, DIRECTION_WEST), + WAIT_FANFARE2(465), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), { 0x58, 0x01, 0x0000, 0x000001f0, 0x00000150, NULL }, @@ -13085,21 +13085,21 @@ static const struct ScriptCommand s_gs1_g43_s0_lives4_dlg0[] = { /* 0x816d56c */ WAIT(60), WALK_RELATIVE(256, 8, -8), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), WAIT(45), WALK_RELATIVE(256, 8, 8), FANFARE_PLAY2(468), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), FANFARE_PLAY2(468), WAIT(45), ALERT_CUE(5), AWAIT_CUE(9), FANFARE_PLAY2(809), { 0x54, 0x00, 0x000f, 0x00000000, 0x00000000, NULL }, - ROTATE(1, 10, DIRECTION_SOUTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(10), - { 0xe2, 0x00, 0x0329, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(809), STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -13135,7 +13135,7 @@ static const struct ScriptCommand s_gs1_g45_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g45_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs1_g45_s1_station_sref_script }; /* 0x816d934 */ +static const struct ScriptRef s_gs1_g45_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs1_g45_s1_station_sref_script }; /* 0x816d934 */ static const struct ScriptCommand s_gs1_g45_s1_lives0_dlg0[] = { /* 0x816d940 */ DEBUGINFO_O(13141), @@ -13212,11 +13212,11 @@ static const struct ScriptCommand s_gs1_g45_s1_lives0_dlg0[] = { /* 0x816d940 */ ALERT_CUE(7), { 0x52, 0x00, 0x0000, 0x00000004, 0x00000000, NULL }, WALK_RELATIVE(256, -32, 0), - { 0x8e, 0x0f, 0x000a, 0x00000073, 0x00000000, NULL }, + CMD_UNK_8E(15, DIR_TRANS_10, 115), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(5), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(3), @@ -13232,7 +13232,7 @@ static const struct ScriptCommand s_gs1_g45_s1_lives1_dlg0[] = { /* 0x816e32c */ AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(4), @@ -13258,7 +13258,7 @@ static const struct ScriptCommand s_gs1_g45_s1_lives1_dlg0[] = { /* 0x816e32c */ FANFARE_PLAY2(762), SELECT_ANIMATION(17), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe2, 0x00, 0x02fa, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(762), FANFARE_PLAY2(510), WAIT(60), SELECT_ANIMATION(2), @@ -13273,7 +13273,7 @@ static const struct ScriptCommand s_gs1_g45_s1_lives1_dlg0[] = { /* 0x816e32c */ LABEL(1), /* = 0x01 */ FANFARE_PLAY2(473), CALL_SCRIPT(JUMP_SURPRISE_FUNC), - { 0xe2, 0x00, 0x01d9, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(473), ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(4), @@ -13290,7 +13290,7 @@ static const struct ScriptCommand s_gs1_g45_s1_lives1_dlg0[] = { /* 0x816e32c */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, WAIT(20), SELECT_ANIMATION(5), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), WALK_RELATIVE(256, 8, 16), ALERT_CUE(5), @@ -13302,13 +13302,13 @@ static const struct ScriptCommand s_gs1_g45_s1_lives1_dlg0[] = { /* 0x816e32c */ WALK_RELATIVE(256, -8, 16), WAIT(60), WALK_RELATIVE(256, 8, 16), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), WAIT(30), WALK_RELATIVE(256, -8, 16), WAIT(60), WALK_RELATIVE(256, 8, 16), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(30), WALK_RELATIVE(256, -8, 16), WAIT(30), @@ -13326,13 +13326,13 @@ static const struct ScriptCommand s_gs1_g46_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(1), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), RET, }; -static const struct ScriptRef s_gs1_g46_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g46_s0_station_sref_script }; /* 0x816e97c */ +static const struct ScriptRef s_gs1_g46_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g46_s0_station_sref_script }; /* 0x816e97c */ static const struct ScriptCommand s_gs1_g46_s0_eff0_script[] = { /* 0x816e988 */ DEBUGINFO_O(13338), @@ -13522,7 +13522,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ ALERT_CUE(7), ALERT_CUE(8), ALERT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), WAIT(60), MSG_NPC(4, _(" I heard this story...")), MSG_NPC(4, _(" Somewhere in the world is\na Pokémon that was made for fighting.")), @@ -13557,11 +13557,11 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), WAIT(30), ALERT_CUE(4), AWAIT_CUE(5), - BGM_SWITCH(9), + BGM_SWITCH(MUS_RISING_FEAR), ALERT_CUE(11), ALERT_CUE(12), WAIT(120), @@ -13618,7 +13618,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), MSG_NPC(7, _(" I never want...{WAIT_PRESS}\nto go back again...{WAIT_PRESS} Gfwoh!")), TEXTBOX_CLEAR, ALERT_CUE(12), @@ -13642,7 +13642,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ MSG_NPC(2, _(" ...Wow, it really exists...{WAIT_PRESS}\nA Pokémon that tough...")), ALERT_CUE(9), ALERT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), MSG_NPC(2, _(" ...But, you know?{WAIT_PRESS}\nSo we now know that Pokémon is in the\n{COLOR YELLOW_D}Western Cave{RESET}...")), MSG_NPC(2, _(" I still don't feel like going\nout there...")), MSG_NPC(2, _(" Going anywhere like that'd\nbe too scary by half!")), @@ -13652,7 +13652,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), AWAIT_CUE(5), ALERT_CUE(10), PORTRAIT_REP(0x0005, 0x00000001), @@ -13666,7 +13666,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives0_dlg0[] = { /* 0x816e9f8 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The {COLOR YELLOW_D}Western Cave{RESET}\n{CENTER_ALIGN}is now open for exploration!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(30), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -13711,17 +13711,17 @@ static const struct ScriptCommand s_gs1_g46_s0_lives2_dlg0[] = { /* 0x81709ac */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), ALERT_CUE(5), AWAIT_CUE(7), CJUMP_VAR(EVENT_LOCAL), @@ -13735,23 +13735,23 @@ static const struct ScriptCommand s_gs1_g46_s0_lives2_dlg0[] = { /* 0x81709ac */ { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), JUMP_LABEL(3), LABEL(1), /* = 0x01 */ { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), JUMP_LABEL(3), LABEL(2), /* = 0x02 */ CALL_SCRIPT(SWEAT_FUNC), ALERT_CUE(5), LABEL(3), /* = 0x03 */ AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), AWAIT_CUE(7), WALK_GRID(256, 138), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), ALERT_CUE(5), AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, @@ -13759,11 +13759,11 @@ static const struct ScriptCommand s_gs1_g46_s0_lives2_dlg0[] = { /* 0x81709ac */ AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHEAST), ALERT_CUE(5), AWAIT_CUE(7), RET, @@ -13774,17 +13774,17 @@ static const struct ScriptCommand s_gs1_g46_s0_lives3_dlg0[] = { /* 0x8170d6c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), AWAIT_CUE(8), CJUMP_VAR(EVENT_LOCAL), COND_EQUAL(1, /* to label */ 0), @@ -13792,7 +13792,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives3_dlg0[] = { /* 0x8170d6c */ COND_EQUAL(3, /* to label */ 2), LABEL(0), /* = 0x00 */ { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), JUMP_LABEL(3), LABEL(1), /* = 0x01 */ CALL_SCRIPT(NOTICE_FUNC), @@ -13801,30 +13801,30 @@ static const struct ScriptCommand s_gs1_g46_s0_lives3_dlg0[] = { /* 0x8170d6c */ { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), JUMP_LABEL(3), LABEL(2), /* = 0x02 */ CALL_SCRIPT(SWEAT_FUNC), LABEL(3), /* = 0x03 */ AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), AWAIT_CUE(8), SELECT_ANIMATION(9), WAIT(60), SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), AWAIT_CUE(8), WALK_GRID(256, 139), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(8), @@ -13838,13 +13838,13 @@ static const struct ScriptCommand s_gs1_g46_s0_lives4_dlg0[] = { /* 0x817113c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), WAIT(30), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), @@ -13862,26 +13862,26 @@ static const struct ScriptCommand s_gs1_g46_s0_lives4_dlg0[] = { /* 0x817113c */ CALL_SCRIPT(SWEAT_FUNC), LABEL(3), /* = 0x03 */ AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), ALERT_CUE(5), AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(9), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(9), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(9), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(9), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(9), RET, }; @@ -13891,41 +13891,41 @@ static const struct ScriptCommand s_gs1_g46_s0_lives5_dlg0[] = { /* 0x817145c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(10), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(10), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000004f, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 79), AWAIT_CUE(10), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(10), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), WAIT(30), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(10), @@ -13941,29 +13941,29 @@ static const struct ScriptCommand s_gs1_g46_s0_lives5_dlg0[] = { /* 0x817145c */ CALL_SCRIPT(SWEAT_FUNC), LABEL(3), /* = 0x03 */ AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000059, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 89), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(10), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x00000068, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 104), AWAIT_CUE(10), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000004d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 77), AWAIT_CUE(10), - { 0x93, 0x04, 0x000a, 0x0000006d, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 109), + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(19), STOP_ANIMATION_ON_CURRENT_FRAME, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(10), SELECT_ANIMATION(2), ALERT_CUE(5), @@ -13987,7 +13987,7 @@ static const struct ScriptCommand s_gs1_g46_s0_lives6_dlg0[] = { /* 0x817197c */ { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, WAIT(25), FANFARE_PLAY2(400), - { 0xe2, 0x00, 0x0190, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(400), ALERT_CUE(5), AWAIT_CUE(11), HALT, @@ -14004,13 +14004,13 @@ static const struct ScriptCommand s_gs1_g46_s0_lives7_dlg0[] = { /* 0x8171aac */ WAIT_RANDOM(30, 60), WALK_GRID(76, 143), { 0x54, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(12), { 0x54, 0x00, 0x001a, 0x00000000, 0x00000000, NULL }, { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, WAIT(20), FANFARE_PLAY2(400), - { 0xe2, 0x00, 0x0190, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(400), ALERT_CUE(5), AWAIT_CUE(12), HALT, @@ -14025,7 +14025,7 @@ static const struct ScriptCommand s_gs1_g47_s0_station_sref_script[] = { /* 0x81 UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), SELECT_MAP(1), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x00, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -14034,7 +14034,7 @@ static const struct ScriptCommand s_gs1_g47_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g47_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g47_s0_station_sref_script }; /* 0x8171cdc */ +static const struct ScriptRef s_gs1_g47_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g47_s0_station_sref_script }; /* 0x8171cdc */ static const struct ScriptCommand s_gs1_g47_s0_eff0_script[] = { /* 0x8171ce8 */ DEBUGINFO_O(14040), @@ -14079,7 +14079,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ ALERT_CUE(10), AWAIT_CUE(5), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), MSG_NPC(2, _(" Up? Up? Up?!\nHow could it be up, I ask you!")), MSG_NPC(2, _(" My beautiful shop...\nMy fine wares were stolen from me!")), @@ -14092,7 +14092,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ WAIT(10), ALERT_CUE(9), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0004, 0x00000000), MSG_NPC(4, _(" My bank wasn't hit, but...{WAIT_PRESS}\nThese are frightening times.")), TEXTBOX_CLEAR, @@ -14101,7 +14101,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ MSG_NPC(1, _(" Is the storage OK?")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(10), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0005, 0x00000000), MSG_NPC(5, _(" No problem.{WAIT_PRESS}\nNothing gets stolen from under my eye.")), @@ -14123,7 +14123,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ ALERT_CUE(8), ALERT_CUE(9), ALERT_CUE(10), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT(PLACEMENT_MIDDLE_TOP_RIGHT, 0x0006, 0x00000000), MSG_NPC(6, _(" Now wait.")), WAIT(10), @@ -14168,7 +14168,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}.\nWant to go check it out?")), VARIANT_DEFAULT(_(" {NAME_0}.\nWant to look into this?")), @@ -14179,7 +14179,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives0_dlg0[] = { /* 0x8171d48 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The {COLOR YELLOW_D}Northern Range{RESET}\n{CENTER_ALIGN}is now open for investigation!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -14207,31 +14207,31 @@ static const struct ScriptCommand s_gs1_g47_s0_lives1_dlg0[] = { /* 0x8172b68 */ WALK_RELATIVE(256, 80, 0), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), WAIT(20), - { 0x8e, 0x01, 0x0000, 0x00000001, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 1), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(6), WALK_GRID(256, 144), FANFARE_PLAY2(468), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d4, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(468), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x00000146, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(1, 10, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_10, DIRECTION_NORTH), HALT, }; @@ -14240,9 +14240,9 @@ static const struct ScriptCommand s_gs1_g47_s0_lives2_dlg0[] = { /* 0x8172d68 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), HALT, }; @@ -14254,7 +14254,7 @@ static const struct ScriptCommand s_gs1_g47_s0_lives3_dlg0[] = { /* 0x8172de8 */ AWAIT_CUE(7), CALL_SCRIPT(ANGRY_START_FUNC), WAIT(60), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), WAIT(60), CALL_SCRIPT(ANGRY_END_FUNC), AWAIT_CUE(7), @@ -14262,24 +14262,24 @@ static const struct ScriptCommand s_gs1_g47_s0_lives3_dlg0[] = { /* 0x8172de8 */ WALK_RELATIVE(512, -16, 0), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), FANFARE_PLAY2(457), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), WAIT(10), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), HALT, }; @@ -14288,11 +14288,11 @@ static const struct ScriptCommand s_gs1_g47_s0_lives4_dlg0[] = { /* 0x8173008 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), HALT, }; @@ -14301,15 +14301,15 @@ static const struct ScriptCommand s_gs1_g47_s0_lives5_dlg0[] = { /* 0x81730a8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), - ROTATE(3, 1, DIRECTION_SOUTH), + ROTATE_TO(3, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(10), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(10), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), CALL_SCRIPT(SMILE_END_FUNC), AWAIT_CUE(10), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), HALT, }; @@ -14321,17 +14321,17 @@ static const struct ScriptCommand s_gs1_g47_s0_lives6_dlg0[] = { /* 0x8173188 */ AWAIT_CUE(11), WALK_RELATIVE(256, -8, 24), ALERT_CUE(5), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), AWAIT_CUE(11), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(11), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), HALT, }; @@ -14339,7 +14339,7 @@ static const struct ScriptCommand s_gs1_g48_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(14339), SELECT_MAP(1), SELECT_ENTITIES(-1, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), BGM_FADEOUT(60), @@ -14348,7 +14348,7 @@ static const struct ScriptCommand s_gs1_g48_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g48_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g48_s0_station_sref_script }; /* 0x8173358 */ +static const struct ScriptRef s_gs1_g48_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g48_s0_station_sref_script }; /* 0x8173358 */ static const struct ScriptCommand s_gs1_g48_s0_eff0_script[] = { /* 0x8173364 */ DEBUGINFO_O(14354), @@ -14409,7 +14409,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ ALERT_CUE(8), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), MSG_NPC(5, _(" Ggh! This wound!")), TEXTBOX_CLEAR, WAIT(10), @@ -14420,7 +14420,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ WAIT(10), ALERT_CUE(10), AWAIT_CUE(5), - BGM_SWITCH(114), + BGM_SWITCH(MUS_IN_THE_DEPTHS_OF_THE_PIT), WAIT(60), MSG_NPC(5, _(" I have a younger sister.\nHer name is Latias.")), MSG_NPC(5, _(" Latias...{WAIT_PRESS}\nCrashed somewhere in the {COLOR YELLOW_D}Pitfall Valley{RESET}...")), @@ -14459,12 +14459,12 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), MSG_NPC(1, _(" A meteorite?!")), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), MSG_NPC(1, _(" {NAME_0}!{WAIT_PRESS}\nDo you think maybe that it's a chunk of\nthe blown-up meteor?")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), MSG_NPC(5, _(" I went to the {COLOR YELLOW_D}Pitfall Valley{RESET}\nin hopes of rescuing my sister, but...")), MSG_NPC(5, _(" I made little headway...\nI wasn't up to the task...")), TEXTBOX_CLEAR, @@ -14484,7 +14484,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ WAIT(60), ALERT_CUE(6), ALERT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" Oh... Oh, my!{WAIT_PRESS}\nIt is not a problem! Not a problem at all!")), @@ -14494,7 +14494,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ ALERT_CUE(9), ALERT_CUE(6), ALERT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(5), MSG_NPC(4, _(" However...{WAIT_PRESS}\nEven if you were to plumb the depths of\n{COLOR YELLOW_D}Pitfall Valley{RESET}...")), MSG_NPC(4, _(" What would you do then?")), @@ -14530,7 +14530,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ ALERT_CUE(8), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x0000000c), MSG_NPC(1, _(" You can?!{WAIT_PRESS}\nHow?!")), TEXTBOX_CLEAR, @@ -14554,7 +14554,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}!{WAIT_PRESS}\nThis is a rescue that only we can do!")), @@ -14568,7 +14568,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives0_dlg0[] = { /* 0x8173394 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Pitfall Valley{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -14609,30 +14609,30 @@ static const struct ScriptCommand s_gs1_g48_s0_lives1_dlg0[] = { /* 0x8174e1c */ AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), - { 0xe2, 0x00, 0x01d5, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(469), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), HALT, }; @@ -14643,9 +14643,9 @@ static const struct ScriptCommand s_gs1_g48_s0_lives2_dlg0[] = { /* 0x817500c */ AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), AWAIT_CUE(8), CALL_SCRIPT(SHOCK_FUNC), HALT, @@ -14671,20 +14671,20 @@ static const struct ScriptCommand s_gs1_g48_s0_lives3_dlg0[] = { /* 0x81750cc */ AWAIT_CUE(7), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(7), WAIT(30), FANFARE_PLAY2(468), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), WAIT(20), FANFARE_PLAY2(468), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), WAIT(30), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), FANFARE_PLAY2(457), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, { 0xde, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -14701,21 +14701,21 @@ static const struct ScriptCommand s_gs1_g48_s0_lives4_dlg0[] = { /* 0x817534c */ { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), WALK_RELATIVE(512, -40, 0), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), AWAIT_CUE(9), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(9), CALL_SCRIPT(SHOCK_FUNC), ALERT_CUE(5), AWAIT_CUE(9), WALK_RELATIVE(256, 24, 0), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(9), WALK_RELATIVE(256, -24, 0), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), HALT, }; @@ -14728,7 +14728,7 @@ static const struct ScriptCommand s_gs1_g48_s0_lives5_dlg0[] = { /* 0x81754ac */ SELECT_ANIMATION(4), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(10), { 0x54, 0x00, 0x001b, 0x00000000, 0x00000000, NULL }, @@ -14743,11 +14743,11 @@ static const struct ScriptCommand s_gs1_g48_s0_lives5_dlg0[] = { /* 0x81754ac */ AWAIT_CUE(10), FANFARE_PLAY2(475), { 0x54, 0x00, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe2, 0x00, 0x01db, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(475), { 0x54, 0x00, 0x001a, 0x00000000, 0x00000000, NULL }, WAIT(40), FANFARE_PLAY2(682), - { 0xe2, 0x00, 0x02aa, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(682), ALERT_CUE(5), SELECT_ANIMATION(25), AWAIT_CUE(10), @@ -14777,14 +14777,14 @@ static const struct ScriptCommand s_gs1_g49_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs1_g49_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs1_g49_s0_station_sref_script }; /* 0x81757ec */ +static const struct ScriptRef s_gs1_g49_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs1_g49_s0_station_sref_script }; /* 0x81757ec */ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ DEBUGINFO_O(14783), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, { 0xdf, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), WAIT(30), ALERT_CUE(10), AWAIT_CUE(5), @@ -14821,7 +14821,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ ALERT_CUE(8), ALERT_CUE(7), AWAIT_CUE(5), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT(PLACEMENT_RIGHT, 0x0005, 0x00000000), MSG_NPC(5, _(" My sister is safe, all\nthanks to you.")), MSG_NPC(5, _(" To be honest, I came close\nto giving up...")), @@ -14850,20 +14850,20 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0006, 0x00000000), MSG_NPC(6, _(" We would like to join {COLOR CYAN}Team\n{TEAM_NAME}{RESET} and help with your rescue\nwork.")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), AWAIT_CUE(5), MSG_NPC(5, _(" Would that work?{WAIT_PRESS}\nWould you be willing to accept us on\nyour rescue team?")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000004), ASK3_VAR( TRUE, /*default*/ -1, /* speaker */ 1, PARTNER_TALK_KIND), @@ -14911,7 +14911,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), MSG_NPC(4, _(" Latios and Latias are\nPokémon so rarely seen that they are\nconsidered mythical.")), MSG_NPC(4, _(" If you part ways with them\nnow, you may never see them again.")), MSG_NPC(4, _(" Strike that.\nYou will never again see them.")), @@ -14923,7 +14923,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ ALERT_CUE(6), ALERT_CUE(7), ALERT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000004), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -14942,7 +14942,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ WAIT(10), UPDATE_VARINT(CALC_SET, EVENT_LOCAL, 1), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), ALERT_CUE(10), ALERT_CUE(11), ALERT_CUE(7), @@ -14964,13 +14964,13 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ WAIT(10), ALERT_CUE(10), ALERT_CUE(11), - ROTATE(4, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), PORTRAIT_REP(0x0005, 0x00000001), MSG_NPC(5, _(" Thanks for having us!")), TEXTBOX_CLEAR, WAIT(10), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), AWAIT_CUE(5), PORTRAIT_REP(0x0006, 0x00000001), MSG_NPC(6, _(" Delighted to join!")), @@ -14981,7 +14981,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives0_dlg0[] = { /* 0x81757f8 */ BGM_STOP, FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_5} and {NAME_6}\n{CENTER_ALIGN}became team members!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, { 0x3b, 0x24, 0x0000, 0x00000000, 0x00000000, NULL }, ASK1(FALSE, /*default*/ -1, /* speaker */ -1, _("Give a nickname to {NAME_5}?")), @@ -15031,16 +15031,16 @@ static const struct ScriptCommand s_gs1_g49_s0_lives1_dlg0[] = { /* 0x8176dcc */ AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(SHOCK_FUNC), - { 0xe2, 0x00, 0x01d1, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE2(465), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), LABEL(0), /* = 0x00 */ @@ -15052,17 +15052,17 @@ static const struct ScriptCommand s_gs1_g49_s0_lives1_dlg0[] = { /* 0x8176dcc */ CALL_SCRIPT(JUMP_SURPRISE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), CALL_SCRIPT(JUMP_ANGRY_FUNC), ALERT_CUE(5), AWAIT_CUE(6), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHEAST), ALERT_CUE(5), HALT, }; @@ -15076,7 +15076,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives2_dlg0[] = { /* 0x817708c */ SELECT_ANIMATION(9), AWAIT_CUE(7), SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), @@ -15085,18 +15085,18 @@ static const struct ScriptCommand s_gs1_g49_s0_lives2_dlg0[] = { /* 0x817708c */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(7), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(7), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, AWAIT_CUE(7), SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), HALT, }; @@ -15106,10 +15106,10 @@ static const struct ScriptCommand s_gs1_g49_s0_lives3_dlg0[] = { /* 0x817725c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), AWAIT_CUE(8), LABEL(0), /* = 0x00 */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), @@ -15118,18 +15118,18 @@ static const struct ScriptCommand s_gs1_g49_s0_lives3_dlg0[] = { /* 0x817725c */ JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 1), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_SOUTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHEAST), AWAIT_CUE(8), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), AWAIT_CUE(8), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, AWAIT_CUE(8), SELECT_ANIMATION(2), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), HALT, }; @@ -15152,7 +15152,7 @@ static const struct ScriptCommand s_gs1_g49_s0_lives4_dlg0[] = { /* 0x817742c */ AWAIT_CUE(9), JUMP_LABEL(0), LABEL(1), /* = 0x01 */ - ROTATE(4, 2, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTHWEST), HALT, }; @@ -15174,11 +15174,11 @@ static const struct ScriptCommand s_gs1_g49_s0_lives5_dlg0[] = { /* 0x817755c */ AWAIT_CUE(10), SELECT_ANIMATION(2), WALK_RELATIVE(256, -8, 8), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), ALERT_CUE(5), AWAIT_CUE(10), { 0x62, 0x00, 0x0200, -0x00000008, 0x00000000, NULL }, - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), SELECT_ANIMATION(17), STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), @@ -15186,25 +15186,25 @@ static const struct ScriptCommand s_gs1_g49_s0_lives5_dlg0[] = { /* 0x817755c */ ALERT_CUE(5), AWAIT_CUE(10), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTHEAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_EAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTH), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_WEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTHWEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(10), { 0x62, 0x00, 0x0200, 0x00000008, 0x00000000, NULL }, - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), HALT, }; @@ -15225,34 +15225,34 @@ static const struct ScriptCommand s_gs1_g49_s0_lives6_dlg0[] = { /* 0x817785c */ AWAIT_CUE(11), SELECT_ANIMATION(2), WALK_RELATIVE(256, 0, -16), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(11), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), FANFARE_PLAY2(455), SELECT_ANIMATION(17), STOP_ANIMATION_ON_CURRENT_FRAME, SELECT_ANIMATION(2), AWAIT_CUE(11), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), { 0x62, 0x00, 0x0100, 0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_WEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), FANFARE_PLAY2(457), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTHWEST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHWEST), { 0x62, 0x00, 0x0100, -0x00000008, 0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTH), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_NORTHEAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), { 0x62, 0x00, 0x0100, -0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_EAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), FANFARE_PLAY2(457), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTHEAST), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHEAST), { 0x62, 0x00, 0x0100, 0x00000008, -0x00000008, NULL }, - ROTATE(1, 1, DIRECTION_SOUTH), + ROTATE_TO(1, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), AWAIT_CUE(11), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), HALT, }; @@ -15302,7 +15302,7 @@ static const struct ScriptCommand s_gs1_g50_s0_lives3_dlg0[] = { /* 0x8177fcc */ { 0x52, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, SELECT_ANIMATION(2), SELECT_ANIMATION(1), - { 0x8b, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(-1, 1), RET, }; @@ -15327,10 +15327,10 @@ static const struct ScriptCommand s_gs1_g50_s0_lives3_dlg2[] = { /* 0x817803c */ MSG_INSTANT(_("{CENTER_ALIGN}Leaving aside the disturbing fact that\n{CENTER_ALIGN}{NAME_1} made them compadres...")), FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0}'s team gained\n{CENTER_ALIGN}access to the {COLOR YELLOW_D}Buried Relic{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, JUMPIF_SCENE_GT(SCENARIO_SUB7, 49, 2, /* to label */ 1), - { 0xaf, 0x01, 0x001b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_BURIED_RELIC, TRUE), SCENARIO_CALC(SCENARIO_SUB7, 49, 3), LABEL(1), /* = 0x01 */ JUMP_SCRIPT(END_TALK), @@ -15342,7 +15342,7 @@ static const struct ScriptCommand s_gs1_g50_s0_lives3_dlg3[] = { /* 0x8178340 */ DEBUGINFO_O(15342), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), @@ -15350,7 +15350,7 @@ static const struct ScriptCommand s_gs1_g50_s0_lives3_dlg3[] = { /* 0x8178340 */ { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), RET, }; @@ -15494,7 +15494,7 @@ static const struct ScriptCommand s_gs1_g52_s0_lives0_dlg2[] = { /* 0x8178d0c */ WAIT(10), FANFARE_PLAY(204), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_1} became the\n{CENTER_ALIGN}rescue team's newest member!")), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR, WAIT(30), { 0x3b, 0x31, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -17918,4 +17918,4 @@ static const struct GroundLink s_gs1_links[] = { /* 0x817d168 */ /* link 145 */ { { /*x*/ 60, /*y*/ 38, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs1 = { LPARRAY(s_gs1_groups), s_gs1_links }; /* 0x817d5f8 */ +const GroundScriptHeader gGroundScript_gs1 = { LPARRAY(s_gs1_groups), s_gs1_links }; /* 0x817d5f8 */ diff --git a/src/data/ground/ground_data_t01p02a_station.h b/src/data/ground/ground_data_t01p02a_station.h index 7df1b9050..ef5614954 100644 --- a/src/data/ground/ground_data_t01p02a_station.h +++ b/src/data/ground/ground_data_t01p02a_station.h @@ -157,8 +157,8 @@ static const struct ScriptCommand s_gs2_g0_s0_station_sref_script[] = { /* 0x817 SELECT_LIVES(0, 2), JUMP_LABEL(30), LABEL(30), /* = 0x1e */ - BGM_SWITCH(8), - JUMPIF_SCENARIOCHECK(6, /* to label */ 31), + BGM_SWITCH(MUS_FILE_SELECT), + JUMPIF_SCENARIOCHECK(QUEST_REACHED_POSTGAME, /* to label */ 31), JUMP_LABEL(32), LABEL(31), /* = 0x1f */ SELECT_EVENTS(0, 2), @@ -166,7 +166,7 @@ static const struct ScriptCommand s_gs2_g0_s0_station_sref_script[] = { /* 0x817 JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs2_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs2_g0_s0_station_sref_script }; /* 0x817de6c */ +static const struct ScriptRef s_gs2_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs2_g0_s0_station_sref_script }; /* 0x817de6c */ static const struct ScriptCommand s_gs2_g0_s0_evt0_sref_script[] = { /* 0x817de78 */ DEBUGINFO_O(172), @@ -174,7 +174,7 @@ static const struct ScriptCommand s_gs2_g0_s0_evt0_sref_script[] = { /* 0x817de7 HALT, }; -static const struct ScriptRef s_gs2_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs2_g0_s0_evt0_sref_script }; /* 0x817dea8 */ +static const struct ScriptRef s_gs2_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs2_g0_s0_evt0_sref_script }; /* 0x817dea8 */ static const struct ScriptCommand s_gs2_g0_s1_lives0_dlg0[] = { /* 0x817deb4 */ DEBUGINFO_O(180), @@ -202,7 +202,7 @@ static const struct ScriptCommand s_gs2_g0_s2_evt0_sref_script[] = { /* 0x817df3 RET, }; -static const struct ScriptRef s_gs2_g0_s2_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs2_g0_s2_evt0_sref_script }; /* 0x817e018 */ +static const struct ScriptRef s_gs2_g0_s2_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs2_g0_s2_evt0_sref_script }; /* 0x817e018 */ static const struct ScriptCommand s_gs2_g0_s2_lives0_dlg0[] = { /* 0x817e024 */ DEBUGINFO_O(208), @@ -225,7 +225,7 @@ static const struct ScriptCommand s_gs2_g1_s0_station_sref_script[] = { /* 0x817 RET, }; -static const struct ScriptRef s_gs2_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g1_s0_station_sref_script }; /* 0x817e0e4 */ +static const struct ScriptRef s_gs2_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g1_s0_station_sref_script }; /* 0x817e0e4 */ static const struct ScriptCommand s_gs2_g1_s0_lives0_dlg0[] = { /* 0x817e0f0 */ DEBUGINFO_O(231), @@ -339,7 +339,7 @@ static const struct ScriptCommand s_gs2_g2_s0_station_sref_script[] = { /* 0x817 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g2_s0_station_sref_script }; /* 0x817e7e8 */ +static const struct ScriptRef s_gs2_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g2_s0_station_sref_script }; /* 0x817e7e8 */ static const struct ScriptCommand s_gs2_g3_s0_lives0_dlg0[] = { /* 0x817e7f4 */ DEBUGINFO_O(345), @@ -392,13 +392,13 @@ static const struct ScriptCommand s_gs2_g3_s0_lives0_dlg2[] = { /* 0x817e834 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}Gained access to\n{CENTER_ALIGN}the {COLOR YELLOW_D}Stormy Sea{RESET}!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, WAIT(20), MSG_INSTANT(_("{CENTER_ALIGN}Beware--you must take the HM {COLOR GREEN_I}Dive{RESET},\n{CENTER_ALIGN}or a team member must learn {COLOR GREEN_I}Dive{RESET}\n{CENTER_ALIGN}as a move for the team to enter!")), TEXTBOX_CLEAR, - BGM_SWITCH(8), - { 0xaf, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + BGM_SWITCH(MUS_FILE_SELECT), + CMD_UNK_AF(RESCUE_DUNGEON_STORMY_SEA, TRUE), SCENARIO_CALC(SCENARIO_SUB2, 33, 4), JUMP_SCRIPT(END_TALK), LABEL(0), /* = 0x00 */ @@ -439,7 +439,7 @@ static const struct ScriptCommand s_gs2_g3_s0_lives0_dlg3[] = { /* 0x817f2d4 */ { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(6), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, @@ -486,12 +486,12 @@ static const struct ScriptCommand s_gs2_g4_s0_lives0_dlg3[] = { /* 0x817f6b8 */ DEBUGINFO_O(486), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(6), { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), RET, }; @@ -519,7 +519,7 @@ static const struct ScriptCommand s_gs2_g5_s0_evt0_sref_script[] = { /* 0x817f7e HALT, }; -static const struct ScriptRef s_gs2_g5_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs2_g5_s0_evt0_sref_script }; /* 0x817f818 */ +static const struct ScriptRef s_gs2_g5_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs2_g5_s0_evt0_sref_script }; /* 0x817f818 */ static const struct ScriptCommand s_gs2_g6_s0_station_sref_script[] = { /* 0x817f824 */ DEBUGINFO_O(525), @@ -531,7 +531,7 @@ static const struct ScriptCommand s_gs2_g6_s0_station_sref_script[] = { /* 0x817 RET, }; -static const struct ScriptRef s_gs2_g6_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs2_g6_s0_station_sref_script }; /* 0x817f894 */ +static const struct ScriptRef s_gs2_g6_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs2_g6_s0_station_sref_script }; /* 0x817f894 */ static const struct ScriptCommand s_gs2_g6_s0_eff0_script[] = { /* 0x817f8a0 */ DEBUGINFO_O(537), @@ -548,7 +548,7 @@ static const struct ScriptCommand s_gs2_g6_s0_lives0_dlg0[] = { /* 0x817f910 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x95, 0x04, 0x000a, 0x00000005, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 5), ALERT_CUE(4), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), @@ -621,8 +621,8 @@ static const struct ScriptCommand s_gs2_g6_s0_lives0_dlg0[] = { /* 0x817f910 */ ALERT_CUE(7), ALERT_CUE(8), WAIT(60), - { 0x93, 0x08, 0x000a, 0x0000005d, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_SOUTHEAST), + CMD_UNK_93(8, DIR_TRANS_10, 93), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(5), CANCEL_EVENTS(5, 0), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -653,13 +653,13 @@ static const struct ScriptCommand s_gs2_g6_s0_lives2_dlg0[] = { /* 0x81800fc */ { 0x56, 0x00, 0x0000, 0x0000005d, 0x00000000, NULL }, WAIT(60), { 0x56, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, @@ -668,7 +668,7 @@ static const struct ScriptCommand s_gs2_g6_s0_lives2_dlg0[] = { /* 0x81800fc */ WAIT(60), { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), WAIT(30), CJUMP_UNK_C8(0), @@ -680,7 +680,7 @@ static const struct ScriptCommand s_gs2_g6_s0_lives2_dlg0[] = { /* 0x81800fc */ LABEL(1), /* = 0x01 */ WALK_GRID(512, 3), WALK_GRID(512, 4), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), END_DELETE, }; @@ -690,10 +690,10 @@ static const struct ScriptCommand s_gs2_g6_s0_lives3_dlg0[] = { /* 0x818034c */ { 0x53, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, @@ -732,7 +732,7 @@ static const struct ScriptCommand s_gs2_g7_s0_evt0_sref_script[] = { /* 0x818055 HALT, }; -static const struct ScriptRef s_gs2_g7_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs2_g7_s0_evt0_sref_script }; /* 0x818058c */ +static const struct ScriptRef s_gs2_g7_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs2_g7_s0_evt0_sref_script }; /* 0x818058c */ static const struct ScriptCommand s_gs2_g8_s0_station_sref_script[] = { /* 0x8180598 */ DEBUGINFO_O(738), @@ -744,7 +744,7 @@ static const struct ScriptCommand s_gs2_g8_s0_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs2_g8_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs2_g8_s0_station_sref_script }; /* 0x8180608 */ +static const struct ScriptRef s_gs2_g8_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs2_g8_s0_station_sref_script }; /* 0x8180608 */ static const struct ScriptCommand s_gs2_g8_s0_eff0_script[] = { /* 0x8180614 */ DEBUGINFO_O(750), @@ -760,7 +760,7 @@ static const struct ScriptCommand s_gs2_g8_s0_lives0_dlg0[] = { /* 0x8180674 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x95, 0x04, 0x000a, 0x00000005, 0x00000000, NULL }, + CMD_UNK_95(4, DIR_TRANS_10, 5), ALERT_CUE(4), AWAIT_CUE(5), PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), @@ -823,8 +823,8 @@ static const struct ScriptCommand s_gs2_g8_s0_lives0_dlg0[] = { /* 0x8180674 */ ALERT_CUE(7), ALERT_CUE(8), WAIT(60), - { 0x93, 0x08, 0x000a, 0x0000005d, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_SOUTHEAST), + CMD_UNK_93(8, DIR_TRANS_10, 93), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHEAST), AWAIT_CUE(5), CANCEL_EVENTS(7, 0), { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, @@ -852,11 +852,11 @@ static const struct ScriptCommand s_gs2_g8_s0_lives2_dlg0[] = { /* 0x8180e20 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, @@ -865,7 +865,7 @@ static const struct ScriptCommand s_gs2_g8_s0_lives2_dlg0[] = { /* 0x8180e20 */ WAIT(60), { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), WAIT(30), CJUMP_UNK_C8(0), @@ -877,7 +877,7 @@ static const struct ScriptCommand s_gs2_g8_s0_lives2_dlg0[] = { /* 0x8180e20 */ LABEL(1), /* = 0x01 */ WALK_GRID(512, 9), WALK_GRID(512, 10), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), END_DELETE, }; @@ -886,11 +886,11 @@ static const struct ScriptCommand s_gs2_g8_s0_lives3_dlg0[] = { /* 0x8181010 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(8), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, { 0x54, 0x00, 0x000b, 0x00000000, 0x00000000, NULL }, @@ -935,7 +935,7 @@ static const struct ScriptCommand s_gs2_g9_s1_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs2_g9_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs2_g9_s1_station_sref_script }; /* 0x81812b0 */ +static const struct ScriptRef s_gs2_g9_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs2_g9_s1_station_sref_script }; /* 0x81812b0 */ static const struct ScriptCommand s_gs2_g9_s1_eff0_script[] = { /* 0x81812bc */ DEBUGINFO_O(941), @@ -999,7 +999,7 @@ static const struct ScriptCommand s_gs2_g9_s1_lives2_dlg0[] = { /* 0x8181730 */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), { 0x56, 0x00, 0x0000, 0x0000005b, 0x00000000, NULL }, @@ -1008,9 +1008,9 @@ static const struct ScriptCommand s_gs2_g9_s1_lives2_dlg0[] = { /* 0x8181730 */ WAIT(60), { 0x70, 0x00, 0x0200, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(2), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(7), - { 0x92, 0x04, 0x000b, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 11, DIR_TRANS_FLIP), ALERT_CUE(5), AWAIT_CUE(7), RET, @@ -1022,7 +1022,7 @@ static const struct ScriptCommand s_gs2_g10_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g10_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g10_s0_station_sref_script }; /* 0x81818a0 */ +static const struct ScriptRef s_gs2_g10_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g10_s0_station_sref_script }; /* 0x81818a0 */ static const struct ScriptCommand s_gs2_g10_s0_lives0_dlg0[] = { /* 0x81818ac */ DEBUGINFO_O(1028), @@ -1054,7 +1054,7 @@ static const struct ScriptCommand s_gs2_g11_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g11_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g11_s0_station_sref_script }; /* 0x8181a80 */ +static const struct ScriptRef s_gs2_g11_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g11_s0_station_sref_script }; /* 0x8181a80 */ static const struct ScriptCommand s_gs2_g11_s0_lives0_dlg0[] = { /* 0x8181a8c */ DEBUGINFO_O(1060), @@ -1085,7 +1085,7 @@ static const struct ScriptCommand s_gs2_g12_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g12_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g12_s0_station_sref_script }; /* 0x8181c0c */ +static const struct ScriptRef s_gs2_g12_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g12_s0_station_sref_script }; /* 0x8181c0c */ static const struct ScriptCommand s_gs2_g12_s0_lives0_dlg0[] = { /* 0x8181c18 */ DEBUGINFO_O(1091), @@ -1130,7 +1130,7 @@ static const struct ScriptCommand s_gs2_g13_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g13_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g13_s0_station_sref_script }; /* 0x8181eec */ +static const struct ScriptRef s_gs2_g13_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g13_s0_station_sref_script }; /* 0x8181eec */ static const struct ScriptCommand s_gs2_g13_s0_lives0_dlg0[] = { /* 0x8181ef8 */ DEBUGINFO_O(1136), @@ -1162,7 +1162,7 @@ static const struct ScriptCommand s_gs2_g14_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g14_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g14_s0_station_sref_script }; /* 0x81820a4 */ +static const struct ScriptRef s_gs2_g14_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g14_s0_station_sref_script }; /* 0x81820a4 */ static const struct ScriptCommand s_gs2_g14_s0_lives0_dlg0[] = { /* 0x81820b0 */ DEBUGINFO_O(1168), @@ -1224,7 +1224,7 @@ static const struct ScriptCommand s_gs2_g15_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g15_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g15_s0_station_sref_script }; /* 0x8182618 */ +static const struct ScriptRef s_gs2_g15_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g15_s0_station_sref_script }; /* 0x8182618 */ static const struct ScriptCommand s_gs2_g15_s0_lives0_dlg0[] = { /* 0x8182624 */ DEBUGINFO_O(1230), @@ -1303,7 +1303,7 @@ static const struct ScriptCommand s_gs2_g16_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g16_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g16_s0_station_sref_script }; /* 0x8182a24 */ +static const struct ScriptRef s_gs2_g16_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g16_s0_station_sref_script }; /* 0x8182a24 */ static const struct ScriptCommand s_gs2_g16_s0_lives0_dlg0[] = { /* 0x8182a30 */ DEBUGINFO_O(1309), @@ -1382,7 +1382,7 @@ static const struct ScriptCommand s_gs2_g16_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g16_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs2_g16_s1_station_sref_script }; /* 0x8182f0c */ +static const struct ScriptRef s_gs2_g16_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs2_g16_s1_station_sref_script }; /* 0x8182f0c */ static const struct ScriptCommand s_gs2_g16_s1_lives0_dlg0[] = { /* 0x8182f18 */ DEBUGINFO_O(1388), @@ -1393,8 +1393,8 @@ static const struct ScriptCommand s_gs2_g16_s1_lives0_dlg0[] = { /* 0x8182f18 */ ALERT_CUE(4), WAIT(1), WALK_GRID(256, 12), - { 0x8b, 0x1e, 0x0004, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(6), + SET_DIR_WAIT(DIRECTION_NORTH, 30), + BGM_SWITCH(MUS_LEGEND_OF_NINETALES), MSG_NPC(1, _(" There once lived a Pokémon\nby the name of {NAME_2}.")), TEXTBOX_CLEAR, MSG_NPC(1, _(" Now, {NAME_2} had\nmany tails, all of them imbued with\npsychic power...")), @@ -1443,11 +1443,11 @@ static const struct ScriptCommand s_gs2_g16_s1_lives0_dlg0[] = { /* 0x8182f18 */ TEXTBOX_CLEAR, WAIT(20), ALERT_CUE(8), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), WAIT(60), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), MSG_NPC(1, _(" “And when the human \nbecomes a Pokémon...”")), MSG_NPC(1, _(" “The world's balance will\nbe upset...”")), MSG_NPC(1, _(" ...And that is how the legend\nends.")), @@ -1471,7 +1471,7 @@ static const struct ScriptCommand s_gs2_g16_s1_lives0_dlg0[] = { /* 0x8182f18 */ TEXTBOX_CLEAR, { 0x9b, 0x00, 0x0100, 0x00000000, 0x00000000, NULL }, ALERT_CUE(4), - BGM_SWITCH(8), + BGM_SWITCH(MUS_FILE_SELECT), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, ALERT_CUE(8), RET, @@ -1482,17 +1482,17 @@ static const struct ScriptCommand s_gs2_g16_s1_lives1_dlg0[] = { /* 0x8183b64 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, WALK_GRID(256, 13), - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), ALERT_CUE(3), AWAIT_CUE(8), FANFARE_PLAY2(466), CALL_SCRIPT(SHOCK_FUNC), AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), FANFARE_PLAY2(470), CALL_SCRIPT(SWEAT_FUNC), WAIT(60), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(8), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -1503,7 +1503,7 @@ static const struct ScriptCommand s_gs2_g16_s1_lives2_dlg0[] = { /* 0x8183c84 */ { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), AWAIT_CUE(6), CALL_SCRIPT(SMILE_START_FUNC), WAIT(30), @@ -1544,7 +1544,7 @@ static const struct ScriptCommand s_gs2_g17_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g17_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs2_g17_s0_station_sref_script }; /* 0x8183f10 */ +static const struct ScriptRef s_gs2_g17_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs2_g17_s0_station_sref_script }; /* 0x8183f10 */ static const struct ScriptCommand s_gs2_g18_s0_station_sref_script[] = { /* 0x8183f1c */ DEBUGINFO_O(1550), @@ -1556,7 +1556,7 @@ static const struct ScriptCommand s_gs2_g18_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g18_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs2_g18_s0_station_sref_script }; /* 0x8183f8c */ +static const struct ScriptRef s_gs2_g18_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs2_g18_s0_station_sref_script }; /* 0x8183f8c */ static const struct ScriptCommand s_gs2_g18_s0_lives0_dlg0[] = { /* 0x8183f98 */ DEBUGINFO_O(1562), @@ -1608,7 +1608,7 @@ static const struct ScriptCommand s_gs2_g19_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g19_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g19_s0_station_sref_script }; /* 0x81842b0 */ +static const struct ScriptRef s_gs2_g19_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g19_s0_station_sref_script }; /* 0x81842b0 */ static const struct ScriptCommand s_gs2_g19_s0_lives0_dlg0[] = { /* 0x81842bc */ DEBUGINFO_O(1614), @@ -1629,7 +1629,7 @@ static const struct ScriptCommand s_gs2_g20_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g20_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g20_s0_station_sref_script }; /* 0x818435c */ +static const struct ScriptRef s_gs2_g20_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g20_s0_station_sref_script }; /* 0x818435c */ static const struct ScriptCommand s_gs2_g20_s0_lives0_dlg0[] = { /* 0x8184368 */ DEBUGINFO_O(1635), @@ -1690,7 +1690,7 @@ static const struct ScriptCommand s_gs2_g21_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g21_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g21_s0_station_sref_script }; /* 0x8184708 */ +static const struct ScriptRef s_gs2_g21_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g21_s0_station_sref_script }; /* 0x8184708 */ static const struct ScriptCommand s_gs2_g21_s0_lives0_dlg0[] = { /* 0x8184714 */ DEBUGINFO_O(1696), @@ -1754,7 +1754,7 @@ static const struct ScriptCommand s_gs2_g22_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g22_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g22_s0_station_sref_script }; /* 0x8184b30 */ +static const struct ScriptRef s_gs2_g22_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g22_s0_station_sref_script }; /* 0x8184b30 */ static const struct ScriptCommand s_gs2_g22_s0_lives0_dlg0[] = { /* 0x8184b3c */ DEBUGINFO_O(1760), @@ -1815,7 +1815,7 @@ static const struct ScriptCommand s_gs2_g23_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g23_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g23_s0_station_sref_script }; /* 0x8184df8 */ +static const struct ScriptRef s_gs2_g23_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g23_s0_station_sref_script }; /* 0x8184df8 */ static const struct ScriptCommand s_gs2_g23_s0_lives0_dlg0[] = { /* 0x8184e04 */ DEBUGINFO_O(1821), @@ -1878,7 +1878,7 @@ static const struct ScriptCommand s_gs2_g24_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g24_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g24_s0_station_sref_script }; /* 0x81851c8 */ +static const struct ScriptRef s_gs2_g24_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g24_s0_station_sref_script }; /* 0x81851c8 */ static const struct ScriptCommand s_gs2_g24_s0_lives0_dlg0[] = { /* 0x81851d4 */ DEBUGINFO_O(1884), @@ -1942,7 +1942,7 @@ static const struct ScriptCommand s_gs2_g25_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs2_g25_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g25_s0_station_sref_script }; /* 0x8185688 */ +static const struct ScriptRef s_gs2_g25_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g25_s0_station_sref_script }; /* 0x8185688 */ static const struct ScriptCommand s_gs2_g25_s0_lives0_dlg0[] = { /* 0x8185694 */ DEBUGINFO_O(1948), @@ -1984,7 +1984,7 @@ static const struct ScriptCommand s_gs2_g26_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g26_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g26_s0_station_sref_script }; /* 0x8185950 */ +static const struct ScriptRef s_gs2_g26_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g26_s0_station_sref_script }; /* 0x8185950 */ static const struct ScriptCommand s_gs2_g26_s0_lives0_dlg0[] = { /* 0x818595c */ DEBUGINFO_O(1990), @@ -2047,7 +2047,7 @@ static const struct ScriptCommand s_gs2_g27_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g27_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g27_s0_station_sref_script }; /* 0x8185d44 */ +static const struct ScriptRef s_gs2_g27_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g27_s0_station_sref_script }; /* 0x8185d44 */ static const struct ScriptCommand s_gs2_g27_s0_lives0_dlg0[] = { /* 0x8185d50 */ DEBUGINFO_O(2053), @@ -2107,14 +2107,14 @@ static const struct ScriptCommand s_gs2_g28_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(2107), SELECT_MAP(2), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(41), + BGM_SWITCH(MUS_AFTERMATH), { 0x22, 0x01, 0x002d, 0x00000000, 0x00000000, NULL }, WAIT(240), { 0x23, 0x01, 0x002d, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs2_g28_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs2_g28_s0_station_sref_script }; /* 0x8186174 */ +static const struct ScriptRef s_gs2_g28_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs2_g28_s0_station_sref_script }; /* 0x8186174 */ static const struct ScriptCommand s_gs2_g28_s0_eff0_script[] = { /* 0x8186180 */ DEBUGINFO_O(2120), @@ -2140,7 +2140,7 @@ static const struct ScriptCommand s_gs2_g29_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(3), SELECT_ENTITIES(-1, 0), WAIT(30), - BGM_SWITCH(8), + BGM_SWITCH(MUS_FILE_SELECT), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), @@ -2149,7 +2149,7 @@ static const struct ScriptCommand s_gs2_g29_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g29_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs2_g29_s0_station_sref_script }; /* 0x8186300 */ +static const struct ScriptRef s_gs2_g29_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs2_g29_s0_station_sref_script }; /* 0x8186300 */ static const struct ScriptCommand s_gs2_g29_s0_eff0_script[] = { /* 0x818630c */ DEBUGINFO_O(2155), @@ -2183,7 +2183,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ ALERT_CUE(7), ALERT_CUE(8), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), PORTRAIT(PLACEMENT_LEFT_, 0x0001, 0x00000000), MSG_NPC(1, _(" Hi, {NAME_4}!")), TEXTBOX_CLEAR, @@ -2194,7 +2194,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ ALERT_CUE(9), ALERT_CUE(10), WALK_GRID(256, 16), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(30), FANFARE_PLAY2(468), ALERT_CUE(6), @@ -2244,7 +2244,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ ALERT_CUE(9), ALERT_CUE(10), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(15), ALERT_CUE(4), AWAIT_CUE(5), @@ -2259,7 +2259,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ ALERT_CUE(9), ALERT_CUE(11), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), WAIT(15), ALERT_CUE(10), AWAIT_CUE(5), @@ -2276,7 +2276,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ ALERT_CUE(8), ALERT_CUE(10), WAIT(5), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), WAIT(30), FANFARE_PLAY2(468), ALERT_CUE(6), @@ -2370,7 +2370,7 @@ static const struct ScriptCommand s_gs2_g29_s0_lives0_dlg0[] = { /* 0x81863ec */ WAIT(10), ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" {NAME_0}.{WAIT_PRESS}\nWe should go to the cave if we want to\nevolve.")), VARIANT(/* == */ 3, _(" {NAME_0}.{WAIT_PRESS}\nLet's go to the cave if we're ready to\nevolve.")), @@ -2412,30 +2412,30 @@ static const struct ScriptCommand s_gs2_g29_s0_lives1_dlg0[] = { /* 0x8187888 */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, WALK_GRID(256, 17), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), FANFARE_PLAY2(465), CALL_SCRIPT(NOTICE_FUNC), ALERT_CUE(5), AWAIT_CUE(6), WALK_GRID(256, 18), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), WAIT(15), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_NORTHEAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHEAST), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(6), CALL_SCRIPT(QUESTION_FUNC), ALERT_CUE(5), @@ -2444,12 +2444,12 @@ static const struct ScriptCommand s_gs2_g29_s0_lives1_dlg0[] = { /* 0x8187888 */ AWAIT_CUE(6), CALL_SCRIPT(JUMP_SURPRISE_FUNC), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), WAIT(90), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, @@ -2463,22 +2463,22 @@ static const struct ScriptCommand s_gs2_g29_s0_lives2_dlg0[] = { /* 0x8187b78 */ WALK_GRID(256, 19), AWAIT_CUE(7), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(7), WAIT(5), WALK_GRID(256, 20), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(7), WAIT(4), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), WAIT(4), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(7), WAIT(3), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(7), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(7), @@ -2501,20 +2501,20 @@ static const struct ScriptCommand s_gs2_g29_s0_lives3_dlg0[] = { /* 0x8187d98 */ ALERT_CUE(5), AWAIT_CUE(8), WAIT(20), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(8), WAIT(10), WALK_GRID(256, 22), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(8), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(8), WAIT(10), - ROTATE(4, 10, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(8), WAIT(4), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -2529,21 +2529,21 @@ static const struct ScriptCommand s_gs2_g29_s0_lives4_dlg0[] = { /* 0x8187f58 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0004, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), AWAIT_CUE(9), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), AWAIT_CUE(9), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(9), HALT, @@ -2555,30 +2555,30 @@ static const struct ScriptCommand s_gs2_g29_s0_lives5_dlg0[] = { /* 0x81880b8 */ { 0x2d, 0x07, 0x0005, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(10), WAIT(10), - ROTATE(8, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTHWEST), WAIT(30), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(10), - ROTATE(10, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(8, 10, DIRECTION_NORTHWEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_NORTHWEST), AWAIT_CUE(10), - ROTATE(10, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTHWEST), ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(10, 10, DIRECTION_WEST), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(10), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(10), - ROTATE(10, 10, DIRECTION_SOUTH), + ROTATE_TO(10, DIR_TRANS_10, DIRECTION_SOUTH), { 0x56, 0x00, 0x0000, 0x00000047, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), CALL_SCRIPT(NOTICE_FUNC), AWAIT_CUE(10), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(10), HALT, }; @@ -2589,11 +2589,11 @@ static const struct ScriptCommand s_gs2_g29_s0_lives6_dlg0[] = { /* 0x81882a8 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0006, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(11), - ROTATE(12, 10, DIRECTION_NORTHWEST), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_NORTHWEST), ALERT_CUE(5), AWAIT_CUE(11), WAIT(4), - ROTATE(12, 10, DIRECTION_SOUTH), + ROTATE_TO(12, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(11), HALT, }; @@ -2605,7 +2605,7 @@ static const struct ScriptCommand s_gs2_g30_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs2_g30_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs2_g30_s0_station_sref_script }; /* 0x81883a8 */ +static const struct ScriptRef s_gs2_g30_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs2_g30_s0_station_sref_script }; /* 0x81883a8 */ static const struct ScriptCommand s_gs2_g30_s0_lives0_dlg2[] = { /* 0x81883b4 */ DEBUGINFO_O(2611), @@ -3428,4 +3428,4 @@ static const struct GroundLink s_gs2_links[] = { /* 0x8189884 */ /* link 25 */ { { /*x*/ 28, /*y*/ 24, /*flags*/ CPOS_HALFTILE, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 1, /*?*/ 0 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs2 = { LPARRAY(s_gs2_groups), s_gs2_links }; /* 0x8189954 */ +const GroundScriptHeader gGroundScript_gs2 = { LPARRAY(s_gs2_groups), s_gs2_links }; /* 0x8189954 */ diff --git a/src/data/ground/ground_data_t01p03_station.h b/src/data/ground/ground_data_t01p03_station.h index 3ed231921..b70848145 100644 --- a/src/data/ground/ground_data_t01p03_station.h +++ b/src/data/ground/ground_data_t01p03_station.h @@ -151,11 +151,11 @@ static const struct ScriptCommand s_gs4_g0_s0_station_sref_script[] = { /* 0x818 SELECT_LIVES(0, 2), JUMP_LABEL(31), LABEL(31), /* = 0x1f */ - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs4_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs4_g0_s0_station_sref_script }; /* 0x818a174 */ +static const struct ScriptRef s_gs4_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs4_g0_s0_station_sref_script }; /* 0x818a174 */ static const struct ScriptCommand s_gs4_g0_s0_evt0_sref_script[] = { /* 0x818a180 */ @@ -164,7 +164,7 @@ static const struct ScriptCommand s_gs4_g0_s0_evt0_sref_script[] = { /* 0x818a18 HALT, }; -static const struct ScriptRef s_gs4_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs4_g0_s0_evt0_sref_script }; /* 0x818a1b0 */ +static const struct ScriptRef s_gs4_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs4_g0_s0_evt0_sref_script }; /* 0x818a1b0 */ static const struct ScriptCommand s_gs4_g0_s0_evt1_sref_script[] = { /* 0x818a1bc */ DEBUGINFO_O(170), @@ -172,14 +172,14 @@ static const struct ScriptCommand s_gs4_g0_s0_evt1_sref_script[] = { /* 0x818a1b HALT, }; -static const struct ScriptRef s_gs4_g0_s0_evt1_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs4_g0_s0_evt1_sref_script }; /* 0x818a1ec */ +static const struct ScriptRef s_gs4_g0_s0_evt1_sref = { GETOUT_NORMAL, 2, NULL, s_gs4_g0_s0_evt1_sref_script }; /* 0x818a1ec */ static const struct ScriptCommand s_gs4_g0_s0_obj0_dlg2[] = { /* 0x818a1f8 */ DEBUGINFO_O(178), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0xaf, 0x01, 0x000d, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_DUMMY, TRUE), SPECIAL_TEXT(SPECIAL_TEXT_BULLETIN_BOARD_JOBS, 0, 0), COND_EQUAL(1, /* to label */ 0), COND_EQUAL(2, /* to label */ 1), @@ -212,10 +212,10 @@ static const struct ScriptCommand s_gs4_g0_s0_lives0_dlg0[] = { /* 0x818a358 */ WAIT(15), { 0x68, 0x00, 0x0100, 0x00000018, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 10, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_WEST), WALK_DIRECT(300, 1), WALK_DIRECT(300, 0), - ROTATE(30, 10, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, WAIT(15), @@ -239,7 +239,7 @@ static const struct ScriptCommand s_gs4_g0_s0_lives1_dlg0[] = { /* 0x818a4f8 */ LABEL(1), /* = 0x01 */ WAIT(90), WALK_DIRECT(300, 2), - ROTATE(30, 10, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, WAIT(15), @@ -249,7 +249,7 @@ static const struct ScriptCommand s_gs4_g0_s0_lives1_dlg0[] = { /* 0x818a4f8 */ WAIT(15), { 0x68, 0x00, 0x0100, 0x00000018, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 10, DIRECTION_EAST), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_EAST), WALK_DIRECT(300, 3), JUMP_LABEL(1), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, @@ -326,7 +326,7 @@ static const struct ScriptCommand s_gs4_g1_s0_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs4_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g1_s0_station_sref_script }; /* 0x818a938 */ +static const struct ScriptRef s_gs4_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g1_s0_station_sref_script }; /* 0x818a938 */ static const struct ScriptCommand s_gs4_g1_s0_lives0_dlg2[] = { /* 0x818a944 */ DEBUGINFO_O(332), @@ -434,12 +434,12 @@ static const struct ScriptCommand s_gs4_g1_s0_lives4_dlg3[] = { /* 0x818b4d4 */ COND_EQUAL(1, /* to label */ 1), COND_EQUAL(2, /* to label */ 2), LABEL(1), /* = 0x01 */ - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, LABEL(2), /* = 0x02 */ - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(6), FANFARE_PLAY2(465), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -458,7 +458,7 @@ static const struct ScriptCommand s_gs4_g1_s1_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs4_g1_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g1_s1_station_sref_script }; /* 0x818b674 */ +static const struct ScriptRef s_gs4_g1_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g1_s1_station_sref_script }; /* 0x818b674 */ static const struct ScriptCommand s_gs4_g1_s1_eff0_script[] = { /* 0x818b680 */ DEBUGINFO_O(464), @@ -477,7 +477,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives0_dlg0[] = { /* 0x818b710 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x34, 0x00, 0x0003, 0x00000000, 0x00000000, _(" (Papa still hasn't come\nhome...)") }, + MSG_NPC(3, _(" (Papa still hasn't come\nhome...)")), MSG_NPC(-1, _(" Our son!{WAIT_PRESS}\nSorry to make you wait!")), TEXTBOX_CLEAR, WAIT(10), @@ -505,35 +505,35 @@ static const struct ScriptCommand s_gs4_g1_s1_lives0_dlg0[] = { /* 0x818b710 */ AWAIT_CUE(5), MSG_NPC(2, _(" Ha!")), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), AWAIT_CUE(5), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" Ha!")), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), AWAIT_CUE(5), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" Ha!")), ALERT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), AWAIT_CUE(5), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" Ha!")), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(5), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), MSG_NPC(2, _(" Ha!")), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(5), TEXTBOX_CLEAR, WAIT(30), @@ -586,7 +586,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives1_dlg0[] = { /* 0x818bfec */ DEBUGINFO_O(586), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -602,7 +602,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), WARP_WAYPOINT(0, 5), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, FANFARE_PLAY2(454), SELECT_ANIMATION(22), @@ -614,7 +614,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WARP_WAYPOINT(0, 6), - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), FANFARE_PLAY2(454), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -625,7 +625,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WARP_WAYPOINT(0, 7), - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), FANFARE_PLAY2(454), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -636,7 +636,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WARP_WAYPOINT(0, 8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), FANFARE_PLAY2(454), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -647,7 +647,7 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ SELECT_ANIMATION(23), STOP_ANIMATION_ON_CURRENT_FRAME, WARP_WAYPOINT(0, 9), - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), FANFARE_PLAY2(454), SELECT_ANIMATION(22), STOP_ANIMATION_ON_CURRENT_FRAME, @@ -655,10 +655,10 @@ static const struct ScriptCommand s_gs4_g1_s1_lives2_dlg0[] = { /* 0x818c05c */ SELECT_ANIMATION(2), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(8, 1, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), { 0x52, 0x00, 0x0000, 0x0000001f, 0x00000000, NULL }, ALERT_CUE(5), AWAIT_CUE(7), @@ -673,34 +673,34 @@ static const struct ScriptCommand s_gs4_g1_s1_lives3_dlg0[] = { /* 0x818c4dc */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), CALL_SCRIPT(NOTICE_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), CALL_SCRIPT(LOOK_AROUND_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTHWEST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTHWEST), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_SOUTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_WEST), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_WEST), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), + CMD_UNK_E5(5, 0), AWAIT_CUE(8), CALL_SCRIPT(SMILE_START_FUNC), WAIT(60), CALL_SCRIPT(SMILE_END_FUNC), - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_E5(5, 0), AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), { 0x53, 0x00, 0x0000, 0x00000400, 0x00000000, NULL }, SELECT_ANIMATION(4), ALERT_CUE(5), @@ -713,7 +713,7 @@ static const struct ScriptCommand s_gs4_g1_s2_station_sref_script[] = { /* 0x818 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g1_s2_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g1_s2_station_sref_script }; /* 0x818c75c */ +static const struct ScriptRef s_gs4_g1_s2_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g1_s2_station_sref_script }; /* 0x818c75c */ static const struct ScriptCommand s_gs4_g1_s2_lives0_dlg2[] = { /* 0x818c768 */ DEBUGINFO_O(719), @@ -752,20 +752,20 @@ static const struct ScriptCommand s_gs4_g2_s0_station_sref_script[] = { /* 0x818 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g2_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g2_s0_station_sref_script }; /* 0x818c978 */ +static const struct ScriptRef s_gs4_g2_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g2_s0_station_sref_script }; /* 0x818c978 */ static const struct ScriptCommand s_gs4_g3_s0_station_sref_script[] = { /* 0x818c984 */ DEBUGINFO_O(758), SELECT_MAP(4), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs4_g3_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g3_s0_station_sref_script }; /* 0x818ca04 */ +static const struct ScriptRef s_gs4_g3_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g3_s0_station_sref_script }; /* 0x818ca04 */ static const struct ScriptCommand s_gs4_g3_s0_eff0_script[] = { /* 0x818ca10 */ DEBUGINFO_O(771), @@ -791,12 +791,12 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ MSG_NPC(1, _(" Did you two put up that job?")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(7), MSG_NPC(2, _(" Yup, yup!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(6), ALERT_CUE(8), AWAIT_CUE(5), @@ -805,12 +805,12 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ TEXTBOX_CLEAR, ALERT_CUE(8), WAIT(10), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(6), MSG_NPC(2, _(" A bad Mankey gang is going\nwild in our forest.\nEveryone is upset.")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(6), ALERT_CUE(8), AWAIT_CUE(5), @@ -818,13 +818,13 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ TEXTBOX_CLEAR, ALERT_CUE(8), WAIT(10), - ROTATE(4, 1, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTHEAST), ALERT_CUE(7), MSG_NPC(2, _(" We don't know why they\nrampage around...")), MSG_NPC(2, _(" But they are always angry\nand attack anyone they see!")), TEXTBOX_CLEAR, WAIT(10), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(6), ALERT_CUE(8), AWAIT_CUE(5), @@ -836,7 +836,7 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Hmm... That is a problem.")), VARIANT_DEFAULT(_(" Oh, no... That is a problem.")), - ROTATE(4, 1, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_EAST), ALERT_CUE(6), PORTRAIT_REP(0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -848,7 +848,7 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ TEXTBOX_CLEAR, WAIT(20), ALERT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(8), AWAIT_CUE(5), MSG_NPC(3, _(" Wobbuffet!")), @@ -859,7 +859,7 @@ static const struct ScriptCommand s_gs4_g3_s0_lives0_dlg0[] = { /* 0x818ca80 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The {COLOR YELLOW_D}Uproar Forest{RESET} is now\n{CENTER_ALIGN}open for exploration!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -876,17 +876,17 @@ static const struct ScriptCommand s_gs4_g3_s0_lives1_dlg0[] = { /* 0x818d208 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_NORTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTHWEST), AWAIT_CUE(6), - ROTATE(4, 2, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_WEST), AWAIT_CUE(6), - ROTATE(4, 1, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_NORTH), AWAIT_CUE(6), WALK_RELATIVE(256, -80, 0), HALT, @@ -901,7 +901,7 @@ static const struct ScriptCommand s_gs4_g3_s0_lives2_dlg0[] = { /* 0x818d328 */ WAIT(15), SELECT_ANIMATION(2), AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTHWEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTHWEST), HALT, }; @@ -959,7 +959,7 @@ static const struct ScriptCommand s_gs4_g5_s0_station_sref_script[] = { /* 0x818 SELECT_MAP(4), WAIT(30), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -967,7 +967,7 @@ static const struct ScriptCommand s_gs4_g5_s0_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs4_g5_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g5_s0_station_sref_script }; /* 0x818d74c */ +static const struct ScriptRef s_gs4_g5_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g5_s0_station_sref_script }; /* 0x818d74c */ static const struct ScriptCommand s_gs4_g5_s0_lives0_dlg0[] = { /* 0x818d758 */ DEBUGINFO_O(973), @@ -979,7 +979,7 @@ static const struct ScriptCommand s_gs4_g5_s0_lives0_dlg0[] = { /* 0x818d758 */ PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" “Smeargle's desperate plea,“\nhuh...?{WAIT_PRESS}\nThat's some title.")), @@ -988,7 +988,7 @@ static const struct ScriptCommand s_gs4_g5_s0_lives0_dlg0[] = { /* 0x818d758 */ VARIANT_DEFAULT(_(" What does it say?{WAIT_PRESS}\nCan you read it?")), TEXTBOX_CLEAR, WAIT(20), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(6), AWAIT_CUE(5), MSG_INSTANT(_("{CENTER_ALIGN}{NAME_0} read the letter.")), @@ -1004,7 +1004,7 @@ static const struct ScriptCommand s_gs4_g5_s0_lives0_dlg0[] = { /* 0x818d758 */ WAIT(20), ALERT_CUE(6), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x00000022, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 34), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" .............{WAIT_PRESS}\nIt says he ran away because he didn't want\nto be an adult...{WAIT_PRESS} What's up with that?")), VARIANT(/* == */ 1, _(" I don't really get it, but...{WAIT_PRESS}\nWell, let's go rescue this Smeargle!")), @@ -1016,7 +1016,7 @@ static const struct ScriptCommand s_gs4_g5_s0_lives0_dlg0[] = { /* 0x818d758 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The {COLOR YELLOW_D}Howling Forest{RESET}\n{CENTER_ALIGN}is now open for exploration!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -1031,13 +1031,13 @@ static const struct ScriptCommand s_gs4_g5_s0_lives1_dlg0[] = { /* 0x818def4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000001, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 1), ALERT_CUE(5), AWAIT_CUE(6), HALT, @@ -1089,21 +1089,21 @@ static const struct ScriptCommand s_gs4_g6_s0_lives0_dlg3[] = { /* 0x818e248 */ { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), WAIT(30), - { 0x92, 0x04, 0x0001, 0x00000001, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT1), WAIT(5), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(5), - { 0x92, 0x04, 0x0001, 0x00000001, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT1), ALERT_CUE(5), AWAIT_CUE(6), - { 0x92, 0x04, 0x0001, 0x00000001, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT1), WAIT(5), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(5), - { 0x92, 0x04, 0x0001, 0x00000001, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_SPINRIGHT1), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), RET, }; @@ -1113,7 +1113,7 @@ static const struct ScriptCommand s_gs4_g7_s0_station_sref_script[] = { /* 0x818 SELECT_MAP(4), WAIT(30), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, @@ -1121,7 +1121,7 @@ static const struct ScriptCommand s_gs4_g7_s0_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs4_g7_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g7_s0_station_sref_script }; /* 0x818e458 */ +static const struct ScriptRef s_gs4_g7_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g7_s0_station_sref_script }; /* 0x818e458 */ static const struct ScriptCommand s_gs4_g7_s0_lives0_dlg0[] = { /* 0x818e464 */ DEBUGINFO_O(1127), @@ -1145,7 +1145,7 @@ static const struct ScriptCommand s_gs4_g7_s0_lives0_dlg0[] = { /* 0x818e464 */ BGM_STOP, FANFARE_PLAY(205), MSG_INSTANT(_("{CENTER_ALIGN}The {COLOR YELLOW_D}Wish Cave{RESET} is now\n{CENTER_ALIGN}open for exploration!")), - { 0xe1, 0x00, 0x00cd, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(205), TEXTBOX_CLEAR, ALERT_CUE(3), HALT, @@ -1225,7 +1225,7 @@ static const struct ScriptCommand s_gs4_g9_s0_station_sref_script[] = { /* 0x818 RET, }; -static const struct ScriptRef s_gs4_g9_s0_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g9_s0_station_sref_script }; /* 0x818eaf0 */ +static const struct ScriptRef s_gs4_g9_s0_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g9_s0_station_sref_script }; /* 0x818eaf0 */ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ DEBUGINFO_O(1231), @@ -1235,7 +1235,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ ALERT_CUE(7), ALERT_CUE(8), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), PORTRAIT(PLACEMENT_LEFT_, 0x0002, 0x00000000), ASK3(FALSE, /*default*/ -1, /* speaker */ 2, _(" Say, sweetie.{WAIT_PRESS}\nHave you seen Gengar around?")), CHOICE(/* label */ 2, _("Yes.")), @@ -1258,7 +1258,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ MSG_NPC(2, _(" ...Oh, OK.")), TEXTBOX_CLEAR, WAIT(10), - { 0x93, 0x04, 0x000a, 0x0000005c, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 92), PORTRAIT(PLACEMENT_RIGHT, 0x0003, 0x00000000), MSG_NPC(3, _(" Something seems to be\nwrong with Gengar lately.")), TEXTBOX_CLEAR, @@ -1273,7 +1273,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ WAIT(10), ALERT_CUE(7), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), PORTRAIT_REP(0x0002, 0x00000000), MSG_NPC(2, _(" You think so?{WAIT_PRESS}\nHis expression...\nIt looks the same as usual, no?")), MSG_NPC(2, _(" All I have seen is him\nlaughing in his usual mean way?")), @@ -1281,7 +1281,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ WAIT(10), ALERT_CUE(8), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000005c, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 92), MSG_NPC(3, _(" No, it's different.{WAIT_PRESS}\nI can tell.")), MSG_NPC(3, _(" The way he sets his mouth.\nIt's different just a little at the corners.")), TEXTBOX_CLEAR, @@ -1291,7 +1291,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives0_dlg0[] = { /* 0x818eafc */ WAIT(10), ALERT_CUE(7), AWAIT_CUE(5), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), MSG_NPC(2, _(" Anyway, without Gengar\naround, {COLOR CYAN}Team Meanies{RESET} can't operate.")), MSG_NPC(2, _(" Such a vexing problem!")), TEXTBOX_CLEAR, @@ -1328,7 +1328,7 @@ static const struct ScriptCommand s_gs4_g9_s0_lives2_dlg0[] = { /* 0x818f2e4 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), AWAIT_CUE(7), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 1, /* to label */ 0), CALL_SCRIPT(JUMP_SURPRISE_FUNC), @@ -1336,13 +1336,13 @@ static const struct ScriptCommand s_gs4_g9_s0_lives2_dlg0[] = { /* 0x818f2e4 */ AWAIT_CUE(7), JUMPIF(JUDGE_EQ, EVENT_LOCAL, 0, /* to label */ 0), LABEL(0), /* = 0x00 */ - { 0x93, 0x04, 0x000a, 0x0000005c, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 92), ALERT_CUE(5), AWAIT_CUE(7), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), HALT, }; @@ -1354,10 +1354,10 @@ static const struct ScriptCommand s_gs4_g9_s0_lives3_dlg0[] = { /* 0x818f434 */ { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), WAIT(5), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x0000005d, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 93), ALERT_CUE(5), AWAIT_CUE(8), HALT, @@ -1417,14 +1417,14 @@ static const struct ScriptCommand s_gs4_g11_s0_station_sref_script[] = { /* 0x81 SELECT_ENTITIES(-1, 2), JUMP_LABEL(5), LABEL(5), /* = 0x05 */ - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs4_g11_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g11_s0_station_sref_script }; /* 0x818f834 */ +static const struct ScriptRef s_gs4_g11_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g11_s0_station_sref_script }; /* 0x818f834 */ static const struct ScriptCommand s_gs4_g11_s1_lives0_dlg0[] = { /* 0x818f840 */ @@ -1500,16 +1500,16 @@ static const struct ScriptCommand s_gs4_g12_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(4), SELECT_ENTITIES(-1, -1), CANCEL_LIVES(0, 0), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), SELECT_LIVES(0, 0), - { 0xaf, 0x01, 0x000d, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_DUMMY, TRUE), RET, }; -static const struct ScriptRef s_gs4_g12_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs4_g12_s0_station_sref_script }; /* 0x818fbe0 */ +static const struct ScriptRef s_gs4_g12_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs4_g12_s0_station_sref_script }; /* 0x818fbe0 */ static const struct ScriptCommand s_gs4_g12_s0_eff0_script[] = { /* 0x818fbec */ DEBUGINFO_O(1515), @@ -1544,7 +1544,7 @@ static const struct ScriptCommand s_gs4_g12_s0_lives0_dlg0[] = { /* 0x818fcdc */ AWAIT_CUE(5), ALERT_CUE(6), WALK_GRID(256, 12), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), PORTRAIT(PLACEMENT_RIGHT, 0x0001, 0x00000000), MSG_VAR(2, PARTNER_TALK_KIND, 1), @@ -1553,18 +1553,18 @@ static const struct ScriptCommand s_gs4_g12_s0_lives0_dlg0[] = { /* 0x818fcdc */ TEXTBOX_CLEAR, ALERT_CUE(6), AWAIT_CUE(5), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" Take a look at this!\nSee this Bulletin Board?")), VARIANT_DEFAULT(_(" See?\nHave a look at this Bulletin Board.")), TEXTBOX_CLEAR, WAIT(10), - { 0x8b, 0x14, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 20), MSG_NPC(1, _(" It lists rescue jobs.\nCheck it out?")), TEXTBOX_CLEAR, SPECIAL_TEXT(SPECIAL_TEXT_BULLETIN_BOARD_JOBS, 0, 0), ALERT_CUE(6), - ROTATE(4, 10, DIRECTION_NORTHEAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTHEAST), AWAIT_CUE(5), MSG_VAR(2, PARTNER_TALK_KIND, 1), VARIANT(/* == */ 1, _(" See?\nThere were jobs listed, right?")), @@ -1613,15 +1613,15 @@ static const struct ScriptCommand s_gs4_g12_s0_lives1_dlg0[] = { /* 0x81909bc */ AWAIT_CUE(6), WALK_GRID(256, 13), WAIT(20), - { 0x8e, 0x14, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(20, DIR_TRANS_NONE, 0), ALERT_CUE(5), AWAIT_CUE(6), WAIT(20), - { 0x8b, 0x14, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 20), ALERT_CUE(5), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, - { 0xe5, 0x00, 0x0005, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), + CMD_UNK_E5(5, 0), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -1638,7 +1638,7 @@ static const struct ScriptCommand s_gs4_g12_s0_lives2_dlg0[] = { /* 0x8190aec */ WAIT(60), { 0x68, 0x00, 0x0100, 0x00000018, 0x00000000, NULL }, WAIT(15), - ROTATE(30, 10, DIRECTION_WEST), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_WEST), WAIT(15), WALK_DIRECT(120, 14), WAIT(15), @@ -1657,7 +1657,7 @@ static const struct ScriptCommand s_gs4_g12_s0_lives3_dlg0[] = { /* 0x8190bec */ WAIT(160), WALK_DIRECT(120, 15), WAIT(15), - ROTATE(30, 10, DIRECTION_SOUTH), + ROTATE_TO(30, DIR_TRANS_10, DIRECTION_SOUTH), WAIT(15), { 0x68, 0x00, 0x0100, 0x00000008, 0x00000000, NULL }, WAIT(15), @@ -1670,7 +1670,7 @@ static const struct ScriptCommand s_gs4_g13_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g13_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g13_s0_station_sref_script }; /* 0x8190d0c */ +static const struct ScriptRef s_gs4_g13_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g13_s0_station_sref_script }; /* 0x8190d0c */ static const struct ScriptCommand s_gs4_g14_s0_station_sref_script[] = { /* 0x8190d18 */ DEBUGINFO_O(1676), @@ -1678,14 +1678,14 @@ static const struct ScriptCommand s_gs4_g14_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g14_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g14_s0_station_sref_script }; /* 0x8190d48 */ +static const struct ScriptRef s_gs4_g14_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g14_s0_station_sref_script }; /* 0x8190d48 */ static const struct ScriptCommand s_gs4_g15_s0_station_sref_script[] = { /* 0x8190d54 */ DEBUGINFO_O(1684), RET_DIRECT, }; -static const struct ScriptRef s_gs4_g15_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g15_s0_station_sref_script }; /* 0x8190d74 */ +static const struct ScriptRef s_gs4_g15_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g15_s0_station_sref_script }; /* 0x8190d74 */ static const struct ScriptCommand s_gs4_g16_s0_station_sref_script[] = { /* 0x8190d80 */ DEBUGINFO_O(1691), @@ -1693,7 +1693,7 @@ static const struct ScriptCommand s_gs4_g16_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g16_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g16_s0_station_sref_script }; /* 0x8190db0 */ +static const struct ScriptRef s_gs4_g16_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g16_s0_station_sref_script }; /* 0x8190db0 */ static const struct ScriptCommand s_gs4_g16_s0_lives0_dlg2[] = { /* 0x8190dbc */ DEBUGINFO_O(1699), @@ -1737,7 +1737,7 @@ static const struct ScriptCommand s_gs4_g16_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g16_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g16_s1_station_sref_script }; /* 0x8190fc0 */ +static const struct ScriptRef s_gs4_g16_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g16_s1_station_sref_script }; /* 0x8190fc0 */ static const struct ScriptCommand s_gs4_g16_s1_lives0_dlg0[] = { /* 0x8190fcc */ DEBUGINFO_O(1743), @@ -1776,10 +1776,10 @@ static const struct ScriptCommand s_gs4_g16_s1_lives1_dlg0[] = { /* 0x8191244 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), ALERT_CUE(5), HALT, @@ -1796,10 +1796,10 @@ static const struct ScriptCommand s_gs4_g16_s1_lives2_dlg0[] = { /* 0x8191324 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), HALT, }; @@ -1816,7 +1816,7 @@ static const struct ScriptCommand s_gs4_g17_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g17_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g17_s0_station_sref_script }; /* 0x8191424 */ +static const struct ScriptRef s_gs4_g17_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g17_s0_station_sref_script }; /* 0x8191424 */ static const struct ScriptCommand s_gs4_g17_s0_lives0_dlg0[] = { /* 0x8191430 */ DEBUGINFO_O(1822), @@ -1850,7 +1850,7 @@ static const struct ScriptCommand s_gs4_g17_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g17_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g17_s1_station_sref_script }; /* 0x8191540 */ +static const struct ScriptRef s_gs4_g17_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g17_s1_station_sref_script }; /* 0x8191540 */ static const struct ScriptCommand s_gs4_g17_s1_lives0_dlg0[] = { /* 0x819154c */ DEBUGINFO_O(1856), @@ -1889,10 +1889,10 @@ static const struct ScriptCommand s_gs4_g17_s1_lives1_dlg0[] = { /* 0x819171c */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), ALERT_CUE(5), HALT, @@ -1909,10 +1909,10 @@ static const struct ScriptCommand s_gs4_g17_s1_lives2_dlg0[] = { /* 0x81917fc */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), HALT, }; @@ -1935,7 +1935,7 @@ static const struct ScriptCommand s_gs4_g18_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g18_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g18_s0_station_sref_script }; /* 0x819195c */ +static const struct ScriptRef s_gs4_g18_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g18_s0_station_sref_script }; /* 0x819195c */ static const struct ScriptCommand s_gs4_g18_s0_lives0_dlg2[] = { /* 0x8191968 */ DEBUGINFO_O(1941), @@ -1945,7 +1945,7 @@ static const struct ScriptCommand s_gs4_g18_s0_lives0_dlg2[] = { /* 0x8191968 */ { 0x2d, 0x09, 0x0003, 0x00000044, 0x00000000, NULL }, WAIT(1), MSG_NPC(3, _(" ............Papa said they've\ngone to sea before...")), - { 0x34, 0x00, 0x0003, 0x00000000, 0x00000000, _(" .........(Does that mean Papa\ncan swim...?)") }, + MSG_NPC(3, _(" .........(Does that mean Papa\ncan swim...?)")), ALERT_CUE(6), AWAIT_CUE(5), ASK3( TRUE, /*default*/ -1, /* speaker */ 3, _(" {NAME_0}.{WAIT_PRESS}\n{NAME_0}, can you swim?")), @@ -1971,10 +1971,10 @@ static const struct ScriptCommand s_gs4_g18_s0_lives0_dlg3[] = { /* 0x8191c7c */ { 0x2d, 0x09, 0x0003, 0x00000000, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x8e, 0x0a, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(10, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), HALT, }; @@ -2009,7 +2009,7 @@ static const struct ScriptCommand s_gs4_g19_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g19_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g19_s0_station_sref_script }; /* 0x81921d0 */ +static const struct ScriptRef s_gs4_g19_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g19_s0_station_sref_script }; /* 0x81921d0 */ static const struct ScriptCommand s_gs4_g19_s0_lives0_dlg0[] = { /* 0x81921dc */ DEBUGINFO_O(2015), @@ -2043,7 +2043,7 @@ static const struct ScriptCommand s_gs4_g19_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g19_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g19_s1_station_sref_script }; /* 0x81922ec */ +static const struct ScriptRef s_gs4_g19_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g19_s1_station_sref_script }; /* 0x81922ec */ static const struct ScriptCommand s_gs4_g19_s1_lives0_dlg0[] = { /* 0x81922f8 */ DEBUGINFO_O(2049), @@ -2081,10 +2081,10 @@ static const struct ScriptCommand s_gs4_g19_s1_lives1_dlg0[] = { /* 0x8192548 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 1, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), ALERT_CUE(5), RET, @@ -2101,10 +2101,10 @@ static const struct ScriptCommand s_gs4_g19_s1_lives2_dlg0[] = { /* 0x8192628 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), RET, }; @@ -2122,7 +2122,7 @@ static const struct ScriptCommand s_gs4_g20_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g20_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g20_s0_station_sref_script }; /* 0x8192738 */ +static const struct ScriptRef s_gs4_g20_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g20_s0_station_sref_script }; /* 0x8192738 */ static const struct ScriptCommand s_gs4_g20_s0_lives0_dlg0[] = { /* 0x8192744 */ DEBUGINFO_O(2128), @@ -2142,10 +2142,10 @@ static const struct ScriptCommand s_gs4_g20_s0_lives1_dlg0[] = { /* 0x81927b4 */ SELECT_ANIMATION(2), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 2, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), SELECT_ANIMATION(4), HALT, }; @@ -2173,7 +2173,7 @@ static const struct ScriptCommand s_gs4_g20_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g20_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g20_s1_station_sref_script }; /* 0x8192934 */ +static const struct ScriptRef s_gs4_g20_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g20_s1_station_sref_script }; /* 0x8192934 */ static const struct ScriptCommand s_gs4_g20_s1_eff0_script[] = { /* 0x8192940 */ DEBUGINFO_O(2179), @@ -2214,7 +2214,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives1_dlg0[] = { /* 0x81929a0 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), @@ -2222,7 +2222,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives1_dlg0[] = { /* 0x81929a0 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), @@ -2230,14 +2230,14 @@ static const struct ScriptCommand s_gs4_g20_s1_lives1_dlg0[] = { /* 0x81929a0 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, PORTRAIT(PLACEMENT_RIGHT, 0x0002, 0x00000000), ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_AUTO_PRESS(30, 30), PORTRAIT(PLACEMENT_LEFT_FLIP, 0x0002, 0x00000000), MSG_NPC(2, _(" Hah!")), @@ -2266,15 +2266,15 @@ static const struct ScriptCommand s_gs4_g20_s1_lives2_dlg0[] = { /* 0x8192fa8 */ DEBUGINFO_O(2266), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -2287,7 +2287,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), { 0x54, 0x00, 0x0400, 0x00000000, 0x00000000, NULL }, @@ -2296,7 +2296,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, -0x0050, 0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2309,7 +2309,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, 0x0050, -0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2322,7 +2322,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, -0x0030, 0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2335,7 +2335,7 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, 0x0030, -0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2345,10 +2345,10 @@ static const struct ScriptCommand s_gs4_g20_s1_lives3_dlg0[] = { /* 0x8193098 */ ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(2), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), { 0x57, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, RET, }; @@ -2365,18 +2365,18 @@ static const struct ScriptCommand s_gs4_g20_s1_lives4_dlg0[] = { /* 0x8193528 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), ALERT_CUE(5), RET, HALT, @@ -2395,7 +2395,7 @@ static const struct ScriptCommand s_gs4_g21_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g21_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g21_s0_station_sref_script }; /* 0x81936d8 */ +static const struct ScriptRef s_gs4_g21_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g21_s0_station_sref_script }; /* 0x81936d8 */ static const struct ScriptCommand s_gs4_g21_s0_lives0_dlg0[] = { /* 0x81936e4 */ DEBUGINFO_O(2401), @@ -2430,7 +2430,7 @@ static const struct ScriptCommand s_gs4_g21_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g21_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g21_s1_station_sref_script }; /* 0x8193804 */ +static const struct ScriptRef s_gs4_g21_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g21_s1_station_sref_script }; /* 0x8193804 */ static const struct ScriptCommand s_gs4_g21_s1_eff0_script[] = { /* 0x8193810 */ DEBUGINFO_O(2436), @@ -2473,7 +2473,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives0_dlg0[] = { /* 0x8193870 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), @@ -2482,7 +2482,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives0_dlg0[] = { /* 0x8193870 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), @@ -2490,13 +2490,13 @@ static const struct ScriptCommand s_gs4_g21_s1_lives0_dlg0[] = { /* 0x8193870 */ MSG_NPC(2, _(" Hah!")), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_CLEAR, ALERT_CUE(7), AWAIT_CUE(5), ALERT_CUE(6), ALERT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), TEXTBOX_AUTO_PRESS(30, 30), PORTRAIT(PLACEMENT_RIGHT_FLIP, 0x0002, 0x00000000), MSG_NPC(2, _(" Hah!")), @@ -2524,15 +2524,15 @@ static const struct ScriptCommand s_gs4_g21_s1_lives1_dlg0[] = { /* 0x8193edc */ DEBUGINFO_O(2524), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -2545,7 +2545,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), { 0x54, 0x00, 0x0400, 0x00000000, 0x00000000, NULL }, @@ -2554,7 +2554,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, -0x0050, 0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0004, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_NORTH, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2567,7 +2567,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, 0x0050, -0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_WEST, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2580,7 +2580,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, -0x0030, 0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2593,7 +2593,7 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ STOP_ANIMATION_ON_CURRENT_FRAME, { 0x52, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, { 0x59, 0x01, 0x0030, -0x00000030, 0x00000000, NULL }, - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), FANFARE_PLAY2(454), { 0x53, 0x00, 0x0000, 0x00400000, 0x00000000, NULL }, SELECT_ANIMATION(22), @@ -2603,10 +2603,10 @@ static const struct ScriptCommand s_gs4_g21_s1_lives2_dlg0[] = { /* 0x8193fcc */ ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(2), - ROTATE(8, 10, DIRECTION_SOUTH), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), { 0x57, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, RET, }; @@ -2623,18 +2623,18 @@ static const struct ScriptCommand s_gs4_g21_s1_lives3_dlg0[] = { /* 0x819445c */ { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - ROTATE(4, 10, DIRECTION_NORTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_NORTH), ALERT_CUE(5), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x93, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 66), AWAIT_CUE(8), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), ALERT_CUE(5), RET, }; @@ -2657,7 +2657,7 @@ static const struct ScriptCommand s_gs4_g22_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g22_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g22_s0_station_sref_script }; /* 0x819464c */ +static const struct ScriptRef s_gs4_g22_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g22_s0_station_sref_script }; /* 0x819464c */ static const struct ScriptCommand s_gs4_g22_s0_lives0_dlg0[] = { /* 0x8194658 */ DEBUGINFO_O(2663), @@ -2686,7 +2686,7 @@ static const struct ScriptCommand s_gs4_g22_s1_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g22_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs4_g22_s1_station_sref_script }; /* 0x8194748 */ +static const struct ScriptRef s_gs4_g22_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs4_g22_s1_station_sref_script }; /* 0x8194748 */ static const struct ScriptCommand s_gs4_g22_s1_eff0_script[] = { /* 0x8194754 */ DEBUGINFO_O(2692), @@ -2748,7 +2748,7 @@ static const struct ScriptCommand s_gs4_g22_s1_lives1_dlg0[] = { /* 0x8194c3c */ DEBUGINFO_O(2748), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(1, DIR_TRANS_NONE, 0), AWAIT_CUE(6), { 0x52, 0x00, 0x0000, 0x00001000, 0x00000000, NULL }, RET, @@ -2760,7 +2760,7 @@ static const struct ScriptCommand s_gs4_g22_s1_lives2_dlg0[] = { /* 0x8194cac */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(7), - ROTATE(4, 10, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_SOUTH), ALERT_CUE(5), AWAIT_CUE(7), SELECT_ANIMATION(23), @@ -2776,7 +2776,7 @@ static const struct ScriptCommand s_gs4_g22_s1_lives3_dlg0[] = { /* 0x8194d7c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0003, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(8), - { 0x8e, 0x04, 0x000a, 0x00000042, 0x00000000, NULL }, + CMD_UNK_8E(4, DIR_TRANS_10, 66), ALERT_CUE(5), AWAIT_CUE(8), CALL_SCRIPT(LOOK_AROUND_FUNC), @@ -2784,7 +2784,7 @@ static const struct ScriptCommand s_gs4_g22_s1_lives3_dlg0[] = { /* 0x8194d7c */ FANFARE_PLAY2(469), CALL_SCRIPT(QUESTION_FUNC), WAIT(10), - ROTATE(4, 10, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_10, DIRECTION_EAST), ALERT_CUE(5), HALT, }; @@ -2815,7 +2815,7 @@ static const struct ScriptCommand s_gs4_g23_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g23_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g23_s0_station_sref_script }; /* 0x8194f60 */ +static const struct ScriptRef s_gs4_g23_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g23_s0_station_sref_script }; /* 0x8194f60 */ static const struct ScriptCommand s_gs4_g23_s0_lives0_dlg1[] = { /* 0x8194f6c */ DEBUGINFO_O(2821), @@ -2857,7 +2857,7 @@ static const struct ScriptCommand s_gs4_g24_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g24_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g24_s0_station_sref_script }; /* 0x8195270 */ +static const struct ScriptRef s_gs4_g24_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g24_s0_station_sref_script }; /* 0x8195270 */ static const struct ScriptCommand s_gs4_g24_s0_lives0_dlg0[] = { /* 0x819527c */ DEBUGINFO_O(2863), @@ -2920,7 +2920,7 @@ static const struct ScriptCommand s_gs4_g25_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g25_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g25_s0_station_sref_script }; /* 0x8195704 */ +static const struct ScriptRef s_gs4_g25_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g25_s0_station_sref_script }; /* 0x8195704 */ static const struct ScriptCommand s_gs4_g25_s0_lives0_dlg0[] = { /* 0x8195710 */ DEBUGINFO_O(2926), @@ -2982,7 +2982,7 @@ static const struct ScriptCommand s_gs4_g26_s0_station_sref_script[] = { /* 0x81 RET, }; -static const struct ScriptRef s_gs4_g26_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g26_s0_station_sref_script }; /* 0x8195a10 */ +static const struct ScriptRef s_gs4_g26_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g26_s0_station_sref_script }; /* 0x8195a10 */ static const struct ScriptCommand s_gs4_g26_s0_lives0_dlg0[] = { /* 0x8195a1c */ DEBUGINFO_O(2988), @@ -3041,14 +3041,14 @@ static const struct ScriptCommand s_gs4_g27_s0_station_sref_script[] = { /* 0x81 DEBUGINFO_O(3041), SELECT_MAP(4), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(41), + BGM_SWITCH(MUS_AFTERMATH), { 0x22, 0x01, 0x002d, 0x00000000, 0x00000000, NULL }, WAIT(240), { 0x23, 0x01, 0x002d, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs4_g27_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g27_s0_station_sref_script }; /* 0x8195d7c */ +static const struct ScriptRef s_gs4_g27_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g27_s0_station_sref_script }; /* 0x8195d7c */ static const struct ScriptCommand s_gs4_g27_s0_eff0_script[] = { /* 0x8195d88 */ DEBUGINFO_O(3054), @@ -3063,11 +3063,11 @@ static const struct ScriptCommand s_gs4_g28_s0_station_sref_script[] = { /* 0x81 RET_DIRECT, }; -static const struct ScriptRef s_gs4_g28_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs4_g28_s0_station_sref_script }; /* 0x8195df8 */ +static const struct ScriptRef s_gs4_g28_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs4_g28_s0_station_sref_script }; /* 0x8195df8 */ static const struct ScriptCommand s_gs4_g28_s0_lives0_dlg1[] = { /* 0x8195e04 */ DEBUGINFO_O(3069), - { 0x8b, 0x00, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 0), { 0x53, 0x00, 0x0000, 0x00000200, 0x00000000, NULL }, SELECT_ANIMATION(1), RET, @@ -3078,7 +3078,7 @@ static const struct ScriptCommand s_gs4_g28_s0_lives0_dlg2[] = { /* 0x8195e54 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0000, 0x00000000, 0x00000000, NULL }, WAIT(1), - { 0x34, 0x00, 0x0001, 0x00000000, 0x00000000, _(" (Everything returned to\npeace...)") }, + MSG_NPC(1, _(" (Everything returned to\npeace...)")), ALERT_CUE(6), AWAIT_CUE(5), MSG_NPC(1, _(" But Papa still hasn't come\nback...")), @@ -3098,7 +3098,7 @@ static const struct ScriptCommand s_gs4_g28_s0_lives0_dlg3[] = { /* 0x819609c */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - { 0x93, 0x04, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_93(4, DIR_TRANS_10, 0), ALERT_CUE(5), AWAIT_CUE(6), CALL_SCRIPT(NOTICE_FUNC), @@ -3150,14 +3150,14 @@ static const struct ScriptCommand s_gs4_g29_s0_station_sref_script[] = { /* 0x81 SELECT_MAP(4), CANCEL_ENTITIES(0, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(40), + BGM_SWITCH(MUS_INTRO), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs4_g29_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs4_g29_s0_station_sref_script }; /* 0x81964c8 */ +static const struct ScriptRef s_gs4_g29_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs4_g29_s0_station_sref_script }; /* 0x81964c8 */ static const struct ScriptCommand s_gs4_g29_s0_lives0_dlg0[] = { /* 0x81964d4 */ DEBUGINFO_O(3163), @@ -3951,4 +3951,4 @@ static const struct GroundLink s_gs4_links[] = { /* 0x8197968 */ /* link 19 */ { { /*x*/ 74, /*y*/ 12, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs4 = { LPARRAY(s_gs4_groups), s_gs4_links }; /* 0x8197a08 */ +const GroundScriptHeader gGroundScript_gs4 = { LPARRAY(s_gs4_groups), s_gs4_links }; /* 0x8197a08 */ diff --git a/src/data/ground/ground_data_t01p04_station.h b/src/data/ground/ground_data_t01p04_station.h index 139324016..566ec0fa2 100644 --- a/src/data/ground/ground_data_t01p04_station.h +++ b/src/data/ground/ground_data_t01p04_station.h @@ -21,10 +21,10 @@ static const struct ScriptCommand s_gs5_g0_s0_station_sref_script[] = { /* 0x819 JUMP_LABEL(1), LABEL(1), /* = 0x01 */ CJUMP_VAR(START_MODE), - COND_EQUAL(12, /* to label */ 2), - COND_EQUAL(11, /* to label */ 2), - COND_EQUAL(10, /* to label */ 3), - COND_EQUAL(9, /* to label */ 4), + COND_EQUAL(STARTMODE_DUNGEON_LOST, /* to label */ 2), + COND_EQUAL(STARTMODE_11, /* to label */ 2), + COND_EQUAL(STARTMODE_10, /* to label */ 3), + COND_EQUAL(STARTMODE_DUNGEON_WON, /* to label */ 4), SELECT_LIVES(0, 1), JUMP_LABEL(6), LABEL(2), /* = 0x02 */ @@ -41,11 +41,11 @@ static const struct ScriptCommand s_gs5_g0_s0_station_sref_script[] = { /* 0x819 RET, LABEL(6), /* = 0x06 */ SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs5_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs5_g0_s0_station_sref_script }; /* 0x8197c28 */ +static const struct ScriptRef s_gs5_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs5_g0_s0_station_sref_script }; /* 0x8197c28 */ static const struct ScriptCommand s_gs5_g0_s0_evt0_sref_script[] = { /* 0x8197c34 */ @@ -54,7 +54,7 @@ static const struct ScriptCommand s_gs5_g0_s0_evt0_sref_script[] = { /* 0x8197c3 HALT, }; -static const struct ScriptRef s_gs5_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs5_g0_s0_evt0_sref_script }; /* 0x8197c64 */ +static const struct ScriptRef s_gs5_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs5_g0_s0_evt0_sref_script }; /* 0x8197c64 */ static const struct ScriptCommand s_gs5_g0_s1_lives0_dlg0[] = { /* 0x8197c70 */ DEBUGINFO_O(60), @@ -79,7 +79,7 @@ static const struct ScriptCommand s_gs5_g1_s0_station_sref_script[] = { /* 0x819 RET_DIRECT, }; -static const struct ScriptRef s_gs5_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs5_g1_s0_station_sref_script }; /* 0x8197d50 */ +static const struct ScriptRef s_gs5_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs5_g1_s0_station_sref_script }; /* 0x8197d50 */ static const struct ScriptCommand s_gs5_g1_s0_lives0_dlg2[] = { /* 0x8197d5c */ DEBUGINFO_O(85), @@ -128,7 +128,7 @@ static const struct ScriptCommand s_gs5_g2_s0_station_sref_script[] = { /* 0x819 CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -136,7 +136,7 @@ static const struct ScriptCommand s_gs5_g2_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs5_g2_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs5_g2_s0_station_sref_script }; /* 0x8197fdc */ +static const struct ScriptRef s_gs5_g2_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs5_g2_s0_station_sref_script }; /* 0x8197fdc */ static const struct ScriptCommand s_gs5_g2_s0_lives0_dlg0[] = { /* 0x8197fe8 */ DEBUGINFO_O(142), @@ -178,7 +178,7 @@ static const struct ScriptCommand s_gs5_g3_s0_station_sref_script[] = { /* 0x819 CALL_SCRIPT(DISMISSAL_SALLY_MEMBER2_FUNC), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -186,7 +186,7 @@ static const struct ScriptCommand s_gs5_g3_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs5_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs5_g3_s0_station_sref_script }; /* 0x8198228 */ +static const struct ScriptRef s_gs5_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs5_g3_s0_station_sref_script }; /* 0x8198228 */ static const struct ScriptCommand s_gs5_g3_s0_lives0_dlg0[] = { /* 0x8198234 */ DEBUGINFO_O(192), @@ -231,7 +231,7 @@ static const struct ScriptCommand s_gs5_g4_s0_station_sref_script[] = { /* 0x819 CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -239,7 +239,7 @@ static const struct ScriptCommand s_gs5_g4_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs5_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs5_g4_s0_station_sref_script }; /* 0x81985ec */ +static const struct ScriptRef s_gs5_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs5_g4_s0_station_sref_script }; /* 0x81985ec */ static const struct ScriptCommand s_gs5_g4_s0_lives0_dlg0[] = { /* 0x81985f8 */ DEBUGINFO_O(245), @@ -282,14 +282,14 @@ static const struct ScriptCommand s_gs5_g5_s0_station_sref_script[] = { /* 0x819 DEBUGINFO_O(282), SELECT_MAP(5), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(40), + BGM_SWITCH(MUS_INTRO), { 0x22, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, RET, }; -static const struct ScriptRef s_gs5_g5_s0_station_sref = { 400, 7, NULL /* EVENT_CONTROL */, s_gs5_g5_s0_station_sref_script }; /* 0x8198868 */ +static const struct ScriptRef s_gs5_g5_s0_station_sref = { EVENT_CONTROL, 7, NULL, s_gs5_g5_s0_station_sref_script }; /* 0x8198868 */ static const struct ScriptCommand s_gs5_g5_s0_eff0_script[] = { /* 0x8198874 */ DEBUGINFO_O(295), @@ -317,7 +317,7 @@ static const struct ScriptCommand s_gs5_g5_s0_lives0_dlg0[] = { /* 0x81988f4 */ ALERT_CUE(4), { 0x53, 0x00, 0x0000, 0x01000000, 0x00000000, NULL }, { 0x80, 0x00, 0x0080, 0x00000002, 0x00000000, NULL }, - ROTATE(8, 10, DIRECTION_EAST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_EAST), { 0x80, 0x00, 0x0100, 0x00000003, 0x00000000, NULL }, ALERT_CUE(3), { 0x80, 0x00, 0x0100, 0x00000004, 0x00000000, NULL }, @@ -329,7 +329,7 @@ static const struct ScriptCommand s_gs5_g5_s0_lives1_dlg0[] = { /* 0x8198a24 */ SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(6), - ROTATE(8, 10, DIRECTION_WEST), + ROTATE_TO(8, DIR_TRANS_10, DIRECTION_WEST), HALT, }; @@ -471,4 +471,4 @@ static const struct GroundLink s_gs5_links[] = { /* 0x8198ddc */ /* link 5 */ { { /*x*/ 31, /*y*/ 37, /*flags*/ 0, CPOS_HALFTILE }, /*w*/ 1, /*h*/ 1, /*ret*/ 2, /*?*/ 1 }, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs5 = { LPARRAY(s_gs5_groups), s_gs5_links }; /* 0x8198e0c */ +const GroundScriptHeader gGroundScript_gs5 = { LPARRAY(s_gs5_groups), s_gs5_links }; /* 0x8198e0c */ diff --git a/src/data/ground/ground_data_t01p05_station.h b/src/data/ground/ground_data_t01p05_station.h index 91d1a0794..c46ba214b 100644 --- a/src/data/ground/ground_data_t01p05_station.h +++ b/src/data/ground/ground_data_t01p05_station.h @@ -15,10 +15,10 @@ static const struct ScriptCommand s_gs6_g0_s0_station_sref_script[] = { /* 0x819 JUMP_LABEL(1), LABEL(1), /* = 0x01 */ CJUMP_VAR(START_MODE), - COND_EQUAL(12, /* to label */ 2), - COND_EQUAL(11, /* to label */ 2), - COND_EQUAL(10, /* to label */ 3), - COND_EQUAL(9, /* to label */ 4), + COND_EQUAL(STARTMODE_DUNGEON_LOST, /* to label */ 2), + COND_EQUAL(STARTMODE_11, /* to label */ 2), + COND_EQUAL(STARTMODE_10, /* to label */ 3), + COND_EQUAL(STARTMODE_DUNGEON_WON, /* to label */ 4), CJUMP_VAR(GROUND_GETOUT), COND_EQUAL(1, /* to label */ 5), COND_EQUAL(7, /* to label */ 6), @@ -47,11 +47,11 @@ static const struct ScriptCommand s_gs6_g0_s0_station_sref_script[] = { /* 0x819 RET, LABEL(7), /* = 0x07 */ SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs6_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs6_g0_s0_station_sref_script }; /* 0x81990ec */ +static const struct ScriptRef s_gs6_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs6_g0_s0_station_sref_script }; /* 0x81990ec */ static const struct ScriptCommand s_gs6_g0_s0_evt0_sref_script[] = { /* 0x81990f8 */ DEBUGINFO_O(57), @@ -59,7 +59,7 @@ static const struct ScriptCommand s_gs6_g0_s0_evt0_sref_script[] = { /* 0x81990f HALT, }; -static const struct ScriptRef s_gs6_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs6_g0_s0_evt0_sref_script }; /* 0x8199128 */ +static const struct ScriptRef s_gs6_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs6_g0_s0_evt0_sref_script }; /* 0x8199128 */ static const struct ScriptCommand s_gs6_g0_s1_lives0_dlg0[] = { /* 0x8199134 */ DEBUGINFO_O(65), @@ -105,12 +105,12 @@ static const struct ScriptCommand s_gs6_g0_s3_evt0_sref_script[] = { /* 0x819923 RET, }; -static const struct ScriptRef s_gs6_g0_s3_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs6_g0_s3_evt0_sref_script }; /* 0x8199304 */ +static const struct ScriptRef s_gs6_g0_s3_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs6_g0_s3_evt0_sref_script }; /* 0x8199304 */ static const struct ScriptCommand s_gs6_g1_s0_station_sref_script[] = { /* 0x8199310 */ DEBUGINFO_O(112), - JUMPIF_SCENARIOCHECK(10, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_UNK10, /* to label */ 0), CANCEL_EVENTS(-1, -1), SELECT_ENTITIES(-1, 1), RET_DIRECT, @@ -120,7 +120,7 @@ static const struct ScriptCommand s_gs6_g1_s0_station_sref_script[] = { /* 0x819 RET_DIRECT, }; -static const struct ScriptRef s_gs6_g1_s0_station_sref = { 403, 8, NULL /* STATION_CONTROL */, s_gs6_g1_s0_station_sref_script }; /* 0x81993a0 */ +static const struct ScriptRef s_gs6_g1_s0_station_sref = { STATION_CONTROL , 8, NULL, s_gs6_g1_s0_station_sref_script }; /* 0x81993a0 */ static const struct ScriptCommand s_gs6_g1_s0_lives0_dlg1[] = { /* 0x81993ac */ DEBUGINFO_O(126), @@ -144,10 +144,10 @@ static const struct ScriptCommand s_gs6_g1_s0_lives0_dlg2[] = { /* 0x81993dc */ static const struct ScriptCommand s_gs6_g1_s0_lives0_dlg3[] = { /* 0x819947c */ DEBUGINFO_O(145), CALL_SCRIPT(INIT_PLAZA_SLEEP_TALK_FUNC), - JUMPIF_SCENARIOCHECK(4, /* to label */ 0), - { 0x8e, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + JUMPIF_SCENARIOCHECK(QUEST_SQUARE_ASLEEP, /* to label */ 0), + CMD_UNK_8E(0, DIR_TRANS_NONE, 0), LABEL(0), /* = 0x00 */ - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), JUMP_SCRIPT(LIVES_REPLY), }; @@ -157,7 +157,7 @@ static const struct ScriptCommand s_gs6_g1_s0_evt0_sref_script[] = { /* 0x81994e HALT, }; -static const struct ScriptRef s_gs6_g1_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs6_g1_s0_evt0_sref_script }; /* 0x819951c */ +static const struct ScriptRef s_gs6_g1_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs6_g1_s0_evt0_sref_script }; /* 0x819951c */ static const struct ScriptCommand s_gs6_g1_s1_evt0_sref_script[] = { /* 0x8199528 */ DEBUGINFO_O(163), @@ -170,14 +170,14 @@ static const struct ScriptCommand s_gs6_g1_s1_evt0_sref_script[] = { /* 0x819952 JUMP_SCRIPT(END_TALK), }; -static const struct ScriptRef s_gs6_g1_s1_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs6_g1_s1_evt0_sref_script }; /* 0x8199640 */ +static const struct ScriptRef s_gs6_g1_s1_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs6_g1_s1_evt0_sref_script }; /* 0x8199640 */ static const struct ScriptCommand s_gs6_g2_s0_station_sref_script[] = { /* 0x819964c */ DEBUGINFO_O(176), SELECT_MAP(6), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -185,7 +185,7 @@ static const struct ScriptCommand s_gs6_g2_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs6_g2_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs6_g2_s0_station_sref_script }; /* 0x81996ec */ +static const struct ScriptRef s_gs6_g2_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs6_g2_s0_station_sref_script }; /* 0x81996ec */ static const struct ScriptCommand s_gs6_g2_s0_lives0_dlg0[] = { /* 0x81996f8 */ DEBUGINFO_O(191), @@ -231,7 +231,7 @@ static const struct ScriptCommand s_gs6_g2_s0_lives2_dlg0[] = { /* 0x81998c8 */ { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(INIT_PLAZA_SLEEP_TALK_FUNC), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(0, DIR_TRANS_NONE, 0), AWAIT_CUE(3), RET, }; @@ -241,7 +241,7 @@ static const struct ScriptCommand s_gs6_g3_s0_station_sref_script[] = { /* 0x819 SELECT_MAP(6), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -249,7 +249,7 @@ static const struct ScriptCommand s_gs6_g3_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs6_g3_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs6_g3_s0_station_sref_script }; /* 0x81999d8 */ +static const struct ScriptRef s_gs6_g3_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs6_g3_s0_station_sref_script }; /* 0x81999d8 */ static const struct ScriptCommand s_gs6_g3_s0_lives0_dlg0[] = { /* 0x81999e4 */ DEBUGINFO_O(255), @@ -281,7 +281,7 @@ static const struct ScriptCommand s_gs6_g3_s0_lives2_dlg0[] = { /* 0x8199b14 */ { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(INIT_PLAZA_SLEEP_TALK_FUNC), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(0, DIR_TRANS_NONE, 0), AWAIT_CUE(3), RET, }; @@ -291,7 +291,7 @@ static const struct ScriptCommand s_gs6_g4_s0_station_sref_script[] = { /* 0x819 SELECT_MAP(6), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -299,7 +299,7 @@ static const struct ScriptCommand s_gs6_g4_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs6_g4_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs6_g4_s0_station_sref_script }; /* 0x8199c24 */ +static const struct ScriptRef s_gs6_g4_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs6_g4_s0_station_sref_script }; /* 0x8199c24 */ static const struct ScriptCommand s_gs6_g4_s0_lives0_dlg0[] = { /* 0x8199c30 */ DEBUGINFO_O(305), @@ -331,7 +331,7 @@ static const struct ScriptCommand s_gs6_g4_s0_lives2_dlg0[] = { /* 0x8199d60 */ { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(INIT_PLAZA_SLEEP_TALK_FUNC), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(0, DIR_TRANS_NONE, 0), AWAIT_CUE(3), RET, }; @@ -341,7 +341,7 @@ static const struct ScriptCommand s_gs6_g5_s0_station_sref_script[] = { /* 0x819 SELECT_MAP(6), CALL_STATION( 1, 0), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(7), + BGM_SWITCH(MUS_POKEMON_SQUARE), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), CALL_STATION( 1, 0), @@ -349,7 +349,7 @@ static const struct ScriptCommand s_gs6_g5_s0_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs6_g5_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs6_g5_s0_station_sref_script }; /* 0x8199e70 */ +static const struct ScriptRef s_gs6_g5_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs6_g5_s0_station_sref_script }; /* 0x8199e70 */ static const struct ScriptCommand s_gs6_g5_s0_lives0_dlg0[] = { /* 0x8199e7c */ DEBUGINFO_O(355), @@ -381,7 +381,7 @@ static const struct ScriptCommand s_gs6_g5_s0_lives2_dlg0[] = { /* 0x8199fac */ { 0x4f, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, CALL_SCRIPT(INIT_PLAZA_SLEEP_TALK_FUNC), { 0x2d, 0x07, 0x0002, 0x00000000, 0x00000000, NULL }, - { 0x8e, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8E(0, DIR_TRANS_NONE, 0), AWAIT_CUE(3), RET, }; @@ -526,4 +526,4 @@ static const struct GroundLink s_gs6_links[] = { /* 0x819a3bc */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs6 = { LPARRAY(s_gs6_groups), s_gs6_links }; /* 0x819a3c4 */ +const GroundScriptHeader gGroundScript_gs6 = { LPARRAY(s_gs6_groups), s_gs6_links }; /* 0x819a3c4 */ diff --git a/src/data/ground/ground_data_t01p06_station.h b/src/data/ground/ground_data_t01p06_station.h index 6cfe52338..c2231788a 100644 --- a/src/data/ground/ground_data_t01p06_station.h +++ b/src/data/ground/ground_data_t01p06_station.h @@ -28,11 +28,11 @@ static const struct ScriptCommand s_gs7_g0_s0_station_sref_script[] = { /* 0x819 SELECT_LIVES(0, 1), JUMP_LABEL(4), LABEL(4), /* = 0x04 */ - BGM_SWITCH(110), + BGM_SWITCH(MUS_MAKUHITA_DOJO), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs7_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs7_g0_s0_station_sref_script }; /* 0x819a574 */ +static const struct ScriptRef s_gs7_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs7_g0_s0_station_sref_script }; /* 0x819a574 */ static const struct ScriptCommand s_gs7_g0_s0_evt0_sref_script[] = { /* 0x819a580 */ DEBUGINFO_O(38), @@ -40,7 +40,7 @@ static const struct ScriptCommand s_gs7_g0_s0_evt0_sref_script[] = { /* 0x819a58 HALT, }; -static const struct ScriptRef s_gs7_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs7_g0_s0_evt0_sref_script }; /* 0x819a5b0 */ +static const struct ScriptRef s_gs7_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs7_g0_s0_evt0_sref_script }; /* 0x819a5b0 */ static const struct ScriptCommand s_gs7_g0_s1_lives0_dlg0[] = { /* 0x819a5bc */ DEBUGINFO_O(46), @@ -96,4 +96,4 @@ static const struct GroundLink s_gs7_links[] = { /* 0x819a734 */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs7 = { LPARRAY(s_gs7_groups), s_gs7_links }; /* 0x819a73c */ +const GroundScriptHeader gGroundScript_gs7 = { LPARRAY(s_gs7_groups), s_gs7_links }; /* 0x819a73c */ diff --git a/src/data/ground/ground_data_t01p07_station.h b/src/data/ground/ground_data_t01p07_station.h index 0a9d10c40..74a1d5b7c 100644 --- a/src/data/ground/ground_data_t01p07_station.h +++ b/src/data/ground/ground_data_t01p07_station.h @@ -17,11 +17,11 @@ static const struct ScriptCommand s_gs8_g0_s0_station_sref_script[] = { /* 0x819 LABEL(1), /* = 0x01 */ JUMP_STATION( 1, 0), LABEL(2), /* = 0x02 */ - BGM_SWITCH(8), + BGM_SWITCH(MUS_FILE_SELECT), JUMP_SCRIPT(COMMON_ENTER), }; -static const struct ScriptRef s_gs8_g0_s0_station_sref = { 404, 1, NULL /* ENTER_CONTROL */, s_gs8_g0_s0_station_sref_script }; /* 0x819a83c */ +static const struct ScriptRef s_gs8_g0_s0_station_sref = { ENTER_CONTROL , 1, NULL, s_gs8_g0_s0_station_sref_script }; /* 0x819a83c */ static const struct ScriptCommand s_gs8_g0_s0_evt0_sref_script[] = { /* 0x819a848 */ @@ -30,7 +30,7 @@ static const struct ScriptCommand s_gs8_g0_s0_evt0_sref_script[] = { /* 0x819a84 HALT, }; -static const struct ScriptRef s_gs8_g0_s0_evt0_sref = { 357, 2, NULL /* GETOUT_NORMAL */, s_gs8_g0_s0_evt0_sref_script }; /* 0x819a878 */ +static const struct ScriptRef s_gs8_g0_s0_evt0_sref = { GETOUT_NORMAL, 2, NULL, s_gs8_g0_s0_evt0_sref_script }; /* 0x819a878 */ static const struct ScriptCommand s_gs8_g0_s1_lives0_dlg0[] = { /* 0x819a884 */ DEBUGINFO_O(36), @@ -50,14 +50,14 @@ static const struct ScriptCommand s_gs8_g1_s0_station_sref_script[] = { /* 0x819 DEBUGINFO_O(50), SELECT_MAP(8), SELECT_ENTITIES(-1, -1), - BGM_SWITCH(8), + BGM_SWITCH(MUS_FILE_SELECT), { 0x22, 0x01, -0x0001, 0x00000000, 0x00000000, NULL }, AWAIT_CUE(3), SELECT_EVENTS(0, 0), RET, }; -static const struct ScriptRef s_gs8_g1_s0_station_sref = { 402, 7, NULL /* EVENT_STATION */, s_gs8_g1_s0_station_sref_script }; /* 0x819a984 */ +static const struct ScriptRef s_gs8_g1_s0_station_sref = { EVENT_STATION , 7, NULL, s_gs8_g1_s0_station_sref_script }; /* 0x819a984 */ static const struct ScriptCommand s_gs8_g1_s0_eff0_script[] = { /* 0x819a990 */ DEBUGINFO_O(63), @@ -88,7 +88,7 @@ static const struct ScriptCommand s_gs8_g1_s1_station_sref_script[] = { /* 0x819 RET, }; -static const struct ScriptRef s_gs8_g1_s1_station_sref = { 401, 7, NULL /* EVENT_WAKEUP */, s_gs8_g1_s1_station_sref_script }; /* 0x819aad0 */ +static const struct ScriptRef s_gs8_g1_s1_station_sref = { EVENT_WAKEUP, 7, NULL, s_gs8_g1_s1_station_sref_script }; /* 0x819aad0 */ static const struct ScriptCommand s_gs8_g1_s1_eff0_script[] = { /* 0x819aadc */ DEBUGINFO_O(94), @@ -168,4 +168,4 @@ static const struct GroundLink s_gs8_links[] = { /* 0x819acfc */ {}, }; -/*extern*/ const struct GroundScriptHeader gGroundScript_gs8 = { LPARRAY(s_gs8_groups), s_gs8_links }; /* 0x819ad04 */ +const GroundScriptHeader gGroundScript_gs8 = { LPARRAY(s_gs8_groups), s_gs8_links }; /* 0x819ad04 */ diff --git a/src/data/ground/ground_event_data.h b/src/data/ground/ground_event_data.h index 2cbaa1fae..4a57420d4 100644 --- a/src/data/ground/ground_event_data.h +++ b/src/data/ground/ground_event_data.h @@ -51,7 +51,7 @@ static const struct ScriptCommand s_script_LIVES_REPLY_NORMAL[] = { /* 0x811efd8 DEBUGINFO_O(51), SELECT_ANIMATION(2), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, @@ -60,7 +60,7 @@ static const struct ScriptCommand s_script_LIVES_REPLY_NORMAL[] = { /* 0x811efd8 static const struct ScriptCommand s_script_LIVES_REPLY[] = { /* 0x811f048 */ DEBUGINFO_O(61), { 0x2d, 0x07, 0x0001, 0x00000000, 0x00000000, NULL }, - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), AWAIT_CUE(2), WAIT(12), RET, @@ -162,7 +162,7 @@ static const struct ScriptCommand s_script_HABITAT_MOVE1[] = { /* 0x811f7c0 */ LABEL(0), /* = 0x00 */ SELECT_ANIMATION(1), LABEL(1), /* = 0x01 */ - { 0x8a, 0x18, 0x0100, 0x00000009, 0x00000000, NULL }, + CMD_UNK_8A(24, 256, DIR_TRANS_RAND), WAIT_RANDOM(24, 48), JUMP_LABEL(1), }; @@ -177,7 +177,7 @@ static const struct ScriptCommand s_script_HABITAT_MOVE2[] = { /* 0x811f860 */ { 0x52, 0x00, 0x0000, 0x00000002, 0x00000000, NULL }, { 0x53, 0x00, 0x0000, 0x00000001, 0x00000000, NULL }, LABEL(1), /* = 0x01 */ - { 0x8a, 0x18, 0x0100, 0x00000009, 0x00000000, NULL }, + CMD_UNK_8A(24, 256, DIR_TRANS_RAND), WAIT_RANDOM(24, 48), JUMP_LABEL(1), }; @@ -186,7 +186,7 @@ static const struct ScriptCommand s_script_HABITAT_MOVE_PAUSE[] = { /* 0x811f920 DEBUGINFO_O(186), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(3), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), LABEL(0), /* = 0x00 */ WAIT(240), JUMP_LABEL(0), @@ -196,7 +196,7 @@ static const struct ScriptCommand s_script_HABITAT_MOVE_STAY_FIX[] = { /* 0x811f DEBUGINFO_O(196), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(4), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), LABEL(0), /* = 0x00 */ WAIT(240), JUMP_LABEL(0), @@ -207,7 +207,7 @@ static const struct ScriptCommand s_script_HABITAT_MOVE_STAY_TURN[] = { /* 0x811 { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(4), LABEL(0), /* = 0x00 */ - { 0x8d, 0x01, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_RAND), WAIT_RANDOM(24, 48), JUMP_LABEL(0), }; @@ -272,7 +272,7 @@ static const struct ScriptCommand s_script_MOVE_PAUSE[] = { /* 0x811fca0 */ DEBUGINFO_O(272), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(3), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), LABEL(0), /* = 0x00 */ WAIT(240), JUMP_LABEL(0), @@ -282,7 +282,7 @@ static const struct ScriptCommand s_script_MOVE_STAY[] = { /* 0x811fd10 */ DEBUGINFO_O(282), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(4), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), LABEL(0), /* = 0x00 */ WAIT(240), JUMP_LABEL(0), @@ -301,7 +301,7 @@ static const struct ScriptCommand s_script_MOVE_RANDOM[] = { /* 0x811fde0 */ DEBUGINFO_O(301), SELECT_ANIMATION(1), LABEL(0), /* = 0x00 */ - { 0x8a, 0x18, 0x0100, 0x00000008, 0x00000000, NULL }, + CMD_UNK_8A(24, 256, DIR_TRANS_RAND_CARDINAL), WAIT(48), JUMP_LABEL(0), }; @@ -310,7 +310,7 @@ static const struct ScriptCommand s_script_MOVE_BOY[] = { /* 0x811fe40 */ DEBUGINFO_O(310), SELECT_ANIMATION(1), LABEL(0), /* = 0x00 */ - { 0x8a, 0x18, 0x0100, 0x00000008, 0x00000000, NULL }, + CMD_UNK_8A(24, 256, DIR_TRANS_RAND_CARDINAL), WAIT_RANDOM(24, 48), JUMP_LABEL(0), }; @@ -319,7 +319,7 @@ static const struct ScriptCommand s_script_MOVE_GIRL[] = { /* 0x811fea0 */ DEBUGINFO_O(319), SELECT_ANIMATION(1), LABEL(0), /* = 0x00 */ - { 0x8a, 0x10, 0x0100, 0x00000008, 0x00000000, NULL }, + CMD_UNK_8A(16, 256, DIR_TRANS_RAND_CARDINAL), WAIT_RANDOM(16, 24), JUMP_LABEL(0), }; @@ -328,13 +328,13 @@ static const struct ScriptCommand s_script_WAKEUP_FUNC[] = { /* 0x811ff00 */ DEBUGINFO_O(328), JUMPIF_UNK_BE(/* to label */ 0), /* something sleep related?*/ SELECT_ANIMATION(6), - { 0x8b, 0x3c, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 60), SELECT_ANIMATION(2), WAIT(60), RET_DIRECT, LABEL(0), /* = 0x00 */ SELECT_ANIMATION(38), - { 0x8b, 0x3c, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 60), SELECT_ANIMATION(39), STOP_ANIMATION_ON_CURRENT_FRAME, WAIT(10), @@ -345,42 +345,42 @@ static const struct ScriptCommand s_script_WAKEUP_FUNC[] = { /* 0x811ff00 */ static const struct ScriptCommand s_script_LOOK_AROUND_FUNC[] = { /* 0x8120000 */ DEBUGINFO_O(347), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), - { 0x92, 0x04, 0x0001, 0x00000005, 0x00000000, NULL }, + CMD_UNK_92(4, 1, DIR_TRANS_FLIP), WAIT(15), - { 0x92, 0x04, 0x0002, 0x00000004, 0x00000000, NULL }, + CMD_UNK_92(4, 2, DIR_TRANS_SPINLEFT2), WAIT(15), RET_DIRECT, }; static const struct ScriptCommand s_script_LOOK_AROUND_DOWN_FUNC[] = { /* 0x8120080 */ DEBUGINFO_O(358), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(15), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(15), - ROTATE(4, 2, DIRECTION_SOUTH), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH), RET_DIRECT, }; static const struct ScriptCommand s_script_LOOK_AROUND_RIGHT_FUNC[] = { /* 0x81200f0 */ DEBUGINFO_O(368), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(15), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(15), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), RET_DIRECT, }; static const struct ScriptCommand s_script_LOOK_AROUND_LEFT_FUNC[] = { /* 0x8120160 */ DEBUGINFO_O(378), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), WAIT(15), - ROTATE(4, 2, DIRECTION_EAST), + ROTATE_TO(4, DIR_TRANS_SPINLEFT1, DIRECTION_EAST), WAIT(15), - ROTATE(4, 1, DIRECTION_WEST), + ROTATE_TO(4, DIR_TRANS_SPINRIGHT1, DIRECTION_WEST), RET_DIRECT, }; @@ -486,7 +486,7 @@ static const struct ScriptCommand s_script_ANGRY_END_FUNC[] = { /* 0x8120560 */ static const struct ScriptCommand s_script_MOVE_PLAZA_SLEEP[] = { /* 0x8120590 */ DEBUGINFO_O(487), CALL_SCRIPT(INIT_PLAZA_SLEEP_STAY_FUNC), - { 0x8d, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + CMD_UNK_8D(1, DIR_TRANS_NONE), LABEL(0), /* = 0x00 */ WAIT(240), JUMP_LABEL(0), @@ -494,7 +494,7 @@ static const struct ScriptCommand s_script_MOVE_PLAZA_SLEEP[] = { /* 0x8120590 * static const struct ScriptCommand s_script_INIT_PLAZA_SLEEP_STAY_FUNC[] = { /* 0x81205f0 */ DEBUGINFO_O(496), - JUMPIF_SCENARIOCHECK(4, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_SQUARE_ASLEEP, /* to label */ 0), { 0x54, 0x00, 0x0300, 0x00000000, 0x00000000, NULL }, SELECT_ANIMATION(4), RET_DIRECT, @@ -505,7 +505,7 @@ static const struct ScriptCommand s_script_INIT_PLAZA_SLEEP_STAY_FUNC[] = { /* 0 static const struct ScriptCommand s_script_INIT_PLAZA_SLEEP_TALK_FUNC[] = { /* 0x8120670 */ DEBUGINFO_O(507), - JUMPIF_SCENARIOCHECK(4, /* to label */ 0), + JUMPIF_SCENARIOCHECK(QUEST_SQUARE_ASLEEP, /* to label */ 0), SELECT_ANIMATION(2), RET_DIRECT, LABEL(0), /* = 0x00 */ @@ -517,11 +517,11 @@ static const struct ScriptCommand s_script_INIT_SLEEP_FUNC[] = { /* 0x81206e0 */ DEBUGINFO_O(517), JUMPIF_UNK_BE(/* to label */ 0), /* something sleep related?*/ SELECT_ANIMATION(6), - { 0x8b, 0x00, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_SOUTH, 0), RET_DIRECT, LABEL(0), /* = 0x00 */ SELECT_ANIMATION(38), - { 0x8b, 0x3c, 0x0002, 0x00000000, 0x00000000, NULL }, + SET_DIR_WAIT(DIRECTION_EAST, 60), RET_DIRECT, }; @@ -677,8 +677,8 @@ static const struct ScriptCommand s_script_SAVE_AND_WAREHOUSE_POINT[] = { /* 0x8 static const struct ScriptCommand s_script_WORLD_MAP_POINT[] = { /* 0x8121034 */ DEBUGINFO_O(679), - EXECUTE_SUBSTATION(228, 1, 0), - EXECUTE_SUBSTATION(12, 1, 1), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_WALL_MAP, 1, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 1, 1), HALT, }; @@ -698,7 +698,7 @@ static const struct ScriptCommand s_script_FORMATION_HERO[] = { /* 0x8121074 */ static const struct ScriptCommand s_script_EVOLUTION_HERO[] = { /* 0x8121124 */ DEBUGINFO_O(700), - EXECUTE_STATION(8, 1, 1), + EXECUTE_STATION(MAP_LUMINOUS_CAVE, 1, 1), HALT, }; @@ -891,7 +891,7 @@ static const struct ScriptCommand s_script_LIVES_WARP_ARRIVE_SUB[] = { /* 0x8121 static const struct ScriptCommand s_script_GET_ITEM_FUNC[] = { /* 0x8121a54 */ DEBUGINFO_O(892), FANFARE_PLAY(203), - { 0xe1, 0x00, 0x00cb, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(203), TEXTBOX_CLEAR2, RET_DIRECT, }; @@ -899,7 +899,7 @@ static const struct ScriptCommand s_script_GET_ITEM_FUNC[] = { /* 0x8121a54 */ static const struct ScriptCommand s_script_GET_ITEM_WAIT_FUNC[] = { /* 0x8121aa4 */ DEBUGINFO_O(900), FANFARE_PLAY(203), - { 0xe1, 0x00, 0x00cb, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(203), TEXTBOX_CLEAR, RET_DIRECT, }; @@ -907,7 +907,7 @@ static const struct ScriptCommand s_script_GET_ITEM_WAIT_FUNC[] = { /* 0x8121aa4 static const struct ScriptCommand s_script_GET_ITEM2_FUNC[] = { /* 0x8121af4 */ DEBUGINFO_O(908), FANFARE_PLAY(203), - { 0xe1, 0x00, 0x00cb, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(203), TEXTBOX_CLEAR2, RET_DIRECT, }; @@ -915,7 +915,7 @@ static const struct ScriptCommand s_script_GET_ITEM2_FUNC[] = { /* 0x8121af4 */ static const struct ScriptCommand s_script_GET_ITEM2_WAIT_FUNC[] = { /* 0x8121b44 */ DEBUGINFO_O(916), FANFARE_PLAY(203), - { 0xe1, 0x00, 0x00cb, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(203), TEXTBOX_CLEAR, RET_DIRECT, }; @@ -923,7 +923,7 @@ static const struct ScriptCommand s_script_GET_ITEM2_WAIT_FUNC[] = { /* 0x8121b4 static const struct ScriptCommand s_script_JOIN_FUNC[] = { /* 0x8121b94 */ DEBUGINFO_O(924), FANFARE_PLAY(204), - { 0xe1, 0x00, 0x00cc, 0x00000000, 0x00000000, NULL }, + WAIT_FANFARE1(204), TEXTBOX_CLEAR2, RET_DIRECT, }; @@ -957,7 +957,7 @@ static const struct ScriptCommand s_script_SAVE_START_FUNC[] = { /* 0x8121cb4 */ DEBUGINFO_O(957), { 0x23, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x43, 0x0000, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(50), + BGM_SWITCH(MUS_BLANK_50), RET_DIRECT, }; @@ -979,7 +979,7 @@ static const struct ScriptCommand s_script_SAVE_END_FUNC[] = { /* 0x8121d44 */ static const struct ScriptCommand s_script_SAVE_SOUND_FUNC[] = { /* 0x8121d94 */ DEBUGINFO_O(980), { 0x3b, 0x43, 0x0000, 0x00000000, 0x00000000, NULL }, - BGM_SWITCH(50), + BGM_SWITCH(MUS_BLANK_50), { 0xe0, 0x00, 0x0032, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x45, 0x001e, 0x00000000, 0x00000000, NULL }, RET_DIRECT, @@ -1147,7 +1147,7 @@ static const struct ScriptCommand s_script_EVENT_DIVIDE[] = { /* 0x8121f94 */ static const struct ScriptCommand s_script_EVENT_DIVIDE_NEXT[] = { /* 0x81226e4 */ DEBUGINFO_O(1148), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), RET, }; @@ -1156,7 +1156,7 @@ static const struct ScriptCommand s_script_EVENT_DIVIDE_INIT_FUNC[] = { /* 0x812 { 0xf2, 0x00, 0x0002, 0x00000000, 0x00000000, _("EVENT_DIVIDE_INIT_FUNC\n") }, UPDATE_VARINT(CALC_SET, GROUND_ENTER, MAP_TEAM_BASE_INSIDE), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, MAP_TEAM_BASE_INSIDE), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), CLEAR_ARRAY(WARP_LIST), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), @@ -1197,7 +1197,7 @@ static const struct ScriptCommand s_script_EVENT_DIVIDE_NEXT_DAY_FUNC[] = { /* 0 JUMP_LABEL(8), LABEL(7), /* = 0x07 */ SCENARIO_CALC(SCENARIO_SUB8, 51, 7), - { 0xae, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_WISH_CAVE), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ JUMPIF_SCENE_EQ(SCENARIO_SUB9, 53, 2, /* to label */ 9), @@ -1260,7 +1260,7 @@ static const struct ScriptCommand s_script_EVENT_DIVIDE_NEXT_DAY2_FUNC[] = { /* JUMP_LABEL(8), LABEL(7), /* = 0x07 */ SCENARIO_CALC(SCENARIO_SUB8, 51, 7), - { 0xae, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_WISH_CAVE), JUMP_LABEL(8), LABEL(8), /* = 0x08 */ JUMPIF_SCENE_EQ(SCENARIO_SUB9, 53, 2, /* to label */ 9), @@ -1737,16 +1737,16 @@ static const struct ScriptCommand s_script_EVENT_DIVIDE_AFTER[] = { /* 0x8124268 CALL_SCRIPT(EVENT_S08E01A_END), CALL_SCRIPT(EVENT_S03E01A_END), CALL_SCRIPT(EVENT_S09E01A_END), - { 0xb0, 0x01, 0x001f, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0020, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0021, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0022, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0023, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0024, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0025, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0027, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0028, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0029, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_DESERT_REGION), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SOUTHERN_CAVERN), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WYVERN_HILL), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SOLAR_CAVE), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_DARKNIGHT_RELIC), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_GRAND_SEA), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WATERFALL_POND), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_JOYOUS_TOWER), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FAR_OFF_SEA), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_PURITY_FOREST), JUMP_SCRIPT(EVENT_M02END_L001), }; @@ -1839,8 +1839,8 @@ static const struct ScriptCommand s_script_DEMO_02[] = { /* 0x81250d0 */ static const struct ScriptCommand s_script_DEMO_03[] = { /* 0x8125110 */ DEBUGINFO_O(1841), - EXECUTE_SUBSTATION(5, 5, 0), - EXECUTE_SUBSTATION(4, 29, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE_INSIDE, 5, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 29, 0), EXECUTE_SUBSTATION(225, 1, 0), EXECUTE_SUBSTATION(224, 3, 0), { 0x3b, 0x41, 0x003c, 0x00000000, 0x00000000, NULL }, @@ -1866,34 +1866,34 @@ static const struct ScriptCommand s_script_EVENT_M00E01A_L001[] = { /* 0x81251c0 static const struct ScriptCommand s_script_EVENT_M01E01A_L001[] = { /* 0x8125230 */ DEBUGINFO_O(1868), - EXECUTE_SUBSTATION(178, 1, 0), - { 0xaf, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TINY_WOODS_ENTRY, 1, 0), + CMD_UNK_AF(RESCUE_DUNGEON_TINY_WOODS, TRUE), RET, }; static const struct ScriptCommand s_script_EVENT_M01E01A_L002[] = { /* 0x8125270 */ DEBUGINFO_O(1875), - EXECUTE_SUBSTATION(178, 2, 0), + EXECUTE_SUBSTATION(MAP_TINY_WOODS_ENTRY, 2, 0), RET, }; static const struct ScriptCommand s_script_EVENT_M01E01A_L003[] = { /* 0x81252a0 */ DEBUGINFO_O(1881), { 0x3b, 0x39, 0x0004, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(179, 1, 0), - EXECUTE_SUBSTATION(178, 3, 0), - EXECUTE_SUBSTATION(9, 17, 0), + EXECUTE_SUBSTATION(MAP_TINY_WOODS_END, 1, 0), + EXECUTE_SUBSTATION(MAP_TINY_WOODS_ENTRY, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 17, 0), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(224, 2, 0), + EXECUTE_SUBSTATION(MAP_TITLE_SCREEN, 2, 0), { 0x3b, 0x39, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0000, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_TINY_WOODS), SCENARIO_CALC(SCENARIO_MAIN, 3, 0), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E02A_L001[] = { /* 0x8125350 */ DEBUGINFO_O(1895), - EXECUTE_SUBSTATION(12, 15, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 15, 0), SCENARIO_CALC(SCENARIO_MAIN, 3, 2), RET, }; @@ -1906,14 +1906,14 @@ static const struct ScriptCommand s_script_EVENT_M01E02A_L001B[] = { /* 0x812539 static const struct ScriptCommand s_script_EVENT_M01E02A_L001C[] = { /* 0x81253c0 */ DEBUGINFO_O(1908), - EXECUTE_SUBSTATION(12, 17, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 17, 0), SCENARIO_CALC(SCENARIO_MAIN, 3, 4), RET, }; static const struct ScriptCommand s_script_EVENT_M01E02A_L002[] = { /* 0x8125400 */ DEBUGINFO_O(1915), - EXECUTE_SUBSTATION(9, 18, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 18, 0), SCENARIO_CALC(SCENARIO_MAIN, 3, 5), RET, }; @@ -1921,14 +1921,14 @@ static const struct ScriptCommand s_script_EVENT_M01E02A_L002[] = { /* 0x8125400 static const struct ScriptCommand s_script_EVENT_M01E02A_L003[] = { /* 0x8125440 */ DEBUGINFO_O(1922), EXECUTE_SUBSTATION(180, 1, 0), - { 0xaf, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_THUNDERWAVE_CAVE, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 3, 6), RET, }; static const struct ScriptCommand s_script_EVENT_M01E02A_L004[] = { /* 0x8125490 */ DEBUGINFO_O(1930), - EXECUTE_SUBSTATION(12, 18, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 18, 0), RET, }; @@ -1940,28 +1940,28 @@ static const struct ScriptCommand s_script_EVENT_M01E02A_L005[] = { /* 0x81254c0 static const struct ScriptCommand s_script_EVENT_M01E02A_L006[] = { /* 0x81254f0 */ DEBUGINFO_O(1942), - EXECUTE_SUBSTATION(181, 1, 0), - EXECUTE_SUBSTATION(180, 3, 0), - EXECUTE_SUBSTATION(9, 23, 0), - { 0xb0, 0x01, 0x0001, 0x00000000, 0x00000000, NULL }, - SCENARIO_CALC(SCENARIO_MAIN, 4, 0), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + EXECUTE_SUBSTATION(MAP_THUNDERWAVE_CAVE_END, 1, 0), + EXECUTE_SUBSTATION(MAP_THUNDERWAVE_CAVE_ENTRY, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 23, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_THUNDERWAVE_CAVE), + SCENARIO_CALC(SCENARIO_MAIN, 4, 0), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E02B_L001[] = { /* 0x8125580 */ DEBUGINFO_O(1954), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 1, 0), - EXECUTE_SUBSTATION(12, 19, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 19, 0), SCENARIO_CALC(SCENARIO_MAIN, 4, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E02B_L002[] = { /* 0x81255e0 */ DEBUGINFO_O(1963), - EXECUTE_SUBSTATION(1, 6, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 6, 0), SCENARIO_CALC(SCENARIO_MAIN, 4, 3), UPDATE_VARINT(CALC_SET, WARP_LOCK, 3), RET, @@ -1969,7 +1969,7 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L002[] = { /* 0x81255e0 static const struct ScriptCommand s_script_EVENT_M01E02B_L003[] = { /* 0x8125630 */ DEBUGINFO_O(1971), - EXECUTE_SUBSTATION(4, 12, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 12, 0), SCENARIO_CALC(SCENARIO_MAIN, 4, 4), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, @@ -1977,17 +1977,17 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L003[] = { /* 0x8125630 static const struct ScriptCommand s_script_EVENT_M01E02B_L004[] = { /* 0x8125680 */ DEBUGINFO_O(1979), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 2, 0), - EXECUTE_SUBSTATION(12, 20, 0), - { 0xaf, 0x01, 0x0002, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 20, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MT_STEEL, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 4, 5), RET, }; static const struct ScriptCommand s_script_EVENT_M01E02B_L004B[] = { /* 0x81256f0 */ DEBUGINFO_O(1989), - EXECUTE_SUBSTATION(9, 26, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 26, 0), SCENARIO_CALC(SCENARIO_MAIN, 4, 6), RET, }; @@ -2001,7 +2001,7 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L005[] = { /* 0x8125730 static const struct ScriptCommand s_script_EVENT_M01E02B_L006[] = { /* 0x8125770 */ DEBUGINFO_O(2003), - EXECUTE_SUBSTATION(12, 21, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 21, 0), RET, }; @@ -2015,33 +2015,33 @@ static const struct ScriptCommand s_script_EVENT_M01E02B_L007[] = { /* 0x81257a0 static const struct ScriptCommand s_script_EVENT_M01E02B_L008[] = { /* 0x81257e0 */ DEBUGINFO_O(2016), EXECUTE_SUBSTATION(183, 1, 0), - EXECUTE_SUBSTATION(9, 28, 0), - { 0xb0, 0x01, 0x0002, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 28, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_STEEL), SCENARIO_CALC(SCENARIO_MAIN, 5, 0), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E03A_L000[] = { /* 0x8125860 */ DEBUGINFO_O(2027), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 1), RET, }; static const struct ScriptCommand s_script_EVENT_M01E03A_L001[] = { /* 0x81258a0 */ DEBUGINFO_O(2034), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 3, 0), - EXECUTE_SUBSTATION(12, 22, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 22, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E03A_L002[] = { /* 0x8125900 */ DEBUGINFO_O(2043), - EXECUTE_SUBSTATION(9, 29, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 29, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 3), UPDATE_VARINT(CALC_SET, WARP_LOCK, 4), SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), @@ -2059,7 +2059,7 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L003[] = { /* 0x81259b0 UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), { 0x3b, 0x03, 0x0000, 0x00000000, 0x00000000, NULL }, JUMPIF(JUDGE_GE, CLEAR_COUNT, 3, /* to label */ 0), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 5), RET, LABEL(0), /* = 0x00 */ @@ -2068,7 +2068,7 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L003[] = { /* 0x81259b0 static const struct ScriptCommand s_script_EVENT_M01E03A_L004[] = { /* 0x8125a50 */ DEBUGINFO_O(2070), - EXECUTE_SUBSTATION(12, 23, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 23, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 6), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, @@ -2076,7 +2076,7 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L004[] = { /* 0x8125a50 static const struct ScriptCommand s_script_EVENT_M01E03A_L005[] = { /* 0x8125aa0 */ DEBUGINFO_O(2078), - EXECUTE_SUBSTATION(9, 30, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 30, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 7), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, @@ -2084,15 +2084,15 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L005[] = { /* 0x8125aa0 static const struct ScriptCommand s_script_EVENT_M01E03A_L006[] = { /* 0x8125af0 */ DEBUGINFO_O(2086), - EXECUTE_SUBSTATION(12, 24, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 24, 0), SCENARIO_CALC(SCENARIO_MAIN, 5, 8), RET, }; static const struct ScriptCommand s_script_EVENT_M01E03A_L007[] = { /* 0x8125b30 */ DEBUGINFO_O(2093), - EXECUTE_SUBSTATION(9, 31, 0), - { 0xaf, 0x01, 0x0003, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 31, 0), + CMD_UNK_AF(RESCUE_DUNGEON_SINISTER_WOODS, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 5, 9), RET, }; @@ -2106,7 +2106,7 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L008[] = { /* 0x8125b80 static const struct ScriptCommand s_script_EVENT_M01E03A_L009[] = { /* 0x8125bb0 */ DEBUGINFO_O(2107), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 25, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 25, 0), RET, }; @@ -2119,36 +2119,36 @@ static const struct ScriptCommand s_script_EVENT_M01E03A_L010[] = { /* 0x8125bf0 static const struct ScriptCommand s_script_EVENT_M01E03A_L011[] = { /* 0x8125c20 */ DEBUGINFO_O(2120), EXECUTE_SUBSTATION(185, 1, 0), - EXECUTE_SUBSTATION(9, 34, 0), - { 0xb0, 0x01, 0x0003, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 34, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SINISTER_WOODS), SCENARIO_CALC(SCENARIO_MAIN, 6, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E04A_L000[] = { /* 0x8125cb0 */ DEBUGINFO_O(2132), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 6, 1), RET, }; static const struct ScriptCommand s_script_EVENT_M01E04A_L001[] = { /* 0x8125cf0 */ DEBUGINFO_O(2139), - EXECUTE_SUBSTATION(12, 26, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 26, 0), SCENARIO_CALC(SCENARIO_MAIN, 6, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E04A_L002[] = { /* 0x8125d30 */ DEBUGINFO_O(2146), - EXECUTE_SUBSTATION(9, 35, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 35, 0), { 0x3b, 0x3b, 0x0000, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(1, 12, 0), - EXECUTE_SUBSTATION(9, 36, 0), - { 0xaf, 0x01, 0x0004, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 12, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 36, 0), + CMD_UNK_AF(RESCUE_DUNGEON_SILENT_CHASM, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 6, 3), RET, }; @@ -2162,7 +2162,7 @@ static const struct ScriptCommand s_script_EVENT_M01E04A_L003[] = { /* 0x8125db0 static const struct ScriptCommand s_script_EVENT_M01E04A_L004[] = { /* 0x8125de0 */ DEBUGINFO_O(2163), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 27, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 27, 0), RET, }; @@ -2175,33 +2175,33 @@ static const struct ScriptCommand s_script_EVENT_M01E04A_L005[] = { /* 0x8125e20 static const struct ScriptCommand s_script_EVENT_M01E04A_L006[] = { /* 0x8125e50 */ DEBUGINFO_O(2176), EXECUTE_SUBSTATION(187, 1, 0), - EXECUTE_SUBSTATION(9, 39, 0), - { 0xb0, 0x01, 0x0004, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 39, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SILENT_CHASM), SCENARIO_CALC(SCENARIO_MAIN, 7, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E04B_L000[] = { /* 0x8125ee0 */ DEBUGINFO_O(2188), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 7, 1), RET, }; static const struct ScriptCommand s_script_EVENT_M01E04B_L001[] = { /* 0x8125f20 */ DEBUGINFO_O(2195), - EXECUTE_SUBSTATION(12, 28, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 28, 0), SCENARIO_CALC(SCENARIO_MAIN, 7, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E04B_L002[] = { /* 0x8125f60 */ DEBUGINFO_O(2202), - EXECUTE_SUBSTATION(9, 40, 0), - { 0xaf, 0x01, 0x0005, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 40, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MT_THUNDER, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 7, 3), RET, }; @@ -2215,7 +2215,7 @@ static const struct ScriptCommand s_script_EVENT_M01E04B_L003[] = { /* 0x8125fb0 static const struct ScriptCommand s_script_EVENT_M01E04B_L004[] = { /* 0x8125fe0 */ DEBUGINFO_O(2216), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 29, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 29, 0), RET, }; @@ -2234,32 +2234,32 @@ static const struct ScriptCommand s_script_EVENT_M01E04B_L006[] = { /* 0x8126050 static const struct ScriptCommand s_script_EVENT_M01E04B_L007[] = { /* 0x8126080 */ DEBUGINFO_O(2235), EXECUTE_SUBSTATION(190, 1, 0), - { 0xb0, 0x01, 0x0005, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_THUNDER), SCENARIO_CALC(SCENARIO_MAIN, 8, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E05A_L000[] = { /* 0x8126100 */ DEBUGINFO_O(2246), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 8, 1), RET, }; static const struct ScriptCommand s_script_EVENT_M01E05A_L001[] = { /* 0x8126140 */ DEBUGINFO_O(2253), - EXECUTE_SUBSTATION(12, 30, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 30, 0), SCENARIO_CALC(SCENARIO_MAIN, 8, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E05A_L002[] = { /* 0x8126180 */ DEBUGINFO_O(2260), - EXECUTE_SUBSTATION(9, 43, 0), - { 0xaf, 0x01, 0x0006, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 43, 0), + CMD_UNK_AF(RESCUE_DUNGEON_GREAT_CANYON, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 8, 3), RET, }; @@ -2273,7 +2273,7 @@ static const struct ScriptCommand s_script_EVENT_M01E05A_L003[] = { /* 0x81261d0 static const struct ScriptCommand s_script_EVENT_M01E05A_L004[] = { /* 0x8126200 */ DEBUGINFO_O(2274), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 31, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 31, 0), RET, }; @@ -2286,31 +2286,31 @@ static const struct ScriptCommand s_script_EVENT_M01E05A_L005[] = { /* 0x8126240 static const struct ScriptCommand s_script_EVENT_M01E05A_L006[] = { /* 0x8126270 */ DEBUGINFO_O(2287), EXECUTE_SUBSTATION(192, 2, 0), - { 0xb0, 0x01, 0x0006, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_GREAT_CANYON), SCENARIO_CALC(SCENARIO_MAIN, 9, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), CALL_SCRIPT(NEXT_SAVE_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E05B_L000[] = { /* 0x81262f0 */ DEBUGINFO_O(2298), - EXECUTE_SUBSTATION(12, 3, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 3, 0), SCENARIO_CALC(SCENARIO_MAIN, 9, 1), RET, }; static const struct ScriptCommand s_script_EVENT_M01E05B_L001[] = { /* 0x8126330 */ DEBUGINFO_O(2305), - EXECUTE_SUBSTATION(12, 32, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 32, 0), SCENARIO_CALC(SCENARIO_MAIN, 9, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E05B_L002[] = { /* 0x8126370 */ DEBUGINFO_O(2312), - EXECUTE_SUBSTATION(9, 45, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 45, 0), SCENARIO_CALC(SCENARIO_MAIN, 9, 3), RET, }; @@ -2323,49 +2323,49 @@ static const struct ScriptCommand s_script_EVENT_M01E05B_L003[] = { /* 0x81263b0 static const struct ScriptCommand s_script_EVENT_M01E05B_L004[] = { /* 0x81263e0 */ DEBUGINFO_O(2325), - EXECUTE_SUBSTATION(2, 17, 0), + EXECUTE_SUBSTATION(MAP_WHISCASH_POND, 17, 0), SCENARIO_CALC(SCENARIO_MAIN, 9, 5), RET, }; static const struct ScriptCommand s_script_EVENT_M01E05B_L005[] = { /* 0x8126420 */ DEBUGINFO_O(2332), - EXECUTE_SUBSTATION(9, 46, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 46, 0), SCENARIO_CALC(SCENARIO_MAIN, 10, 0), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E06A_L001[] = { /* 0x8126460 */ DEBUGINFO_O(2339), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 4, 0), - EXECUTE_SUBSTATION(12, 33, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 33, 0), { 0x3b, 0x3b, 0x0000, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(2, 18, 0), - EXECUTE_SUBSTATION(12, 34, 0), + EXECUTE_SUBSTATION(MAP_WHISCASH_POND, 18, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 34, 0), SCENARIO_CALC(SCENARIO_MAIN, 10, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E06A_L002[] = { /* 0x81264f0 */ DEBUGINFO_O(2351), - EXECUTE_SUBSTATION(9, 47, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 47, 0), SCENARIO_CALC(SCENARIO_MAIN, 10, 3), RET, }; static const struct ScriptCommand s_script_EVENT_M01E06A_L003[] = { /* 0x8126530 */ DEBUGINFO_O(2358), - EXECUTE_SUBSTATION(1, 20, 0), - EXECUTE_SUBSTATION(1, 21, 0), - EXECUTE_SUBSTATION(9, 48, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 20, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 21, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 48, 0), SCENARIO_CALC(SCENARIO_MAIN, 11, 0), JUMP_SCRIPT(EVENT_DIVIDE), }; static const struct ScriptCommand s_script_EVENT_M01E07A_L001[] = { /* 0x8126590 */ DEBUGINFO_O(2367), - EXECUTE_SUBSTATION(9, 49, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 49, 0), SCENARIO_CALC(SCENARIO_MAIN, 11, 2), UPDATE_VARINT(CALC_SET, WARP_LOCK, 5), RET, @@ -2374,9 +2374,9 @@ static const struct ScriptCommand s_script_EVENT_M01E07A_L001[] = { /* 0x8126590 static const struct ScriptCommand s_script_EVENT_M01E07A_L002[] = { /* 0x81265e0 */ DEBUGINFO_O(2375), SCENARIO_CALC(SCENARIO_MAIN, 11, 4), - EXECUTE_SUBSTATION(9, 51, 0), - EXECUTE_SUBSTATION(9, 52, 0), - EXECUTE_SUBSTATION(9, 53, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 51, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 52, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 53, 0), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, EXECUTE_SUBSTATION(164, 1, 0), EXECUTE_SUBSTATION(165, 1, 0), @@ -2389,7 +2389,7 @@ static const struct ScriptCommand s_script_EVENT_M01E07A_L002[] = { /* 0x81265e0 static const struct ScriptCommand s_script_EVENT_M01E07A_L003[] = { /* 0x81266a0 */ DEBUGINFO_O(2390), EXECUTE_SUBSTATION(193, 1, 0), - { 0xaf, 0x01, 0x0007, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_LAPIS_CAVE, TRUE), RET, }; @@ -2407,7 +2407,7 @@ static const struct ScriptCommand s_script_EVENT_M01E07A_L005[] = { /* 0x8126710 EXECUTE_SUBSTATION(167, 1, 0), { 0x3b, 0x39, 0x0000, 0x00000000, 0x00000000, NULL }, EXECUTE_SUBSTATION(166, 2, 0), - { 0xb0, 0x01, 0x0007, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_LAPIS_CAVE), SCENARIO_CALC(SCENARIO_MAIN, 12, 0), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 24), CALL_SCRIPT(NEXT_SAVE_FUNC), @@ -2435,7 +2435,7 @@ static const struct ScriptCommand s_script_EVENT_M01E07B_L001[] = { /* 0x8126830 static const struct ScriptCommand s_script_EVENT_M01E07B_L002[] = { /* 0x8126870 */ DEBUGINFO_O(2437), - { 0xaf, 0x01, 0x0008, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_MT_BLAZE, TRUE), RET, }; @@ -2457,7 +2457,7 @@ static const struct ScriptCommand s_script_EVENT_M01E07B_L005[] = { /* 0x8126900 { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, EXECUTE_SUBSTATION(167, 2, 0), { 0x3b, 0x39, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0008, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_BLAZE), SCENARIO_CALC(SCENARIO_MAIN, 13, 0), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 26), CALL_SCRIPT(NEXT_SAVE_FUNC), @@ -2490,7 +2490,7 @@ static const struct ScriptCommand s_script_EVENT_M01E08A_L001[] = { /* 0x8126a00 static const struct ScriptCommand s_script_EVENT_M01E08A_L002[] = { /* 0x8126a80 */ DEBUGINFO_O(2491), EXECUTE_SUBSTATION(198, 1, 0), - { 0xaf, 0x01, 0x0009, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_FROSTY_FOREST, TRUE), RET, }; @@ -2502,7 +2502,7 @@ static const struct ScriptCommand s_script_EVENT_M01E08A_L003[] = { /* 0x8126ac0 static const struct ScriptCommand s_script_EVENT_M01E08A_L004[] = { /* 0x8126af0 */ DEBUGINFO_O(2504), - JUMPIF_UNK_BC(8, /* to label */ 0), + JUMPIF_CUTSCENE_FLAG(CUTSCENE_FLAG_FROSTY_GROTTO_REACHED, /* to label */ 0), EXECUTE_SUBSTATION(199, 1, 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ @@ -2514,7 +2514,7 @@ static const struct ScriptCommand s_script_EVENT_M01E08A_L004[] = { /* 0x8126af0 static const struct ScriptCommand s_script_EVENT_M01E08A_L005[] = { /* 0x8126b70 */ DEBUGINFO_O(2515), EXECUTE_SUBSTATION(200, 1, 0), - { 0xb0, 0x01, 0x0009, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FROSTY_FOREST), SCENARIO_CALC(SCENARIO_MAIN, 14, 0), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 28), CALL_SCRIPT(NEXT_SAVE_FUNC), @@ -2547,7 +2547,7 @@ static const struct ScriptCommand s_script_EVENT_M01E08B_L001[] = { /* 0x8126c40 static const struct ScriptCommand s_script_EVENT_M01E08B_L002[] = { /* 0x8126cc0 */ DEBUGINFO_O(2548), EXECUTE_SUBSTATION(201, 1, 0), - { 0xaf, 0x01, 0x000a, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_MT_FREEZE, TRUE), RET, }; @@ -2573,7 +2573,7 @@ static const struct ScriptCommand s_script_EVENT_M01E08B_L006[] = { /* 0x8126d90 DEBUGINFO_O(2573), EXECUTE_SUBSTATION(203, 2, 0), EXECUTE_SUBSTATION(203, 3, 0), - { 0xb0, 0x01, 0x000a, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_FREEZE), SCENARIO_CALC(SCENARIO_MAIN, 15, 0), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 2), CALL_SCRIPT(NEXT_SAVE_FUNC), @@ -2594,65 +2594,65 @@ static const struct ScriptCommand s_script_EVENT_M01E08B_T002[] = { /* 0x8126e40 static const struct ScriptCommand s_script_EVENT_M01E09A_L001[] = { /* 0x8126e70 */ DEBUGINFO_O(2596), - EXECUTE_SUBSTATION(1, 23, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 23, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - EXECUTE_SUBSTATION(12, 35, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 35, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L002[] = { /* 0x8126ed0 */ DEBUGINFO_O(2605), - EXECUTE_SUBSTATION(9, 55, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 55, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 3), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L003[] = { /* 0x8126f10 */ DEBUGINFO_O(2612), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 6, 0), - EXECUTE_SUBSTATION(12, 36, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 36, 0), EXECUTE_SUBSTATION(162, 7, 0), - EXECUTE_SUBSTATION(12, 37, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 37, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 4), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L004[] = { /* 0x8126f90 */ DEBUGINFO_O(2623), - EXECUTE_SUBSTATION(9, 57, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 57, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 5), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L005[] = { /* 0x8126fd0 */ DEBUGINFO_O(2630), - EXECUTE_SUBSTATION(12, 38, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 38, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 6), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L006[] = { /* 0x8127010 */ DEBUGINFO_O(2637), - EXECUTE_SUBSTATION(9, 58, 0), - EXECUTE_SUBSTATION(1, 26, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 58, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 26, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 7), - EXECUTE_SUBSTATION(9, 59, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 59, 0), RET, }; static const struct ScriptCommand s_script_EVENT_M01E09A_L007[] = { /* 0x8127070 */ DEBUGINFO_O(2646), - EXECUTE_SUBSTATION(12, 39, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 39, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 8), JUMP_SCRIPT(EVENT_M01E09A_L008), }; static const struct ScriptCommand s_script_EVENT_M01E09A_L008[] = { /* 0x81270b0 */ DEBUGINFO_O(2653), - EXECUTE_SUBSTATION(1, 28, 0), - EXECUTE_SUBSTATION(9, 60, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 28, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 60, 0), SCENARIO_CALC(SCENARIO_MAIN, 15, 9), UPDATE_VARINT(CALC_SET, WARP_LOCK, 6), RET, @@ -2660,11 +2660,11 @@ static const struct ScriptCommand s_script_EVENT_M01E09A_L008[] = { /* 0x81270b0 static const struct ScriptCommand s_script_EVENT_M01E09A_L009[] = { /* 0x8127110 */ DEBUGINFO_O(2662), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(162, 8, 0), { 0x3b, 0x03, 0x0000, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(12, 40, 0), - { 0xaf, 0x01, 0x000b, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 40, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MAGMA_CAVERN, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 15, 10), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, @@ -2672,8 +2672,8 @@ static const struct ScriptCommand s_script_EVENT_M01E09A_L009[] = { /* 0x8127110 static const struct ScriptCommand s_script_EVENT_M01E09A_L010[] = { /* 0x81271a0 */ DEBUGINFO_O(2674), - EXECUTE_SUBSTATION(9, 62, 0), - { 0xaf, 0x01, 0x000b, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 62, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MAGMA_CAVERN, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 15, 11), RET, }; @@ -2687,7 +2687,7 @@ static const struct ScriptCommand s_script_EVENT_M01E09A_L011[] = { /* 0x81271f0 static const struct ScriptCommand s_script_EVENT_M01E09A_L012[] = { /* 0x8127220 */ DEBUGINFO_O(2688), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 41, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 41, 0), RET, }; @@ -2706,7 +2706,7 @@ static const struct ScriptCommand s_script_EVENT_M01E09A_L014[] = { /* 0x8127290 static const struct ScriptCommand s_script_EVENT_M01E09A_L015[] = { /* 0x81272c0 */ DEBUGINFO_O(2707), EXECUTE_SUBSTATION(206, 1, 0), - { 0xb0, 0x01, 0x000b, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MAGMA_CAVERN), SCENARIO_CALC(SCENARIO_MAIN, 16, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 2), @@ -2717,12 +2717,12 @@ static const struct ScriptCommand s_script_EVENT_M01E09A_L015[] = { /* 0x81272c0 static const struct ScriptCommand s_script_EVENT_M01E10A_L001[] = { /* 0x8127340 */ DEBUGINFO_O(2718), SCENARIO_CALC(SCENARIO_MAIN, 16, 1), - EXECUTE_SUBSTATION(1, 31, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 31, 0), EXECUTE_SUBSTATION(171, 1, 0), EXECUTE_SUBSTATION(173, 1, 0), EXECUTE_SUBSTATION(171, 2, 0), - EXECUTE_SUBSTATION(1, 32, 0), - EXECUTE_SUBSTATION(1, 33, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 32, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 33, 0), SCENARIO_CALC(SCENARIO_MAIN, 16, 2), UPDATE_VARINT(CALC_SET, WARP_LOCK, 7), RET, @@ -2731,22 +2731,22 @@ static const struct ScriptCommand s_script_EVENT_M01E10A_L001[] = { /* 0x8127340 static const struct ScriptCommand s_script_EVENT_M01E10A_L002[] = { /* 0x81273f0 */ DEBUGINFO_O(2732), SCENARIO_CALC(SCENARIO_MAIN, 16, 3), - EXECUTE_SUBSTATION(12, 2, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 2, 0), EXECUTE_SUBSTATION(163, 1, 0), - EXECUTE_SUBSTATION(12, 42, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 42, 0), EXECUTE_SUBSTATION(163, 2, 0), EXECUTE_SUBSTATION(162, 9, 0), { 0x3b, 0x03, 0x0000, 0x00000000, 0x00000000, NULL }, - EXECUTE_SUBSTATION(12, 43, 0), - { 0xaf, 0x01, 0x000c, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 43, 0), + CMD_UNK_AF(RESCUE_DUNGEON_SKY_TOWER, TRUE), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, }; static const struct ScriptCommand s_script_EVENT_M01E10A_L003[] = { /* 0x81274b0 */ DEBUGINFO_O(2747), - EXECUTE_SUBSTATION(9, 65, 0), - { 0xaf, 0x01, 0x000c, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 65, 0), + CMD_UNK_AF(RESCUE_DUNGEON_SKY_TOWER, TRUE), SCENARIO_CALC(SCENARIO_MAIN, 16, 4), UPDATE_VARINT(CALC_SET, WARP_LOCK, 0), RET, @@ -2766,7 +2766,7 @@ static const struct ScriptCommand s_script_EVENT_M01E10A_L004[] = { /* 0x8127510 static const struct ScriptCommand s_script_EVENT_M01E10A_L005[] = { /* 0x8127590 */ DEBUGINFO_O(2767), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), - EXECUTE_SUBSTATION(12, 44, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 44, 0), RET, }; @@ -2789,7 +2789,7 @@ static const struct ScriptCommand s_script_EVENT_M01E10A_L008[] = { /* 0x8127630 EXECUTE_SUBSTATION(209, 2, 0), EXECUTE_SUBSTATION(173, 3, 0), EXECUTE_SUBSTATION(209, 3, 0), - { 0xb0, 0x01, 0x000c, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SKY_TOWER), SCENARIO_CALC(SCENARIO_MAIN, 17, 0), JUMP_SCRIPT(EVENT_DIVIDE), }; @@ -2799,9 +2799,9 @@ static const struct ScriptCommand s_script_EVENT_M01END_L001[] = { /* 0x81276c0 { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, EXECUTE_SUBSTATION(174, 1, 0), EXECUTE_SUBSTATION(171, 5, 0), - EXECUTE_SUBSTATION(1, 37, 0), - EXECUTE_SUBSTATION(2, 28, 0), - EXECUTE_SUBSTATION(4, 27, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 37, 0), + EXECUTE_SUBSTATION(MAP_WHISCASH_POND, 28, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 27, 0), EXECUTE_SUBSTATION(171, 6, 0), EXECUTE_SUBSTATION(171, 7, 0), { 0x3b, 0x39, 0x0001, 0x00000000, 0x00000000, NULL }, @@ -2810,7 +2810,7 @@ static const struct ScriptCommand s_script_EVENT_M01END_L001[] = { /* 0x81276c0 SCENARIO_CALC(SCENARIO_MAIN, 18, 0), CALL_SCRIPT(EVENT_DIVIDE_INIT_FUNC), EXECUTE_SUBSTATION(175, 2, 0), - EXECUTE_SUBSTATION(9, 68, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 68, 0), EXECUTE_SUBSTATION(177, 1, 0), { 0x3b, 0x42, 0x0000, 0x00000000, 0x00000000, NULL }, HALT, @@ -2824,7 +2824,7 @@ static const struct ScriptCommand s_script_EVENT_M01END_L002[] = { /* 0x81277f0 SCENARIO_CALC(SCENARIO_MAIN, 18, 0), CALL_SCRIPT(EVENT_DIVIDE_INIT_FUNC), EXECUTE_SUBSTATION(175, 2, 0), - EXECUTE_SUBSTATION(9, 68, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 68, 0), EXECUTE_SUBSTATION(177, 1, 0), { 0x3b, 0x42, 0x0000, 0x00000000, 0x00000000, NULL }, HALT, @@ -2832,22 +2832,22 @@ static const struct ScriptCommand s_script_EVENT_M01END_L002[] = { /* 0x81277f0 static const struct ScriptCommand s_script_EVENT_M02E01A_L001[] = { /* 0x81278a0 */ DEBUGINFO_O(2834), - EXECUTE_SUBSTATION(12, 45, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 45, 0), SCENARIO_CALC(SCENARIO_MAIN, 18, 2), RET, }; static const struct ScriptCommand s_script_EVENT_M02E01A_L002[] = { /* 0x81278e0 */ DEBUGINFO_O(2841), - EXECUTE_SUBSTATION(9, 69, 0), - EXECUTE_SUBSTATION(2, 29, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 69, 0), + EXECUTE_SUBSTATION(MAP_WHISCASH_POND, 29, 0), SCENARIO_CALC(SCENARIO_MAIN, 18, 3), RET, }; static const struct ScriptCommand s_script_EVENT_M02E01A_L003[] = { /* 0x8127930 */ DEBUGINFO_O(2849), - EXECUTE_SUBSTATION(9, 72, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 72, 0), SCENARIO_CALC(SCENARIO_MAIN, 18, 4), RET, }; @@ -2856,7 +2856,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02A_L001[] = { /* 0x8127970 DEBUGINFO_O(2856), SCENARIO_CALC(SCENARIO_MAIN, 19, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2864,7 +2864,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02B_L001[] = { /* 0x81279c0 DEBUGINFO_O(2864), SCENARIO_CALC(SCENARIO_MAIN, 20, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2872,7 +2872,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02C_L001[] = { /* 0x8127a10 DEBUGINFO_O(2872), SCENARIO_CALC(SCENARIO_MAIN, 21, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2880,7 +2880,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02D_L001[] = { /* 0x8127a60 DEBUGINFO_O(2880), SCENARIO_CALC(SCENARIO_MAIN, 22, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2888,7 +2888,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02E_L001[] = { /* 0x8127ab0 DEBUGINFO_O(2888), SCENARIO_CALC(SCENARIO_MAIN, 23, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2896,7 +2896,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02F_L001[] = { /* 0x8127b00 DEBUGINFO_O(2896), SCENARIO_CALC(SCENARIO_MAIN, 24, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2904,7 +2904,7 @@ static const struct ScriptCommand s_script_EVENT_M02E02G_L001[] = { /* 0x8127b50 DEBUGINFO_O(2904), SCENARIO_CALC(SCENARIO_MAIN, 25, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; @@ -2912,13 +2912,13 @@ static const struct ScriptCommand s_script_EVENT_M02E02H_L001[] = { /* 0x8127ba0 DEBUGINFO_O(2912), SCENARIO_CALC(SCENARIO_MAIN, 26, 2), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), RET, }; static const struct ScriptCommand s_script_EVENT_M02END_L001[] = { /* 0x8127bf0 */ DEBUGINFO_O(2920), - EXECUTE_SUBSTATION(12, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 6, 0), SCENARIO_CALC(SCENARIO_MAIN, 27, 2), RET, }; @@ -2927,13 +2927,13 @@ static const struct ScriptCommand s_script_EVENT_S00E01A_L001[] = { /* 0x8127c30 DEBUGINFO_O(2927), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER3_FUNC), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 7, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 7, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S00E01A_L002[] = { /* 0x8127c80 */ DEBUGINFO_O(2935), - EXECUTE_SUBSTATION(9, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 6, 0), UPDATE_VARINT(CALC_SET, GROUND_ENTER, MAP_TEAM_BASE_INSIDE), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, MAP_TEAM_BASE_INSIDE), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), @@ -2943,13 +2943,13 @@ static const struct ScriptCommand s_script_EVENT_S00E01A_L002[] = { /* 0x8127c80 static const struct ScriptCommand s_script_EVENT_S00E01A_L003[] = { /* 0x8127cf0 */ DEBUGINFO_O(2945), - EXECUTE_SUBSTATION(12, 4, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 4, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S00E01A_L004[] = { /* 0x8127d20 */ DEBUGINFO_O(2951), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; @@ -2968,7 +2968,7 @@ static const struct ScriptCommand s_script_EVENT_S01E01A_CONTINUE[] = { /* 0x812 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB1, 29, 2), - { 0xae, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_UPROAR_FOREST), RET_DIRECT, }; @@ -2978,14 +2978,14 @@ static const struct ScriptCommand s_script_EVENT_S01E01A_END[] = { /* 0x8127e20 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB1, 31, 0), - { 0xb0, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_UPROAR_FOREST), UPDATE_VARINT(CALC_SET, BASE_LEVEL, 2), RET_DIRECT, }; static const struct ScriptCommand s_script_EVENT_S01E01A_L001[] = { /* 0x8127ea0 */ DEBUGINFO_O(2987), - { 0xae, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_UPROAR_FOREST), SCENARIO_CALC(SCENARIO_SUB1, 29, 2), RET, SCENARIO_CALC(SCENARIO_MAIN, 15, 5), @@ -3001,30 +3001,30 @@ static const struct ScriptCommand s_script_EVENT_S01E01A_L001[] = { /* 0x8127ea0 static const struct ScriptCommand s_script_EVENT_S01E01A_L002[] = { /* 0x8127f60 */ DEBUGINFO_O(3003), - EXECUTE_SUBSTATION(4, 3, 0), - { 0xaf, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 3, 0), + CMD_UNK_AF(RESCUE_DUNGEON_UPROAR_FOREST, TRUE), SCENARIO_CALC(SCENARIO_SUB1, 29, 3), SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), UPDATE_VARINT(CALC_SET, GROUND_ENTER, 4), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, 4), - EXECUTE_SUBSTATION(4, 0, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 0, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S01E01A_L003[] = { /* 0x8127ff0 */ DEBUGINFO_O(3015), - EXECUTE_SUBSTATION(9, 75, 0), - { 0xb0, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 75, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_UPROAR_FOREST), JUMP_SCRIPT(EVENT_S01E01B_L001), }; static const struct ScriptCommand s_script_EVENT_S01E01B_L001[] = { /* 0x8128030 */ DEBUGINFO_O(3022), UPDATE_VARINT(CALC_SET, BASE_LEVEL, 1), - EXECUTE_SUBSTATION(9, 76, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 76, 0), SCENARIO_CALC(SCENARIO_SUB1, 30, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 30, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3032,14 +3032,14 @@ static const struct ScriptCommand s_script_EVENT_S01E01B_L001[] = { /* 0x8128030 static const struct ScriptCommand s_script_EVENT_S01E01B_L001L[] = { /* 0x81280c0 */ DEBUGINFO_O(3034), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S01E01C_L001[] = { /* 0x81280f0 */ DEBUGINFO_O(3040), UPDATE_VARINT(CALC_SET, BASE_LEVEL, 2), - EXECUTE_SUBSTATION(9, 78, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 78, 0), SCENARIO_CALC(SCENARIO_SUB1, 31, 0), { 0x3b, 0x03, 0x0000, 0x00000000, 0x00000000, NULL }, EXECUTE_FUNCTION(EVENT_DIVIDE_NEXT), @@ -3052,9 +3052,9 @@ static const struct ScriptCommand s_script_EVENT_S01E02A_START[] = { /* 0x812816 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB1, 31, 1), - { 0xae, 0x01, 0x000f, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, - { 0xad, 0x01, 0x0076, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_HOWLING_FOREST), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_UPROAR_FOREST), + UNLOCK_FRIEND_AREA(MAP_FRIEND_AREA_SKY_BLUE_PLAINS), UPDATE_VARINT(CALC_SET, BASE_LEVEL, 2), RET_DIRECT, }; @@ -3065,31 +3065,31 @@ static const struct ScriptCommand s_script_EVENT_S01E02A_END[] = { /* 0x8128200 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB1, 32, 2), - { 0xb0, 0x01, 0x000e, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x000f, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_UPROAR_FOREST), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_HOWLING_FOREST), UPDATE_VARINT(CALC_SET, BASE_LEVEL, 2), RET_DIRECT, }; static const struct ScriptCommand s_script_EVENT_S01E02A_L001[] = { /* 0x8128290 */ DEBUGINFO_O(3075), - EXECUTE_SUBSTATION(4, 5, 0), - { 0xaf, 0x01, 0x000f, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 5, 0), + CMD_UNK_AF(RESCUE_DUNGEON_HOWLING_FOREST, TRUE), SCENARIO_CALC(SCENARIO_SUB1, 31, 2), SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), UPDATE_VARINT(CALC_SET, GROUND_ENTER, 4), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, 4), - EXECUTE_SUBSTATION(4, 0, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 0, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S01E02A_L002[] = { /* 0x8128320 */ DEBUGINFO_O(3087), SCENARIO_CALC(SCENARIO_SUB1, 32, 0), - EXECUTE_SUBSTATION(9, 79, 0), - { 0xb0, 0x01, 0x000f, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 79, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_HOWLING_FOREST), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 31, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3098,7 +3098,7 @@ static const struct ScriptCommand s_script_EVENT_S01E02A_L002[] = { /* 0x8128320 static const struct ScriptCommand s_script_EVENT_S01E02A_L002L[] = { /* 0x81283b0 */ DEBUGINFO_O(3099), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY2_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3120,7 +3120,7 @@ static const struct ScriptCommand s_script_EVENT_S02E01A_START[] = { /* 0x812845 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB2, 33, 1), - { 0xb0, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_STORMY_SEA), RET_DIRECT, }; @@ -3130,7 +3130,7 @@ static const struct ScriptCommand s_script_EVENT_S02E01A_END[] = { /* 0x81284c0 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB2, 34, 0), - { 0xb0, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_STORMY_SEA), RET_DIRECT, }; @@ -3148,17 +3148,17 @@ static const struct ScriptCommand s_script_EVENT_S02E01A_L002[] = { /* 0x8128560 static const struct ScriptCommand s_script_EVENT_S02E01A_L003[] = { /* 0x8128590 */ DEBUGINFO_O(3150), - { 0xaf, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_STORMY_SEA, TRUE), SCENARIO_CALC(SCENARIO_SUB2, 33, 4), RET, }; static const struct ScriptCommand s_script_EVENT_S02E01A_L004[] = { /* 0x81285d0 */ DEBUGINFO_O(3157), - { 0xb0, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_STORMY_SEA), SCENARIO_CALC(SCENARIO_SUB2, 34, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 33, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3167,7 +3167,7 @@ static const struct ScriptCommand s_script_EVENT_S02E01A_L004[] = { /* 0x81285d0 static const struct ScriptCommand s_script_EVENT_S02E01A_L004L[] = { /* 0x8128650 */ DEBUGINFO_O(3168), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3178,7 +3178,7 @@ static const struct ScriptCommand s_script_EVENT_S02E02A_START[] = { /* 0x812869 LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB2, 34, 1), { 0x3b, 0x20, 0x0000, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_STORMY_SEA), RET_DIRECT, }; @@ -3188,8 +3188,8 @@ static const struct ScriptCommand s_script_EVENT_S02E02A_END[] = { /* 0x8128710 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB2, 35, 0), - { 0xb0, 0x01, 0x0010, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0011, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_STORMY_SEA), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SILVER_TRENCH), RET_DIRECT, }; @@ -3202,18 +3202,18 @@ static const struct ScriptCommand s_script_EVENT_S02E02A_L001[] = { /* 0x8128790 static const struct ScriptCommand s_script_EVENT_S02E02A_L002[] = { /* 0x81287c0 */ DEBUGINFO_O(3203), EXECUTE_SUBSTATION(158, 2, 0), - { 0xaf, 0x01, 0x0011, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_SILVER_TRENCH, TRUE), SCENARIO_CALC(SCENARIO_SUB2, 34, 3), - EXECUTE_SUBSTATION(12, 4, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 4, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S02E02A_L003[] = { /* 0x8128820 */ DEBUGINFO_O(3212), - { 0xb0, 0x01, 0x0011, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_SILVER_TRENCH), SCENARIO_CALC(SCENARIO_SUB2, 35, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 34, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3222,7 +3222,7 @@ static const struct ScriptCommand s_script_EVENT_S02E02A_L003[] = { /* 0x8128820 static const struct ScriptCommand s_script_EVENT_S02E02A_L003L[] = { /* 0x81288a0 */ DEBUGINFO_O(3223), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3241,7 +3241,7 @@ static const struct ScriptCommand s_script_EVENT_S03E01A_CONTINUE[] = { /* 0x812 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB3, 36, 2), - { 0xaf, 0x01, 0x0012, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_METEOR_CAVE, TRUE), RET_DIRECT, }; @@ -3251,25 +3251,25 @@ static const struct ScriptCommand s_script_EVENT_S03E01A_END[] = { /* 0x81289b0 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB3, 37, 0), - { 0xb0, 0x01, 0x0012, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_METEOR_CAVE), RET_DIRECT, }; static const struct ScriptCommand s_script_EVENT_S03E01A_L001[] = { /* 0x8128a20 */ DEBUGINFO_O(3259), - { 0xaf, 0x01, 0x0012, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_METEOR_CAVE, TRUE), SCENARIO_CALC(SCENARIO_SUB3, 36, 2), - EXECUTE_SUBSTATION(9, 81, 0), - EXECUTE_SUBSTATION(12, 4, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 81, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 4, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S03E01A_L002[] = { /* 0x8128a80 */ DEBUGINFO_O(3268), - { 0xb0, 0x01, 0x0012, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_METEOR_CAVE), SCENARIO_CALC(SCENARIO_SUB3, 37, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 36, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3278,7 +3278,7 @@ static const struct ScriptCommand s_script_EVENT_S03E01A_L002[] = { /* 0x8128a80 static const struct ScriptCommand s_script_EVENT_S03E01A_L002L[] = { /* 0x8128b00 */ DEBUGINFO_O(3279), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3297,11 +3297,11 @@ static const struct ScriptCommand s_script_EVENT_S04E01A_LAST[] = { /* 0x8128ba0 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB4, 43, 0), - { 0xaf, 0x00, 0x0013, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0015, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0016, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0017, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_GREAT_CANYON_2, FALSE), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FIERY_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_LIGHTNING_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_NORTHWIND_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_FARAWAY), RET_DIRECT, }; @@ -3311,19 +3311,19 @@ static const struct ScriptCommand s_script_EVENT_S04E01A_END[] = { /* 0x8128c50 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB4, 43, 2), - { 0xaf, 0x00, 0x0013, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0015, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0016, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x0017, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_GREAT_CANYON_2, FALSE), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FIERY_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_LIGHTNING_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_NORTHWIND_FIELD), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_FARAWAY), RET_DIRECT, }; static const struct ScriptCommand s_script_EVENT_S04E01A_L001[] = { /* 0x8128d00 */ DEBUGINFO_O(3323), - EXECUTE_SUBSTATION(9, 82, 0), - EXECUTE_SUBSTATION(12, 9, 0), - { 0xaf, 0x01, 0x0013, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 82, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 9, 0), + CMD_UNK_AF(RESCUE_DUNGEON_GREAT_CANYON_2, TRUE), SCENARIO_CALC(SCENARIO_SUB4, 38, 2), RET, }; @@ -3331,11 +3331,11 @@ static const struct ScriptCommand s_script_EVENT_S04E01A_L001[] = { /* 0x8128d00 static const struct ScriptCommand s_script_EVENT_S04E01A_L002[] = { /* 0x8128d60 */ DEBUGINFO_O(3332), EXECUTE_SUBSTATION(192, 1, 0), - { 0xaf, 0x00, 0x0013, 0x00000000, 0x00000000, NULL }, - { 0xaf, 0x01, 0x0014, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_GREAT_CANYON_2, FALSE), + CMD_UNK_AF(RESCUE_DUNGEON_FIERY_FIELD, TRUE), SCENARIO_CALC(SCENARIO_SUB4, 39, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 38, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3350,11 +3350,11 @@ static const struct ScriptCommand s_script_EVENT_S04E01A_L002L[] = { /* 0x8128e0 static const struct ScriptCommand s_script_EVENT_S04E01B_L001[] = { /* 0x8128e30 */ DEBUGINFO_O(3351), EXECUTE_SUBSTATION(212, 1, 0), - { 0xb0, 0x01, 0x0014, 0x00000000, 0x00000000, NULL }, - { 0xaf, 0x01, 0x0015, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FIERY_FIELD), + CMD_UNK_AF(RESCUE_DUNGEON_LIGHTNING_FIELD, TRUE), SCENARIO_CALC(SCENARIO_SUB4, 40, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 39, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3369,11 +3369,11 @@ static const struct ScriptCommand s_script_EVENT_S04E01B_L001L[] = { /* 0x8128ed static const struct ScriptCommand s_script_EVENT_S04E01C_L001[] = { /* 0x8128f00 */ DEBUGINFO_O(3370), EXECUTE_SUBSTATION(213, 1, 0), - { 0xb0, 0x01, 0x0015, 0x00000000, 0x00000000, NULL }, - { 0xaf, 0x01, 0x0016, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_LIGHTNING_FIELD), + CMD_UNK_AF(RESCUE_DUNGEON_NORTHWIND_FIELD, TRUE), SCENARIO_CALC(SCENARIO_SUB4, 41, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 40, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3388,11 +3388,11 @@ static const struct ScriptCommand s_script_EVENT_S04E01C_L001L[] = { /* 0x8128fa static const struct ScriptCommand s_script_EVENT_S04E01D_L001[] = { /* 0x8128fd0 */ DEBUGINFO_O(3389), EXECUTE_SUBSTATION(214, 1, 0), - { 0xb0, 0x01, 0x0016, 0x00000000, 0x00000000, NULL }, - { 0xaf, 0x01, 0x0017, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_NORTHWIND_FIELD), + CMD_UNK_AF(RESCUE_DUNGEON_MT_FARAWAY, TRUE), SCENARIO_CALC(SCENARIO_SUB4, 42, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 41, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3406,10 +3406,10 @@ static const struct ScriptCommand s_script_EVENT_S04E01D_L001L[] = { /* 0x812907 static const struct ScriptCommand s_script_EVENT_S04E01E_L001[] = { /* 0x81290a0 */ DEBUGINFO_O(3408), - { 0xb0, 0x01, 0x0017, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MT_FARAWAY), SCENARIO_CALC(SCENARIO_SUB4, 43, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 42, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3442,7 +3442,7 @@ static const struct ScriptCommand s_script_EVENT_S05E01A_CONTINUE[] = { /* 0x812 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB5, 44, 2), - { 0xaf, 0x01, 0x0018, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_WESTERN_CAVE, TRUE), RET_DIRECT, }; @@ -3452,26 +3452,26 @@ static const struct ScriptCommand s_script_EVENT_S05E01A_END[] = { /* 0x8129250 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB5, 45, 0), - { 0xb0, 0x01, 0x0018, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WESTERN_CAVE), RET_DIRECT, }; static const struct ScriptCommand s_script_EVENT_S05E01A_L001[] = { /* 0x81292c0 */ DEBUGINFO_O(3460), - { 0xaf, 0x01, 0x0018, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_WESTERN_CAVE, TRUE), SCENARIO_CALC(SCENARIO_SUB5, 44, 2), EXECUTE_SUBSTATION(216, 1, 0), - EXECUTE_SUBSTATION(1, 46, 0), - EXECUTE_SUBSTATION(12, 4, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 46, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 4, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S05E01A_L002[] = { /* 0x8129330 */ DEBUGINFO_O(3470), - { 0xb0, 0x01, 0x0018, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WESTERN_CAVE), SCENARIO_CALC(SCENARIO_SUB5, 45, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 44, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3498,7 +3498,7 @@ static const struct ScriptCommand s_script_EVENT_S06E01A_CONTINUE[] = { /* 0x812 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB6, 46, 2), - { 0xaf, 0x01, 0x0019, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_NORTHERN_RANGE, TRUE), RET_DIRECT, }; @@ -3508,8 +3508,8 @@ static const struct ScriptCommand s_script_EVENT_S06E01A_END[] = { /* 0x81294b0 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB6, 48, 0), - { 0xb0, 0x01, 0x0019, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x001a, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_NORTHERN_RANGE), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_PITFALL_VALLEY), { 0x3b, 0x24, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x25, 0x0000, 0x00000000, 0x00000000, NULL }, { 0x3b, 0x26, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -3519,20 +3519,20 @@ static const struct ScriptCommand s_script_EVENT_S06E01A_END[] = { /* 0x81294b0 static const struct ScriptCommand s_script_EVENT_S06E01A_L001[] = { /* 0x8129570 */ DEBUGINFO_O(3521), - { 0xaf, 0x01, 0x0019, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_NORTHERN_RANGE, TRUE), SCENARIO_CALC(SCENARIO_SUB6, 46, 2), - EXECUTE_SUBSTATION(12, 10, 0), - EXECUTE_SUBSTATION(9, 83, 0), - EXECUTE_SUBSTATION(12, 11, 0), - EXECUTE_SUBSTATION(1, 47, 0), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 10, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 83, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 11, 0), + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 47, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S06E01A_L002[] = { /* 0x8129600 */ DEBUGINFO_O(3533), EXECUTE_SUBSTATION(217, 1, 0), - { 0xb0, 0x01, 0x0019, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_NORTHERN_RANGE), SCENARIO_CALC(SCENARIO_SUB6, 47, 2), UPDATE_VARINT(CALC_SET, GROUND_PLACE, 2), SCENARIO_CALC(SCENARIO_SELECT, 46, 0), @@ -3547,22 +3547,22 @@ static const struct ScriptCommand s_script_EVENT_S06E01A_L002L[] = { /* 0x812968 static const struct ScriptCommand s_script_EVENT_S06E01B_L001[] = { /* 0x81296a0 */ DEBUGINFO_O(3549), - EXECUTE_SUBSTATION(1, 48, 0), - { 0xaf, 0x01, 0x001a, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 48, 0), + CMD_UNK_AF(RESCUE_DUNGEON_PITFALL_VALLEY, TRUE), SCENARIO_CALC(SCENARIO_SUB6, 47, 2), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S06E01B_L002[] = { /* 0x8129710 */ DEBUGINFO_O(3559), EXECUTE_SUBSTATION(218, 1, 0), - EXECUTE_SUBSTATION(1, 49, 0), - { 0xb0, 0x01, 0x001a, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_POKEMON_SQUARE, 49, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_PITFALL_VALLEY), SCENARIO_CALC(SCENARIO_SUB6, 48, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 47, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3571,7 +3571,7 @@ static const struct ScriptCommand s_script_EVENT_S06E01B_L002[] = { /* 0x8129710 static const struct ScriptCommand s_script_EVENT_S06E01B_L002L[] = { /* 0x81297b0 */ DEBUGINFO_O(3572), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3590,7 +3590,7 @@ static const struct ScriptCommand s_script_EVENT_S07E01A_END[] = { /* 0x8129850 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB7, 50, 0), - { 0xb0, 0x01, 0x001b, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_BURIED_RELIC), RET_DIRECT, }; @@ -3602,17 +3602,17 @@ static const struct ScriptCommand s_script_EVENT_S07E01A_L001[] = { /* 0x81298c0 static const struct ScriptCommand s_script_EVENT_S07E01A_L002[] = { /* 0x81298f0 */ DEBUGINFO_O(3604), - { 0xaf, 0x01, 0x001b, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_BURIED_RELIC, TRUE), SCENARIO_CALC(SCENARIO_SUB7, 49, 3), RET, }; static const struct ScriptCommand s_script_EVENT_S07E01A_L003[] = { /* 0x8129930 */ DEBUGINFO_O(3611), - { 0xb0, 0x01, 0x001b, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_BURIED_RELIC), SCENARIO_CALC(SCENARIO_SUB7, 50, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 49, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3621,7 +3621,7 @@ static const struct ScriptCommand s_script_EVENT_S07E01A_L003[] = { /* 0x8129930 static const struct ScriptCommand s_script_EVENT_S07E01A_L003L[] = { /* 0x81299b0 */ DEBUGINFO_O(3622), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3640,7 +3640,7 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_END[] = { /* 0x8129a50 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB8, 52, 0), - { 0xb0, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WISH_CAVE), RET_DIRECT, }; @@ -3670,30 +3670,30 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L004[] = { /* 0x8129b50 static const struct ScriptCommand s_script_EVENT_S08E01A_L005[] = { /* 0x8129b80 */ DEBUGINFO_O(3672), - { 0xae, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AE(RESCUE_DUNGEON_WISH_CAVE), SCENARIO_CALC(SCENARIO_SUB8, 51, 7), RET, }; static const struct ScriptCommand s_script_EVENT_S08E01A_L005B[] = { /* 0x8129bc0 */ DEBUGINFO_O(3679), - EXECUTE_SUBSTATION(4, 7, 0), - { 0xaf, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 7, 0), + CMD_UNK_AF(RESCUE_DUNGEON_WISH_CAVE, TRUE), SCENARIO_CALC(SCENARIO_SUB8, 51, 8), SET_DUNGEON_RES(/* result */ 0, /* enter */ -1), UPDATE_VARINT(CALC_SET, GROUND_ENTER, 4), UPDATE_VARINT(CALC_SET, GROUND_GETOUT, 4), - EXECUTE_SUBSTATION(4, 0, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 0, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S08E01A_L006[] = { /* 0x8129c50 */ DEBUGINFO_O(3691), - EXECUTE_SUBSTATION(9, 84, 0), - { 0xb0, 0x01, 0x001c, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 84, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_WISH_CAVE), SCENARIO_CALC(SCENARIO_SUB8, 52, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 51, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3702,7 +3702,7 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L006[] = { /* 0x8129c50 static const struct ScriptCommand s_script_EVENT_S08E01A_L006L[] = { /* 0x8129ce0 */ DEBUGINFO_O(3703), CALL_SCRIPT(EVENT_DIVIDE_NEXT_DAY_FUNC), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3721,7 +3721,7 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L008[] = { /* 0x8129d40 UPDATE_VARINT(CALC_SET, PARTNER1_KIND, 0), UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 57, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3733,16 +3733,16 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L008[] = { /* 0x8129d40 { 0x3b, 0x29, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 3), LABEL(4), /* = 0x04 */ - EXECUTE_SUBSTATION(12, 12, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 12, 0), { 0x3b, 0x2a, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 5), - EXECUTE_SUBSTATION(9, 85, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 85, 0), JUMP_LABEL(5), LABEL(2), /* = 0x02 */ { 0x3b, 0x2d, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 3), LABEL(6), /* = 0x06 */ - EXECUTE_SUBSTATION(12, 13, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 13, 0), JUMP_LABEL(5), LABEL(3), /* = 0x03 */ { 0x3b, 0x29, 0x0000, 0x00000000, 0x00000000, NULL }, @@ -3750,11 +3750,11 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L008[] = { /* 0x8129d40 COND_EQUAL(2, /* to label */ 4), { 0x3b, 0x2d, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(1, /* to label */ 6), - EXECUTE_SUBSTATION(12, 14, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 14, 0), JUMP_LABEL(5), LABEL(5), /* = 0x05 */ CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 52, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3762,7 +3762,7 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L008[] = { /* 0x8129d40 static const struct ScriptCommand s_script_EVENT_S08E01A_L008L[] = { /* 0x812a034 */ DEBUGINFO_O(3764), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; @@ -3770,26 +3770,26 @@ static const struct ScriptCommand s_script_EVENT_S08E01A_L008A[] = { /* 0x812a06 DEBUGINFO_O(3770), { 0x3b, 0x29, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 0), - EXECUTE_SUBSTATION(12, 12, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 12, 0), { 0x3b, 0x2a, 0x0000, 0x00000000, 0x00000000, NULL }, COND_EQUAL(0, /* to label */ 0), - EXECUTE_SUBSTATION(9, 85, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 85, 0), LABEL(0), /* = 0x00 */ - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S08E01A_L008B[] = { /* 0x812a104 */ DEBUGINFO_O(3783), - EXECUTE_SUBSTATION(12, 13, 0), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 13, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S08E01A_L008C[] = { /* 0x812a144 */ DEBUGINFO_O(3790), - EXECUTE_SUBSTATION(12, 14, 0), - EXECUTE_SUBSTATION(12, 5, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 14, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 5, 0), RET, }; @@ -3808,8 +3808,8 @@ static const struct ScriptCommand s_script_EVENT_S09E01A_END[] = { /* 0x812a1e4 RET_DIRECT, LABEL(0), /* = 0x00 */ SCENARIO_CALC(SCENARIO_SUB9, 55, 2), - { 0xaf, 0x00, 0x001d, 0x00000000, 0x00000000, NULL }, - { 0xb0, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, + CMD_UNK_AF(RESCUE_DUNGEON_MT_FREEZE_2, FALSE), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MURKY_CAVE), RET_DIRECT, }; @@ -3833,8 +3833,8 @@ static const struct ScriptCommand s_script_EVENT_S09E01A_L003[] = { /* 0x812a2c4 static const struct ScriptCommand s_script_EVENT_S09E01A_L004[] = { /* 0x812a2f4 */ DEBUGINFO_O(3835), - EXECUTE_SUBSTATION(9, 86, 0), - { 0xaf, 0x01, 0x001d, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 86, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MT_FREEZE_2, TRUE), SCENARIO_CALC(SCENARIO_SUB9, 53, 6), RET, }; @@ -3849,11 +3849,11 @@ static const struct ScriptCommand s_script_EVENT_S09E01A_L004B[] = { /* 0x812a34 static const struct ScriptCommand s_script_EVENT_S09E01A_L005[] = { /* 0x812a384 */ DEBUGINFO_O(3850), EXECUTE_SUBSTATION(203, 1, 0), - EXECUTE_SUBSTATION(9, 88, 0), - { 0xaf, 0x00, 0x001d, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 88, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MT_FREEZE_2, FALSE), SCENARIO_CALC(SCENARIO_SUB9, 54, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 53, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3861,14 +3861,14 @@ static const struct ScriptCommand s_script_EVENT_S09E01A_L005[] = { /* 0x812a384 static const struct ScriptCommand s_script_EVENT_S09E01A_L005L[] = { /* 0x812a424 */ DEBUGINFO_O(3863), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; static const struct ScriptCommand s_script_EVENT_S09E01B_L001[] = { /* 0x812a454 */ DEBUGINFO_O(3869), - EXECUTE_SUBSTATION(9, 89, 0), - { 0xaf, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 89, 0), + CMD_UNK_AF(RESCUE_DUNGEON_MURKY_CAVE, TRUE), SCENARIO_CALC(SCENARIO_SUB9, 54, 2), RET, }; @@ -3885,11 +3885,11 @@ static const struct ScriptCommand s_script_EVENT_S09E01B_L002[] = { /* 0x812a4e4 EXECUTE_SUBSTATION(220, 1, 0), EXECUTE_SUBSTATION(163, 3, 0), EXECUTE_SUBSTATION(220, 2, 0), - EXECUTE_SUBSTATION(9, 91, 0), - { 0xb0, 0x01, 0x001e, 0x00000000, 0x00000000, NULL }, + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 91, 0), + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MURKY_CAVE), SCENARIO_CALC(SCENARIO_SUB9, 55, 2), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 54, 0), CALL_SCRIPT(NEXT_SAVE2_FUNC), JUMP_SCRIPT(EVENT_DIVIDE), @@ -3897,7 +3897,7 @@ static const struct ScriptCommand s_script_EVENT_S09E01B_L002[] = { /* 0x812a4e4 static const struct ScriptCommand s_script_EVENT_S09E01B_L002L[] = { /* 0x812a5a4 */ DEBUGINFO_O(3899), - EXECUTE_SUBSTATION(12, 8, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE_INSIDE, 8, 0), RET, }; @@ -3911,13 +3911,13 @@ static const struct ScriptCommand s_script_EVENT_R00E01A_L001[] = { /* 0x812a604 DEBUGINFO_O(3911), CLEAR_ARRAY(EVENT_LOCAL), LABEL(0), /* = 0x00 */ - EXECUTE_SUBSTATION(4, 11, 0), + EXECUTE_SUBSTATION(MAP_PELIPPER_POST_OFFICE, 11, 0), CJUMP_SCENARIO_0(SCENARIO_SELECT), COND(JUDGE_EQ, 56, /* to label */ 0), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 1), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 1), JUMPIF_EQUAL(EVENT_LOCAL, 0, /* to label */ 2), LABEL(1), /* = 0x01 */ - EXECUTE_SUBSTATION(9, 6, 0), + EXECUTE_SUBSTATION(MAP_TEAM_BASE, 6, 0), LABEL(2), /* = 0x02 */ CJUMP_VAR(DUNGEON_ENTER_INDEX), COND_EQUAL(36, /* to label */ 3), @@ -3927,16 +3927,16 @@ static const struct ScriptCommand s_script_EVENT_R00E01A_L001[] = { /* 0x812a604 UPDATE_VARINT(CALC_SET, PARTNER1_KIND, 0), UPDATE_VARINT(CALC_SET, PARTNER2_KIND, 0), CALL_SCRIPT(DISMISSAL_SALLY_MEMBER_FUNC), - UPDATE_VARINT(CALC_SET, GROUND_PLACE, 11), + UPDATE_VARINT(CALC_SET, GROUND_PLACE, GROUND_PLACE_TEAM_BASE_INSIDE), SCENARIO_CALC(SCENARIO_SELECT, 57, 0), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), JUMPIF_EQUAL(EVENT_LOCAL, 0, /* to label */ 6), LABEL(5), /* = 0x05 */ CALL_SCRIPT(NEXT_SAVE2_FUNC), LABEL(6), /* = 0x06 */ JUMP_SCRIPT(EVENT_DIVIDE), LABEL(3), /* = 0x03 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 7), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 7), JUMP_LABEL(4), LABEL(7), /* = 0x07 */ JUMP_SCRIPT(EVENT_S08E01A_L008), @@ -3977,7 +3977,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E01A[] = { /* 0x812a8d4 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 2, 1, /* to label */ 4), SCENARIO_CALC(SCENARIO_MAIN, 2, 2), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), JUMP_SCRIPT(EVENT_M01E01A_L002), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E01A_L003), @@ -3997,8 +3997,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E02A[] = { /* 0x812aa14 */ JUMPIF_EQUAL(SCENARIO_MAIN, 3, /* to label */ 3), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_M01E02A_L004), LABEL(4), /* = 0x04 */ JUMP_SCRIPT(EVENT_M01E02A_L006), @@ -4022,8 +4022,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E02B[] = { /* 0x812ab34 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 4, 6, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 4, 7), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E02B_L006), LABEL(6), /* = 0x06 */ NEXT_DUNGEON(-1, SCRIPT_DUNGEON_3), @@ -4035,8 +4035,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E02B[] = { /* 0x812ab34 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 4, 7, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 4, 8), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E02B_L006), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E02B_L008), @@ -4046,7 +4046,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E02B[] = { /* 0x812ab34 */ COND_EQUAL(3, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), LABEL(11), /* = 0x0b */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(12), /* = 0x0c */ @@ -4070,8 +4070,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E03A[] = { /* 0x812ae04 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 5, 9, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 5, 10), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E03A_L009), LABEL(6), /* = 0x06 */ NEXT_DUNGEON(-1, SCRIPT_DUNGEON_5), @@ -4083,8 +4083,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E03A[] = { /* 0x812ae04 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 5, 10, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 5, 11), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E03A_L009), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E03A_L011), @@ -4094,7 +4094,7 @@ static const struct ScriptCommand s_script_GETOUT_M01E03A[] = { /* 0x812ae04 */ COND_EQUAL(5, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), LABEL(11), /* = 0x0b */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(12), /* = 0x0c */ @@ -4117,8 +4117,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E04A[] = { /* 0x812b0d4 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 6, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_MAIN, 6, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_M01E04A_L004), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E04A_L006), @@ -4142,8 +4142,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E04B[] = { /* 0x812b224 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 7, 3, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 7, 4), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E04B_L004), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000bd, 0x00000000, NULL }, @@ -4155,8 +4155,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E04B[] = { /* 0x812b224 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 7, 4, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 7, 5), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E04B_L006), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E04B_L007), @@ -4166,10 +4166,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E04B[] = { /* 0x812b224 */ COND_EQUAL(8, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(11), /* = 0x0b */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 13), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 13), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(13), /* = 0x0d */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4195,8 +4195,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E05A[] = { /* 0x812b554 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 8, 3, /* to label */ 4), SCENARIO_CALC(SCENARIO_MAIN, 8, 4), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_M01E05A_L004), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E05A_L006), @@ -4219,8 +4219,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E07A[] = { /* 0x812b6a4 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 11, 4, /* to label */ 4), SCENARIO_CALC(SCENARIO_MAIN, 11, 5), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_M01E07A_L004), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E07A_L005), @@ -4244,8 +4244,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E07B[] = { /* 0x812b7f4 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 12, 2, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 12, 3), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E07B_L003), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000c4, 0x00000000, NULL }, @@ -4257,8 +4257,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E07B[] = { /* 0x812b7f4 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 12, 3, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 12, 4), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E07B_L004), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E07B_L005), @@ -4268,10 +4268,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E07B[] = { /* 0x812b7f4 */ COND_EQUAL(12, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(11), /* = 0x0b */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 13), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 13), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(13), /* = 0x0d */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4298,8 +4298,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E08A[] = { /* 0x812bb24 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 13, 2, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 13, 3), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08A_L003), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000c7, 0x00000000, NULL }, @@ -4311,8 +4311,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E08A[] = { /* 0x812bb24 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 13, 3, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 13, 4), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08A_L004), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E08A_L005), @@ -4322,10 +4322,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E08A[] = { /* 0x812bb24 */ COND_EQUAL(14, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(11), /* = 0x0b */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 13), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 13), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(13), /* = 0x0d */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4352,8 +4352,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E08B[] = { /* 0x812be54 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 14, 2, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 14, 3), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08B_L003), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000ca, 0x00000000, NULL }, @@ -4362,8 +4362,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E08B[] = { /* 0x812be54 */ JUMPIF_EQUAL(SCENARIO_MAIN, 14, /* to label */ 7), JUMP_LABEL(3), LABEL(7), /* = 0x07 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 8), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 8), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08B_L005), LABEL(8), /* = 0x08 */ JUMP_SCRIPT(EVENT_M01E08B_L006), @@ -4373,10 +4373,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E08B[] = { /* 0x812be54 */ COND_EQUAL(16, /* to label */ 10), JUMP_LABEL(3), LABEL(9), /* = 0x09 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 11), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 11), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(12), /* = 0x0c */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4403,8 +4403,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E09A[] = { /* 0x812c154 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 15, 11, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 15, 12), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E09A_L012), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000cd, 0x00000000, NULL }, @@ -4416,8 +4416,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E09A[] = { /* 0x812c154 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 15, 8, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 15, 9), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E09A_L014), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E09A_L015), @@ -4427,10 +4427,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E09A[] = { /* 0x812c154 */ COND_EQUAL(18, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(11), /* = 0x0b */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 13), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 13), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(13), /* = 0x0d */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4457,8 +4457,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E10A[] = { /* 0x812c484 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 16, 4, /* to label */ 5), SCENARIO_CALC(SCENARIO_MAIN, 16, 5), LABEL(5), /* = 0x05 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E10A_L005), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000d0, 0x00000000, NULL }, @@ -4470,8 +4470,8 @@ static const struct ScriptCommand s_script_GETOUT_M01E10A[] = { /* 0x812c484 */ JUMPIF_SCENE_GT(SCENARIO_MAIN, 16, 5, /* to label */ 8), SCENARIO_CALC(SCENARIO_MAIN, 16, 6), LABEL(8), /* = 0x08 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 9), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 9), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E10A_L007), LABEL(9), /* = 0x09 */ JUMP_SCRIPT(EVENT_M01E10A_L008), @@ -4481,10 +4481,10 @@ static const struct ScriptCommand s_script_GETOUT_M01E10A[] = { /* 0x812c484 */ COND_EQUAL(20, /* to label */ 11), JUMP_LABEL(3), LABEL(10), /* = 0x0a */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 12), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 12), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(11), /* = 0x0b */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 13), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 13), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(13), /* = 0x0d */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4504,8 +4504,8 @@ static const struct ScriptCommand s_script_GETOUT_S00E01A[] = { /* 0x812c7b4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 1), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 1), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ UPDATE_VARINT(CALC_SET, CLEAR_COUNT, 100), @@ -4527,8 +4527,8 @@ static const struct ScriptCommand s_script_GETOUT_S01E01A[] = { /* 0x812c894 */ JUMPIF_SCENE_GT(SCENARIO_SUB1, 29, 3, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB1, 29, 4), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S01E01A_L003), @@ -4551,8 +4551,8 @@ static const struct ScriptCommand s_script_GETOUT_S01E02A[] = { /* 0x812c9e4 */ JUMPIF_SCENE_GT(SCENARIO_SUB1, 31, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB1, 31, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S01E02A_L002), @@ -4575,8 +4575,8 @@ static const struct ScriptCommand s_script_GETOUT_S02E01A[] = { /* 0x812cb34 */ JUMPIF_SCENE_GT(SCENARIO_SUB2, 33, 4, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB2, 33, 5), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S02E01A_L004), @@ -4599,8 +4599,8 @@ static const struct ScriptCommand s_script_GETOUT_S02E02A[] = { /* 0x812cc84 */ JUMPIF_SCENE_GT(SCENARIO_SUB2, 34, 4, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB2, 34, 5), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S02E02A_L003), @@ -4623,8 +4623,8 @@ static const struct ScriptCommand s_script_GETOUT_S03E01A[] = { /* 0x812cdd4 */ JUMPIF_SCENE_GT(SCENARIO_SUB3, 36, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB3, 36, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S03E01A_L002), @@ -4644,8 +4644,8 @@ static const struct ScriptCommand s_script_GETOUT_S04E01A[] = { /* 0x812cf24 */ JUMPIF_EQUAL(SCENARIO_SUB4, 38, /* to label */ 3), JUMP_LABEL(2), LABEL(3), /* = 0x03 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S04E01A_L002), @@ -4669,8 +4669,8 @@ static const struct ScriptCommand s_script_GETOUT_S04E01B[] = { /* 0x812d044 */ JUMPIF_SCENE_GT(SCENARIO_SUB4, 39, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB4, 39, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S04E01B_L001), @@ -4693,8 +4693,8 @@ static const struct ScriptCommand s_script_GETOUT_S04E01C[] = { /* 0x812d194 */ JUMPIF_SCENE_GT(SCENARIO_SUB4, 40, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB4, 40, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S04E01C_L001), @@ -4717,8 +4717,8 @@ static const struct ScriptCommand s_script_GETOUT_S04E01D[] = { /* 0x812d2e4 */ JUMPIF_SCENE_GT(SCENARIO_SUB4, 41, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB4, 41, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S04E01D_L001), @@ -4741,8 +4741,8 @@ static const struct ScriptCommand s_script_GETOUT_S04E01E[] = { /* 0x812d434 */ JUMPIF_SCENE_GT(SCENARIO_SUB4, 42, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB4, 42, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S04E01E_L001), @@ -4765,8 +4765,8 @@ static const struct ScriptCommand s_script_GETOUT_S05E01A[] = { /* 0x812d584 */ JUMPIF_SCENE_GT(SCENARIO_SUB5, 44, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB5, 44, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S05E01A_L002), @@ -4789,8 +4789,8 @@ static const struct ScriptCommand s_script_GETOUT_S06E01A[] = { /* 0x812d6d4 */ JUMPIF_SCENE_GT(SCENARIO_SUB6, 46, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB6, 46, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S06E01A_L002), @@ -4813,8 +4813,8 @@ static const struct ScriptCommand s_script_GETOUT_S06E01B[] = { /* 0x812d824 */ JUMPIF_SCENE_GT(SCENARIO_SUB6, 47, 2, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB6, 47, 3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S06E01B_L002), @@ -4837,8 +4837,8 @@ static const struct ScriptCommand s_script_GETOUT_S07E01A[] = { /* 0x812d974 */ JUMPIF_SCENE_GT(SCENARIO_SUB7, 49, 3, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB7, 49, 4), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S07E01A_L003), @@ -4861,8 +4861,8 @@ static const struct ScriptCommand s_script_GETOUT_S08E01A[] = { /* 0x812dac4 */ JUMPIF_SCENE_GT(SCENARIO_SUB8, 51, 8, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB8, 51, 9), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S08E01A_L006), @@ -4883,8 +4883,8 @@ static const struct ScriptCommand s_script_GETOUT_S09E01A[] = { /* 0x812dc14 */ JUMPIF_EQUAL(SCENARIO_SUB9, 53, /* to label */ 4), JUMP_LABEL(3), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(6), /* = 0x06 */ { 0x01, 0x00, -0x0001, 0x000000ca, 0x00000000, NULL }, @@ -4893,8 +4893,8 @@ static const struct ScriptCommand s_script_GETOUT_S09E01A[] = { /* 0x812dc14 */ JUMPIF_EQUAL(SCENARIO_SUB9, 53, /* to label */ 7), JUMP_LABEL(3), LABEL(7), /* = 0x07 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 8), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 8), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(8), /* = 0x08 */ JUMP_SCRIPT(EVENT_S09E01A_L005), @@ -4904,8 +4904,8 @@ static const struct ScriptCommand s_script_GETOUT_S09E01A[] = { /* 0x812dc14 */ COND_EQUAL(38, /* to label */ 10), JUMP_LABEL(3), LABEL(9), /* = 0x09 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 11), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 11), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(GETOUT_R00E01A), LABEL(10), /* = 0x0a */ JUMP_SCRIPT(GETOUT_R00E01A), @@ -4930,8 +4930,8 @@ static const struct ScriptCommand s_script_GETOUT_S09E01B[] = { /* 0x812dea4 */ JUMPIF_SCENE_GT(SCENARIO_SUB9, 54, 3, /* to label */ 4), SCENARIO_CALC(SCENARIO_SUB9, 54, 4), LABEL(4), /* = 0x04 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_S09E01B_L002), @@ -4948,11 +4948,11 @@ static const struct ScriptCommand s_script_GETOUT_D62E01A[] = { /* 0x812dff4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ - { 0xb0, 0x01, 0x0029, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_PURITY_FOREST), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(1), /* = 0x01 */ @@ -4966,11 +4966,11 @@ static const struct ScriptCommand s_script_GETOUT_D43E01A[] = { /* 0x812e0e4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ - { 0xb0, 0x01, 0x002a, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_ODDITY_CAVE), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(1), /* = 0x01 */ @@ -4984,11 +4984,11 @@ static const struct ScriptCommand s_script_GETOUT_D44E01A[] = { /* 0x812e1d4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ - { 0xb0, 0x01, 0x002b, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_REMAINS_ISLAND), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(1), /* = 0x01 */ @@ -5002,11 +5002,11 @@ static const struct ScriptCommand s_script_GETOUT_D45E01A[] = { /* 0x812e2c4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ - { 0xb0, 0x01, 0x002c, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_MARVELOUS_SEA), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(1), /* = 0x01 */ @@ -5020,11 +5020,11 @@ static const struct ScriptCommand s_script_GETOUT_D46E01A[] = { /* 0x812e3b4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ - { 0xb0, 0x01, 0x002d, 0x00000000, 0x00000000, NULL }, + SET_RESCUE_CONQUERED(RESCUE_DUNGEON_FANTASY_STRAIT), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(GETOUT_R00E01A), LABEL(1), /* = 0x01 */ @@ -5045,8 +5045,8 @@ static const struct ScriptCommand s_script_GETOUT_U00E01A[] = { /* 0x812e4a4 */ COND_EQUAL(80, /* to label */ 2), JUMP_SCRIPT(EVENT_DIVIDE), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 3), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), LABEL(3), /* = 0x03 */ JUMP_SCRIPT(EVENT_DIVIDE), }; @@ -5058,8 +5058,8 @@ static const struct ScriptCommand s_script_GETOUT_R00E01A[] = { /* 0x812e5c4 */ COND_EQUAL(81, /* to label */ 0), JUMP_LABEL(1), LABEL(0), /* = 0x00 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 2), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 2), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 2), JUMP_SCRIPT(EVENT_S00E01A_L001), LABEL(2), /* = 0x02 */ SCENARIO_CALC(SCENARIO_SELECT, 56, 0), @@ -5086,8 +5086,8 @@ static const struct ScriptCommand s_script_GETOUT_T00E01A[] = { /* 0x812e6b4 */ CJUMP_VAR(DUNGEON_ENTER_INDEX), COND_EQUAL(78, /* to label */ 4), COND_EQUAL(79, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 6), - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 7), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 6), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 7), JUMP_LABEL(8), LABEL(7), /* = 0x07 */ CJUMP_VAR(DUNGEON_ENTER_INDEX), @@ -5204,14 +5204,14 @@ static const struct ScriptCommand s_script_GETOUT_M01E07T[] = { /* 0x812eeb8 */ JUMPIF_EQUAL(SCENARIO_MAIN, 12, /* to label */ 2), JUMP_LABEL(3), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E07A_T001), LABEL(4), /* = 0x04 */ JUMP_SCRIPT(EVENT_M01E07A_T002), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E07B_T001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E07B_T002), @@ -5227,14 +5227,14 @@ static const struct ScriptCommand s_script_GETOUT_M01E08T[] = { /* 0x812eff8 */ JUMPIF_EQUAL(SCENARIO_MAIN, 14, /* to label */ 2), JUMP_LABEL(3), LABEL(1), /* = 0x01 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 4), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 4), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08A_T001), LABEL(4), /* = 0x04 */ JUMP_SCRIPT(EVENT_M01E08A_T002), LABEL(2), /* = 0x02 */ - JUMPIF_EQUAL(START_MODE, 9, /* to label */ 5), - JUMPIF_EQUAL(START_MODE, 10, /* to label */ 3), + JUMPIF_EQUAL(START_MODE, STARTMODE_DUNGEON_WON, /* to label */ 5), + JUMPIF_EQUAL(START_MODE, STARTMODE_10, /* to label */ 3), JUMP_SCRIPT(EVENT_M01E08B_T001), LABEL(5), /* = 0x05 */ JUMP_SCRIPT(EVENT_M01E08B_T002), @@ -5261,413 +5261,412 @@ static const struct ScriptCommand s_script_MOVE_DEBUG_CAMERA[] = { /* 0x812f198 END_DELETE, }; -/*extern*/ const struct ScriptRef gFunctionScriptTable[] = { /* 0x812f1f8 */ - { 0, 4, _("END_TALK"), s_script_END_TALK }, - { 1, 4, _("WAIT_END_TALK_FUNC"), s_script_WAIT_END_TALK_FUNC }, - { 2, 4, _("WAIT_END_EVENT_FUNC"), s_script_WAIT_END_EVENT_FUNC }, - { 3, 4, _("WAIT_START_FUNC"), s_script_WAIT_START_FUNC }, - { 4, 4, _("INCOMPLETE_TALK"), s_script_INCOMPLETE_TALK }, - { 5, 4, _("NORMAL_WAIT_END_TALK"), s_script_NORMAL_WAIT_END_TALK }, - { 6, 4, _("LIVES_REPLY_NORMAL"), s_script_LIVES_REPLY_NORMAL }, - { 7, 4, _("LIVES_REPLY"), s_script_LIVES_REPLY }, - { 8, 4, _("OBJECT_REPLY_NORMAL"), s_script_OBJECT_REPLY_NORMAL }, - { 9, 4, _("EXAMINE_MISS"), s_script_EXAMINE_MISS }, - { 10, 4, _("ENTER_WAIT_FUNC"), s_script_ENTER_WAIT_FUNC }, - { 11, 4, _("UNIT_TALK"), s_script_UNIT_TALK }, - { 12, 4, _("HABITAT_TALK"), s_script_HABITAT_TALK }, - { 13, 4, _("HABITAT_TALK_S01E02A"), s_script_HABITAT_TALK_S01E02A }, - { 14, 5, _("HABITAT_MOVE1"), s_script_HABITAT_MOVE1 }, - { 15, 5, _("HABITAT_MOVE2"), s_script_HABITAT_MOVE2 }, - { 16, 5, _("HABITAT_MOVE_PAUSE"), s_script_HABITAT_MOVE_PAUSE }, - { 17, 5, _("HABITAT_MOVE_STAY_FIX"), s_script_HABITAT_MOVE_STAY_FIX }, - { 18, 5, _("HABITAT_MOVE_STAY_TURN"), s_script_HABITAT_MOVE_STAY_TURN }, - { 19, 5, _("LIVES_MOVE_NORMAL"), s_script_LIVES_MOVE_NORMAL }, - { 20, 5, _("LIVES_MOVE_CHANGE"), s_script_LIVES_MOVE_CHANGE }, - { 21, 5, _("OBJECT_MOVE_NORMAL"), s_script_OBJECT_MOVE_NORMAL }, - { 22, 5, _("OBJECT_MOVE_CHANGE"), s_script_OBJECT_MOVE_CHANGE }, - { 23, 5, _("EFFECT_MOVE_NORMAL"), s_script_EFFECT_MOVE_NORMAL }, - { 24, 5, _("EFFECT_MOVE_CHANGE"), s_script_EFFECT_MOVE_CHANGE }, - { 25, 5, _("MOVE_INIT"), s_script_MOVE_INIT }, - { 26, 5, _("MOVE_PAUSE"), s_script_MOVE_PAUSE }, - { 27, 5, _("MOVE_STAY"), s_script_MOVE_STAY }, - { 28, 5, _("MOVE_SLEEP"), s_script_MOVE_SLEEP }, - { 29, 5, _("MOVE_RANDOM"), s_script_MOVE_RANDOM }, - { 30, 5, _("MOVE_BOY"), s_script_MOVE_BOY }, - { 31, 5, _("MOVE_GIRL"), s_script_MOVE_GIRL }, - { 32, 9, _("WAKEUP_FUNC"), s_script_WAKEUP_FUNC }, - { 33, 9, _("LOOK_AROUND_FUNC"), s_script_LOOK_AROUND_FUNC }, - { 34, 9, _("LOOK_AROUND_DOWN_FUNC"), s_script_LOOK_AROUND_DOWN_FUNC }, - { 35, 9, _("LOOK_AROUND_RIGHT_FUNC"), s_script_LOOK_AROUND_RIGHT_FUNC }, - { 36, 9, _("LOOK_AROUND_LEFT_FUNC"), s_script_LOOK_AROUND_LEFT_FUNC }, - { 37, 9, _("JUMP_HAPPY_FUNC"), s_script_JUMP_HAPPY_FUNC }, - { 38, 9, _("JUMP_SURPRISE_FUNC"), s_script_JUMP_SURPRISE_FUNC }, - { 39, 9, _("JUMP_ANGRY_FUNC"), s_script_JUMP_ANGRY_FUNC }, - { 40, 9, _("NOTICE_FUNC"), s_script_NOTICE_FUNC }, - { 41, 9, _("QUESTION_FUNC"), s_script_QUESTION_FUNC }, - { 42, 9, _("SWEAT_FUNC"), s_script_SWEAT_FUNC }, - { 43, 9, _("SHOCK_FUNC"), s_script_SHOCK_FUNC }, - { 44, 9, _("SPREE_START_FUNC"), s_script_SPREE_START_FUNC }, - { 45, 9, _("SPREE_END_FUNC"), s_script_SPREE_END_FUNC }, - { 46, 9, _("SMILE_START_FUNC"), s_script_SMILE_START_FUNC }, - { 47, 9, _("SMILE_END_FUNC"), s_script_SMILE_END_FUNC }, - { 48, 9, _("ANGRY_START_FUNC"), s_script_ANGRY_START_FUNC }, - { 49, 9, _("ANGRY_END_FUNC"), s_script_ANGRY_END_FUNC }, - { 50, 5, _("MOVE_PLAZA_SLEEP"), s_script_MOVE_PLAZA_SLEEP }, - { 51, 9, _("INIT_PLAZA_SLEEP_STAY_FUNC"), s_script_INIT_PLAZA_SLEEP_STAY_FUNC }, - { 52, 9, _("INIT_PLAZA_SLEEP_TALK_FUNC"), s_script_INIT_PLAZA_SLEEP_TALK_FUNC }, - { 53, 8, _("INIT_SLEEP_FUNC"), s_script_INIT_SLEEP_FUNC }, - { 54, 8, _("INIT_BASE_FUNC"), s_script_INIT_BASE_FUNC }, - { 55, 8, _("INIT_DEBUG_HABITAT"), s_script_INIT_DEBUG_HABITAT }, - { 56, 7, _("NORMAL_MESSAGE"), NULL }, - { 57, 7, _("NORMAL_EVENT"), NULL }, - { 58, 7, _("NORMAL_CAMERA"), s_script_NORMAL_CAMERA }, - { 59, 7, _("DISMISSAL_SALLY_MEMBER_FUNC"), s_script_DISMISSAL_SALLY_MEMBER_FUNC }, - { 60, 7, _("DISMISSAL_SALLY_MEMBER2_FUNC"), s_script_DISMISSAL_SALLY_MEMBER2_FUNC }, - { 61, 7, _("DISMISSAL_SALLY_MEMBER3_FUNC"), s_script_DISMISSAL_SALLY_MEMBER3_FUNC }, - { 62, 7, _("DISMISSAL_SALLY_MEMBER4_FUNC"), s_script_DISMISSAL_SALLY_MEMBER4_FUNC }, - { 63, 7, _("NEXT_SAVE_FUNC"), s_script_NEXT_SAVE_FUNC }, - { 64, 7, _("NEXT_SAVE2_FUNC"), s_script_NEXT_SAVE2_FUNC }, - { 65, 7, _("SAVE_POINT"), s_script_SAVE_POINT }, - { 66, 7, _("WAREHOUSE_POINT"), s_script_WAREHOUSE_POINT }, - { 67, 7, _("SAVE_AND_WAREHOUSE_POINT"), s_script_SAVE_AND_WAREHOUSE_POINT }, - { 68, 7, _("WORLD_MAP_POINT"), s_script_WORLD_MAP_POINT }, - { 69, 7, _("FORMATION_HERO"), s_script_FORMATION_HERO }, - { 70, 7, _("EVOLUTION_HERO"), s_script_EVOLUTION_HERO }, - { 71, 7, _("WARP_LIVES_START"), s_script_WARP_LIVES_START }, - { 72, 7, _("WARP_LIVES_START2"), s_script_WARP_LIVES_START2 }, - { 73, 7, _("WARP_LIVES_START3"), s_script_WARP_LIVES_START3 }, - { 74, 7, _("WARP_LIVES_ARRIVE"), s_script_WARP_LIVES_ARRIVE }, - { 75, 7, _("WARP_LIVES_ARRIVE2"), s_script_WARP_LIVES_ARRIVE2 }, - { 76, 7, _("WARP_LIVES_ARRIVE3"), s_script_WARP_LIVES_ARRIVE3 }, - { 77, 7, _("LIVES_WARP_START_FUNC"), s_script_LIVES_WARP_START_FUNC }, - { 78, 7, _("LIVES_WARP_START2_FUNC"), s_script_LIVES_WARP_START2_FUNC }, - { 79, 7, _("LIVES_WARP_START3_FUNC"), s_script_LIVES_WARP_START3_FUNC }, - { 80, 7, _("LIVES_WARP_START_SUB"), s_script_LIVES_WARP_START_SUB }, - { 81, 7, _("LIVES_WARP_ARRIVE_FUNC"), s_script_LIVES_WARP_ARRIVE_FUNC }, - { 82, 7, _("LIVES_WARP_ARRIVE2_FUNC"), s_script_LIVES_WARP_ARRIVE2_FUNC }, - { 83, 7, _("LIVES_WARP_ARRIVE3_FUNC"), s_script_LIVES_WARP_ARRIVE3_FUNC }, - { 84, 7, _("LIVES_WARP_ARRIVE_SUB"), s_script_LIVES_WARP_ARRIVE_SUB }, - { 85, 7, _("GET_ITEM_FUNC"), s_script_GET_ITEM_FUNC }, - { 86, 7, _("GET_ITEM_WAIT_FUNC"), s_script_GET_ITEM_WAIT_FUNC }, - { 87, 7, _("GET_ITEM2_FUNC"), s_script_GET_ITEM2_FUNC }, - { 88, 7, _("GET_ITEM2_WAIT_FUNC"), s_script_GET_ITEM2_WAIT_FUNC }, - { 89, 7, _("JOIN_FUNC"), s_script_JOIN_FUNC }, - { 90, 7, _("LODGE_START_FUNC"), s_script_LODGE_START_FUNC }, - { 91, 7, _("LODGE_WAIT_FUNC"), s_script_LODGE_WAIT_FUNC }, - { 92, 7, _("LODGE_END_FUNC"), s_script_LODGE_END_FUNC }, - { 93, 7, _("LODGE_SOUND_FUNC"), s_script_LODGE_SOUND_FUNC }, - { 94, 7, _("SAVE_START_FUNC"), s_script_SAVE_START_FUNC }, - { 95, 7, _("SAVE_WAIT_FUNC"), s_script_SAVE_WAIT_FUNC }, - { 96, 7, _("SAVE_END_FUNC"), s_script_SAVE_END_FUNC }, - { 97, 7, _("SAVE_SOUND_FUNC"), s_script_SAVE_SOUND_FUNC }, - { 98, 9, _("EFFECT_TEST1"), s_script_EFFECT_TEST1 }, - { 99, 9, _("EFFECT_TEST2"), s_script_EFFECT_TEST2 }, - { 100, 9, _("EFFECT_MOVE_DIVE"), s_script_EFFECT_MOVE_DIVE }, - { 101, 9, _("EFFECT_MOVE_WAVE"), s_script_EFFECT_MOVE_WAVE }, - { 102, 7, _("EVENT_DIVIDE"), s_script_EVENT_DIVIDE }, - { 103, 7, _("EVENT_DIVIDE_NEXT"), s_script_EVENT_DIVIDE_NEXT }, - { 104, 7, _("EVENT_DIVIDE_INIT_FUNC"), s_script_EVENT_DIVIDE_INIT_FUNC }, - { 105, 7, _("EVENT_DIVIDE_NEXT_DAY_FUNC"), s_script_EVENT_DIVIDE_NEXT_DAY_FUNC }, - { 106, 7, _("EVENT_DIVIDE_NEXT_DAY2_FUNC"), s_script_EVENT_DIVIDE_NEXT_DAY2_FUNC }, - { 107, 7, _("EVENT_DIVIDE_FIRST"), s_script_EVENT_DIVIDE_FIRST }, - { 108, 7, _("EVENT_DIVIDE_SECOND"), s_script_EVENT_DIVIDE_SECOND }, - { 109, 7, _("EVENT_DIVIDE_AFTER"), s_script_EVENT_DIVIDE_AFTER }, - { 110, 7, _("EVENT_DIVIDE_WARP_LOCK_FUNC"), s_script_EVENT_DIVIDE_WARP_LOCK_FUNC }, - { 111, 7, _("EVENT_RESCUE_ENTER_CHECK"), s_script_EVENT_RESCUE_ENTER_CHECK }, - { 112, 7, _("EVENT_RESCUE"), s_script_EVENT_RESCUE }, - { 113, 7, _("DEBUG_SCRIPT"), s_script_DEBUG_SCRIPT }, - { 114, 7, _("DEMO_CANCEL"), s_script_DEMO_CANCEL }, - { 115, 10, _("DEMO_01"), s_script_DEMO_01 }, - { 116, 10, _("DEMO_02"), s_script_DEMO_02 }, - { 117, 10, _("DEMO_03"), s_script_DEMO_03 }, - { 118, 10, _("DEMO_04"), s_script_DEMO_04 }, - { 119, 10, _("EVENT_M00E01A_L001"), s_script_EVENT_M00E01A_L001 }, - { 120, 10, _("EVENT_M01E01A_L001"), s_script_EVENT_M01E01A_L001 }, - { 121, 10, _("EVENT_M01E01A_L002"), s_script_EVENT_M01E01A_L002 }, - { 122, 10, _("EVENT_M01E01A_L003"), s_script_EVENT_M01E01A_L003 }, - { 123, 10, _("EVENT_M01E02A_L001"), s_script_EVENT_M01E02A_L001 }, - { 124, 12, _("EVENT_M01E02A_L001B"), s_script_EVENT_M01E02A_L001B }, - { 125, 10, _("EVENT_M01E02A_L001C"), s_script_EVENT_M01E02A_L001C }, - { 126, 10, _("EVENT_M01E02A_L002"), s_script_EVENT_M01E02A_L002 }, - { 127, 10, _("EVENT_M01E02A_L003"), s_script_EVENT_M01E02A_L003 }, - { 128, 10, _("EVENT_M01E02A_L004"), s_script_EVENT_M01E02A_L004 }, - { 129, 10, _("EVENT_M01E02A_L005"), s_script_EVENT_M01E02A_L005 }, - { 130, 10, _("EVENT_M01E02A_L006"), s_script_EVENT_M01E02A_L006 }, - { 131, 10, _("EVENT_M01E02B_L001"), s_script_EVENT_M01E02B_L001 }, - { 132, 10, _("EVENT_M01E02B_L002"), s_script_EVENT_M01E02B_L002 }, - { 133, 10, _("EVENT_M01E02B_L003"), s_script_EVENT_M01E02B_L003 }, - { 134, 10, _("EVENT_M01E02B_L004"), s_script_EVENT_M01E02B_L004 }, - { 135, 10, _("EVENT_M01E02B_L004B"), s_script_EVENT_M01E02B_L004B }, - { 136, 10, _("EVENT_M01E02B_L005"), s_script_EVENT_M01E02B_L005 }, - { 137, 10, _("EVENT_M01E02B_L006"), s_script_EVENT_M01E02B_L006 }, - { 138, 10, _("EVENT_M01E02B_L007"), s_script_EVENT_M01E02B_L007 }, - { 139, 10, _("EVENT_M01E02B_L008"), s_script_EVENT_M01E02B_L008 }, - { 140, 10, _("EVENT_M01E03A_L000"), s_script_EVENT_M01E03A_L000 }, - { 141, 10, _("EVENT_M01E03A_L001"), s_script_EVENT_M01E03A_L001 }, - { 142, 10, _("EVENT_M01E03A_L002"), s_script_EVENT_M01E03A_L002 }, - { 143, 10, _("EVENT_M01E03A_L003"), s_script_EVENT_M01E03A_L003 }, - { 144, 10, _("EVENT_M01E03A_L004"), s_script_EVENT_M01E03A_L004 }, - { 145, 10, _("EVENT_M01E03A_L005"), s_script_EVENT_M01E03A_L005 }, - { 146, 10, _("EVENT_M01E03A_L006"), s_script_EVENT_M01E03A_L006 }, - { 147, 10, _("EVENT_M01E03A_L007"), s_script_EVENT_M01E03A_L007 }, - { 148, 10, _("EVENT_M01E03A_L008"), s_script_EVENT_M01E03A_L008 }, - { 149, 10, _("EVENT_M01E03A_L009"), s_script_EVENT_M01E03A_L009 }, - { 150, 10, _("EVENT_M01E03A_L010"), s_script_EVENT_M01E03A_L010 }, - { 151, 10, _("EVENT_M01E03A_L011"), s_script_EVENT_M01E03A_L011 }, - { 152, 10, _("EVENT_M01E04A_L000"), s_script_EVENT_M01E04A_L000 }, - { 153, 10, _("EVENT_M01E04A_L001"), s_script_EVENT_M01E04A_L001 }, - { 154, 10, _("EVENT_M01E04A_L002"), s_script_EVENT_M01E04A_L002 }, - { 155, 10, _("EVENT_M01E04A_L003"), s_script_EVENT_M01E04A_L003 }, - { 156, 10, _("EVENT_M01E04A_L004"), s_script_EVENT_M01E04A_L004 }, - { 157, 12, _("EVENT_M01E04A_L005"), s_script_EVENT_M01E04A_L005 }, - { 158, 10, _("EVENT_M01E04A_L006"), s_script_EVENT_M01E04A_L006 }, - { 159, 10, _("EVENT_M01E04B_L000"), s_script_EVENT_M01E04B_L000 }, - { 160, 10, _("EVENT_M01E04B_L001"), s_script_EVENT_M01E04B_L001 }, - { 161, 10, _("EVENT_M01E04B_L002"), s_script_EVENT_M01E04B_L002 }, - { 162, 10, _("EVENT_M01E04B_L003"), s_script_EVENT_M01E04B_L003 }, - { 163, 10, _("EVENT_M01E04B_L004"), s_script_EVENT_M01E04B_L004 }, - { 164, 10, _("EVENT_M01E04B_L005"), s_script_EVENT_M01E04B_L005 }, - { 165, 10, _("EVENT_M01E04B_L006"), s_script_EVENT_M01E04B_L006 }, - { 166, 10, _("EVENT_M01E04B_L007"), s_script_EVENT_M01E04B_L007 }, - { 167, 10, _("EVENT_M01E05A_L000"), s_script_EVENT_M01E05A_L000 }, - { 168, 10, _("EVENT_M01E05A_L001"), s_script_EVENT_M01E05A_L001 }, - { 169, 10, _("EVENT_M01E05A_L002"), s_script_EVENT_M01E05A_L002 }, - { 170, 10, _("EVENT_M01E05A_L003"), s_script_EVENT_M01E05A_L003 }, - { 171, 10, _("EVENT_M01E05A_L004"), s_script_EVENT_M01E05A_L004 }, - { 172, 10, _("EVENT_M01E05A_L005"), s_script_EVENT_M01E05A_L005 }, - { 173, 10, _("EVENT_M01E05A_L006"), s_script_EVENT_M01E05A_L006 }, - { 174, 10, _("EVENT_M01E05B_L000"), s_script_EVENT_M01E05B_L000 }, - { 175, 10, _("EVENT_M01E05B_L001"), s_script_EVENT_M01E05B_L001 }, - { 176, 10, _("EVENT_M01E05B_L002"), s_script_EVENT_M01E05B_L002 }, - { 177, 12, _("EVENT_M01E05B_L003"), s_script_EVENT_M01E05B_L003 }, - { 178, 10, _("EVENT_M01E05B_L004"), s_script_EVENT_M01E05B_L004 }, - { 179, 10, _("EVENT_M01E05B_L005"), s_script_EVENT_M01E05B_L005 }, - { 180, 10, _("EVENT_M01E06A_L001"), s_script_EVENT_M01E06A_L001 }, - { 181, 10, _("EVENT_M01E06A_L002"), s_script_EVENT_M01E06A_L002 }, - { 182, 10, _("EVENT_M01E06A_L003"), s_script_EVENT_M01E06A_L003 }, - { 183, 10, _("EVENT_M01E07A_L001"), s_script_EVENT_M01E07A_L001 }, - { 184, 10, _("EVENT_M01E07A_L002"), s_script_EVENT_M01E07A_L002 }, - { 185, 10, _("EVENT_M01E07A_L003"), s_script_EVENT_M01E07A_L003 }, - { 186, 10, _("EVENT_M01E07A_L004"), s_script_EVENT_M01E07A_L004 }, - { 187, 10, _("EVENT_M01E07A_L005"), s_script_EVENT_M01E07A_L005 }, - { 188, 10, _("EVENT_M01E07A_T001"), s_script_EVENT_M01E07A_T001 }, - { 189, 10, _("EVENT_M01E07A_T002"), s_script_EVENT_M01E07A_T002 }, - { 190, 10, _("EVENT_M01E07B_L001"), s_script_EVENT_M01E07B_L001 }, - { 191, 10, _("EVENT_M01E07B_L002"), s_script_EVENT_M01E07B_L002 }, - { 192, 10, _("EVENT_M01E07B_L003"), s_script_EVENT_M01E07B_L003 }, - { 193, 10, _("EVENT_M01E07B_L004"), s_script_EVENT_M01E07B_L004 }, - { 194, 10, _("EVENT_M01E07B_L005"), s_script_EVENT_M01E07B_L005 }, - { 195, 10, _("EVENT_M01E07B_T001"), s_script_EVENT_M01E07B_T001 }, - { 196, 10, _("EVENT_M01E07B_T002"), s_script_EVENT_M01E07B_T002 }, - { 197, 10, _("EVENT_M01E08A_L001"), s_script_EVENT_M01E08A_L001 }, - { 198, 10, _("EVENT_M01E08A_L002"), s_script_EVENT_M01E08A_L002 }, - { 199, 10, _("EVENT_M01E08A_L003"), s_script_EVENT_M01E08A_L003 }, - { 200, 10, _("EVENT_M01E08A_L004"), s_script_EVENT_M01E08A_L004 }, - { 201, 10, _("EVENT_M01E08A_L005"), s_script_EVENT_M01E08A_L005 }, - { 202, 10, _("EVENT_M01E08A_T001"), s_script_EVENT_M01E08A_T001 }, - { 203, 10, _("EVENT_M01E08A_T002"), s_script_EVENT_M01E08A_T002 }, - { 204, 10, _("EVENT_M01E08B_L001"), s_script_EVENT_M01E08B_L001 }, - { 205, 10, _("EVENT_M01E08B_L002"), s_script_EVENT_M01E08B_L002 }, - { 206, 10, _("EVENT_M01E08B_L003"), s_script_EVENT_M01E08B_L003 }, - { 207, 10, _("EVENT_M01E08B_L004"), s_script_EVENT_M01E08B_L004 }, - { 208, 10, _("EVENT_M01E08B_L005"), s_script_EVENT_M01E08B_L005 }, - { 209, 10, _("EVENT_M01E08B_L006"), s_script_EVENT_M01E08B_L006 }, - { 210, 10, _("EVENT_M01E08B_T001"), s_script_EVENT_M01E08B_T001 }, - { 211, 10, _("EVENT_M01E08B_T002"), s_script_EVENT_M01E08B_T002 }, - { 212, 10, _("EVENT_M01E09A_L001"), s_script_EVENT_M01E09A_L001 }, - { 213, 10, _("EVENT_M01E09A_L002"), s_script_EVENT_M01E09A_L002 }, - { 214, 10, _("EVENT_M01E09A_L003"), s_script_EVENT_M01E09A_L003 }, - { 215, 10, _("EVENT_M01E09A_L004"), s_script_EVENT_M01E09A_L004 }, - { 216, 10, _("EVENT_M01E09A_L005"), s_script_EVENT_M01E09A_L005 }, - { 217, 10, _("EVENT_M01E09A_L006"), s_script_EVENT_M01E09A_L006 }, - { 218, 10, _("EVENT_M01E09A_L007"), s_script_EVENT_M01E09A_L007 }, - { 219, 10, _("EVENT_M01E09A_L008"), s_script_EVENT_M01E09A_L008 }, - { 220, 10, _("EVENT_M01E09A_L009"), s_script_EVENT_M01E09A_L009 }, - { 221, 10, _("EVENT_M01E09A_L010"), s_script_EVENT_M01E09A_L010 }, - { 222, 10, _("EVENT_M01E09A_L011"), s_script_EVENT_M01E09A_L011 }, - { 223, 10, _("EVENT_M01E09A_L012"), s_script_EVENT_M01E09A_L012 }, - { 224, 10, _("EVENT_M01E09A_L013"), s_script_EVENT_M01E09A_L013 }, - { 225, 10, _("EVENT_M01E09A_L014"), s_script_EVENT_M01E09A_L014 }, - { 226, 10, _("EVENT_M01E09A_L015"), s_script_EVENT_M01E09A_L015 }, - { 227, 10, _("EVENT_M01E10A_L001"), s_script_EVENT_M01E10A_L001 }, - { 228, 10, _("EVENT_M01E10A_L002"), s_script_EVENT_M01E10A_L002 }, - { 229, 10, _("EVENT_M01E10A_L003"), s_script_EVENT_M01E10A_L003 }, - { 230, 10, _("EVENT_M01E10A_L004"), s_script_EVENT_M01E10A_L004 }, - { 231, 10, _("EVENT_M01E10A_L005"), s_script_EVENT_M01E10A_L005 }, - { 232, 10, _("EVENT_M01E10A_L006"), s_script_EVENT_M01E10A_L006 }, - { 233, 10, _("EVENT_M01E10A_L007"), s_script_EVENT_M01E10A_L007 }, - { 234, 10, _("EVENT_M01E10A_L008"), s_script_EVENT_M01E10A_L008 }, - { 235, 10, _("EVENT_M01END_L001"), s_script_EVENT_M01END_L001 }, - { 236, 10, _("EVENT_M01END_L002"), s_script_EVENT_M01END_L002 }, - { 237, 10, _("EVENT_M02E01A_L001"), s_script_EVENT_M02E01A_L001 }, - { 238, 10, _("EVENT_M02E01A_L002"), s_script_EVENT_M02E01A_L002 }, - { 239, 10, _("EVENT_M02E01A_L003"), s_script_EVENT_M02E01A_L003 }, - { 240, 10, _("EVENT_M02E02A_L001"), s_script_EVENT_M02E02A_L001 }, - { 241, 10, _("EVENT_M02E02B_L001"), s_script_EVENT_M02E02B_L001 }, - { 242, 10, _("EVENT_M02E02C_L001"), s_script_EVENT_M02E02C_L001 }, - { 243, 10, _("EVENT_M02E02D_L001"), s_script_EVENT_M02E02D_L001 }, - { 244, 10, _("EVENT_M02E02E_L001"), s_script_EVENT_M02E02E_L001 }, - { 245, 10, _("EVENT_M02E02F_L001"), s_script_EVENT_M02E02F_L001 }, - { 246, 10, _("EVENT_M02E02G_L001"), s_script_EVENT_M02E02G_L001 }, - { 247, 10, _("EVENT_M02E02H_L001"), s_script_EVENT_M02E02H_L001 }, - { 248, 10, _("EVENT_M02END_L001"), s_script_EVENT_M02END_L001 }, - { 249, 10, _("EVENT_S00E01A_L001"), s_script_EVENT_S00E01A_L001 }, - { 250, 10, _("EVENT_S00E01A_L002"), s_script_EVENT_S00E01A_L002 }, - { 251, 10, _("EVENT_S00E01A_L003"), s_script_EVENT_S00E01A_L003 }, - { 252, 10, _("EVENT_S00E01A_L004"), s_script_EVENT_S00E01A_L004 }, - { 253, 11, _("EVENT_S01E01A_START"), s_script_EVENT_S01E01A_START }, - { 254, 11, _("EVENT_S01E01A_CONTINUE"), s_script_EVENT_S01E01A_CONTINUE }, - { 255, 11, _("EVENT_S01E01A_END"), s_script_EVENT_S01E01A_END }, - { 256, 12, _("EVENT_S01E01A_L001"), s_script_EVENT_S01E01A_L001 }, - { 257, 10, _("EVENT_S01E01A_L002"), s_script_EVENT_S01E01A_L002 }, - { 258, 10, _("EVENT_S01E01A_L003"), s_script_EVENT_S01E01A_L003 }, - { 259, 10, _("EVENT_S01E01B_L001"), s_script_EVENT_S01E01B_L001 }, - { 260, 12, _("EVENT_S01E01B_L001L"), s_script_EVENT_S01E01B_L001L }, - { 261, 10, _("EVENT_S01E01C_L001"), s_script_EVENT_S01E01C_L001 }, - { 262, 11, _("EVENT_S01E02A_START"), s_script_EVENT_S01E02A_START }, - { 263, 11, _("EVENT_S01E02A_END"), s_script_EVENT_S01E02A_END }, - { 264, 10, _("EVENT_S01E02A_L001"), s_script_EVENT_S01E02A_L001 }, - { 265, 10, _("EVENT_S01E02A_L002"), s_script_EVENT_S01E02A_L002 }, - { 266, 12, _("EVENT_S01E02A_L002L"), s_script_EVENT_S01E02A_L002L }, - { 267, 12, _("EVENT_S01E02B_L001"), s_script_EVENT_S01E02B_L001 }, - { 268, 12, _("EVENT_S01E02B_L002"), s_script_EVENT_S01E02B_L002 }, - { 269, 11, _("EVENT_S02E01A_START"), s_script_EVENT_S02E01A_START }, - { 270, 11, _("EVENT_S02E01A_END"), s_script_EVENT_S02E01A_END }, - { 271, 12, _("EVENT_S02E01A_L001"), s_script_EVENT_S02E01A_L001 }, - { 272, 12, _("EVENT_S02E01A_L002"), s_script_EVENT_S02E01A_L002 }, - { 273, 12, _("EVENT_S02E01A_L003"), s_script_EVENT_S02E01A_L003 }, - { 274, 12, _("EVENT_S02E01A_L004"), s_script_EVENT_S02E01A_L004 }, - { 275, 12, _("EVENT_S02E01A_L004L"), s_script_EVENT_S02E01A_L004L }, - { 276, 11, _("EVENT_S02E02A_START"), s_script_EVENT_S02E02A_START }, - { 277, 11, _("EVENT_S02E02A_END"), s_script_EVENT_S02E02A_END }, - { 278, 12, _("EVENT_S02E02A_L001"), s_script_EVENT_S02E02A_L001 }, - { 279, 10, _("EVENT_S02E02A_L002"), s_script_EVENT_S02E02A_L002 }, - { 280, 12, _("EVENT_S02E02A_L003"), s_script_EVENT_S02E02A_L003 }, - { 281, 12, _("EVENT_S02E02A_L003L"), s_script_EVENT_S02E02A_L003L }, - { 282, 11, _("EVENT_S03E01A_START"), s_script_EVENT_S03E01A_START }, - { 283, 11, _("EVENT_S03E01A_CONTINUE"), s_script_EVENT_S03E01A_CONTINUE }, - { 284, 11, _("EVENT_S03E01A_END"), s_script_EVENT_S03E01A_END }, - { 285, 10, _("EVENT_S03E01A_L001"), s_script_EVENT_S03E01A_L001 }, - { 286, 12, _("EVENT_S03E01A_L002"), s_script_EVENT_S03E01A_L002 }, - { 287, 12, _("EVENT_S03E01A_L002L"), s_script_EVENT_S03E01A_L002L }, - { 288, 11, _("EVENT_S04E01A_START"), s_script_EVENT_S04E01A_START }, - { 289, 11, _("EVENT_S04E01A_LAST"), s_script_EVENT_S04E01A_LAST }, - { 290, 11, _("EVENT_S04E01A_END"), s_script_EVENT_S04E01A_END }, - { 291, 10, _("EVENT_S04E01A_L001"), s_script_EVENT_S04E01A_L001 }, - { 292, 10, _("EVENT_S04E01A_L002"), s_script_EVENT_S04E01A_L002 }, - { 293, 12, _("EVENT_S04E01A_L002L"), s_script_EVENT_S04E01A_L002L }, - { 294, 10, _("EVENT_S04E01B_L001"), s_script_EVENT_S04E01B_L001 }, - { 295, 12, _("EVENT_S04E01B_L001L"), s_script_EVENT_S04E01B_L001L }, - { 296, 10, _("EVENT_S04E01C_L001"), s_script_EVENT_S04E01C_L001 }, - { 297, 12, _("EVENT_S04E01C_L001L"), s_script_EVENT_S04E01C_L001L }, - { 298, 10, _("EVENT_S04E01D_L001"), s_script_EVENT_S04E01D_L001 }, - { 299, 12, _("EVENT_S04E01D_L001L"), s_script_EVENT_S04E01D_L001L }, - { 300, 10, _("EVENT_S04E01E_L001"), s_script_EVENT_S04E01E_L001 }, - { 301, 12, _("EVENT_S04E01E_L001L"), s_script_EVENT_S04E01E_L001L }, - { 302, 12, _("EVENT_S04E01F_L001"), s_script_EVENT_S04E01F_L001 }, - { 303, 11, _("EVENT_S05E01A_START"), s_script_EVENT_S05E01A_START }, - { 304, 11, _("EVENT_S05E01A_CONTINUE"), s_script_EVENT_S05E01A_CONTINUE }, - { 305, 11, _("EVENT_S05E01A_END"), s_script_EVENT_S05E01A_END }, - { 306, 10, _("EVENT_S05E01A_L001"), s_script_EVENT_S05E01A_L001 }, - { 307, 12, _("EVENT_S05E01A_L002"), s_script_EVENT_S05E01A_L002 }, - { 308, 12, _("EVENT_S05E01A_L002L"), s_script_EVENT_S05E01A_L002L }, - { 309, 11, _("EVENT_S06E01A_START"), s_script_EVENT_S06E01A_START }, - { 310, 11, _("EVENT_S06E01A_CONTINUE"), s_script_EVENT_S06E01A_CONTINUE }, - { 311, 11, _("EVENT_S06E01A_END"), s_script_EVENT_S06E01A_END }, - { 312, 10, _("EVENT_S06E01A_L001"), s_script_EVENT_S06E01A_L001 }, - { 313, 10, _("EVENT_S06E01A_L002"), s_script_EVENT_S06E01A_L002 }, - { 314, 12, _("EVENT_S06E01A_L002L"), s_script_EVENT_S06E01A_L002L }, - { 315, 10, _("EVENT_S06E01B_L001"), s_script_EVENT_S06E01B_L001 }, - { 316, 10, _("EVENT_S06E01B_L002"), s_script_EVENT_S06E01B_L002 }, - { 317, 12, _("EVENT_S06E01B_L002L"), s_script_EVENT_S06E01B_L002L }, - { 318, 11, _("EVENT_S07E01A_START"), s_script_EVENT_S07E01A_START }, - { 319, 11, _("EVENT_S07E01A_END"), s_script_EVENT_S07E01A_END }, - { 320, 12, _("EVENT_S07E01A_L001"), s_script_EVENT_S07E01A_L001 }, - { 321, 12, _("EVENT_S07E01A_L002"), s_script_EVENT_S07E01A_L002 }, - { 322, 12, _("EVENT_S07E01A_L003"), s_script_EVENT_S07E01A_L003 }, - { 323, 12, _("EVENT_S07E01A_L003L"), s_script_EVENT_S07E01A_L003L }, - { 324, 11, _("EVENT_S08E01A_START"), s_script_EVENT_S08E01A_START }, - { 325, 11, _("EVENT_S08E01A_END"), s_script_EVENT_S08E01A_END }, - { 326, 12, _("EVENT_S08E01A_L001"), s_script_EVENT_S08E01A_L001 }, - { 327, 12, _("EVENT_S08E01A_L002"), s_script_EVENT_S08E01A_L002 }, - { 328, 12, _("EVENT_S08E01A_L003"), s_script_EVENT_S08E01A_L003 }, - { 329, 12, _("EVENT_S08E01A_L004"), s_script_EVENT_S08E01A_L004 }, - { 330, 12, _("EVENT_S08E01A_L005"), s_script_EVENT_S08E01A_L005 }, - { 331, 10, _("EVENT_S08E01A_L005B"), s_script_EVENT_S08E01A_L005B }, - { 332, 10, _("EVENT_S08E01A_L006"), s_script_EVENT_S08E01A_L006 }, - { 333, 12, _("EVENT_S08E01A_L006L"), s_script_EVENT_S08E01A_L006L }, - { 334, 12, _("EVENT_S08E01A_L007"), s_script_EVENT_S08E01A_L007 }, - { 335, 10, _("EVENT_S08E01A_L008"), s_script_EVENT_S08E01A_L008 }, - { 336, 12, _("EVENT_S08E01A_L008L"), s_script_EVENT_S08E01A_L008L }, - { 337, 10, _("EVENT_S08E01A_L008A"), s_script_EVENT_S08E01A_L008A }, - { 338, 10, _("EVENT_S08E01A_L008B"), s_script_EVENT_S08E01A_L008B }, - { 339, 10, _("EVENT_S08E01A_L008C"), s_script_EVENT_S08E01A_L008C }, - { 340, 11, _("EVENT_S09E01A_START"), s_script_EVENT_S09E01A_START }, - { 341, 11, _("EVENT_S09E01A_END"), s_script_EVENT_S09E01A_END }, - { 342, 12, _("EVENT_S09E01A_L001"), s_script_EVENT_S09E01A_L001 }, - { 343, 12, _("EVENT_S09E01A_L002"), s_script_EVENT_S09E01A_L002 }, - { 344, 12, _("EVENT_S09E01A_L003"), s_script_EVENT_S09E01A_L003 }, - { 345, 10, _("EVENT_S09E01A_L004"), s_script_EVENT_S09E01A_L004 }, - { 346, 10, _("EVENT_S09E01A_L004B"), s_script_EVENT_S09E01A_L004B }, - { 347, 10, _("EVENT_S09E01A_L005"), s_script_EVENT_S09E01A_L005 }, - { 348, 12, _("EVENT_S09E01A_L005L"), s_script_EVENT_S09E01A_L005L }, - { 349, 10, _("EVENT_S09E01B_L001"), s_script_EVENT_S09E01B_L001 }, - { 350, 10, _("EVENT_S09E01B_L001B"), s_script_EVENT_S09E01B_L001B }, - { 351, 10, _("EVENT_S09E01B_L002"), s_script_EVENT_S09E01B_L002 }, - { 352, 12, _("EVENT_S09E01B_L002L"), s_script_EVENT_S09E01B_L002L }, - { 353, 12, _("EVENT_S09E01C_L001"), s_script_EVENT_S09E01C_L001 }, - { 354, 7, _("EVENT_R00E01A_L001"), s_script_EVENT_R00E01A_L001 }, - { 355, 1, _("COMMON_ENTER"), s_script_COMMON_ENTER }, - { 356, 1, _("DEBUG_ENTER"), s_script_DEBUG_ENTER }, - { 357, 2, _("GETOUT_NORMAL"), NULL }, - { 358, 2, _("GETOUT_HABITAT"), s_script_GETOUT_HABITAT }, - { 359, 2, _("GETOUT_M01E01A"), s_script_GETOUT_M01E01A }, - { 360, 2, _("GETOUT_M01E02A"), s_script_GETOUT_M01E02A }, - { 361, 2, _("GETOUT_M01E02B"), s_script_GETOUT_M01E02B }, - { 362, 2, _("GETOUT_M01E03A"), s_script_GETOUT_M01E03A }, - { 363, 2, _("GETOUT_M01E04A"), s_script_GETOUT_M01E04A }, - { 364, 2, _("GETOUT_M01E04B"), s_script_GETOUT_M01E04B }, - { 365, 2, _("GETOUT_M01E05A"), s_script_GETOUT_M01E05A }, - { 366, 2, _("GETOUT_M01E07A"), s_script_GETOUT_M01E07A }, - { 367, 2, _("GETOUT_M01E07B"), s_script_GETOUT_M01E07B }, - { 368, 2, _("GETOUT_M01E08A"), s_script_GETOUT_M01E08A }, - { 369, 2, _("GETOUT_M01E08B"), s_script_GETOUT_M01E08B }, - { 370, 2, _("GETOUT_M01E09A"), s_script_GETOUT_M01E09A }, - { 371, 2, _("GETOUT_M01E10A"), s_script_GETOUT_M01E10A }, - { 372, 2, _("GETOUT_S00E01A"), s_script_GETOUT_S00E01A }, - { 373, 2, _("GETOUT_S01E01A"), s_script_GETOUT_S01E01A }, - { 374, 2, _("GETOUT_S01E02A"), s_script_GETOUT_S01E02A }, - { 375, 2, _("GETOUT_S02E01A"), s_script_GETOUT_S02E01A }, - { 376, 2, _("GETOUT_S02E02A"), s_script_GETOUT_S02E02A }, - { 377, 2, _("GETOUT_S03E01A"), s_script_GETOUT_S03E01A }, - { 378, 2, _("GETOUT_S04E01A"), s_script_GETOUT_S04E01A }, - { 379, 2, _("GETOUT_S04E01B"), s_script_GETOUT_S04E01B }, - { 380, 2, _("GETOUT_S04E01C"), s_script_GETOUT_S04E01C }, - { 381, 2, _("GETOUT_S04E01D"), s_script_GETOUT_S04E01D }, - { 382, 2, _("GETOUT_S04E01E"), s_script_GETOUT_S04E01E }, - { 383, 2, _("GETOUT_S05E01A"), s_script_GETOUT_S05E01A }, - { 384, 2, _("GETOUT_S06E01A"), s_script_GETOUT_S06E01A }, - { 385, 2, _("GETOUT_S06E01B"), s_script_GETOUT_S06E01B }, - { 386, 2, _("GETOUT_S07E01A"), s_script_GETOUT_S07E01A }, - { 387, 2, _("GETOUT_S08E01A"), s_script_GETOUT_S08E01A }, - { 388, 2, _("GETOUT_S09E01A"), s_script_GETOUT_S09E01A }, - { 389, 2, _("GETOUT_S09E01B"), s_script_GETOUT_S09E01B }, - { 390, 2, _("GETOUT_D62E01A"), s_script_GETOUT_D62E01A }, - { 391, 2, _("GETOUT_D43E01A"), s_script_GETOUT_D43E01A }, - { 392, 2, _("GETOUT_D44E01A"), s_script_GETOUT_D44E01A }, - { 393, 2, _("GETOUT_D45E01A"), s_script_GETOUT_D45E01A }, - { 394, 2, _("GETOUT_D46E01A"), s_script_GETOUT_D46E01A }, - { 395, 2, _("GETOUT_U00E01A"), s_script_GETOUT_U00E01A }, - { 396, 2, _("GETOUT_R00E01A"), s_script_GETOUT_R00E01A }, - { 397, 2, _("GETOUT_T00E01A"), s_script_GETOUT_T00E01A }, - { 398, 2, _("GETOUT_M01E07T"), s_script_GETOUT_M01E07T }, - { 399, 2, _("GETOUT_M01E08T"), s_script_GETOUT_M01E08T }, - { 400, 7, _("EVENT_CONTROL"), NULL }, - { 401, 7, _("EVENT_WAKEUP"), NULL }, - { 402, 7, _("EVENT_STATION"), NULL }, - { 403, 8, _("STATION_CONTROL"), NULL }, - { 404, 1, _("ENTER_CONTROL"), NULL }, - { 405, 7, _("SETUP_DEBUG_CAMERA"), s_script_SETUP_DEBUG_CAMERA }, - { 406, 5, _("MOVE_DEBUG_CAMERA"), s_script_MOVE_DEBUG_CAMERA }, +const struct ScriptRef gFunctionScriptTable[NUM_SCRIPT_IDS] = { /* R = 0x812F1F8 | B = arm9.bin::020E7BE4 */ + [END_TALK] = { END_TALK, 4, _("END_TALK"), s_script_END_TALK }, + [WAIT_END_TALK_FUNC] = { WAIT_END_TALK_FUNC, 4, _("WAIT_END_TALK_FUNC"), s_script_WAIT_END_TALK_FUNC }, + [WAIT_END_EVENT_FUNC] = { WAIT_END_EVENT_FUNC, 4, _("WAIT_END_EVENT_FUNC"), s_script_WAIT_END_EVENT_FUNC }, + [WAIT_START_FUNC] = { WAIT_START_FUNC, 4, _("WAIT_START_FUNC"), s_script_WAIT_START_FUNC }, + [INCOMPLETE_TALK] = { INCOMPLETE_TALK, 4, _("INCOMPLETE_TALK"), s_script_INCOMPLETE_TALK }, + [NORMAL_WAIT_END_TALK] = { NORMAL_WAIT_END_TALK, 4, _("NORMAL_WAIT_END_TALK"), s_script_NORMAL_WAIT_END_TALK }, + [LIVES_REPLY_NORMAL] = { LIVES_REPLY_NORMAL, 4, _("LIVES_REPLY_NORMAL"), s_script_LIVES_REPLY_NORMAL }, + [LIVES_REPLY] = { LIVES_REPLY, 4, _("LIVES_REPLY"), s_script_LIVES_REPLY }, + [OBJECT_REPLY_NORMAL] = { OBJECT_REPLY_NORMAL, 4, _("OBJECT_REPLY_NORMAL"), s_script_OBJECT_REPLY_NORMAL }, + [EXAMINE_MISS] = { EXAMINE_MISS, 4, _("EXAMINE_MISS"), s_script_EXAMINE_MISS }, + [ENTER_WAIT_FUNC] = { ENTER_WAIT_FUNC, 4, _("ENTER_WAIT_FUNC"), s_script_ENTER_WAIT_FUNC }, + [UNIT_TALK] = { UNIT_TALK, 4, _("UNIT_TALK"), s_script_UNIT_TALK }, + [HABITAT_TALK] = { HABITAT_TALK, 4, _("HABITAT_TALK"), s_script_HABITAT_TALK }, + [HABITAT_TALK_S01E02A] = { HABITAT_TALK_S01E02A, 4, _("HABITAT_TALK_S01E02A"), s_script_HABITAT_TALK_S01E02A }, + [HABITAT_MOVE1] = { HABITAT_MOVE1, 5, _("HABITAT_MOVE1"), s_script_HABITAT_MOVE1 }, + [HABITAT_MOVE2] = { HABITAT_MOVE2, 5, _("HABITAT_MOVE2"), s_script_HABITAT_MOVE2 }, + [HABITAT_MOVE_PAUSE] = { HABITAT_MOVE_PAUSE, 5, _("HABITAT_MOVE_PAUSE"), s_script_HABITAT_MOVE_PAUSE }, + [HABITAT_MOVE_STAY_FIX] = { HABITAT_MOVE_STAY_FIX, 5, _("HABITAT_MOVE_STAY_FIX"), s_script_HABITAT_MOVE_STAY_FIX }, + [HABITAT_MOVE_STAY_TURN] = { HABITAT_MOVE_STAY_TURN, 5, _("HABITAT_MOVE_STAY_TURN"), s_script_HABITAT_MOVE_STAY_TURN }, + [LIVES_MOVE_NORMAL] = { LIVES_MOVE_NORMAL, 5, _("LIVES_MOVE_NORMAL"), s_script_LIVES_MOVE_NORMAL }, + [LIVES_MOVE_CHANGE] = { LIVES_MOVE_CHANGE, 5, _("LIVES_MOVE_CHANGE"), s_script_LIVES_MOVE_CHANGE }, + [OBJECT_MOVE_NORMAL] = { OBJECT_MOVE_NORMAL, 5, _("OBJECT_MOVE_NORMAL"), s_script_OBJECT_MOVE_NORMAL }, + [OBJECT_MOVE_CHANGE] = { OBJECT_MOVE_CHANGE, 5, _("OBJECT_MOVE_CHANGE"), s_script_OBJECT_MOVE_CHANGE }, + [EFFECT_MOVE_NORMAL] = { EFFECT_MOVE_NORMAL, 5, _("EFFECT_MOVE_NORMAL"), s_script_EFFECT_MOVE_NORMAL }, + [EFFECT_MOVE_CHANGE] = { EFFECT_MOVE_CHANGE, 5, _("EFFECT_MOVE_CHANGE"), s_script_EFFECT_MOVE_CHANGE }, + [MOVE_INIT] = { MOVE_INIT, 5, _("MOVE_INIT"), s_script_MOVE_INIT }, + [MOVE_PAUSE] = { MOVE_PAUSE, 5, _("MOVE_PAUSE"), s_script_MOVE_PAUSE }, + [MOVE_STAY] = { MOVE_STAY, 5, _("MOVE_STAY"), s_script_MOVE_STAY }, + [MOVE_SLEEP] = { MOVE_SLEEP, 5, _("MOVE_SLEEP"), s_script_MOVE_SLEEP }, + [MOVE_RANDOM] = { MOVE_RANDOM, 5, _("MOVE_RANDOM"), s_script_MOVE_RANDOM }, + [MOVE_BOY] = { MOVE_BOY, 5, _("MOVE_BOY"), s_script_MOVE_BOY }, + [MOVE_GIRL] = { MOVE_GIRL, 5, _("MOVE_GIRL"), s_script_MOVE_GIRL }, + [WAKEUP_FUNC] = { WAKEUP_FUNC, 9, _("WAKEUP_FUNC"), s_script_WAKEUP_FUNC }, + [LOOK_AROUND_FUNC] = { LOOK_AROUND_FUNC, 9, _("LOOK_AROUND_FUNC"), s_script_LOOK_AROUND_FUNC }, + [LOOK_AROUND_DOWN_FUNC] = { LOOK_AROUND_DOWN_FUNC, 9, _("LOOK_AROUND_DOWN_FUNC"), s_script_LOOK_AROUND_DOWN_FUNC }, + [LOOK_AROUND_RIGHT_FUNC] = { LOOK_AROUND_RIGHT_FUNC, 9, _("LOOK_AROUND_RIGHT_FUNC"), s_script_LOOK_AROUND_RIGHT_FUNC }, + [LOOK_AROUND_LEFT_FUNC] = { LOOK_AROUND_LEFT_FUNC, 9, _("LOOK_AROUND_LEFT_FUNC"), s_script_LOOK_AROUND_LEFT_FUNC }, + [JUMP_HAPPY_FUNC] = { JUMP_HAPPY_FUNC, 9, _("JUMP_HAPPY_FUNC"), s_script_JUMP_HAPPY_FUNC }, + [JUMP_SURPRISE_FUNC] = { JUMP_SURPRISE_FUNC, 9, _("JUMP_SURPRISE_FUNC"), s_script_JUMP_SURPRISE_FUNC }, + [JUMP_ANGRY_FUNC] = { JUMP_ANGRY_FUNC, 9, _("JUMP_ANGRY_FUNC"), s_script_JUMP_ANGRY_FUNC }, + [NOTICE_FUNC] = { NOTICE_FUNC, 9, _("NOTICE_FUNC"), s_script_NOTICE_FUNC }, + [QUESTION_FUNC] = { QUESTION_FUNC, 9, _("QUESTION_FUNC"), s_script_QUESTION_FUNC }, + [SWEAT_FUNC] = { SWEAT_FUNC, 9, _("SWEAT_FUNC"), s_script_SWEAT_FUNC }, + [SHOCK_FUNC] = { SHOCK_FUNC, 9, _("SHOCK_FUNC"), s_script_SHOCK_FUNC }, + [SPREE_START_FUNC] = { SPREE_START_FUNC, 9, _("SPREE_START_FUNC"), s_script_SPREE_START_FUNC }, + [SPREE_END_FUNC] = { SPREE_END_FUNC, 9, _("SPREE_END_FUNC"), s_script_SPREE_END_FUNC }, + [SMILE_START_FUNC] = { SMILE_START_FUNC, 9, _("SMILE_START_FUNC"), s_script_SMILE_START_FUNC }, + [SMILE_END_FUNC] = { SMILE_END_FUNC, 9, _("SMILE_END_FUNC"), s_script_SMILE_END_FUNC }, + [ANGRY_START_FUNC] = { ANGRY_START_FUNC, 9, _("ANGRY_START_FUNC"), s_script_ANGRY_START_FUNC }, + [ANGRY_END_FUNC] = { ANGRY_END_FUNC, 9, _("ANGRY_END_FUNC"), s_script_ANGRY_END_FUNC }, + [MOVE_PLAZA_SLEEP] = { MOVE_PLAZA_SLEEP, 5, _("MOVE_PLAZA_SLEEP"), s_script_MOVE_PLAZA_SLEEP }, + [INIT_PLAZA_SLEEP_STAY_FUNC] = { INIT_PLAZA_SLEEP_STAY_FUNC, 9, _("INIT_PLAZA_SLEEP_STAY_FUNC"), s_script_INIT_PLAZA_SLEEP_STAY_FUNC }, + [INIT_PLAZA_SLEEP_TALK_FUNC] = { INIT_PLAZA_SLEEP_TALK_FUNC, 9, _("INIT_PLAZA_SLEEP_TALK_FUNC"), s_script_INIT_PLAZA_SLEEP_TALK_FUNC }, + [INIT_SLEEP_FUNC] = { INIT_SLEEP_FUNC, 8, _("INIT_SLEEP_FUNC"), s_script_INIT_SLEEP_FUNC }, + [INIT_BASE_FUNC] = { INIT_BASE_FUNC, 8, _("INIT_BASE_FUNC"), s_script_INIT_BASE_FUNC }, + [INIT_DEBUG_HABITAT] = { INIT_DEBUG_HABITAT, 8, _("INIT_DEBUG_HABITAT"), s_script_INIT_DEBUG_HABITAT }, + [NORMAL_MESSAGE] = { NORMAL_MESSAGE, 7, _("NORMAL_MESSAGE"), NULL }, + [NORMAL_EVENT] = { NORMAL_EVENT, 7, _("NORMAL_EVENT"), NULL }, + [NORMAL_CAMERA] = { NORMAL_CAMERA, 7, _("NORMAL_CAMERA"), s_script_NORMAL_CAMERA }, + [DISMISSAL_SALLY_MEMBER_FUNC] = { DISMISSAL_SALLY_MEMBER_FUNC, 7, _("DISMISSAL_SALLY_MEMBER_FUNC"), s_script_DISMISSAL_SALLY_MEMBER_FUNC }, + [DISMISSAL_SALLY_MEMBER2_FUNC] = { DISMISSAL_SALLY_MEMBER2_FUNC, 7, _("DISMISSAL_SALLY_MEMBER2_FUNC"), s_script_DISMISSAL_SALLY_MEMBER2_FUNC }, + [DISMISSAL_SALLY_MEMBER3_FUNC] = { DISMISSAL_SALLY_MEMBER3_FUNC, 7, _("DISMISSAL_SALLY_MEMBER3_FUNC"), s_script_DISMISSAL_SALLY_MEMBER3_FUNC }, + [DISMISSAL_SALLY_MEMBER4_FUNC] = { DISMISSAL_SALLY_MEMBER4_FUNC, 7, _("DISMISSAL_SALLY_MEMBER4_FUNC"), s_script_DISMISSAL_SALLY_MEMBER4_FUNC }, + [NEXT_SAVE_FUNC] = { NEXT_SAVE_FUNC, 7, _("NEXT_SAVE_FUNC"), s_script_NEXT_SAVE_FUNC }, + [NEXT_SAVE2_FUNC] = { NEXT_SAVE2_FUNC, 7, _("NEXT_SAVE2_FUNC"), s_script_NEXT_SAVE2_FUNC }, + [SAVE_POINT] = { SAVE_POINT, 7, _("SAVE_POINT"), s_script_SAVE_POINT }, + [WAREHOUSE_POINT] = { WAREHOUSE_POINT, 7, _("WAREHOUSE_POINT"), s_script_WAREHOUSE_POINT }, + [SAVE_AND_WAREHOUSE_POINT] = { SAVE_AND_WAREHOUSE_POINT, 7, _("SAVE_AND_WAREHOUSE_POINT"), s_script_SAVE_AND_WAREHOUSE_POINT }, + [WORLD_MAP_POINT] = { WORLD_MAP_POINT, 7, _("WORLD_MAP_POINT"), s_script_WORLD_MAP_POINT }, + [FORMATION_HERO] = { FORMATION_HERO, 7, _("FORMATION_HERO"), s_script_FORMATION_HERO }, + [EVOLUTION_HERO] = { EVOLUTION_HERO, 7, _("EVOLUTION_HERO"), s_script_EVOLUTION_HERO }, + [WARP_LIVES_START] = { WARP_LIVES_START, 7, _("WARP_LIVES_START"), s_script_WARP_LIVES_START }, + [WARP_LIVES_START2] = { WARP_LIVES_START2, 7, _("WARP_LIVES_START2"), s_script_WARP_LIVES_START2 }, + [WARP_LIVES_START3] = { WARP_LIVES_START3, 7, _("WARP_LIVES_START3"), s_script_WARP_LIVES_START3 }, + [WARP_LIVES_ARRIVE] = { WARP_LIVES_ARRIVE, 7, _("WARP_LIVES_ARRIVE"), s_script_WARP_LIVES_ARRIVE }, + [WARP_LIVES_ARRIVE2] = { WARP_LIVES_ARRIVE2, 7, _("WARP_LIVES_ARRIVE2"), s_script_WARP_LIVES_ARRIVE2 }, + [WARP_LIVES_ARRIVE3] = { WARP_LIVES_ARRIVE3, 7, _("WARP_LIVES_ARRIVE3"), s_script_WARP_LIVES_ARRIVE3 }, + [LIVES_WARP_START_FUNC] = { LIVES_WARP_START_FUNC, 7, _("LIVES_WARP_START_FUNC"), s_script_LIVES_WARP_START_FUNC }, + [LIVES_WARP_START2_FUNC] = { LIVES_WARP_START2_FUNC, 7, _("LIVES_WARP_START2_FUNC"), s_script_LIVES_WARP_START2_FUNC }, + [LIVES_WARP_START3_FUNC] = { LIVES_WARP_START3_FUNC, 7, _("LIVES_WARP_START3_FUNC"), s_script_LIVES_WARP_START3_FUNC }, + [LIVES_WARP_START_SUB] = { LIVES_WARP_START_SUB, 7, _("LIVES_WARP_START_SUB"), s_script_LIVES_WARP_START_SUB }, + [LIVES_WARP_ARRIVE_FUNC] = { LIVES_WARP_ARRIVE_FUNC, 7, _("LIVES_WARP_ARRIVE_FUNC"), s_script_LIVES_WARP_ARRIVE_FUNC }, + [LIVES_WARP_ARRIVE2_FUNC] = { LIVES_WARP_ARRIVE2_FUNC, 7, _("LIVES_WARP_ARRIVE2_FUNC"), s_script_LIVES_WARP_ARRIVE2_FUNC }, + [LIVES_WARP_ARRIVE3_FUNC] = { LIVES_WARP_ARRIVE3_FUNC, 7, _("LIVES_WARP_ARRIVE3_FUNC"), s_script_LIVES_WARP_ARRIVE3_FUNC }, + [LIVES_WARP_ARRIVE_SUB] = { LIVES_WARP_ARRIVE_SUB, 7, _("LIVES_WARP_ARRIVE_SUB"), s_script_LIVES_WARP_ARRIVE_SUB }, + [GET_ITEM_FUNC] = { GET_ITEM_FUNC, 7, _("GET_ITEM_FUNC"), s_script_GET_ITEM_FUNC }, + [GET_ITEM_WAIT_FUNC] = { GET_ITEM_WAIT_FUNC, 7, _("GET_ITEM_WAIT_FUNC"), s_script_GET_ITEM_WAIT_FUNC }, + [GET_ITEM2_FUNC] = { GET_ITEM2_FUNC, 7, _("GET_ITEM2_FUNC"), s_script_GET_ITEM2_FUNC }, + [GET_ITEM2_WAIT_FUNC] = { GET_ITEM2_WAIT_FUNC, 7, _("GET_ITEM2_WAIT_FUNC"), s_script_GET_ITEM2_WAIT_FUNC }, + [JOIN_FUNC] = { JOIN_FUNC, 7, _("JOIN_FUNC"), s_script_JOIN_FUNC }, + [LODGE_START_FUNC] = { LODGE_START_FUNC, 7, _("LODGE_START_FUNC"), s_script_LODGE_START_FUNC }, + [LODGE_WAIT_FUNC] = { LODGE_WAIT_FUNC, 7, _("LODGE_WAIT_FUNC"), s_script_LODGE_WAIT_FUNC }, + [LODGE_END_FUNC] = { LODGE_END_FUNC, 7, _("LODGE_END_FUNC"), s_script_LODGE_END_FUNC }, + [LODGE_SOUND_FUNC] = { LODGE_SOUND_FUNC, 7, _("LODGE_SOUND_FUNC"), s_script_LODGE_SOUND_FUNC }, + [SAVE_START_FUNC] = { SAVE_START_FUNC, 7, _("SAVE_START_FUNC"), s_script_SAVE_START_FUNC }, + [SAVE_WAIT_FUNC] = { SAVE_WAIT_FUNC, 7, _("SAVE_WAIT_FUNC"), s_script_SAVE_WAIT_FUNC }, + [SAVE_END_FUNC] = { SAVE_END_FUNC, 7, _("SAVE_END_FUNC"), s_script_SAVE_END_FUNC }, + [SAVE_SOUND_FUNC] = { SAVE_SOUND_FUNC, 7, _("SAVE_SOUND_FUNC"), s_script_SAVE_SOUND_FUNC }, + [EFFECT_TEST1] = { EFFECT_TEST1, 9, _("EFFECT_TEST1"), s_script_EFFECT_TEST1 }, + [EFFECT_TEST2] = { EFFECT_TEST2, 9, _("EFFECT_TEST2"), s_script_EFFECT_TEST2 }, + [EFFECT_MOVE_DIVE] = { EFFECT_MOVE_DIVE, 9, _("EFFECT_MOVE_DIVE"), s_script_EFFECT_MOVE_DIVE }, + [EFFECT_MOVE_WAVE] = { EFFECT_MOVE_WAVE, 9, _("EFFECT_MOVE_WAVE"), s_script_EFFECT_MOVE_WAVE }, + [EVENT_DIVIDE] = { EVENT_DIVIDE, 7, _("EVENT_DIVIDE"), s_script_EVENT_DIVIDE }, + [EVENT_DIVIDE_NEXT] = { EVENT_DIVIDE_NEXT, 7, _("EVENT_DIVIDE_NEXT"), s_script_EVENT_DIVIDE_NEXT }, + [EVENT_DIVIDE_INIT_FUNC] = { EVENT_DIVIDE_INIT_FUNC, 7, _("EVENT_DIVIDE_INIT_FUNC"), s_script_EVENT_DIVIDE_INIT_FUNC }, + [EVENT_DIVIDE_NEXT_DAY_FUNC] = { EVENT_DIVIDE_NEXT_DAY_FUNC, 7, _("EVENT_DIVIDE_NEXT_DAY_FUNC"), s_script_EVENT_DIVIDE_NEXT_DAY_FUNC }, + [EVENT_DIVIDE_NEXT_DAY2_FUNC] = { EVENT_DIVIDE_NEXT_DAY2_FUNC, 7, _("EVENT_DIVIDE_NEXT_DAY2_FUNC"), s_script_EVENT_DIVIDE_NEXT_DAY2_FUNC }, + [EVENT_DIVIDE_FIRST] = { EVENT_DIVIDE_FIRST, 7, _("EVENT_DIVIDE_FIRST"), s_script_EVENT_DIVIDE_FIRST }, + [EVENT_DIVIDE_SECOND] = { EVENT_DIVIDE_SECOND, 7, _("EVENT_DIVIDE_SECOND"), s_script_EVENT_DIVIDE_SECOND }, + [EVENT_DIVIDE_AFTER] = { EVENT_DIVIDE_AFTER, 7, _("EVENT_DIVIDE_AFTER"), s_script_EVENT_DIVIDE_AFTER }, + [EVENT_DIVIDE_WARP_LOCK_FUNC] = { EVENT_DIVIDE_WARP_LOCK_FUNC, 7, _("EVENT_DIVIDE_WARP_LOCK_FUNC"), s_script_EVENT_DIVIDE_WARP_LOCK_FUNC }, + [EVENT_RESCUE_ENTER_CHECK] = { EVENT_RESCUE_ENTER_CHECK, 7, _("EVENT_RESCUE_ENTER_CHECK"), s_script_EVENT_RESCUE_ENTER_CHECK }, + [EVENT_RESCUE] = { EVENT_RESCUE, 7, _("EVENT_RESCUE"), s_script_EVENT_RESCUE }, + [DEBUG_SCRIPT] = { DEBUG_SCRIPT, 7, _("DEBUG_SCRIPT"), s_script_DEBUG_SCRIPT }, + [DEMO_CANCEL] = { DEMO_CANCEL, 7, _("DEMO_CANCEL"), s_script_DEMO_CANCEL }, + [DEMO_01] = { DEMO_01, 10, _("DEMO_01"), s_script_DEMO_01 }, + [DEMO_02] = { DEMO_02, 10, _("DEMO_02"), s_script_DEMO_02 }, + [DEMO_03] = { DEMO_03, 10, _("DEMO_03"), s_script_DEMO_03 }, + [DEMO_04] = { DEMO_04, 10, _("DEMO_04"), s_script_DEMO_04 }, + [EVENT_M00E01A_L001] = { EVENT_M00E01A_L001, 10, _("EVENT_M00E01A_L001"), s_script_EVENT_M00E01A_L001 }, + [EVENT_M01E01A_L001] = { EVENT_M01E01A_L001, 10, _("EVENT_M01E01A_L001"), s_script_EVENT_M01E01A_L001 }, + [EVENT_M01E01A_L002] = { EVENT_M01E01A_L002, 10, _("EVENT_M01E01A_L002"), s_script_EVENT_M01E01A_L002 }, + [EVENT_M01E01A_L003] = { EVENT_M01E01A_L003, 10, _("EVENT_M01E01A_L003"), s_script_EVENT_M01E01A_L003 }, + [EVENT_M01E02A_L001] = { EVENT_M01E02A_L001, 10, _("EVENT_M01E02A_L001"), s_script_EVENT_M01E02A_L001 }, + [EVENT_M01E02A_L001B] = { EVENT_M01E02A_L001B, 12, _("EVENT_M01E02A_L001B"), s_script_EVENT_M01E02A_L001B }, + [EVENT_M01E02A_L001C] = { EVENT_M01E02A_L001C, 10, _("EVENT_M01E02A_L001C"), s_script_EVENT_M01E02A_L001C }, + [EVENT_M01E02A_L002] = { EVENT_M01E02A_L002, 10, _("EVENT_M01E02A_L002"), s_script_EVENT_M01E02A_L002 }, + [EVENT_M01E02A_L003] = { EVENT_M01E02A_L003, 10, _("EVENT_M01E02A_L003"), s_script_EVENT_M01E02A_L003 }, + [EVENT_M01E02A_L004] = { EVENT_M01E02A_L004, 10, _("EVENT_M01E02A_L004"), s_script_EVENT_M01E02A_L004 }, + [EVENT_M01E02A_L005] = { EVENT_M01E02A_L005, 10, _("EVENT_M01E02A_L005"), s_script_EVENT_M01E02A_L005 }, + [EVENT_M01E02A_L006] = { EVENT_M01E02A_L006, 10, _("EVENT_M01E02A_L006"), s_script_EVENT_M01E02A_L006 }, + [EVENT_M01E02B_L001] = { EVENT_M01E02B_L001, 10, _("EVENT_M01E02B_L001"), s_script_EVENT_M01E02B_L001 }, + [EVENT_M01E02B_L002] = { EVENT_M01E02B_L002, 10, _("EVENT_M01E02B_L002"), s_script_EVENT_M01E02B_L002 }, + [EVENT_M01E02B_L003] = { EVENT_M01E02B_L003, 10, _("EVENT_M01E02B_L003"), s_script_EVENT_M01E02B_L003 }, + [EVENT_M01E02B_L004] = { EVENT_M01E02B_L004, 10, _("EVENT_M01E02B_L004"), s_script_EVENT_M01E02B_L004 }, + [EVENT_M01E02B_L004B] = { EVENT_M01E02B_L004B, 10, _("EVENT_M01E02B_L004B"), s_script_EVENT_M01E02B_L004B }, + [EVENT_M01E02B_L005] = { EVENT_M01E02B_L005, 10, _("EVENT_M01E02B_L005"), s_script_EVENT_M01E02B_L005 }, + [EVENT_M01E02B_L006] = { EVENT_M01E02B_L006, 10, _("EVENT_M01E02B_L006"), s_script_EVENT_M01E02B_L006 }, + [EVENT_M01E02B_L007] = { EVENT_M01E02B_L007, 10, _("EVENT_M01E02B_L007"), s_script_EVENT_M01E02B_L007 }, + [EVENT_M01E02B_L008] = { EVENT_M01E02B_L008, 10, _("EVENT_M01E02B_L008"), s_script_EVENT_M01E02B_L008 }, + [EVENT_M01E03A_L000] = { EVENT_M01E03A_L000, 10, _("EVENT_M01E03A_L000"), s_script_EVENT_M01E03A_L000 }, + [EVENT_M01E03A_L001] = { EVENT_M01E03A_L001, 10, _("EVENT_M01E03A_L001"), s_script_EVENT_M01E03A_L001 }, + [EVENT_M01E03A_L002] = { EVENT_M01E03A_L002, 10, _("EVENT_M01E03A_L002"), s_script_EVENT_M01E03A_L002 }, + [EVENT_M01E03A_L003] = { EVENT_M01E03A_L003, 10, _("EVENT_M01E03A_L003"), s_script_EVENT_M01E03A_L003 }, + [EVENT_M01E03A_L004] = { EVENT_M01E03A_L004, 10, _("EVENT_M01E03A_L004"), s_script_EVENT_M01E03A_L004 }, + [EVENT_M01E03A_L005] = { EVENT_M01E03A_L005, 10, _("EVENT_M01E03A_L005"), s_script_EVENT_M01E03A_L005 }, + [EVENT_M01E03A_L006] = { EVENT_M01E03A_L006, 10, _("EVENT_M01E03A_L006"), s_script_EVENT_M01E03A_L006 }, + [EVENT_M01E03A_L007] = { EVENT_M01E03A_L007, 10, _("EVENT_M01E03A_L007"), s_script_EVENT_M01E03A_L007 }, + [EVENT_M01E03A_L008] = { EVENT_M01E03A_L008, 10, _("EVENT_M01E03A_L008"), s_script_EVENT_M01E03A_L008 }, + [EVENT_M01E03A_L009] = { EVENT_M01E03A_L009, 10, _("EVENT_M01E03A_L009"), s_script_EVENT_M01E03A_L009 }, + [EVENT_M01E03A_L010] = { EVENT_M01E03A_L010, 10, _("EVENT_M01E03A_L010"), s_script_EVENT_M01E03A_L010 }, + [EVENT_M01E03A_L011] = { EVENT_M01E03A_L011, 10, _("EVENT_M01E03A_L011"), s_script_EVENT_M01E03A_L011 }, + [EVENT_M01E04A_L000] = { EVENT_M01E04A_L000, 10, _("EVENT_M01E04A_L000"), s_script_EVENT_M01E04A_L000 }, + [EVENT_M01E04A_L001] = { EVENT_M01E04A_L001, 10, _("EVENT_M01E04A_L001"), s_script_EVENT_M01E04A_L001 }, + [EVENT_M01E04A_L002] = { EVENT_M01E04A_L002, 10, _("EVENT_M01E04A_L002"), s_script_EVENT_M01E04A_L002 }, + [EVENT_M01E04A_L003] = { EVENT_M01E04A_L003, 10, _("EVENT_M01E04A_L003"), s_script_EVENT_M01E04A_L003 }, + [EVENT_M01E04A_L004] = { EVENT_M01E04A_L004, 10, _("EVENT_M01E04A_L004"), s_script_EVENT_M01E04A_L004 }, + [EVENT_M01E04A_L005] = { EVENT_M01E04A_L005, 12, _("EVENT_M01E04A_L005"), s_script_EVENT_M01E04A_L005 }, + [EVENT_M01E04A_L006] = { EVENT_M01E04A_L006, 10, _("EVENT_M01E04A_L006"), s_script_EVENT_M01E04A_L006 }, + [EVENT_M01E04B_L000] = { EVENT_M01E04B_L000, 10, _("EVENT_M01E04B_L000"), s_script_EVENT_M01E04B_L000 }, + [EVENT_M01E04B_L001] = { EVENT_M01E04B_L001, 10, _("EVENT_M01E04B_L001"), s_script_EVENT_M01E04B_L001 }, + [EVENT_M01E04B_L002] = { EVENT_M01E04B_L002, 10, _("EVENT_M01E04B_L002"), s_script_EVENT_M01E04B_L002 }, + [EVENT_M01E04B_L003] = { EVENT_M01E04B_L003, 10, _("EVENT_M01E04B_L003"), s_script_EVENT_M01E04B_L003 }, + [EVENT_M01E04B_L004] = { EVENT_M01E04B_L004, 10, _("EVENT_M01E04B_L004"), s_script_EVENT_M01E04B_L004 }, + [EVENT_M01E04B_L005] = { EVENT_M01E04B_L005, 10, _("EVENT_M01E04B_L005"), s_script_EVENT_M01E04B_L005 }, + [EVENT_M01E04B_L006] = { EVENT_M01E04B_L006, 10, _("EVENT_M01E04B_L006"), s_script_EVENT_M01E04B_L006 }, + [EVENT_M01E04B_L007] = { EVENT_M01E04B_L007, 10, _("EVENT_M01E04B_L007"), s_script_EVENT_M01E04B_L007 }, + [EVENT_M01E05A_L000] = { EVENT_M01E05A_L000, 10, _("EVENT_M01E05A_L000"), s_script_EVENT_M01E05A_L000 }, + [EVENT_M01E05A_L001] = { EVENT_M01E05A_L001, 10, _("EVENT_M01E05A_L001"), s_script_EVENT_M01E05A_L001 }, + [EVENT_M01E05A_L002] = { EVENT_M01E05A_L002, 10, _("EVENT_M01E05A_L002"), s_script_EVENT_M01E05A_L002 }, + [EVENT_M01E05A_L003] = { EVENT_M01E05A_L003, 10, _("EVENT_M01E05A_L003"), s_script_EVENT_M01E05A_L003 }, + [EVENT_M01E05A_L004] = { EVENT_M01E05A_L004, 10, _("EVENT_M01E05A_L004"), s_script_EVENT_M01E05A_L004 }, + [EVENT_M01E05A_L005] = { EVENT_M01E05A_L005, 10, _("EVENT_M01E05A_L005"), s_script_EVENT_M01E05A_L005 }, + [EVENT_M01E05A_L006] = { EVENT_M01E05A_L006, 10, _("EVENT_M01E05A_L006"), s_script_EVENT_M01E05A_L006 }, + [EVENT_M01E05B_L000] = { EVENT_M01E05B_L000, 10, _("EVENT_M01E05B_L000"), s_script_EVENT_M01E05B_L000 }, + [EVENT_M01E05B_L001] = { EVENT_M01E05B_L001, 10, _("EVENT_M01E05B_L001"), s_script_EVENT_M01E05B_L001 }, + [EVENT_M01E05B_L002] = { EVENT_M01E05B_L002, 10, _("EVENT_M01E05B_L002"), s_script_EVENT_M01E05B_L002 }, + [EVENT_M01E05B_L003] = { EVENT_M01E05B_L003, 12, _("EVENT_M01E05B_L003"), s_script_EVENT_M01E05B_L003 }, + [EVENT_M01E05B_L004] = { EVENT_M01E05B_L004, 10, _("EVENT_M01E05B_L004"), s_script_EVENT_M01E05B_L004 }, + [EVENT_M01E05B_L005] = { EVENT_M01E05B_L005, 10, _("EVENT_M01E05B_L005"), s_script_EVENT_M01E05B_L005 }, + [EVENT_M01E06A_L001] = { EVENT_M01E06A_L001, 10, _("EVENT_M01E06A_L001"), s_script_EVENT_M01E06A_L001 }, + [EVENT_M01E06A_L002] = { EVENT_M01E06A_L002, 10, _("EVENT_M01E06A_L002"), s_script_EVENT_M01E06A_L002 }, + [EVENT_M01E06A_L003] = { EVENT_M01E06A_L003, 10, _("EVENT_M01E06A_L003"), s_script_EVENT_M01E06A_L003 }, + [EVENT_M01E07A_L001] = { EVENT_M01E07A_L001, 10, _("EVENT_M01E07A_L001"), s_script_EVENT_M01E07A_L001 }, + [EVENT_M01E07A_L002] = { EVENT_M01E07A_L002, 10, _("EVENT_M01E07A_L002"), s_script_EVENT_M01E07A_L002 }, + [EVENT_M01E07A_L003] = { EVENT_M01E07A_L003, 10, _("EVENT_M01E07A_L003"), s_script_EVENT_M01E07A_L003 }, + [EVENT_M01E07A_L004] = { EVENT_M01E07A_L004, 10, _("EVENT_M01E07A_L004"), s_script_EVENT_M01E07A_L004 }, + [EVENT_M01E07A_L005] = { EVENT_M01E07A_L005, 10, _("EVENT_M01E07A_L005"), s_script_EVENT_M01E07A_L005 }, + [EVENT_M01E07A_T001] = { EVENT_M01E07A_T001, 10, _("EVENT_M01E07A_T001"), s_script_EVENT_M01E07A_T001 }, + [EVENT_M01E07A_T002] = { EVENT_M01E07A_T002, 10, _("EVENT_M01E07A_T002"), s_script_EVENT_M01E07A_T002 }, + [EVENT_M01E07B_L001] = { EVENT_M01E07B_L001, 10, _("EVENT_M01E07B_L001"), s_script_EVENT_M01E07B_L001 }, + [EVENT_M01E07B_L002] = { EVENT_M01E07B_L002, 10, _("EVENT_M01E07B_L002"), s_script_EVENT_M01E07B_L002 }, + [EVENT_M01E07B_L003] = { EVENT_M01E07B_L003, 10, _("EVENT_M01E07B_L003"), s_script_EVENT_M01E07B_L003 }, + [EVENT_M01E07B_L004] = { EVENT_M01E07B_L004, 10, _("EVENT_M01E07B_L004"), s_script_EVENT_M01E07B_L004 }, + [EVENT_M01E07B_L005] = { EVENT_M01E07B_L005, 10, _("EVENT_M01E07B_L005"), s_script_EVENT_M01E07B_L005 }, + [EVENT_M01E07B_T001] = { EVENT_M01E07B_T001, 10, _("EVENT_M01E07B_T001"), s_script_EVENT_M01E07B_T001 }, + [EVENT_M01E07B_T002] = { EVENT_M01E07B_T002, 10, _("EVENT_M01E07B_T002"), s_script_EVENT_M01E07B_T002 }, + [EVENT_M01E08A_L001] = { EVENT_M01E08A_L001, 10, _("EVENT_M01E08A_L001"), s_script_EVENT_M01E08A_L001 }, + [EVENT_M01E08A_L002] = { EVENT_M01E08A_L002, 10, _("EVENT_M01E08A_L002"), s_script_EVENT_M01E08A_L002 }, + [EVENT_M01E08A_L003] = { EVENT_M01E08A_L003, 10, _("EVENT_M01E08A_L003"), s_script_EVENT_M01E08A_L003 }, + [EVENT_M01E08A_L004] = { EVENT_M01E08A_L004, 10, _("EVENT_M01E08A_L004"), s_script_EVENT_M01E08A_L004 }, + [EVENT_M01E08A_L005] = { EVENT_M01E08A_L005, 10, _("EVENT_M01E08A_L005"), s_script_EVENT_M01E08A_L005 }, + [EVENT_M01E08A_T001] = { EVENT_M01E08A_T001, 10, _("EVENT_M01E08A_T001"), s_script_EVENT_M01E08A_T001 }, + [EVENT_M01E08A_T002] = { EVENT_M01E08A_T002, 10, _("EVENT_M01E08A_T002"), s_script_EVENT_M01E08A_T002 }, + [EVENT_M01E08B_L001] = { EVENT_M01E08B_L001, 10, _("EVENT_M01E08B_L001"), s_script_EVENT_M01E08B_L001 }, + [EVENT_M01E08B_L002] = { EVENT_M01E08B_L002, 10, _("EVENT_M01E08B_L002"), s_script_EVENT_M01E08B_L002 }, + [EVENT_M01E08B_L003] = { EVENT_M01E08B_L003, 10, _("EVENT_M01E08B_L003"), s_script_EVENT_M01E08B_L003 }, + [EVENT_M01E08B_L004] = { EVENT_M01E08B_L004, 10, _("EVENT_M01E08B_L004"), s_script_EVENT_M01E08B_L004 }, + [EVENT_M01E08B_L005] = { EVENT_M01E08B_L005, 10, _("EVENT_M01E08B_L005"), s_script_EVENT_M01E08B_L005 }, + [EVENT_M01E08B_L006] = { EVENT_M01E08B_L006, 10, _("EVENT_M01E08B_L006"), s_script_EVENT_M01E08B_L006 }, + [EVENT_M01E08B_T001] = { EVENT_M01E08B_T001, 10, _("EVENT_M01E08B_T001"), s_script_EVENT_M01E08B_T001 }, + [EVENT_M01E08B_T002] = { EVENT_M01E08B_T002, 10, _("EVENT_M01E08B_T002"), s_script_EVENT_M01E08B_T002 }, + [EVENT_M01E09A_L001] = { EVENT_M01E09A_L001, 10, _("EVENT_M01E09A_L001"), s_script_EVENT_M01E09A_L001 }, + [EVENT_M01E09A_L002] = { EVENT_M01E09A_L002, 10, _("EVENT_M01E09A_L002"), s_script_EVENT_M01E09A_L002 }, + [EVENT_M01E09A_L003] = { EVENT_M01E09A_L003, 10, _("EVENT_M01E09A_L003"), s_script_EVENT_M01E09A_L003 }, + [EVENT_M01E09A_L004] = { EVENT_M01E09A_L004, 10, _("EVENT_M01E09A_L004"), s_script_EVENT_M01E09A_L004 }, + [EVENT_M01E09A_L005] = { EVENT_M01E09A_L005, 10, _("EVENT_M01E09A_L005"), s_script_EVENT_M01E09A_L005 }, + [EVENT_M01E09A_L006] = { EVENT_M01E09A_L006, 10, _("EVENT_M01E09A_L006"), s_script_EVENT_M01E09A_L006 }, + [EVENT_M01E09A_L007] = { EVENT_M01E09A_L007, 10, _("EVENT_M01E09A_L007"), s_script_EVENT_M01E09A_L007 }, + [EVENT_M01E09A_L008] = { EVENT_M01E09A_L008, 10, _("EVENT_M01E09A_L008"), s_script_EVENT_M01E09A_L008 }, + [EVENT_M01E09A_L009] = { EVENT_M01E09A_L009, 10, _("EVENT_M01E09A_L009"), s_script_EVENT_M01E09A_L009 }, + [EVENT_M01E09A_L010] = { EVENT_M01E09A_L010, 10, _("EVENT_M01E09A_L010"), s_script_EVENT_M01E09A_L010 }, + [EVENT_M01E09A_L011] = { EVENT_M01E09A_L011, 10, _("EVENT_M01E09A_L011"), s_script_EVENT_M01E09A_L011 }, + [EVENT_M01E09A_L012] = { EVENT_M01E09A_L012, 10, _("EVENT_M01E09A_L012"), s_script_EVENT_M01E09A_L012 }, + [EVENT_M01E09A_L013] = { EVENT_M01E09A_L013, 10, _("EVENT_M01E09A_L013"), s_script_EVENT_M01E09A_L013 }, + [EVENT_M01E09A_L014] = { EVENT_M01E09A_L014, 10, _("EVENT_M01E09A_L014"), s_script_EVENT_M01E09A_L014 }, + [EVENT_M01E09A_L015] = { EVENT_M01E09A_L015, 10, _("EVENT_M01E09A_L015"), s_script_EVENT_M01E09A_L015 }, + [EVENT_M01E10A_L001] = { EVENT_M01E10A_L001, 10, _("EVENT_M01E10A_L001"), s_script_EVENT_M01E10A_L001 }, + [EVENT_M01E10A_L002] = { EVENT_M01E10A_L002, 10, _("EVENT_M01E10A_L002"), s_script_EVENT_M01E10A_L002 }, + [EVENT_M01E10A_L003] = { EVENT_M01E10A_L003, 10, _("EVENT_M01E10A_L003"), s_script_EVENT_M01E10A_L003 }, + [EVENT_M01E10A_L004] = { EVENT_M01E10A_L004, 10, _("EVENT_M01E10A_L004"), s_script_EVENT_M01E10A_L004 }, + [EVENT_M01E10A_L005] = { EVENT_M01E10A_L005, 10, _("EVENT_M01E10A_L005"), s_script_EVENT_M01E10A_L005 }, + [EVENT_M01E10A_L006] = { EVENT_M01E10A_L006, 10, _("EVENT_M01E10A_L006"), s_script_EVENT_M01E10A_L006 }, + [EVENT_M01E10A_L007] = { EVENT_M01E10A_L007, 10, _("EVENT_M01E10A_L007"), s_script_EVENT_M01E10A_L007 }, + [EVENT_M01E10A_L008] = { EVENT_M01E10A_L008, 10, _("EVENT_M01E10A_L008"), s_script_EVENT_M01E10A_L008 }, + [EVENT_M01END_L001] = { EVENT_M01END_L001, 10, _("EVENT_M01END_L001"), s_script_EVENT_M01END_L001 }, + [EVENT_M01END_L002] = { EVENT_M01END_L002, 10, _("EVENT_M01END_L002"), s_script_EVENT_M01END_L002 }, + [EVENT_M02E01A_L001] = { EVENT_M02E01A_L001, 10, _("EVENT_M02E01A_L001"), s_script_EVENT_M02E01A_L001 }, + [EVENT_M02E01A_L002] = { EVENT_M02E01A_L002, 10, _("EVENT_M02E01A_L002"), s_script_EVENT_M02E01A_L002 }, + [EVENT_M02E01A_L003] = { EVENT_M02E01A_L003, 10, _("EVENT_M02E01A_L003"), s_script_EVENT_M02E01A_L003 }, + [EVENT_M02E02A_L001] = { EVENT_M02E02A_L001, 10, _("EVENT_M02E02A_L001"), s_script_EVENT_M02E02A_L001 }, + [EVENT_M02E02B_L001] = { EVENT_M02E02B_L001, 10, _("EVENT_M02E02B_L001"), s_script_EVENT_M02E02B_L001 }, + [EVENT_M02E02C_L001] = { EVENT_M02E02C_L001, 10, _("EVENT_M02E02C_L001"), s_script_EVENT_M02E02C_L001 }, + [EVENT_M02E02D_L001] = { EVENT_M02E02D_L001, 10, _("EVENT_M02E02D_L001"), s_script_EVENT_M02E02D_L001 }, + [EVENT_M02E02E_L001] = { EVENT_M02E02E_L001, 10, _("EVENT_M02E02E_L001"), s_script_EVENT_M02E02E_L001 }, + [EVENT_M02E02F_L001] = { EVENT_M02E02F_L001, 10, _("EVENT_M02E02F_L001"), s_script_EVENT_M02E02F_L001 }, + [EVENT_M02E02G_L001] = { EVENT_M02E02G_L001, 10, _("EVENT_M02E02G_L001"), s_script_EVENT_M02E02G_L001 }, + [EVENT_M02E02H_L001] = { EVENT_M02E02H_L001, 10, _("EVENT_M02E02H_L001"), s_script_EVENT_M02E02H_L001 }, + [EVENT_M02END_L001] = { EVENT_M02END_L001, 10, _("EVENT_M02END_L001"), s_script_EVENT_M02END_L001 }, + [EVENT_S00E01A_L001] = { EVENT_S00E01A_L001, 10, _("EVENT_S00E01A_L001"), s_script_EVENT_S00E01A_L001 }, + [EVENT_S00E01A_L002] = { EVENT_S00E01A_L002, 10, _("EVENT_S00E01A_L002"), s_script_EVENT_S00E01A_L002 }, + [EVENT_S00E01A_L003] = { EVENT_S00E01A_L003, 10, _("EVENT_S00E01A_L003"), s_script_EVENT_S00E01A_L003 }, + [EVENT_S00E01A_L004] = { EVENT_S00E01A_L004, 10, _("EVENT_S00E01A_L004"), s_script_EVENT_S00E01A_L004 }, + [EVENT_S01E01A_START] = { EVENT_S01E01A_START, 11, _("EVENT_S01E01A_START"), s_script_EVENT_S01E01A_START }, + [EVENT_S01E01A_CONTINUE] = { EVENT_S01E01A_CONTINUE, 11, _("EVENT_S01E01A_CONTINUE"), s_script_EVENT_S01E01A_CONTINUE }, + [EVENT_S01E01A_END] = { EVENT_S01E01A_END, 11, _("EVENT_S01E01A_END"), s_script_EVENT_S01E01A_END }, + [EVENT_S01E01A_L001] = { EVENT_S01E01A_L001, 12, _("EVENT_S01E01A_L001"), s_script_EVENT_S01E01A_L001 }, + [EVENT_S01E01A_L002] = { EVENT_S01E01A_L002, 10, _("EVENT_S01E01A_L002"), s_script_EVENT_S01E01A_L002 }, + [EVENT_S01E01A_L003] = { EVENT_S01E01A_L003, 10, _("EVENT_S01E01A_L003"), s_script_EVENT_S01E01A_L003 }, + [EVENT_S01E01B_L001] = { EVENT_S01E01B_L001, 10, _("EVENT_S01E01B_L001"), s_script_EVENT_S01E01B_L001 }, + [EVENT_S01E01B_L001L] = { EVENT_S01E01B_L001L, 12, _("EVENT_S01E01B_L001L"), s_script_EVENT_S01E01B_L001L }, + [EVENT_S01E01C_L001] = { EVENT_S01E01C_L001, 10, _("EVENT_S01E01C_L001"), s_script_EVENT_S01E01C_L001 }, + [EVENT_S01E02A_START] = { EVENT_S01E02A_START, 11, _("EVENT_S01E02A_START"), s_script_EVENT_S01E02A_START }, + [EVENT_S01E02A_END] = { EVENT_S01E02A_END, 11, _("EVENT_S01E02A_END"), s_script_EVENT_S01E02A_END }, + [EVENT_S01E02A_L001] = { EVENT_S01E02A_L001, 10, _("EVENT_S01E02A_L001"), s_script_EVENT_S01E02A_L001 }, + [EVENT_S01E02A_L002] = { EVENT_S01E02A_L002, 10, _("EVENT_S01E02A_L002"), s_script_EVENT_S01E02A_L002 }, + [EVENT_S01E02A_L002L] = { EVENT_S01E02A_L002L, 12, _("EVENT_S01E02A_L002L"), s_script_EVENT_S01E02A_L002L }, + [EVENT_S01E02B_L001] = { EVENT_S01E02B_L001, 12, _("EVENT_S01E02B_L001"), s_script_EVENT_S01E02B_L001 }, + [EVENT_S01E02B_L002] = { EVENT_S01E02B_L002, 12, _("EVENT_S01E02B_L002"), s_script_EVENT_S01E02B_L002 }, + [EVENT_S02E01A_START] = { EVENT_S02E01A_START, 11, _("EVENT_S02E01A_START"), s_script_EVENT_S02E01A_START }, + [EVENT_S02E01A_END] = { EVENT_S02E01A_END, 11, _("EVENT_S02E01A_END"), s_script_EVENT_S02E01A_END }, + [EVENT_S02E01A_L001] = { EVENT_S02E01A_L001, 12, _("EVENT_S02E01A_L001"), s_script_EVENT_S02E01A_L001 }, + [EVENT_S02E01A_L002] = { EVENT_S02E01A_L002, 12, _("EVENT_S02E01A_L002"), s_script_EVENT_S02E01A_L002 }, + [EVENT_S02E01A_L003] = { EVENT_S02E01A_L003, 12, _("EVENT_S02E01A_L003"), s_script_EVENT_S02E01A_L003 }, + [EVENT_S02E01A_L004] = { EVENT_S02E01A_L004, 12, _("EVENT_S02E01A_L004"), s_script_EVENT_S02E01A_L004 }, + [EVENT_S02E01A_L004L] = { EVENT_S02E01A_L004L, 12, _("EVENT_S02E01A_L004L"), s_script_EVENT_S02E01A_L004L }, + [EVENT_S02E02A_START] = { EVENT_S02E02A_START, 11, _("EVENT_S02E02A_START"), s_script_EVENT_S02E02A_START }, + [EVENT_S02E02A_END] = { EVENT_S02E02A_END, 11, _("EVENT_S02E02A_END"), s_script_EVENT_S02E02A_END }, + [EVENT_S02E02A_L001] = { EVENT_S02E02A_L001, 12, _("EVENT_S02E02A_L001"), s_script_EVENT_S02E02A_L001 }, + [EVENT_S02E02A_L002] = { EVENT_S02E02A_L002, 10, _("EVENT_S02E02A_L002"), s_script_EVENT_S02E02A_L002 }, + [EVENT_S02E02A_L003] = { EVENT_S02E02A_L003, 12, _("EVENT_S02E02A_L003"), s_script_EVENT_S02E02A_L003 }, + [EVENT_S02E02A_L003L] = { EVENT_S02E02A_L003L, 12, _("EVENT_S02E02A_L003L"), s_script_EVENT_S02E02A_L003L }, + [EVENT_S03E01A_START] = { EVENT_S03E01A_START, 11, _("EVENT_S03E01A_START"), s_script_EVENT_S03E01A_START }, + [EVENT_S03E01A_CONTINUE] = { EVENT_S03E01A_CONTINUE, 11, _("EVENT_S03E01A_CONTINUE"), s_script_EVENT_S03E01A_CONTINUE }, + [EVENT_S03E01A_END] = { EVENT_S03E01A_END, 11, _("EVENT_S03E01A_END"), s_script_EVENT_S03E01A_END }, + [EVENT_S03E01A_L001] = { EVENT_S03E01A_L001, 10, _("EVENT_S03E01A_L001"), s_script_EVENT_S03E01A_L001 }, + [EVENT_S03E01A_L002] = { EVENT_S03E01A_L002, 12, _("EVENT_S03E01A_L002"), s_script_EVENT_S03E01A_L002 }, + [EVENT_S03E01A_L002L] = { EVENT_S03E01A_L002L, 12, _("EVENT_S03E01A_L002L"), s_script_EVENT_S03E01A_L002L }, + [EVENT_S04E01A_START] = { EVENT_S04E01A_START, 11, _("EVENT_S04E01A_START"), s_script_EVENT_S04E01A_START }, + [EVENT_S04E01A_LAST] = { EVENT_S04E01A_LAST, 11, _("EVENT_S04E01A_LAST"), s_script_EVENT_S04E01A_LAST }, + [EVENT_S04E01A_END] = { EVENT_S04E01A_END, 11, _("EVENT_S04E01A_END"), s_script_EVENT_S04E01A_END }, + [EVENT_S04E01A_L001] = { EVENT_S04E01A_L001, 10, _("EVENT_S04E01A_L001"), s_script_EVENT_S04E01A_L001 }, + [EVENT_S04E01A_L002] = { EVENT_S04E01A_L002, 10, _("EVENT_S04E01A_L002"), s_script_EVENT_S04E01A_L002 }, + [EVENT_S04E01A_L002L] = { EVENT_S04E01A_L002L, 12, _("EVENT_S04E01A_L002L"), s_script_EVENT_S04E01A_L002L }, + [EVENT_S04E01B_L001] = { EVENT_S04E01B_L001, 10, _("EVENT_S04E01B_L001"), s_script_EVENT_S04E01B_L001 }, + [EVENT_S04E01B_L001L] = { EVENT_S04E01B_L001L, 12, _("EVENT_S04E01B_L001L"), s_script_EVENT_S04E01B_L001L }, + [EVENT_S04E01C_L001] = { EVENT_S04E01C_L001, 10, _("EVENT_S04E01C_L001"), s_script_EVENT_S04E01C_L001 }, + [EVENT_S04E01C_L001L] = { EVENT_S04E01C_L001L, 12, _("EVENT_S04E01C_L001L"), s_script_EVENT_S04E01C_L001L }, + [EVENT_S04E01D_L001] = { EVENT_S04E01D_L001, 10, _("EVENT_S04E01D_L001"), s_script_EVENT_S04E01D_L001 }, + [EVENT_S04E01D_L001L] = { EVENT_S04E01D_L001L, 12, _("EVENT_S04E01D_L001L"), s_script_EVENT_S04E01D_L001L }, + [EVENT_S04E01E_L001] = { EVENT_S04E01E_L001, 10, _("EVENT_S04E01E_L001"), s_script_EVENT_S04E01E_L001 }, + [EVENT_S04E01E_L001L] = { EVENT_S04E01E_L001L, 12, _("EVENT_S04E01E_L001L"), s_script_EVENT_S04E01E_L001L }, + [EVENT_S04E01F_L001] = { EVENT_S04E01F_L001, 12, _("EVENT_S04E01F_L001"), s_script_EVENT_S04E01F_L001 }, + [EVENT_S05E01A_START] = { EVENT_S05E01A_START, 11, _("EVENT_S05E01A_START"), s_script_EVENT_S05E01A_START }, + [EVENT_S05E01A_CONTINUE] = { EVENT_S05E01A_CONTINUE, 11, _("EVENT_S05E01A_CONTINUE"), s_script_EVENT_S05E01A_CONTINUE }, + [EVENT_S05E01A_END] = { EVENT_S05E01A_END, 11, _("EVENT_S05E01A_END"), s_script_EVENT_S05E01A_END }, + [EVENT_S05E01A_L001] = { EVENT_S05E01A_L001, 10, _("EVENT_S05E01A_L001"), s_script_EVENT_S05E01A_L001 }, + [EVENT_S05E01A_L002] = { EVENT_S05E01A_L002, 12, _("EVENT_S05E01A_L002"), s_script_EVENT_S05E01A_L002 }, + [EVENT_S05E01A_L002L] = { EVENT_S05E01A_L002L, 12, _("EVENT_S05E01A_L002L"), s_script_EVENT_S05E01A_L002L }, + [EVENT_S06E01A_START] = { EVENT_S06E01A_START, 11, _("EVENT_S06E01A_START"), s_script_EVENT_S06E01A_START }, + [EVENT_S06E01A_CONTINUE] = { EVENT_S06E01A_CONTINUE, 11, _("EVENT_S06E01A_CONTINUE"), s_script_EVENT_S06E01A_CONTINUE }, + [EVENT_S06E01A_END] = { EVENT_S06E01A_END, 11, _("EVENT_S06E01A_END"), s_script_EVENT_S06E01A_END }, + [EVENT_S06E01A_L001] = { EVENT_S06E01A_L001, 10, _("EVENT_S06E01A_L001"), s_script_EVENT_S06E01A_L001 }, + [EVENT_S06E01A_L002] = { EVENT_S06E01A_L002, 10, _("EVENT_S06E01A_L002"), s_script_EVENT_S06E01A_L002 }, + [EVENT_S06E01A_L002L] = { EVENT_S06E01A_L002L, 12, _("EVENT_S06E01A_L002L"), s_script_EVENT_S06E01A_L002L }, + [EVENT_S06E01B_L001] = { EVENT_S06E01B_L001, 10, _("EVENT_S06E01B_L001"), s_script_EVENT_S06E01B_L001 }, + [EVENT_S06E01B_L002] = { EVENT_S06E01B_L002, 10, _("EVENT_S06E01B_L002"), s_script_EVENT_S06E01B_L002 }, + [EVENT_S06E01B_L002L] = { EVENT_S06E01B_L002L, 12, _("EVENT_S06E01B_L002L"), s_script_EVENT_S06E01B_L002L }, + [EVENT_S07E01A_START] = { EVENT_S07E01A_START, 11, _("EVENT_S07E01A_START"), s_script_EVENT_S07E01A_START }, + [EVENT_S07E01A_END] = { EVENT_S07E01A_END, 11, _("EVENT_S07E01A_END"), s_script_EVENT_S07E01A_END }, + [EVENT_S07E01A_L001] = { EVENT_S07E01A_L001, 12, _("EVENT_S07E01A_L001"), s_script_EVENT_S07E01A_L001 }, + [EVENT_S07E01A_L002] = { EVENT_S07E01A_L002, 12, _("EVENT_S07E01A_L002"), s_script_EVENT_S07E01A_L002 }, + [EVENT_S07E01A_L003] = { EVENT_S07E01A_L003, 12, _("EVENT_S07E01A_L003"), s_script_EVENT_S07E01A_L003 }, + [EVENT_S07E01A_L003L] = { EVENT_S07E01A_L003L, 12, _("EVENT_S07E01A_L003L"), s_script_EVENT_S07E01A_L003L }, + [EVENT_S08E01A_START] = { EVENT_S08E01A_START, 11, _("EVENT_S08E01A_START"), s_script_EVENT_S08E01A_START }, + [EVENT_S08E01A_END] = { EVENT_S08E01A_END, 11, _("EVENT_S08E01A_END"), s_script_EVENT_S08E01A_END }, + [EVENT_S08E01A_L001] = { EVENT_S08E01A_L001, 12, _("EVENT_S08E01A_L001"), s_script_EVENT_S08E01A_L001 }, + [EVENT_S08E01A_L002] = { EVENT_S08E01A_L002, 12, _("EVENT_S08E01A_L002"), s_script_EVENT_S08E01A_L002 }, + [EVENT_S08E01A_L003] = { EVENT_S08E01A_L003, 12, _("EVENT_S08E01A_L003"), s_script_EVENT_S08E01A_L003 }, + [EVENT_S08E01A_L004] = { EVENT_S08E01A_L004, 12, _("EVENT_S08E01A_L004"), s_script_EVENT_S08E01A_L004 }, + [EVENT_S08E01A_L005] = { EVENT_S08E01A_L005, 12, _("EVENT_S08E01A_L005"), s_script_EVENT_S08E01A_L005 }, + [EVENT_S08E01A_L005B] = { EVENT_S08E01A_L005B, 10, _("EVENT_S08E01A_L005B"), s_script_EVENT_S08E01A_L005B }, + [EVENT_S08E01A_L006] = { EVENT_S08E01A_L006, 10, _("EVENT_S08E01A_L006"), s_script_EVENT_S08E01A_L006 }, + [EVENT_S08E01A_L006L] = { EVENT_S08E01A_L006L, 12, _("EVENT_S08E01A_L006L"), s_script_EVENT_S08E01A_L006L }, + [EVENT_S08E01A_L007] = { EVENT_S08E01A_L007, 12, _("EVENT_S08E01A_L007"), s_script_EVENT_S08E01A_L007 }, + [EVENT_S08E01A_L008] = { EVENT_S08E01A_L008, 10, _("EVENT_S08E01A_L008"), s_script_EVENT_S08E01A_L008 }, + [EVENT_S08E01A_L008L] = { EVENT_S08E01A_L008L, 12, _("EVENT_S08E01A_L008L"), s_script_EVENT_S08E01A_L008L }, + [EVENT_S08E01A_L008A] = { EVENT_S08E01A_L008A, 10, _("EVENT_S08E01A_L008A"), s_script_EVENT_S08E01A_L008A }, + [EVENT_S08E01A_L008B] = { EVENT_S08E01A_L008B, 10, _("EVENT_S08E01A_L008B"), s_script_EVENT_S08E01A_L008B }, + [EVENT_S08E01A_L008C] = { EVENT_S08E01A_L008C, 10, _("EVENT_S08E01A_L008C"), s_script_EVENT_S08E01A_L008C }, + [EVENT_S09E01A_START] = { EVENT_S09E01A_START, 11, _("EVENT_S09E01A_START"), s_script_EVENT_S09E01A_START }, + [EVENT_S09E01A_END] = { EVENT_S09E01A_END, 11, _("EVENT_S09E01A_END"), s_script_EVENT_S09E01A_END }, + [EVENT_S09E01A_L001] = { EVENT_S09E01A_L001, 12, _("EVENT_S09E01A_L001"), s_script_EVENT_S09E01A_L001 }, + [EVENT_S09E01A_L002] = { EVENT_S09E01A_L002, 12, _("EVENT_S09E01A_L002"), s_script_EVENT_S09E01A_L002 }, + [EVENT_S09E01A_L003] = { EVENT_S09E01A_L003, 12, _("EVENT_S09E01A_L003"), s_script_EVENT_S09E01A_L003 }, + [EVENT_S09E01A_L004] = { EVENT_S09E01A_L004, 10, _("EVENT_S09E01A_L004"), s_script_EVENT_S09E01A_L004 }, + [EVENT_S09E01A_L004B] = { EVENT_S09E01A_L004B, 10, _("EVENT_S09E01A_L004B"), s_script_EVENT_S09E01A_L004B }, + [EVENT_S09E01A_L005] = { EVENT_S09E01A_L005, 10, _("EVENT_S09E01A_L005"), s_script_EVENT_S09E01A_L005 }, + [EVENT_S09E01A_L005L] = { EVENT_S09E01A_L005L, 12, _("EVENT_S09E01A_L005L"), s_script_EVENT_S09E01A_L005L }, + [EVENT_S09E01B_L001] = { EVENT_S09E01B_L001, 10, _("EVENT_S09E01B_L001"), s_script_EVENT_S09E01B_L001 }, + [EVENT_S09E01B_L001B] = { EVENT_S09E01B_L001B, 10, _("EVENT_S09E01B_L001B"), s_script_EVENT_S09E01B_L001B }, + [EVENT_S09E01B_L002] = { EVENT_S09E01B_L002, 10, _("EVENT_S09E01B_L002"), s_script_EVENT_S09E01B_L002 }, + [EVENT_S09E01B_L002L] = { EVENT_S09E01B_L002L, 12, _("EVENT_S09E01B_L002L"), s_script_EVENT_S09E01B_L002L }, + [EVENT_S09E01C_L001] = { EVENT_S09E01C_L001, 12, _("EVENT_S09E01C_L001"), s_script_EVENT_S09E01C_L001 }, + [EVENT_R00E01A_L001] = { EVENT_R00E01A_L001, 7, _("EVENT_R00E01A_L001"), s_script_EVENT_R00E01A_L001 }, + [COMMON_ENTER] = { COMMON_ENTER, 1, _("COMMON_ENTER"), s_script_COMMON_ENTER }, + [DEBUG_ENTER] = { DEBUG_ENTER, 1, _("DEBUG_ENTER"), s_script_DEBUG_ENTER }, + [GETOUT_NORMAL] = { GETOUT_NORMAL, 2, _("GETOUT_NORMAL"), NULL }, + [GETOUT_HABITAT] = { GETOUT_HABITAT, 2, _("GETOUT_HABITAT"), s_script_GETOUT_HABITAT }, + [GETOUT_M01E01A] = { GETOUT_M01E01A, 2, _("GETOUT_M01E01A"), s_script_GETOUT_M01E01A }, + [GETOUT_M01E02A] = { GETOUT_M01E02A, 2, _("GETOUT_M01E02A"), s_script_GETOUT_M01E02A }, + [GETOUT_M01E02B] = { GETOUT_M01E02B, 2, _("GETOUT_M01E02B"), s_script_GETOUT_M01E02B }, + [GETOUT_M01E03A] = { GETOUT_M01E03A, 2, _("GETOUT_M01E03A"), s_script_GETOUT_M01E03A }, + [GETOUT_M01E04A] = { GETOUT_M01E04A, 2, _("GETOUT_M01E04A"), s_script_GETOUT_M01E04A }, + [GETOUT_M01E04B] = { GETOUT_M01E04B, 2, _("GETOUT_M01E04B"), s_script_GETOUT_M01E04B }, + [GETOUT_M01E05A] = { GETOUT_M01E05A, 2, _("GETOUT_M01E05A"), s_script_GETOUT_M01E05A }, + [GETOUT_M01E07A] = { GETOUT_M01E07A, 2, _("GETOUT_M01E07A"), s_script_GETOUT_M01E07A }, + [GETOUT_M01E07B] = { GETOUT_M01E07B, 2, _("GETOUT_M01E07B"), s_script_GETOUT_M01E07B }, + [GETOUT_M01E08A] = { GETOUT_M01E08A, 2, _("GETOUT_M01E08A"), s_script_GETOUT_M01E08A }, + [GETOUT_M01E08B] = { GETOUT_M01E08B, 2, _("GETOUT_M01E08B"), s_script_GETOUT_M01E08B }, + [GETOUT_M01E09A] = { GETOUT_M01E09A, 2, _("GETOUT_M01E09A"), s_script_GETOUT_M01E09A }, + [GETOUT_M01E10A] = { GETOUT_M01E10A, 2, _("GETOUT_M01E10A"), s_script_GETOUT_M01E10A }, + [GETOUT_S00E01A] = { GETOUT_S00E01A, 2, _("GETOUT_S00E01A"), s_script_GETOUT_S00E01A }, + [GETOUT_S01E01A] = { GETOUT_S01E01A, 2, _("GETOUT_S01E01A"), s_script_GETOUT_S01E01A }, + [GETOUT_S01E02A] = { GETOUT_S01E02A, 2, _("GETOUT_S01E02A"), s_script_GETOUT_S01E02A }, + [GETOUT_S02E01A] = { GETOUT_S02E01A, 2, _("GETOUT_S02E01A"), s_script_GETOUT_S02E01A }, + [GETOUT_S02E02A] = { GETOUT_S02E02A, 2, _("GETOUT_S02E02A"), s_script_GETOUT_S02E02A }, + [GETOUT_S03E01A] = { GETOUT_S03E01A, 2, _("GETOUT_S03E01A"), s_script_GETOUT_S03E01A }, + [GETOUT_S04E01A] = { GETOUT_S04E01A, 2, _("GETOUT_S04E01A"), s_script_GETOUT_S04E01A }, + [GETOUT_S04E01B] = { GETOUT_S04E01B, 2, _("GETOUT_S04E01B"), s_script_GETOUT_S04E01B }, + [GETOUT_S04E01C] = { GETOUT_S04E01C, 2, _("GETOUT_S04E01C"), s_script_GETOUT_S04E01C }, + [GETOUT_S04E01D] = { GETOUT_S04E01D, 2, _("GETOUT_S04E01D"), s_script_GETOUT_S04E01D }, + [GETOUT_S04E01E] = { GETOUT_S04E01E, 2, _("GETOUT_S04E01E"), s_script_GETOUT_S04E01E }, + [GETOUT_S05E01A] = { GETOUT_S05E01A, 2, _("GETOUT_S05E01A"), s_script_GETOUT_S05E01A }, + [GETOUT_S06E01A] = { GETOUT_S06E01A, 2, _("GETOUT_S06E01A"), s_script_GETOUT_S06E01A }, + [GETOUT_S06E01B] = { GETOUT_S06E01B, 2, _("GETOUT_S06E01B"), s_script_GETOUT_S06E01B }, + [GETOUT_S07E01A] = { GETOUT_S07E01A, 2, _("GETOUT_S07E01A"), s_script_GETOUT_S07E01A }, + [GETOUT_S08E01A] = { GETOUT_S08E01A, 2, _("GETOUT_S08E01A"), s_script_GETOUT_S08E01A }, + [GETOUT_S09E01A] = { GETOUT_S09E01A, 2, _("GETOUT_S09E01A"), s_script_GETOUT_S09E01A }, + [GETOUT_S09E01B] = { GETOUT_S09E01B, 2, _("GETOUT_S09E01B"), s_script_GETOUT_S09E01B }, + [GETOUT_D62E01A] = { GETOUT_D62E01A, 2, _("GETOUT_D62E01A"), s_script_GETOUT_D62E01A }, + [GETOUT_D43E01A] = { GETOUT_D43E01A, 2, _("GETOUT_D43E01A"), s_script_GETOUT_D43E01A }, + [GETOUT_D44E01A] = { GETOUT_D44E01A, 2, _("GETOUT_D44E01A"), s_script_GETOUT_D44E01A }, + [GETOUT_D45E01A] = { GETOUT_D45E01A, 2, _("GETOUT_D45E01A"), s_script_GETOUT_D45E01A }, + [GETOUT_D46E01A] = { GETOUT_D46E01A, 2, _("GETOUT_D46E01A"), s_script_GETOUT_D46E01A }, + [GETOUT_U00E01A] = { GETOUT_U00E01A, 2, _("GETOUT_U00E01A"), s_script_GETOUT_U00E01A }, + [GETOUT_R00E01A] = { GETOUT_R00E01A, 2, _("GETOUT_R00E01A"), s_script_GETOUT_R00E01A }, + [GETOUT_T00E01A] = { GETOUT_T00E01A, 2, _("GETOUT_T00E01A"), s_script_GETOUT_T00E01A }, + [GETOUT_M01E07T] = { GETOUT_M01E07T, 2, _("GETOUT_M01E07T"), s_script_GETOUT_M01E07T }, + [GETOUT_M01E08T] = { GETOUT_M01E08T, 2, _("GETOUT_M01E08T"), s_script_GETOUT_M01E08T }, + [EVENT_CONTROL] = { EVENT_CONTROL, 7, _("EVENT_CONTROL"), NULL }, + [EVENT_WAKEUP] = { EVENT_WAKEUP, 7, _("EVENT_WAKEUP"), NULL }, + [EVENT_STATION] = { EVENT_STATION, 7, _("EVENT_STATION"), NULL }, + [STATION_CONTROL] = { STATION_CONTROL, 8, _("STATION_CONTROL"), NULL }, + [ENTER_CONTROL] = { ENTER_CONTROL, 1, _("ENTER_CONTROL"), NULL }, + [SETUP_DEBUG_CAMERA] = { SETUP_DEBUG_CAMERA, 7, _("SETUP_DEBUG_CAMERA"), s_script_SETUP_DEBUG_CAMERA }, + [MOVE_DEBUG_CAMERA] = { MOVE_DEBUG_CAMERA, 5, _("MOVE_DEBUG_CAMERA"), s_script_MOVE_DEBUG_CAMERA }, }; - diff --git a/src/data/ornament/flag00.h b/src/data/ornament/flag00.h index 1060397b8..1a7268bb2 100644 --- a/src/data/ornament/flag00.h +++ b/src/data/ornament/flag00.h @@ -1,4 +1,4 @@ -const RGB gFlag00Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag00.pmdpal") }; +const RGB_Struct gFlag00Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag00.pmdpal") }; static const axmain sAxMainFlag00; const SiroArchive gAxFlag00 = {"SIRO", &sAxMainFlag00}; diff --git a/src/data/ornament/flag01.h b/src/data/ornament/flag01.h index c250fcf28..169daf414 100644 --- a/src/data/ornament/flag01.h +++ b/src/data/ornament/flag01.h @@ -1,4 +1,4 @@ -const RGB gFlag01Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag01.pmdpal") }; +const RGB_Struct gFlag01Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag01.pmdpal") }; static const axmain sAxMainFlag01; const SiroArchive gAxFlag01 = {"SIRO", &sAxMainFlag01}; diff --git a/src/data/ornament/flag02.h b/src/data/ornament/flag02.h index 5b753aadf..a71fa388e 100644 --- a/src/data/ornament/flag02.h +++ b/src/data/ornament/flag02.h @@ -1,4 +1,4 @@ -const RGB gFlag02Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag02.pmdpal") }; +const RGB_Struct gFlag02Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag02.pmdpal") }; static const axmain sAxMainFlag02; const SiroArchive gAxFlag02 = {"SIRO", &sAxMainFlag02}; diff --git a/src/data/ornament/flag03.h b/src/data/ornament/flag03.h index 6773f1626..1c7d45cb2 100644 --- a/src/data/ornament/flag03.h +++ b/src/data/ornament/flag03.h @@ -1,4 +1,4 @@ -const RGB gFlag03Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag03.pmdpal") }; +const RGB_Struct gFlag03Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag03.pmdpal") }; static const axmain sAxMainFlag03; const SiroArchive gAxFlag03 = {"SIRO", &sAxMainFlag03}; diff --git a/src/data/ornament/flag04.h b/src/data/ornament/flag04.h index 03725b2c7..d4c9e662f 100644 --- a/src/data/ornament/flag04.h +++ b/src/data/ornament/flag04.h @@ -1,4 +1,4 @@ -const RGB gFlag04Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag04.pmdpal") }; +const RGB_Struct gFlag04Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag04.pmdpal") }; static const axmain sAxMainFlag04; const SiroArchive gAxFlag04 = {"SIRO", &sAxMainFlag04}; diff --git a/src/data/ornament/flag05.h b/src/data/ornament/flag05.h index a92ac22e7..9e158f0c4 100644 --- a/src/data/ornament/flag05.h +++ b/src/data/ornament/flag05.h @@ -1,4 +1,4 @@ -const RGB gFlag05Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag05.pmdpal") }; +const RGB_Struct gFlag05Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag05.pmdpal") }; static const axmain sAxMainFlag05; const SiroArchive gAxFlag05 = {"SIRO", &sAxMainFlag05}; diff --git a/src/data/ornament/flag06.h b/src/data/ornament/flag06.h index 076159150..c8c1ca12d 100644 --- a/src/data/ornament/flag06.h +++ b/src/data/ornament/flag06.h @@ -1,4 +1,4 @@ -const RGB gFlag06Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag06.pmdpal") }; +const RGB_Struct gFlag06Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag06.pmdpal") }; static const axmain sAxMainFlag06; const SiroArchive gAxFlag06 = {"SIRO", &sAxMainFlag06}; diff --git a/src/data/ornament/flag07.h b/src/data/ornament/flag07.h index 0ce201c4d..53a171d65 100644 --- a/src/data/ornament/flag07.h +++ b/src/data/ornament/flag07.h @@ -1,4 +1,4 @@ -const RGB gFlag07Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag07.pmdpal") }; +const RGB_Struct gFlag07Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag07.pmdpal") }; static const axmain sAxMainFlag07; const SiroArchive gAxFlag07 = {"SIRO", &sAxMainFlag07}; diff --git a/src/data/ornament/flag08.h b/src/data/ornament/flag08.h index 553782921..5139479d4 100644 --- a/src/data/ornament/flag08.h +++ b/src/data/ornament/flag08.h @@ -1,4 +1,4 @@ -const RGB gFlag08Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag08.pmdpal") }; +const RGB_Struct gFlag08Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag08.pmdpal") }; static const axmain sAxMainFlag08; const SiroArchive gAxFlag08 = {"SIRO", &sAxMainFlag08}; diff --git a/src/data/ornament/flag09.h b/src/data/ornament/flag09.h index 4b12839d7..30adeb17a 100644 --- a/src/data/ornament/flag09.h +++ b/src/data/ornament/flag09.h @@ -1,4 +1,4 @@ -const RGB gFlag09Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag09.pmdpal") }; +const RGB_Struct gFlag09Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag09.pmdpal") }; static const axmain sAxMainFlag09; const SiroArchive gAxFlag09 = {"SIRO", &sAxMainFlag09}; diff --git a/src/data/ornament/flag10.h b/src/data/ornament/flag10.h index 8f589a06e..6057ef621 100644 --- a/src/data/ornament/flag10.h +++ b/src/data/ornament/flag10.h @@ -111,7 +111,7 @@ static const axmain sAxMainFlag109 = { .spriteData = sAxSpritesFlag109, .positions = NULL, }; -const RGB gFlag10Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag10.pmdpal") }; +const RGB_Struct gFlag10Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag10.pmdpal") }; static const axmain sAxMainFlag10; const SiroArchive gAxFlag10 = {"SIRO", &sAxMainFlag10}; diff --git a/src/data/ornament/flag100.h b/src/data/ornament/flag100.h index 03dadd1dc..b30528282 100644 --- a/src/data/ornament/flag100.h +++ b/src/data/ornament/flag100.h @@ -1,4 +1,4 @@ -const RGB gFlag100Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag100.pmdpal") }; +const RGB_Struct gFlag100Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag100.pmdpal") }; static const axmain sAxMainFlag100; const SiroArchive gAxFlag100 = {"SIRO", &sAxMainFlag100}; diff --git a/src/data/ornament/flag101.h b/src/data/ornament/flag101.h index 182612393..cc71a1e35 100644 --- a/src/data/ornament/flag101.h +++ b/src/data/ornament/flag101.h @@ -1,4 +1,4 @@ -const RGB gFlag101Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag101.pmdpal") }; +const RGB_Struct gFlag101Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag101.pmdpal") }; static const axmain sAxMainFlag101; const SiroArchive gAxFlag101 = {"SIRO", &sAxMainFlag101}; diff --git a/src/data/ornament/flag102.h b/src/data/ornament/flag102.h index 0e60e9b4b..04918e7c9 100644 --- a/src/data/ornament/flag102.h +++ b/src/data/ornament/flag102.h @@ -1,4 +1,4 @@ -const RGB gFlag102Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag102.pmdpal") }; +const RGB_Struct gFlag102Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag102.pmdpal") }; static const axmain sAxMainFlag102; const SiroArchive gAxFlag102 = {"SIRO", &sAxMainFlag102}; diff --git a/src/data/ornament/flag103.h b/src/data/ornament/flag103.h index 70c7d0a46..0c1656359 100644 --- a/src/data/ornament/flag103.h +++ b/src/data/ornament/flag103.h @@ -1,4 +1,4 @@ -const RGB gFlag103Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag103.pmdpal") }; +const RGB_Struct gFlag103Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag103.pmdpal") }; static const axmain sAxMainFlag103; const SiroArchive gAxFlag103 = {"SIRO", &sAxMainFlag103}; diff --git a/src/data/ornament/flag104.h b/src/data/ornament/flag104.h index f8847891f..aff2bd353 100644 --- a/src/data/ornament/flag104.h +++ b/src/data/ornament/flag104.h @@ -1,4 +1,4 @@ -const RGB gFlag104Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag104.pmdpal") }; +const RGB_Struct gFlag104Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag104.pmdpal") }; static const axmain sAxMainFlag104; const SiroArchive gAxFlag104 = {"SIRO", &sAxMainFlag104}; diff --git a/src/data/ornament/flag105.h b/src/data/ornament/flag105.h index 121e12ff7..1f4adb4ec 100644 --- a/src/data/ornament/flag105.h +++ b/src/data/ornament/flag105.h @@ -1,4 +1,4 @@ -const RGB gFlag105Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag105.pmdpal") }; +const RGB_Struct gFlag105Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag105.pmdpal") }; static const axmain sAxMainFlag105; const SiroArchive gAxFlag105 = {"SIRO", &sAxMainFlag105}; diff --git a/src/data/ornament/flag106.h b/src/data/ornament/flag106.h index b59da97a5..aed050a3e 100644 --- a/src/data/ornament/flag106.h +++ b/src/data/ornament/flag106.h @@ -1,4 +1,4 @@ -const RGB gFlag106Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag106.pmdpal") }; +const RGB_Struct gFlag106Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag106.pmdpal") }; static const axmain sAxMainFlag106; const SiroArchive gAxFlag106 = {"SIRO", &sAxMainFlag106}; diff --git a/src/data/ornament/flag107.h b/src/data/ornament/flag107.h index fe42664b5..ddfbb76d6 100644 --- a/src/data/ornament/flag107.h +++ b/src/data/ornament/flag107.h @@ -1,4 +1,4 @@ -const RGB gFlag107Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag107.pmdpal") }; +const RGB_Struct gFlag107Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag107.pmdpal") }; static const axmain sAxMainFlag107; const SiroArchive gAxFlag107 = {"SIRO", &sAxMainFlag107}; diff --git a/src/data/ornament/flag108.h b/src/data/ornament/flag108.h index 0322efe93..349a53449 100644 --- a/src/data/ornament/flag108.h +++ b/src/data/ornament/flag108.h @@ -1,4 +1,4 @@ -const RGB gFlag108Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag108.pmdpal") }; +const RGB_Struct gFlag108Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag108.pmdpal") }; static const axmain sAxMainFlag108; const SiroArchive gAxFlag108 = {"SIRO", &sAxMainFlag108}; diff --git a/src/data/ornament/flag109.h b/src/data/ornament/flag109.h index 88f65da54..be842a34c 100644 --- a/src/data/ornament/flag109.h +++ b/src/data/ornament/flag109.h @@ -1,2 +1,2 @@ -const RGB gFlag109Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag109.pmdpal") }; +const RGB_Struct gFlag109Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag109.pmdpal") }; diff --git a/src/data/ornament/flag11.h b/src/data/ornament/flag11.h index 8226ff5ef..242b6d463 100644 --- a/src/data/ornament/flag11.h +++ b/src/data/ornament/flag11.h @@ -1,4 +1,4 @@ -const RGB gFlag11Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag11.pmdpal") }; +const RGB_Struct gFlag11Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag11.pmdpal") }; static const axmain sAxMainFlag11; const SiroArchive gAxFlag11 = {"SIRO", &sAxMainFlag11}; diff --git a/src/data/ornament/flag110.h b/src/data/ornament/flag110.h index 979ed50ce..5280fedd8 100644 --- a/src/data/ornament/flag110.h +++ b/src/data/ornament/flag110.h @@ -1,4 +1,4 @@ -const RGB gFlag110Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag110.pmdpal") }; +const RGB_Struct gFlag110Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag110.pmdpal") }; static const axmain sAxMainFlag110; const SiroArchive gAxFlag110 = {"SIRO", &sAxMainFlag110}; diff --git a/src/data/ornament/flag111.h b/src/data/ornament/flag111.h index f3b26c3ac..b342e088a 100644 --- a/src/data/ornament/flag111.h +++ b/src/data/ornament/flag111.h @@ -1,4 +1,4 @@ -const RGB gFlag111Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag111.pmdpal") }; +const RGB_Struct gFlag111Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag111.pmdpal") }; static const axmain sAxMainFlag111; const SiroArchive gAxFlag111 = {"SIRO", &sAxMainFlag111}; diff --git a/src/data/ornament/flag112.h b/src/data/ornament/flag112.h index 4fa9e0ab3..782ec7d8c 100644 --- a/src/data/ornament/flag112.h +++ b/src/data/ornament/flag112.h @@ -1,4 +1,4 @@ -const RGB gFlag112Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag112.pmdpal") }; +const RGB_Struct gFlag112Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag112.pmdpal") }; static const axmain sAxMainFlag112; const SiroArchive gAxFlag112 = {"SIRO", &sAxMainFlag112}; diff --git a/src/data/ornament/flag113.h b/src/data/ornament/flag113.h index bc00fba42..b2ee26a00 100644 --- a/src/data/ornament/flag113.h +++ b/src/data/ornament/flag113.h @@ -1,4 +1,4 @@ -const RGB gFlag113Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag113.pmdpal") }; +const RGB_Struct gFlag113Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag113.pmdpal") }; static const axmain sAxMainFlag113; const SiroArchive gAxFlag113 = {"SIRO", &sAxMainFlag113}; diff --git a/src/data/ornament/flag114.h b/src/data/ornament/flag114.h index bdace10dd..f0adb5d54 100644 --- a/src/data/ornament/flag114.h +++ b/src/data/ornament/flag114.h @@ -1,4 +1,4 @@ -const RGB gFlag114Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag114.pmdpal") }; +const RGB_Struct gFlag114Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag114.pmdpal") }; static const axmain sAxMainFlag114; const SiroArchive gAxFlag114 = {"SIRO", &sAxMainFlag114}; diff --git a/src/data/ornament/flag12.h b/src/data/ornament/flag12.h index 886aeba42..8e6578323 100644 --- a/src/data/ornament/flag12.h +++ b/src/data/ornament/flag12.h @@ -1,4 +1,4 @@ -const RGB gFlag12Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag12.pmdpal") }; +const RGB_Struct gFlag12Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag12.pmdpal") }; static const axmain sAxMainFlag12; const SiroArchive gAxFlag12 = {"SIRO", &sAxMainFlag12}; diff --git a/src/data/ornament/flag13.h b/src/data/ornament/flag13.h index 263bf51f1..a0554741e 100644 --- a/src/data/ornament/flag13.h +++ b/src/data/ornament/flag13.h @@ -1,4 +1,4 @@ -const RGB gFlag13Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag13.pmdpal") }; +const RGB_Struct gFlag13Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag13.pmdpal") }; static const axmain sAxMainFlag13; const SiroArchive gAxFlag13 = {"SIRO", &sAxMainFlag13}; diff --git a/src/data/ornament/flag14.h b/src/data/ornament/flag14.h index 9fa7abe9a..d4b911ca7 100644 --- a/src/data/ornament/flag14.h +++ b/src/data/ornament/flag14.h @@ -1,4 +1,4 @@ -const RGB gFlag14Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag14.pmdpal") }; +const RGB_Struct gFlag14Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag14.pmdpal") }; static const axmain sAxMainFlag14; const SiroArchive gAxFlag14 = {"SIRO", &sAxMainFlag14}; diff --git a/src/data/ornament/flag15.h b/src/data/ornament/flag15.h index 37b2b4d62..a0cc1b522 100644 --- a/src/data/ornament/flag15.h +++ b/src/data/ornament/flag15.h @@ -1,4 +1,4 @@ -const RGB gFlag15Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag15.pmdpal") }; +const RGB_Struct gFlag15Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag15.pmdpal") }; static const axmain sAxMainFlag15; const SiroArchive gAxFlag15 = {"SIRO", &sAxMainFlag15}; diff --git a/src/data/ornament/flag16.h b/src/data/ornament/flag16.h index 774d598c0..63eea3de4 100644 --- a/src/data/ornament/flag16.h +++ b/src/data/ornament/flag16.h @@ -1,4 +1,4 @@ -const RGB gFlag16Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag16.pmdpal") }; +const RGB_Struct gFlag16Pal[] = { INCBIN_RGB("graphics/ornament/pal/flag16.pmdpal") }; static const axmain sAxMainFlag16; const SiroArchive gAxFlag16 = {"SIRO", &sAxMainFlag16}; diff --git a/src/data/ornament/stoneim.h b/src/data/ornament/stoneim.h index 32de5fb09..480370ca1 100644 --- a/src/data/ornament/stoneim.h +++ b/src/data/ornament/stoneim.h @@ -1,2 +1,2 @@ -const RGB gStoneimPal[] = { INCBIN_RGB("graphics/ornament/pal/stoneim.pmdpal") }; +const RGB_Struct gStoneimPal[] = { INCBIN_RGB("graphics/ornament/pal/stoneim.pmdpal") }; diff --git a/src/data/ornament/titlebg.h b/src/data/ornament/titlebg.h index 4844855be..e27cd9cf3 100644 --- a/src/data/ornament/titlebg.h +++ b/src/data/ornament/titlebg.h @@ -396,5 +396,5 @@ static const axmain sAxMainTitlebg1 = { .spriteData = sAxSpritesTitlebg1, .positions = NULL, }; -const RGB gTitlebgPal[] = { INCBIN_RGB("graphics/ornament/pal/titlebg.pmdpal") }; +const RGB_Struct gTitlebgPal[] = { INCBIN_RGB("graphics/ornament/pal/titlebg.pmdpal") }; diff --git a/src/data/ornament/titleop2.h b/src/data/ornament/titleop2.h index c34b46fca..a1b3e01ff 100644 --- a/src/data/ornament/titleop2.h +++ b/src/data/ornament/titleop2.h @@ -92,4 +92,4 @@ static const axmain sAxMainTitleop2 = { .spriteData = sAxSpritesTitleop2, .positions = NULL, }; -const RGB gTitleopPal[] = { INCBIN_RGB("graphics/ornament/pal/titleop.pmdpal") }; +const RGB_Struct gTitleopPal[] = { INCBIN_RGB("graphics/ornament/pal/titleop.pmdpal") }; diff --git a/src/debug_field_map.c b/src/debug_field_map.c index 849143b57..50ef85498 100644 --- a/src/debug_field_map.c +++ b/src/debug_field_map.c @@ -40,14 +40,14 @@ UNUSED static void DebugMapViewer(void) ResetDialogueBox(); sub_8005838(NULL, 0); AllocGroundMapAction(); - while (1) { + while (TRUE) { bool8 quitMapView; PixelPos pixPos1, pixPos2; PixelPos boundary; if (DebugFieldMapWindow_Init()) { DebugFieldMapWindow_MoveMenuTo(mapId); - while (1) { + while (TRUE) { sub_8005838(NULL, 0); sub_8012A18(0); switch (DebugFieldMapWindow_GetInput()) { @@ -88,7 +88,7 @@ UNUSED static void DebugMapViewer(void) currPos.y = 0; sub_80999E8(4); quitMapView = FALSE; - while (1) { + while (TRUE) { xxx_call_update_bg_sound_input(); ResetSprites(FALSE); if (quitMapView && !sub_8099B94()) @@ -131,7 +131,7 @@ UNUSED static void DebugMapViewer(void) sub_809D25C(); sub_80A59DC(); - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); sub_8005838(NULL, 0); sub_80060EC(); nullsub_8(gGameOptionsRef->touchScreen); diff --git a/src/debug_field_map_window.c b/src/debug_field_map_window.c index cf6f66bdc..447a9c964 100644 --- a/src/debug_field_map_window.c +++ b/src/debug_field_map_window.c @@ -18,12 +18,12 @@ EWRAM_INIT static struct MenuHeaderWindow *sDebugWindow = {NULL}; static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY; static const WindowTemplate sDebugWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 24, .height = 17, - .unk10 = 17, + .totalHeight = 17, .unk12 = 0, .header = NULL, }; diff --git a/src/direction_util.c b/src/direction_util.c index 304ced132..ba6d16950 100644 --- a/src/direction_util.c +++ b/src/direction_util.c @@ -21,71 +21,73 @@ static const PixelPos sVectorDirections[NUM_DIRECTIONS] = { static s8 VecDirection4Radial(PixelPos *pixelPos); -static inline s8 GetRandomizedDirection(s32 direction1, s32 rand, s32 add, s32 multi) +static inline s8 GetRandomizedDirection(s32 dir, s32 randExclusiveMax, s32 add, s32 multi) { - return (s8)(((direction1 + add) + OtherRandInt(rand) * multi) % NUM_DIRECTIONS); + return (s8)(((dir + add) + (OtherRandInt(randExclusiveMax) * multi)) % NUM_DIRECTIONS); } // arm9.bin::020109F4 -s32 sub_8002984(s32 _direction1, u32 caseID) +s32 TransformDirection1(s32 _direction1, u32 caseID) { - s32 direction1 = (s8) _direction1; + s32 dir = (s8) _direction1; switch((u8)caseID) { - case 1: - if (direction1 >= 0) { - direction1 += 7; - direction1 &= DIRECTION_MASK; + case DIR_TRANS_SPINRIGHT1: + if (dir >= 0) { + dir += 7; + dir &= DIRECTION_MASK; } break; - case 2: - if (direction1 >= 0) { - direction1 += 1; - direction1 &= DIRECTION_MASK; + case DIR_TRANS_SPINLEFT1: + if (dir >= 0) { + dir += 1; + dir &= DIRECTION_MASK; } break; - case 3: - if (direction1 >= 0) { - direction1 += 6; - direction1 &= DIRECTION_MASK; + case DIR_TRANS_SPINRIGHT2: + if (dir >= 0) { + dir += 6; + dir &= DIRECTION_MASK; } break; - case 4: - if (direction1 >= 0) { - direction1 += 2; - direction1 &= DIRECTION_MASK; + case DIR_TRANS_SPINLEFT2: + if (dir >= 0) { + dir += 2; + dir &= DIRECTION_MASK; } break; - case 5: - if (direction1 >= 0) { - direction1 += 4; - direction1 &= DIRECTION_MASK; + case DIR_TRANS_FLIP: + if (dir >= 0) { + dir += 4; + dir &= DIRECTION_MASK; } break; - case 6: - if ((direction1 & 1) != 0) { - direction1 = GetRandomizedDirection(direction1, 2, 7, 2); + case DIR_TRANS_RAND_OFFSET_SOFT_CARDINAL: + if ((dir & 1) != 0) { + // Diagonal + dir = GetRandomizedDirection(dir, 2, 7, 2); // spinRight1 + (0 or spinLeft2) } else { - direction1 = GetRandomizedDirection(direction1, 3, 6, 2); + // Cardinal + dir = GetRandomizedDirection(dir, 3, 6, 2); // spinRight2 + (0 or spinLeft2 or flip) } break; - case 7: - direction1 = GetRandomizedDirection(direction1, 3, 7, 1); + case DIR_TRANS_RAND_OFFSET_SOFT: + dir = GetRandomizedDirection(dir, 3, 7, 1); // spinRight1 + (0 or spinLeft1 or spinLeft2) break; - case 8: - direction1 = (s8)(OtherRandInt(NUM_DIRECTIONS) & 0xfe); + case DIR_TRANS_RAND_CARDINAL: + dir = (s8)(OtherRandInt(NUM_DIRECTIONS) & (u8)~1); break; - case 9: - direction1 = (s8) OtherRandInt(NUM_DIRECTIONS); + case DIR_TRANS_RAND: + dir = (s8) OtherRandInt(NUM_DIRECTIONS); break; default: break; } - return direction1; + return dir; } // arm9.bin::020108EC -s32 sub_8002A70(s32 _direction1, s32 _direction2, s32 _caseId) +s32 TransformDirection2(s32 _direction1, s32 _direction2, s32 _caseId) { s32 direction1 = (s8)(_direction1); s32 direction2 = (s8)(_direction2); @@ -95,34 +97,34 @@ s32 sub_8002A70(s32 _direction1, s32 _direction2, s32 _caseId) return direction1; switch (caseId) { - case 1: + case DIR_TRANS_SPINRIGHT1: if (direction1 >= 0) { direction1 += 7; direction1 &= DIRECTION_MASK; } break; - case 2: + case DIR_TRANS_SPINLEFT1: if (direction1 >= 0) { direction1 += 1; direction1 &= DIRECTION_MASK; } break; - case 3: + case DIR_TRANS_SPINRIGHT2: if (direction1 >= 0) { direction1 += 6; direction1 &= DIRECTION_MASK; } break; - case 4: + case DIR_TRANS_SPINLEFT2: if (direction1 >= 0) { direction1 += 2; direction1 &= DIRECTION_MASK; } break; - case 11: + case DIR_TRANS_11: direction1 = sub_8002B04(direction1, direction2); // Fallthrough - case 10: + case DIR_TRANS_10: direction1 = sub_8002B04(direction1, direction2); break; } @@ -139,11 +141,11 @@ s32 sub_8002B04(s32 _direction1, s32 _direction2) { s32 newDirection = ((direction2 + NUM_DIRECTIONS) - direction1) % NUM_DIRECTIONS; - if (newDirection != 0) { - if (newDirection < 4) - newDirection = (direction1 + 1) % NUM_DIRECTIONS; + if (newDirection != DIRECTION_SOUTH) { + if (newDirection <= DIRECTION_NORTHEAST) + newDirection = (direction1 + 1) % NUM_DIRECTIONS; // Spin Left 1 else - newDirection = (direction1 + 7) % NUM_DIRECTIONS; + newDirection = (direction1 + 7) % NUM_DIRECTIONS; // Spin Right 1 direction1 = (s8)newDirection; } @@ -164,12 +166,12 @@ UNUSED static s32 sub_8002B5C(s32 _direction1, s32 _direction2) if (direction2 != -1) { newDirection = ((direction2 + NUM_DIRECTIONS) - direction1) % NUM_DIRECTIONS; - if (newDirection != 0) { - if (newDirection < 4) { - newDirection = (direction1 + 2) % NUM_DIRECTIONS; + if (newDirection != DIRECTION_SOUTH) { + if (newDirection <= DIRECTION_NORTHEAST) { + newDirection = (direction1 + 2) % NUM_DIRECTIONS; // Spin Left 2 } else { - newDirection = (direction1 + 6) % NUM_DIRECTIONS; + newDirection = (direction1 + 6) % NUM_DIRECTIONS; // Spin Right 2 } direction1 = (s8)(newDirection); } diff --git a/src/drought_orb.c b/src/drought_orb.c index fa6a9202f..598322fca 100644 --- a/src/drought_orb.c +++ b/src/drought_orb.c @@ -35,13 +35,13 @@ void HandleDroughtOrb(Entity *pokemon, Entity *target) flag = FALSE; if(IsCurrentFixedRoomBossFight()) { - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD060); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD060); return; } if(IsWaterTileset()) { - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD08C); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD08C); return; } @@ -63,11 +63,11 @@ void HandleDroughtOrb(Entity *pokemon, Entity *target) if(flag) { sub_80421C0(pokemon, 0x1A1); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD05C); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD05C); } else { - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD060); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD060); } gDungeon->unk644.unk2C = 1; DetermineAllMonsterShadow(); diff --git a/src/dungeon_8041AD0.c b/src/dungeon_8041AD0.c index b922a3712..393a24be8 100644 --- a/src/dungeon_8041AD0.c +++ b/src/dungeon_8041AD0.c @@ -206,7 +206,7 @@ static s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5) return -1; if (a4 != 0) { - sub_804178C(a4 == 2); + sub_804178C_Async(a4 == 2); } sub_800569C(&pos, &entity->axObj.axdata, a3); @@ -296,7 +296,7 @@ static u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2) return sub_800E890(param_1); } -void sub_804178C(u8 param_1) +void sub_804178C_Async(u8 param_1) { u32 temp; s32 counter; @@ -1099,7 +1099,7 @@ void sub_804225C(Entity *entity, DungeonPos *pos, u8 trapId) sub_800EF28(trapId); sub_800EF64(); - sub_803E708(4,0x42); + DungeonWaitFrames_Async(4,0x42); x = X_POS_TO_PIXELPOS(pos->x); newPos.x = x / 256; @@ -1110,7 +1110,7 @@ void sub_804225C(Entity *entity, DungeonPos *pos, u8 trapId) uVar6 = sub_800E448(trapId,&newPos); if (trapId == TRAP_SUMMON_TRAP) { sub_80421C0(0,0x193); - sub_803E708(0x28,0x33); + DungeonWaitFrames_Async(0x28,0x33); } else if (trapId == TRAP_SPIN_TRAP) { EntityInfo *info = GetEntInfo(entity); @@ -1119,14 +1119,14 @@ void sub_804225C(Entity *entity, DungeonPos *pos, u8 trapId) direction--; direction &= DIRECTION_MASK; sub_806CDD4(entity,0,direction); - sub_803E708(2,0x33); + DungeonWaitFrames_Async(2,0x33); if (!sub_800E9A8(uVar6)) break; } info->action.direction = direction & DIRECTION_MASK; } else { - sub_803E708(0x28,0x33); + DungeonWaitFrames_Async(0x28,0x33); } for (i = 0; i < 1000; i++) { @@ -1149,7 +1149,7 @@ void sub_8042390(Entity *entity, Item *item) id = !ItemSticky(item) ? item->id : ITEM_NOTHING; sub_800EF40(id, 0); sub_800EF64(); - sub_803E708(4,0x42); + DungeonWaitFrames_Async(4,0x42); local_14.x = (entity->pixelPos).x / 256; local_14.y = (entity->pixelPos).y / 256; @@ -1177,7 +1177,7 @@ void sub_804245C(Entity *entity, Item *item) if (sub_8042768(entity)) { id = !ItemSticky(item) ? item->id : ITEM_NOTHING; sub_800EF64(); - sub_803E708(4,0x42); + DungeonWaitFrames_Async(4,0x42); local_14.x = (entity->pixelPos).x / 256; local_14.y = (entity->pixelPos).y / 256; @@ -1328,7 +1328,7 @@ void sub_80427AC(void) sub_80429A0(entity); if (!enInfo->isNotTeamMember) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - DisplayDungeonLoggableMessageTrue(entity, gPtrFeralFoundItemMessage); + DisplayDungeonLoggableMessageTrue_Async(entity, gPtrFeralFoundItemMessage); } } } @@ -1418,7 +1418,7 @@ void sub_8042940(Entity *r0) void sub_8042950(Entity *r0) { sub_804151C(r0, 0xD8 << 1, 1); - sub_803E708(0xA, 0x42); + DungeonWaitFrames_Async(0xA, 0x42); } void sub_8042968(Entity *r0) @@ -1513,7 +1513,7 @@ static void sub_8042A84(s16 param_1, Entity *entity, u32 param_3) r6 = IntToF248(2); if (sub_8042768(entity)) { sub_804151C(entity,param_1_s16,0); - sub_803E708(param_3,0x42); + DungeonWaitFrames_Async(param_3,0x42); do { if (entity->unk1C > IntToF248(199.999)) break; DungeonRunFrameActions(0x42); @@ -1522,7 +1522,7 @@ static void sub_8042A84(s16 param_1, Entity *entity, u32 param_3) iVar3 = (entity->pixelPos.y - entity->unk1C) / 256; } while (-8 <= iVar3 - gDungeon->unk181e8.cameraPixelPos.y); entity->isVisible = 0; - sub_804178C(0); + sub_804178C_Async(0); } } diff --git a/src/dungeon_action_execution.c b/src/dungeon_action_execution.c index cc6460ee5..4e2908f64 100644 --- a/src/dungeon_action_execution.c +++ b/src/dungeon_action_execution.c @@ -51,7 +51,7 @@ static void HandleSleepTalk(void); static void HandleSnore(void); static void HandleFlashFire(void); -bool8 ExecuteEntityDungeonAction(Entity *entity) +bool8 ExecuteEntityDungeonAction_Async(Entity *entity) { bool8 bVar4; bool8 bVar5; @@ -62,7 +62,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) DungeonPos pos; DungeonPos pos1; - sub_804178C(1); + sub_804178C_Async(1); gUnknown_203B434 = TRUE; info = GetEntInfo(entity); info->useHeldItem = FALSE; @@ -76,7 +76,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) sub_8075BA4(entity,gUnknown_80F58F4[(info->action).action][1]); } } - if ((CannotAttack(entity, FALSE)) && (IsChargingAnyTwoTurnMove(entity, TRUE))) { + if (CannotAttack(entity, FALSE) && IsChargingAnyTwoTurnMove(entity, TRUE)) { sub_8079764(entity); } @@ -88,7 +88,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) } } if (!IsNotAttacking(entity, FALSE)) { - if (DisplayActions(entity)) { + if (DisplayActions_Async(entity)) { if (IsFloorOver()) { return FALSE; } @@ -169,12 +169,12 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) break; case ACTION_STAIRS: if ((gDungeon->unk644.dungeonLocation.id == DUNGEON_METEOR_CAVE) && (!gDungeon->deoxysDefeat)) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FA5B4); // It's impossible to go down the stairs now! + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FA5B4); // It's impossible to go down the stairs now! } else { PlayStairsSound(); - gDungeon->unk2 = 1; + gDungeon->unk2 = DUNGEON_UNK2_1; gUnknown_202F32C = (info->action).direction; } break; @@ -184,34 +184,34 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) sub_8067110(entity); break; case ACTION_USE_ORB: - HandleUseOrbAction(entity); + HandleUseOrbAction_Async(entity); break; case ACTION_PICK_UP_PLAYER: - HandlePickUpPlayerAction(entity); + HandlePickUpPlayerAction_Async(entity); break; case ACTION_GIVE_ITEM: - HandleGiveItemAction(entity); + HandleGiveItemAction_Async(entity); break; case ACTION_TAKE_ITEM: - HandleTakeItemAction(entity); + HandleTakeItemAction_Async(entity); break; case 0x3e: - sub_8066BD4(entity); // ITEM_SWITCH_TOOLBOX (When you switch item in Toolbox) + sub_8066BD4_Async(entity); // ITEM_SWITCH_TOOLBOX (When you switch item in Toolbox) break; case ACTION_USE_ITEM: HandleUseItemAction(entity); break; case ACTION_SET_ITEM: - HandleSetItemAction(entity, TRUE); + HandleSetItemAction_Async(entity, TRUE); break; case ACTION_UNSET_ITEM: - HandleUnsetItemAction(entity, TRUE); + HandleUnsetItemAction_Async(entity, TRUE); break; case 0x3b: gDungeon->unkBC = gDungeon->teamPokemon[(info->action).actionParameters[0].actionUseIndex]; break; case ACTION_PLACE_ITEM: - HandlePlaceItemAction(entity); + HandlePlaceItemAction_Async(entity); break; case 10: // Switch with Item on Ground sub_8066E14(entity); @@ -228,7 +228,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) break; } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0); - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FE6D4); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FE6D4); break; case ACTION_TALK_FIELD: HandleTalkFieldAction(entity); @@ -256,7 +256,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) break; case ACTION_SECOND_THOUGHTS: SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0); - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FE478); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FE478); break; default: info->action.action = ACTION_PASS_TURN; @@ -270,7 +270,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) } sub_8041888(0); if (EntityIsValid(entity)) { - sub_8085140(); + sub_8085140_Async(); if (info->unk14B != 0) { bVar4 = FALSE; info->unk14B = 0; @@ -284,7 +284,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) } } if (bVar4) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FD2CC); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FD2CC); } } HandleFlashFire(); @@ -302,14 +302,14 @@ bool8 ExecuteEntityDungeonAction(Entity *entity) } if (EntityIsValid(entity)) { if (!sub_8044B84()) { - sub_8046D20(); + PotentiallyCreateMusicBox_Async(); } sub_8041888(0); if (((EntityIsValid(entity)) && (!info->aiAllySkip)) && (!bVar14)) { if (sub_80706A4(entity,&entity->pos) != '\0') { WarpTarget(entity,entity,0,0); } - ApplyEndOfTurnEffects(entity); + DoEndOfTurnEffects_Async(entity); EnemyEvolution(entity); } } @@ -374,7 +374,7 @@ static void HandleSleepTalk(void) } } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FCF38); // {ARG_POKEMON_0} uttered its sleep talk! + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FCF38); // {ARG_POKEMON_0} uttered its sleep talk! info->action.direction = sl & DIRECTION_MASK; TryUseChosenMove(entity, 0, ITEM_NOTHING, 1, FALSE, &moveStack); flag = TRUE; @@ -440,7 +440,7 @@ static void HandleSnore(void) } } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FCF50); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FCF50); info->action.direction = r8 & DIRECTION_MASK; TryUseChosenMove(pokemon,0,ITEM_NOTHING,1,FALSE,&chosenMove); info->unk165 |= 0xff; diff --git a/src/dungeon_action_handler.c b/src/dungeon_action_handler.c index ca19263b2..fa8766b9d 100644 --- a/src/dungeon_action_handler.c +++ b/src/dungeon_action_handler.c @@ -50,13 +50,13 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2); static Entity *sub_806773C(Entity *entity); static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2); -void HandlePickUpPlayerAction(Entity *entity) +void HandlePickUpPlayerAction_Async(Entity *entity) { GetEntInfo(entity)->action.actionParameters[0].actionUseIndex = 1; - TryLeaderItemPickUp(&entity->pos,0); + TryLeaderItemPickUp_Async(&entity->pos,0); } -void HandleSetItemAction(Entity *param_1, bool8 param_2) +void HandleSetItemAction_Async(Entity *param_1, bool8 param_2) { Item *item; Item *itemPtr; @@ -69,7 +69,7 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2) if (((itemPtr->flags & ITEM_FLAG_EXISTS)) && ((itemPtr->flags & ITEM_FLAG_SET))) { if ((itemPtr->flags & ITEM_FLAG_STICKY)) { sub_8045BF8(gFormatBuffer_Items[0],itemPtr); - LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotEquip); + LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotEquip); return; } itemPtr->flags &= ~(ITEM_FLAG_SET); @@ -77,31 +77,31 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2) } sub_8045BF8(gFormatBuffer_Items[0],item); PlaySoundEffect(0x133); - if (param_2 != 0) { + if (param_2) { if ((item->flags & ITEM_FLAG_STICKY)) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D04); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D04); } else { if (GetItemCategory(item->id) == CATEGORY_THROWN_LINE) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8CE4); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8CE4); } else { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8CE8); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8CE8); } } } item->flags |= ITEM_FLAG_SET; - if (((item->flags & ITEM_FLAG_STICKY)) && (param_2 != 0)) { + if (((item->flags & ITEM_FLAG_STICKY)) && param_2) { sub_8045BF8(gFormatBuffer_Items[0],item); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } } -void HandleUnsetItemAction(Entity *entity, bool8 enableMessage) +void HandleUnsetItemAction_Async(Entity *entity, bool8 enableMessage) { Item *item; - int index; + s32 index; for(index = 0; index < INVENTORY_SIZE; index++) { @@ -109,20 +109,20 @@ void HandleUnsetItemAction(Entity *entity, bool8 enableMessage) if (((item->flags & ITEM_FLAG_EXISTS)) && ((item->flags & ITEM_FLAG_SET))) { if ((item->flags & ITEM_FLAG_STICKY)) { sub_8045BF8(gFormatBuffer_Items[0],item); - LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotEquip); + LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotEquip); return; } item->flags &= ~(ITEM_FLAG_SET); sub_8045BF8(gFormatBuffer_Items[0],item); PlaySoundEffect(0x133); if (enableMessage) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8D20); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8D20); } } } } -void HandleGiveItemAction(Entity *param_1) +void HandleGiveItemAction_Async(Entity *param_1) { Entity *entity; Item *item; @@ -145,7 +145,7 @@ void HandleGiveItemAction(Entity *param_1) if ((!bVar3) && ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET))) { sub_8045BF8(gFormatBuffer_Items[1],item); - LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotMove2); + LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotMove2); } else { @@ -153,7 +153,7 @@ void HandleGiveItemAction(Entity *param_1) if (((info2->heldItem).flags & ITEM_FLAG_EXISTS)) { if (((info2->heldItem).flags & ITEM_FLAG_STICKY)) { sub_8045BF8(gFormatBuffer_Items[1],&info2->heldItem); - LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotMove1); + LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotMove1); return; } item1 = (info2->heldItem); @@ -171,9 +171,9 @@ void HandleGiveItemAction(Entity *param_1) sub_8045BF8(gFormatBuffer_Items[0],&item2); sub_8045BF8(gFormatBuffer_Items[1],&item1); PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(param_1,gMonTookAndReturnedItem); + LogMessageByIdWithPopupCheckUser_Async(param_1,gMonTookAndReturnedItem); if ((item2.flags & ITEM_FLAG_STICKY)) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } } else { @@ -183,9 +183,9 @@ void HandleGiveItemAction(Entity *param_1) info2->heldItem = item3; sub_8045BF8(gFormatBuffer_Items[0],&item3); PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D44); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D44); if ((item3.flags & ITEM_FLAG_STICKY)) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } } sub_806A6E8(entity); @@ -195,11 +195,11 @@ void HandleGiveItemAction(Entity *param_1) if (!info2->isTeamLeader) { info2->flags = info2->flags | MOVEMENT_FLAG_UNK_14; } - TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse); + TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse); } } -void HandleTakeItemAction(Entity *param_1) +void HandleTakeItemAction_Async(Entity *param_1) { Entity *entity; EntityInfo *info; @@ -210,13 +210,13 @@ void HandleTakeItemAction(Entity *param_1) info = GetEntInfo(entity); heldItem = &info->heldItem; if (ItemExists(&gTeamInventoryRef->teamItems[ITEM_POWER_BAND])) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D60); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D60); } else { if (ItemSticky(heldItem)) { sub_8045BF8(gFormatBuffer_Items[0],heldItem); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } else { @@ -227,7 +227,7 @@ void HandleTakeItemAction(Entity *param_1) ZeroOutItem(heldItem); AddItemToInventory(&item); PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D7C); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D7C); sub_806A6E8(entity); if (sub_80706A4(entity,&entity->pos) != 0) { WarpTarget(param_1,entity,0,0); @@ -235,12 +235,12 @@ void HandleTakeItemAction(Entity *param_1) if (!info->isTeamLeader) { info->flags |= MOVEMENT_FLAG_UNK_14; } - TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse); + TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse); } } } -void sub_8066BD4(Entity *param_1) +void sub_8066BD4_Async(Entity *param_1) { Entity *entity; EntityInfo *info; @@ -255,11 +255,11 @@ void sub_8066BD4(Entity *param_1) if (heldItem->flags & ITEM_FLAG_STICKY) { sub_8045BF8(gFormatBuffer_Items[0],heldItem); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } else if ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) { sub_8045BF8(gFormatBuffer_Items[0],item); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0); } else { @@ -272,14 +272,14 @@ void sub_8066BD4(Entity *param_1) info->heldItem = *item; *item = temp; PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8DB4); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8DB4); if (sub_80706A4(entity,&entity->pos) != 0) { WarpTarget(param_1,entity,0,0); } if (!info->isTeamLeader) { info->flags = info->flags | MOVEMENT_FLAG_UNK_14; } - TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse); + TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse); } } @@ -291,45 +291,45 @@ void HandleUseItemAction(Entity *param_1) GetEntInfo(entity)->useHeldItem = TRUE; } -void HandlePlaceItemAction(Entity *entity) +void HandlePlaceItemAction_Async(Entity *entity) { EntityInfo *info = GetEntInfo(entity); Item *item = sub_8044D90(entity,0,4); sub_8045BF8(gFormatBuffer_Items[0],item); if (info->action.actionParameters[0].actionUseIndex == 0x80) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8DE0); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8DE0); } else if (info->action.actionParameters[0].actionUseIndex < 0x15 && (item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0); } else if (info->action.actionParameters[0].actionUseIndex == 0x81 && (item->flags & ITEM_FLAG_STICKY)) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0); } else { const Tile *tile = GetTile(entity->pos.x, entity->pos.y); if ((tile->terrainFlags & TERRAIN_TYPE_STAIRS)) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04); } else if (GetTerrainType(tile) != TERRAIN_TYPE_NORMAL) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04); } else if (tile->object != NULL) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04); } else { item->flags &= ~(ITEM_FLAG_SET); sub_8045BF8(gFormatBuffer_Items[0],item); if (SpawnItem(&entity->pos,item,1) == 0) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04); } else { ZeroOutItem(item); FillInventoryGaps(); PlaySoundEffect(0x14d); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0); - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E28); - TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E28); + TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse); } } } @@ -343,20 +343,20 @@ void sub_8066E14(Entity *entity) item[1] = sub_8044D90(entity,1,6); if (info->action.actionParameters[0].actionUseIndex != 0x80) { - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E2C); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E2C); } else if (info->action.actionParameters[1].actionUseIndex < 0x15 && (item[1]->flags & ITEM_FLAG_SET) && (item[1]->flags & ITEM_FLAG_STICKY)) { sub_8045BF8(gFormatBuffer_Items[0],item[1]); - LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0); + LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0); } else if (info->action.actionParameters[1].actionUseIndex == 0x81 && ItemSticky(item[1])) { sub_8045BF8(gFormatBuffer_Items[1],item[1]); - LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove3); + LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove3); } else { const Tile *tile = GetTile((entity->pos).x,(entity->pos).y); if (tile->object != NULL && GetEntityType(tile->object) != ENTITY_ITEM) { - LogMessageByIdWithPopupCheckUser(entity,gNoExchangesHere); + LogMessageByIdWithPopupCheckUser_Async(entity,gNoExchangesHere); } else { Item newItems[2]; @@ -369,7 +369,7 @@ void sub_8066E14(Entity *entity) RemoveGroundItem(&info->action.actionParameters[0].itemPos,1); ZeroOutItem(item[1]); if (!SpawnItem(&info->action.actionParameters[0].itemPos,&newItems[1],1)) { - LogMessageByIdWithPopupCheckUser(entity,gNothingCanBePutDownHere); + LogMessageByIdWithPopupCheckUser_Async(entity,gNothingCanBePutDownHere); } else { if (info->action.actionParameters[1].actionUseIndex == 0x81) { @@ -383,8 +383,8 @@ void sub_8066E14(Entity *entity) sub_8045BF8(gFormatBuffer_Items[0],&newItems[1]); sub_8045BF8(gFormatBuffer_Items[1],&newItems[0]); PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(entity,gSwappedGroundItem); - TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse); + LogMessageByIdWithPopupCheckUser_Async(entity,gSwappedGroundItem); + TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse); } } } @@ -400,13 +400,13 @@ void sub_8066FA4(Entity *entity) sub_8045BF8(gFormatBuffer_Items[0],item[0]); if (info->action.actionParameters[0].actionUseIndex < 0x15 && (item[0]->flags & ITEM_FLAG_SET) && (item[0]->flags & ITEM_FLAG_STICKY)) { sub_8045BF8(gFormatBuffer_Items[1],item[0]); - LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove3); + LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove3); } else if (info->action.actionParameters[0].actionUseIndex == 0x81 && ItemSticky(item[0])) { - LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove2); + LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove2); } else if (tile->object != NULL && GetEntityType(tile->object) != ENTITY_ITEM) { - LogMessageByIdWithPopupCheckUser(entity,gNoExchangesHere); + LogMessageByIdWithPopupCheckUser_Async(entity,gNoExchangesHere); } else { Item newItems[2]; @@ -421,7 +421,7 @@ void sub_8066FA4(Entity *entity) RemoveGroundItem(&entity->pos,1); ZeroOutItem(item[0]); if (!SpawnItem(&entity->pos, &newItems[0],1)) { - LogMessageByIdWithPopupCheckUser(entity,gNothingCanBePutDownHere); + LogMessageByIdWithPopupCheckUser_Async(entity,gNothingCanBePutDownHere); } else { if (info->action.actionParameters[0].actionUseIndex == 0x81) { @@ -432,8 +432,8 @@ void sub_8066FA4(Entity *entity) } FillInventoryGaps(); PlaySoundEffect(0x14d); - LogMessageByIdWithPopupCheckUser(entity,gSwappedGroundItem); - TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse); + LogMessageByIdWithPopupCheckUser_Async(entity,gSwappedGroundItem); + TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse); } } } @@ -448,12 +448,12 @@ void sub_8067110(Entity *entity) if (sub_8048D50(entity,item)) { Item item2; - LogMessageByIdWithPopupCheckUser(entity,sub_80464AC(item)); + LogMessageByIdWithPopupCheckUser_Async(entity,sub_80464AC(item)); item2 = *item; sub_8044DF0(entity,0,0x66); - sub_803E708(0x1e,0x11); + DungeonWaitFrames_Async(0x1e,0x11); sub_80479B8(0,0,0,entity,entity,&item2); - TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse); + TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse); } } @@ -464,17 +464,17 @@ void sub_80671A0(Entity *entity) if (info->action.actionParameters[0].actionUseIndex == 0x81 && ItemSticky(item)) { sub_8045BF8(gFormatBuffer_Items[0], item); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BE0); - sub_803E708(0x14, 0x4C); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BE0); + DungeonWaitFrames_Async(0x14, 0x4C); } else if ((GetItemCategory(item->id) == CATEGORY_THROWN_LINE || GetItemCategory(item->id) == CATEGORY_THROWN_ARC) && ItemSticky(item)) { sub_8045BF8(gFormatBuffer_Items[0], item); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BE0); - sub_803E708(0x14, 0x4C); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BE0); + DungeonWaitFrames_Async(0x14, 0x4C); } else if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FF76C); - sub_803E708(0x14, 0x4C); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FF76C); + DungeonWaitFrames_Async(0x14, 0x4C); } else { bool8 r7; @@ -524,7 +524,7 @@ void sub_80671A0(Entity *entity) dir--; dir &= DIRECTION_MASK; sub_806CDD4(entity, 0, dir); - sub_803E708(2, 21); + DungeonWaitFrames_Async(2, 21); } info->unk166 = 4; } @@ -536,10 +536,10 @@ void sub_80671A0(Entity *entity) sub_8045C08(gFormatBuffer_Items[0], &newItem); SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); if (GetItemCategory(newItem.id) == CATEGORY_THROWN_LINE) { - LogMessageByIdWithPopupCheckUser(entity, gMonThrewItem2); + LogMessageByIdWithPopupCheckUser_Async(entity, gMonThrewItem2); } else { - LogMessageByIdWithPopupCheckUser(entity, gMonThrewItem1); + LogMessageByIdWithPopupCheckUser_Async(entity, gMonThrewItem1); } sub_8042208(entity, GetItemCategory(newItem.id)); @@ -580,7 +580,7 @@ void sub_80671A0(Entity *entity) if (EntityIsValid(entity)) { sub_806CE68(entity, info->action.direction); - TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse); + TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse); } } } @@ -601,10 +601,10 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2) EntityInfo *info1 = GetEntInfo(entity); if (targetEntity == NULL) { - DisplayDungeonMessage(NULL, gCannotTalk, TRUE); + DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE); } else if (!sub_8070BC0(entity)) { - DisplayDungeonMessage(NULL, gCannotTalk, TRUE); + DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE); } else if (GetTreatmentBetweenMonsters(entity, targetEntity, TRUE, FALSE) != 1 && GetTreatmentBetweenMonsters(targetEntity, entity, TRUE, FALSE) != 1) @@ -616,7 +616,7 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2) sub_8084778(); TrySendImmobilizeSleepEndMsg(entity, targetEntity); if (!sub_8070BC0(targetEntity) || CheckVariousStatuses2(targetEntity, TRUE)) { - DisplayDungeonMessage(NULL, gUnknown_80FE008, TRUE); + DisplayDungeonMessage_Async(NULL, gUnknown_80FE008, TRUE); return; } @@ -635,7 +635,7 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2) if (info2->monsterBehavior == 1) { if (gDungeon->unk644.stoleFromKecleon != 0) { - DisplayDungeonMessage(NULL, gUnknown_80FF674, TRUE); + DisplayDungeonMessage_Async(NULL, gUnknown_80FF674, TRUE); } else if (gDungeon->unk644.unk33) { sub_80845E0(targetEntity); @@ -656,7 +656,7 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2) else if (info2->joinedAt.id == DUNGEON_RESCUE_TEAM_BASE) { speciesId = MONSTER_DECOY; } - else if (info2->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER && !gDungeon->unk644.unk18) { + else if (info2->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER && !gDungeon->unk644.canChangeLeader) { r6 = TRUE; } @@ -671,11 +671,11 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2) } sub_806A3D4(txt, speciesId, r2, r6); - DisplayDungeonMessage(NULL, txt, TRUE); + DisplayDungeonMessage_Async(NULL, txt, TRUE); } } else { - DisplayDungeonMessage(NULL, gCannotTalk, TRUE); + DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE); } } @@ -703,7 +703,7 @@ static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2) EntityInfo *info2 = GetEntInfo(targetEntity); if (targetEntity == NULL) { - DisplayDungeonMessage(NULL, gCannotFarewell, TRUE); + DisplayDungeonMessage_Async(NULL, gCannotFarewell, TRUE); return; } @@ -728,13 +728,13 @@ static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2) } } - if (DisplayDungeonYesNoMessage(NULL, stringPtr1, FALSE) == 1) { + if (DisplayDungeonYesNoMessage_Async(NULL, stringPtr1, FALSE) == 1) { u8 tempText[64]; strncpy(tempText, gFormatBuffer_Monsters[0], sizeof(tempText)); - HandleFaint(targetEntity, DUNGEON_EXIT_WENT_AWAY, 0); + HandleFaint_Async(targetEntity, DUNGEON_EXIT_WENT_AWAY, 0); strncpy(gFormatBuffer_Monsters[0], tempText, sizeof(tempText)); - DisplayDungeonMessage(NULL, stringPtr2, TRUE); + DisplayDungeonMessage_Async(NULL, stringPtr2, TRUE); } } @@ -773,11 +773,11 @@ void sub_8067904(Entity *entity, u16 moveId) InitPokemonMove(&move, moveId); if (info->cringeClassStatus.status == STATUS_CRINGE) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gMonCringing); + LogMessageByIdWithPopupCheckUser_Async(entity, gMonCringing); } else if (info->burnClassStatus.status == STATUS_PARALYSIS) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gMonParalyzed); + LogMessageByIdWithPopupCheckUser_Async(entity, gMonParalyzed); } else { s32 i; @@ -806,7 +806,7 @@ void sub_8067904(Entity *entity, u16 moveId) if (EntityIsValid(entity)) { if (moveId == MOVE_STRUGGLE && gUnknown_202F208 == 0) { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FC690); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FC690); } if (info->isTeamLeader && moveId != MOVE_STRUGGLE) { DungeonPos pos; diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index fb2ebe63e..4e687a46b 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -52,7 +52,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused) { pokemonInfo->useHeldItem = FALSE; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); - LogMessageByIdWithPopupCheckUser(pokemon, gPtrCouldntBeUsedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrCouldntBeUsedMessage); return; } AIDecideUseItem(pokemon); diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index 7735ae131..791cff300 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -901,7 +901,7 @@ void HandleUseMoveAIAction(Entity *target) sub_806A1B0(target); } -void HandleUseOrbAction(Entity *pokemon) +void HandleUseOrbAction_Async(Entity *pokemon) { bool8 r4; Item *item; @@ -918,14 +918,14 @@ void HandleUseOrbAction(Entity *pokemon) if (item->flags & ITEM_FLAG_STICKY) { sub_8045BF8(gFormatBuffer_Items[0], item); - LogMessageByIdWithPopupCheckUser(pokemon, gItemStickyDoesntWorkText); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gItemStickyDoesntWorkText); return; } act = entityInfo->action; if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrMysteriousPowerPreventedUseMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrMysteriousPowerPreventedUseMessage); r4 = TRUE; } else { @@ -945,20 +945,20 @@ void HandleUseOrbAction(Entity *pokemon) if (entityInfo->cringeClassStatus.status == 1) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC714); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC714); r4 = FALSE; r8 = FALSE; } else if (entityInfo->cringeClassStatus.status == 7) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC718); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC718); r4 = FALSE; r8 = FALSE; } else if (entityInfo->burnClassStatus.status == 4) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC6A8); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC6A8); r4 = FALSE; r8 = FALSE; } @@ -995,7 +995,7 @@ void HandleUseOrbAction(Entity *pokemon) } sub_806A5B8(pokemon); - TryTriggerMonsterHouseWithMsg(pokemon, gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(pokemon, gDungeon->forceMonsterHouse); } else if (r4) sub_8044D40(&act, 0); diff --git a/src/dungeon_ai_items.c b/src/dungeon_ai_items.c index ea87b8f1f..41bad1ea8 100644 --- a/src/dungeon_ai_items.c +++ b/src/dungeon_ai_items.c @@ -454,7 +454,7 @@ void MonTryPickUpItem(Entity *entity) if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) { sub_8045BF8(gFormatBuffer_Items[0], groundItem); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - DisplayDungeonLoggableMessageTrue(entity, gMonTerrifiedCouldntPickUpItem); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonTerrifiedCouldntPickUpItem); } else if (!_entityInfo->isNotTeamMember && GetItemCategory(groundItem->id) == CATEGORY_POKE) { // Why check the same thing again? @@ -467,7 +467,7 @@ void MonTryPickUpItem(Entity *entity) AddToTeamMoney(GetMoneyValue(groundItem)); sub_8045BF8(gFormatBuffer_Items[0], groundItem); RemoveGroundItem(&entity->pos, 1); - DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem); } else { s32 i, nItems, newInventoryId; @@ -531,9 +531,9 @@ void MonTryPickUpItem(Entity *entity) RemoveGroundItem(&entity->pos, 1); PlaySoundEffect(0x14A); if (inventoryIds[newInventoryId] <= -1) - DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem2); else - DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItemToolbox); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItemToolbox); return; } @@ -546,7 +546,7 @@ void MonTryPickUpItem(Entity *entity) if (i == nItems) { sub_8045BF8(gFormatBuffer_Items[0], groundItem); - DisplayDungeonLoggableMessageTrue(entity, gMonSteppedOnItem); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonSteppedOnItem); } else { if (_entityInfo->isNotTeamMember) { @@ -560,16 +560,16 @@ void MonTryPickUpItem(Entity *entity) _entityInfo->heldItem = *groundItem; sub_8045BF8(gFormatBuffer_Items[0], groundItem); RemoveGroundItem(&entity->pos, 1); - DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem2); } else if (AddItemToInventory(groundItem)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - DisplayDungeonLoggableMessageTrue(entity, gMonCouldntPickUpItem); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonCouldntPickUpItem); } else { sub_8045BF8(gFormatBuffer_Items[0], groundItem); RemoveGroundItem(&entity->pos, 1); - DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItemToolbox); + DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItemToolbox); } } } diff --git a/src/dungeon_cleared_window.c b/src/dungeon_cleared_window.c index 78070e513..28b04fb0d 100644 --- a/src/dungeon_cleared_window.c +++ b/src/dungeon_cleared_window.c @@ -12,17 +12,18 @@ #include "game_options.h" #include "constants/dungeon_exit.h" -void ShowDungeonClearedWindow(void) +void ShowDungeonClearedWindow_Async(void) { WindowHeader header; WindowTemplates windows = { .id = { [0] = { + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {4, 3}, + .pos = { 4, 3 }, .width = 22, .height = 14, - .unk10 = 14, + .totalHeight = 14, .unk12 = 0, .header = &header, }, @@ -36,28 +37,35 @@ void ShowDungeonClearedWindow(void) header.currId = 0; header.width = 14; header.f3 = 0; + windows.id[0].pos.y = 20; + DungeonShowWindows(&windows, TRUE); - if (gDungeon->exitSummary.exitReason >= DUNGEON_EXIT_REASON_SUCCESS) { + + if (gDungeon->exitSummary.exitReason >= DUNGEON_EXIT_REASON_SUCCESS) PlayDungeonCompleteBGM(); - } - else { + else PlayDungeonFailBGM(); - } - PrintOnDungeonFinishedWindow(0, gText_TheLastOuting,&gDungeon->exitSummary); - while(TRUE) { - sub_803E668(0x36); + + PrintOnDungeonFinishedWindow(0, gText_TheLastOuting, &gDungeon->exitSummary); + + while (TRUE) { + sub_803E668(54); UpdateDungeonMusic(); - if (windows.id[0].pos.y >= 4){ + + if (windows.id[0].pos.y >= 4) { windows.id[0].pos.y--; - windows.id[0].unk0 = 0xa0; + windows.id[0].flags = WINTEMPLATE_FLAG_x20 | WINTEMPLATE_FLAG_x80; DungeonShowWindows(&windows, TRUE); continue; } + if (sub_8094D14()) break; + if (gRealInputs.pressed & A_BUTTON) break; } + PlayDungeonConfirmationSE(); } diff --git a/src/dungeon_cutscene.c b/src/dungeon_cutscene.c index 04e147019..f1d195919 100644 --- a/src/dungeon_cutscene.c +++ b/src/dungeon_cutscene.c @@ -48,22 +48,23 @@ struct RgbS16 }; extern OpenedFile *gDungeonPaletteFile; -extern RGB gUnknown_202ECA4[]; +extern RGB_Struct gUnknown_202ECA4[33]; -extern bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB *ramp, struct RgbS16 *a5); +extern bool8 sub_8004C00(unkStruct_202EE8C *a0, s32 a1, s32 a2, s32 brightness, const RGB_Struct *ramp, struct RgbS16 *a5); extern void sub_8088EE8(void); extern void sub_8088848(void); extern void sub_808A718(void); -struct unkData_8107234 +// Size: R=0x8 | B=0x6 +typedef struct FixedRoomCutsceneData { - u8 unk0; - u8 unk1; - u8 unk2; - u8 unk3; - u8 unk4; - u8 unk5; -}; + /* 0x0 */ u8 fixedRoomNum; // See enum "FixedRoomID" + /* 0x1 */ u8 cutscene1; // See enum "CutsceneKind" + /* 0x2 */ u8 cutscene2Flag; // See enum "CutsceneFlagID" + /* 0x3 */ u8 cutscene2; // See enum "CutsceneKind" + /* 0x4 */ u8 cutscene3Flag; // See enum "CutsceneFlagID" + /* 0x5 */ u8 cutscene3; // See enum "CutsceneKind" +} FixedRoomCutsceneData; // size: 0x8 typedef struct unkStruct_202F3D0 @@ -76,89 +77,91 @@ typedef struct unkStruct_202F3D0 u8 unk5; } unkStruct_202F3D0; -static void sub_8084854(const struct unkData_8107234 *); +static void sub_8084854(const FixedRoomCutsceneData *data); static void sub_8085764(void); static void sub_80857B8(void); static void sub_80861EC(Entity *); -static const struct unkData_8107234 gUnknown_8107234[28] = { - [0] = {1, 1, 0, 2, 1, 3}, - [1] = {2, 4, 2, 5, 3, 6}, - [2] = {3, 7, 4, 8, 5, 9}, - [3] = {4, 0xA, 6, 0xB, 7, 0xC}, - [4] = {5, 0xD, 8, 0xE, 9, 0xF}, - [5] = {6, 0x10, 0xA, 0x11, 0xA, 0x11}, - [6] = {7, 0x12, 0xB, 0x13, 0xC, 0x14}, - [7] = {0x14, 0x15, 0xD, 0x16, 0xD, 0x16}, - [8] = {8, 0x17, 0xE, 0x18, 0xF, 0x19}, - [9] = {0xB, 0x1A, 0x10, 0x1B, 0x11, 0x1C}, - [10] = {9, 0x1D, 0x12, 0x1E, 0x13, 0x1F}, - [11] = {0xC, 0x20, 0x14, 0x21, 0x15, 0x22}, - [12] = {0xD, 0x23, 0x16, 0x24, 0x17, 0x25}, - [13] = {0xE, 0x26, 0x18, 0x27, 0x19, 0x28}, - [14] = {0xF, 0x29, 0x40, 0x29, 0x1A, 0x2A}, - [15] = {0x10, 0x2B, 0x1B, 0x2C, 0x1C, 0x2D}, - [16] = {0x11, 0x2E, 0x40, 0x2E, 0x40, 0x2E}, - [17] = {0x12, 0x2F, 0x40, 0x2F, 0x40, 0x2F}, - [18] = {0x13, 0x30, 0x40, 0x30, 0x40, 0x30}, - [19] = {0xA, 0x31, 0x40, 0x31, 0x1E, 0x32}, - [20] = {0x15, 0x33, 0x40, 0x33, 0x40, 0x33}, - [21] = {0x16, 0x34, 0x40, 0x34, 0x40, 0x34}, - [22] = {0x17, 0x35, 0x40, 0x35, 0x40, 0x35}, - [23] = {0x19, 0x36, 0x40, 0x36, 0x40, 0x36}, - [24] = {0x1B, 0x37, 0x40, 0x37, 0x40, 0x37}, - [25] = {0x1A, 0x38, 0x20, 0x39, 0x20, 0x39}, - [26] = {0x18, 0x3A, 0x21, 0x3B, 0x21, 0x3B}, - [27] = {0}, +static const FixedRoomCutsceneData sFixedRoomCutsceneLookup[] = { + { FIXED_ROOM_MT_STEEL_SKARMORY, CUTSCENE_MT_STEEL_ATTEMPT1, CUTSCENE_FLAG_MT_STEEL_REACHED, CUTSCENE_MT_STEEL_ATTEMPT2, CUTSCENE_FLAG_MT_STEEL_COMPLETE, CUTSCENE_MT_STEEL_POSTSTORY }, + { FIXED_ROOM_SINISTER_WOODS_TEAM_MEANIES, CUTSCENE_SINISTER_WOODS_ATTEMPT1, CUTSCENE_FLAG_SINISTER_WOODS_REACHED, CUTSCENE_SINISTER_WOODS_ATTEMPT2, CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE, CUTSCENE_SINISTER_WOODS_POSTSTORY }, + { FIXED_ROOM_MT_THUNDER_PEAK_ZAPDOS, CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1, CUTSCENE_FLAG_MT_THUNDER_PEAK_REACHED, CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2, CUTSCENE_FLAG_MT_THUNDER_PEAK_COMPLETE, CUTSCENE_MT_THUNDER_PEAK_POSTSTORY }, + { FIXED_ROOM_MT_BLAZE_PEAK_MOLTRES, CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1, CUTSCENE_FLAG_MT_BLAZE_PEAK_REACHED, CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2, CUTSCENE_FLAG_MT_BLAZE_PEAK_COMPLETE, CUTSCENE_MT_BLAZE_PEAK_POSTSTORY }, + { FIXED_ROOM_FROSTY_GROTTO_ARTICUNO, CUTSCENE_FROSTY_GROTTO_ATTEMPT1, CUTSCENE_FLAG_FROSTY_GROTTO_REACHED, CUTSCENE_FROSTY_GROTTO_ATTEMPT2, CUTSCENE_FLAG_FROSTY_GROTTO_COMPLETE, CUTSCENE_FROSTY_GROTTO_POSTSTORY }, + { FIXED_ROOM_MT_FREEZE_PEAK_NINETALES, CUTSCENE_MT_FREEZE_PEAK, CUTSCENE_FLAG_MT_FREEZE_PEAK_COMPLETE, CUTSCENE_MT_FREEZE_PEAK_POSTSTORY, CUTSCENE_FLAG_MT_FREEZE_PEAK_COMPLETE, CUTSCENE_MT_FREEZE_PEAK_POSTSTORY }, + { FIXED_ROOM_MAGMA_CAVERN_PIT_GROUDON, CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1, CUTSCENE_FLAG_MAGMA_CAVERN_PIT_REACHED, CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2, CUTSCENE_FLAG_MAGMA_CAVERN_PIT_COMPLETE, CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY }, + { FIXED_ROOM_MAGMA_CAVERN_PIT_TYRANITAR_ALAKAZAM, CUTSCENE_MAGMA_CAVERN_MID, CUTSCENE_FLAG_MAGMA_CAVERN_MID_REACHED, CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY, CUTSCENE_FLAG_MAGMA_CAVERN_MID_REACHED, CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY }, + { FIXED_ROOM_SKY_TOWER_SUMMIT_RAYQUAZA, CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1, CUTSCENE_FLAG_SKY_TOWER_SUMMIT_REACHED, CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2, CUTSCENE_FLAG_SKY_TOWER_SUMMIT_COMPLETE, CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY }, + { FIXED_ROOM_UPROAR_FOREST_MANKEY, CUTSCENE_UPROAR_FOREST_ATTEMPT1, CUTSCENE_FLAG_UPROAR_FOREST_REACHED, CUTSCENE_UPROAR_FOREST_ATTEMPT2, CUTSCENE_FLAG_UPROAR_FOREST_COMPLETE, CUTSCENE_UPROAR_FOREST_POSTSTORY }, + { FIXED_ROOM_WESTERN_CAVE_MEWTWO, CUTSCENE_WESTERN_CAVE_ATTEMPT1, CUTSCENE_FLAG_WESTERN_CAVE_REACHED, CUTSCENE_WESTERN_CAVE_ATTEMPT2, CUTSCENE_FLAG_WESTERN_CAVE_COMPLETE, CUTSCENE_WESTERN_CAVE_POSTSTORY }, + { FIXED_ROOM_FIERY_FIELD_ENTEI, CUTSCENE_FIERY_FIELD_ATTEMPT1, CUTSCENE_FLAG_FIERY_FIELD_REACHED, CUTSCENE_FIERY_FIELD_ATTEMPT2, CUTSCENE_FLAG_FIERY_FIELD_COMPLETE, CUTSCENE_FIERY_FIELD_POSTSTORY }, + { FIXED_ROOM_LIGHTNING_FIELD_RAIKOU, CUTSCENE_LIGHTNING_FIELD_ATTEMPT1, CUTSCENE_FLAG_LIGHTNING_FIELD_REACHED, CUTSCENE_LIGHTNING_FIELD_ATTEMPT2, CUTSCENE_FLAG_LIGHTNING_FIELD_COMPLETE, CUTSCENE_LIGHTNING_FIELD_POSTSTORY }, + { FIXED_ROOM_NORTHWIND_FIELD_SUICUNE, CUTSCENE_NORTHWIND_FIELD_ATTEMPT1, CUTSCENE_FLAG_NORTHWIND_FIELD_REACHED, CUTSCENE_NORTHWIND_FIELD_ATTEMPT2, CUTSCENE_FLAG_NORTHWIND_FIELD_COMPLETE, CUTSCENE_NORTHWIND_FIELD_POSTSTORY }, + { FIXED_ROOM_MT_FARAWAY_HO_OH, CUTSCENE_MT_FARAWAY, NUM_CUTSCENE_FLAGS, CUTSCENE_MT_FARAWAY, CUTSCENE_FLAG_MT_FARAWAY_COMPLETE, CUTSCENE_MT_FARAWAY_POSTSTORY }, + { FIXED_ROOM_NORTHERN_RANGE_LATIOS, CUTSCENE_NORTHERN_RANGE_ATTEMPT1, CUTSCENE_FLAG_NORTHERN_RANGE_REACHED, CUTSCENE_NORTHERN_RANGE_ATTEMPT2, CUTSCENE_FLAG_NORTHERN_RANGE_COMPLETE, CUTSCENE_NORTHERN_RANGE_POSTSTORY }, + { FIXED_ROOM_BURIED_RELIC_REGIROCK, CUTSCENE_REGIROCK, NUM_CUTSCENE_FLAGS, CUTSCENE_REGIROCK, NUM_CUTSCENE_FLAGS, CUTSCENE_REGIROCK }, + { FIXED_ROOM_BURIED_RELIC_REGICE, CUTSCENE_REGICE, NUM_CUTSCENE_FLAGS, CUTSCENE_REGICE, NUM_CUTSCENE_FLAGS, CUTSCENE_REGICE }, + { FIXED_ROOM_BURIED_RELIC_REGISTEEL, CUTSCENE_REGISTEEL, NUM_CUTSCENE_FLAGS, CUTSCENE_REGISTEEL, NUM_CUTSCENE_FLAGS, CUTSCENE_REGISTEEL }, + { FIXED_ROOM_WISH_CAVE_JIRACHI, CUTSCENE_JIRACHI, NUM_CUTSCENE_FLAGS, CUTSCENE_JIRACHI, CUTSCENE_FLAG_JIRACHI_COMPLETE, CUTSCENE_JIRACHI_POSTSTORY }, + { FIXED_ROOM_SILVER_TRENCH_LUGIA, CUTSCENE_SILVER_TRENCH, NUM_CUTSCENE_FLAGS, CUTSCENE_SILVER_TRENCH, NUM_CUTSCENE_FLAGS, CUTSCENE_SILVER_TRENCH }, + { FIXED_ROOM_STORMY_SEA_KYOGRE, CUTSCENE_STORMY_SEA, NUM_CUTSCENE_FLAGS, CUTSCENE_STORMY_SEA, NUM_CUTSCENE_FLAGS, CUTSCENE_STORMY_SEA }, + { FIXED_ROOM_METEOR_CAVE_DEOXYS, CUTSCENE_METEOR_CAVE, NUM_CUTSCENE_FLAGS, CUTSCENE_METEOR_CAVE, NUM_CUTSCENE_FLAGS, CUTSCENE_METEOR_CAVE }, + { FIXED_ROOM_PURITY_FOREST_CELEBI, CUTSCENE_PURITY_FOREST, NUM_CUTSCENE_FLAGS, CUTSCENE_PURITY_FOREST, NUM_CUTSCENE_FLAGS, CUTSCENE_PURITY_FOREST }, + { FIRST_DOJO_MAZE_BOSS_ROOM, CUTSCENE_MAZE_BOSS, NUM_CUTSCENE_FLAGS, CUTSCENE_MAZE_BOSS, NUM_CUTSCENE_FLAGS, CUTSCENE_MAZE_BOSS }, + { FIXED_ROOM_WISH_CAVE_MEDICHAM, CUTSCENE_MEDICHAM, CUTSCENE_FLAG_MEDICHAM_COMPLETE, CUTSCENE_MEDICHAM_POSTSTORY, CUTSCENE_FLAG_MEDICHAM_COMPLETE, CUTSCENE_MEDICHAM_POSTSTORY }, + { FIXED_ROOM_HOWLING_FOREST_SMEARGLE, CUTSCENE_HOWLING_FOREST, CUTSCENE_FLAG_HOWLING_FOREST_COMPLETE, CUTSCENE_HOWLING_FOREST_POSTSTORY, CUTSCENE_FLAG_HOWLING_FOREST_COMPLETE, CUTSCENE_HOWLING_FOREST_POSTSTORY }, + { FIXED_ROOM_NONE, 0, 0, 0, 0, 0 }, }; -static const s32 gUnknown_8107314[] = { +static const s32 gUnknown_8107314[17] = { 0, -1, 1, -2, 2, -3, 3, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4 }; -EWRAM_DATA static unkStruct_202F3D0 gUnknown_202F3D0 = {0}; +EWRAM_DATA static unkStruct_202F3D0 gUnknown_202F3D0 = { 0 }; void sub_80847D4(void) { u32 fixedRoomNumber; - s32 index; + s32 i; - gDungeon->unk3A0D = 0; - gDungeon->unk1356C = 0; + gDungeon->cutscene = CUTSCENE_NONE; + gDungeon->unk1356C = FALSE; UpdateMinimap(); - for(index = 0; index < 0x3e7 && gUnknown_8107234[index].unk0 != 0; index++) { + + for (i = 0; i < 999 && sFixedRoomCutsceneLookup[i].fixedRoomNum != FIXED_ROOM_NONE; i++) { fixedRoomNumber = gDungeon->fixedRoomNumber; + // Dojo maze bosses all use the same cutscene data - if (fixedRoomNumber - (FIRST_DOJO_MAZE_BOSS_ROOM+1) < NUM_MAZE_BOSS_ROOMS) { + if (fixedRoomNumber >= (FIRST_DOJO_MAZE_BOSS_ROOM + 1) && fixedRoomNumber <= LAST_DOJO_MAZE_BOSS_ROOM) fixedRoomNumber = FIRST_DOJO_MAZE_BOSS_ROOM; - } - if (fixedRoomNumber == gUnknown_8107234[index].unk0) - { - sub_8084854(&gUnknown_8107234[index]); + + if (fixedRoomNumber == sFixedRoomCutsceneLookup[i].fixedRoomNum) { + sub_8084854(&sFixedRoomCutsceneLookup[i]); break; } } - sub_8097FF8(); + + FlushTempCutsceneFlags(); } -static void sub_8084854(const struct unkData_8107234 *param_1) +static void sub_8084854(const FixedRoomCutsceneData *data) { - if (gDungeon->unk644.unk34 != 0) { - gDungeon->unk3A0D = param_1->unk5; + if (gDungeon->unk644.missionKind != DUNGEON_MISSION_UNK0) { + gDungeon->cutscene = data->cutscene3; } - else if (sub_8098100(param_1->unk4) != 0) { - gDungeon->unk3A0D = param_1->unk5; + else if (GetCutsceneFlag(data->cutscene3Flag)) { + gDungeon->cutscene = data->cutscene3; } - else if (sub_8098100(param_1->unk2) != 0) { - gDungeon->unk3A0D = param_1->unk3; + else if (GetCutsceneFlag(data->cutscene2Flag)) { + gDungeon->cutscene = data->cutscene2; } else { - gDungeon->unk3A0D = param_1->unk1; - if (param_1->unk2 != 0x40) { - sub_8097FA8(param_1->unk2); - } + gDungeon->cutscene = data->cutscene1; + + if (data->cutscene2Flag != NUM_CUTSCENE_FLAGS) + SetTempCutsceneFlag(data->cutscene2Flag); } gDungeon->unk644.unk31 = 1; @@ -172,569 +175,571 @@ bool8 ShouldShowDungeonBanner(void) void sub_80848F0(void) { - gDungeon->unk1356C = 1; - switch(gDungeon->unk3A0D) { - case 0: - case 0x3c: - gDungeon->unk1356C = 0; - break; - case 1: - case 2: - sub_8086B14(); - break; - case 3: - sub_8086B94(); - break; - case 4: - case 5: - sub_8086E9C(); - break; - case 6: - sub_8086F00(); - break; - case 7: - case 8: - sub_8087230(); - break; - case 9: - sub_808729C(); - break; - case 10: - case 0xb: - sub_80877E8(); - break; - case 0xc: - sub_8087848(); - break; - case 0xd: - sub_8087F54(); - break; - case 0xe: - sub_8087FB4(); - break; - case 0xf: - sub_8087FF8(); - break; - case 0x10: - sub_80885A0(); - break; - case 0x11: - sub_80885C4(); - break; - case 0x12: - sub_808862C(); - break; - case 0x13: - sub_80886C4(); - break; - case 0x14: - sub_808875C(); - break; - case 0x15: - sub_8088DC0(); - break; - case 0x16: - sub_8088E5C(); - break; - case 0x17: - case 0x18: - sub_80892C8(); - break; - case 0x19: - sub_8089328(); - break; - case 0x1a: - case 0x1b: - sub_808970C(); - break; - case 0x1c: - sub_808974C(); - break; - case 0x1d: - case 0x1e: - sub_8089914(); - break; - case 0x1f: - sub_8089978(); - break; - case 0x20: - case 0x21: - sub_8089C44(); - break; - case 0x22: - sub_8089C90(); - break; - case 0x23: - sub_8089EFC(); - break; - case 0x24: - sub_8089F44(); - break; - case 0x25: - sub_8089F8C(); - break; - case 0x26: - sub_808A264(); - break; - case 0x27: - sub_808A2C0(); - break; - case 0x28: - sub_808A308(); - break; - case 0x29: - sub_808A608(); - break; - case 0x2a: - sub_808A668(); - break; - case 0x2b: - sub_808A9E4(); - break; - case 0x2c: - sub_808AA3C(); - break; - case 0x2d: - sub_808AA94(); - break; - case 0x2e: - sub_808ACC0(); - break; - case 0x2f: - sub_808AD48(); - break; - case 0x30: - sub_808ADCC(); - break; - case 0x31: - sub_808B2F4(); - break; - case 0x32: - sub_808B35C(); - break; - case 0x33: - sub_808BDEC(); - break; - case 0x34: - sub_808C10C(); - break; - case 0x35: - sub_808C3A0(); - break; - case 0x36: - sub_808C5C0(); - break; - case 0x37: - sub_808C938(); - break; - case 0x38: - sub_808C9C4(); - break; - case 0x39: - sub_808CB5C(); - break; - case 0x3a: - sub_808CBB0(); - break; - case 0x3b: - sub_808CD44(); - break; - } - sub_8097FF8(); + gDungeon->unk1356C = TRUE; + + switch (gDungeon->cutscene) { + case CUTSCENE_NONE: + case NUM_CUTSCENES: + gDungeon->unk1356C = FALSE; + break; + case CUTSCENE_MT_STEEL_ATTEMPT1: + case CUTSCENE_MT_STEEL_ATTEMPT2: + sub_8086B14(); + break; + case CUTSCENE_MT_STEEL_POSTSTORY: + sub_8086B94(); + break; + case CUTSCENE_SINISTER_WOODS_ATTEMPT1: + case CUTSCENE_SINISTER_WOODS_ATTEMPT2: + sub_8086E9C(); + break; + case CUTSCENE_SINISTER_WOODS_POSTSTORY: + sub_8086F00(); + break; + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1: + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2: + sub_8087230(); + break; + case CUTSCENE_MT_THUNDER_PEAK_POSTSTORY: + sub_808729C(); + break; + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1: + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2: + sub_80877E8(); + break; + case CUTSCENE_MT_BLAZE_PEAK_POSTSTORY: + sub_8087848(); + break; + case CUTSCENE_FROSTY_GROTTO_ATTEMPT1: + sub_8087F54(); + break; + case CUTSCENE_FROSTY_GROTTO_ATTEMPT2: + sub_8087FB4(); + break; + case CUTSCENE_FROSTY_GROTTO_POSTSTORY: + sub_8087FF8(); + break; + case CUTSCENE_MT_FREEZE_PEAK: + sub_80885A0(); + break; + case CUTSCENE_MT_FREEZE_PEAK_POSTSTORY: + sub_80885C4(); + break; + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1: + sub_808862C(); + break; + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2: + sub_80886C4(); + break; + case CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY: + sub_808875C(); + break; + case CUTSCENE_MAGMA_CAVERN_MID: + sub_8088DC0(); + break; + case CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY: + sub_8088E5C(); + break; + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1: + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2: + sub_80892C8(); + break; + case CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY: + sub_8089328(); + break; + case CUTSCENE_UPROAR_FOREST_ATTEMPT1: + case CUTSCENE_UPROAR_FOREST_ATTEMPT2: + sub_808970C(); + break; + case CUTSCENE_UPROAR_FOREST_POSTSTORY: + sub_808974C(); + break; + case CUTSCENE_WESTERN_CAVE_ATTEMPT1: + case CUTSCENE_WESTERN_CAVE_ATTEMPT2: + sub_8089914(); + break; + case CUTSCENE_WESTERN_CAVE_POSTSTORY: + sub_8089978(); + break; + case CUTSCENE_FIERY_FIELD_ATTEMPT1: + case CUTSCENE_FIERY_FIELD_ATTEMPT2: + sub_8089C44(); + break; + case CUTSCENE_FIERY_FIELD_POSTSTORY: + sub_8089C90(); + break; + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT1: + sub_8089EFC(); + break; + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT2: + sub_8089F44(); + break; + case CUTSCENE_LIGHTNING_FIELD_POSTSTORY: + sub_8089F8C(); + break; + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT1: + sub_808A264(); + break; + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT2: + sub_808A2C0(); + break; + case CUTSCENE_NORTHWIND_FIELD_POSTSTORY: + sub_808A308(); + break; + case CUTSCENE_MT_FARAWAY: + sub_808A608(); + break; + case CUTSCENE_MT_FARAWAY_POSTSTORY: + sub_808A668(); + break; + case CUTSCENE_NORTHERN_RANGE_ATTEMPT1: + sub_808A9E4(); + break; + case CUTSCENE_NORTHERN_RANGE_ATTEMPT2: + sub_808AA3C(); + break; + case CUTSCENE_NORTHERN_RANGE_POSTSTORY: + sub_808AA94(); + break; + case CUTSCENE_REGIROCK: + sub_808ACC0(); + break; + case CUTSCENE_REGICE: + sub_808AD48(); + break; + case CUTSCENE_REGISTEEL: + sub_808ADCC(); + break; + case CUTSCENE_JIRACHI: + sub_808B2F4(); + break; + case CUTSCENE_JIRACHI_POSTSTORY: + sub_808B35C(); + break; + case CUTSCENE_SILVER_TRENCH: + sub_808BDEC(); + break; + case CUTSCENE_STORMY_SEA: + sub_808C10C(); + break; + case CUTSCENE_METEOR_CAVE: + sub_808C3A0(); + break; + case CUTSCENE_PURITY_FOREST: + sub_808C5C0(); + break; + case CUTSCENE_MAZE_BOSS: + sub_808C938(); + break; + case CUTSCENE_MEDICHAM: + sub_808C9C4(); + break; + case CUTSCENE_MEDICHAM_POSTSTORY: + sub_808CB5C(); + break; + case CUTSCENE_HOWLING_FOREST: + sub_808CBB0(); + break; + case CUTSCENE_HOWLING_FOREST_POSTSTORY: + sub_808CD44(); + break; + } + FlushTempCutsceneFlags(); } void DisplayPreFightDialogue(void) { - switch(gDungeon->unk3A0D) { - case 0: - break; - case 1: - SkarmoryPreFightDialogue(); - break; - case 2: - SkarmoryReFightDialogue(); - break; - case 3: - sub_8086E40(); - break; - case 4: - TeamMeaniesPreFightDialogue(); - break; - case 5: - TeamMeaniesReFightDialogue(); - break; - case 6: - sub_8087130(); - break; - case 7: - ZapdosPreFightDialogue(); - break; - case 8: - ZapdosReFightDialogue(); - break; - case 9: - ZapdosPostStoryPreFightDialogue(); - break; - case 10: - MoltresPreFightDialogue(); - break; - case 0xb: - MoltresReFightDialogue(); - break; - case 0xc: - MoltresPostStoryPreFightDialogue(); - break; - case 0xd: - ArticunoPreFightDialogue(); - break; - case 0xe: - ArticunoReFightDialogue(); - break; - case 0xf: - ArticunoPostStoryPreFightDialogue(); - break; - case 0x10: - sub_8088608(); - break; - case 0x11: - sub_8088618(); - break; - case 0x12: - GroudonPreFightDialogue(); - break; - case 0x13: - GroudonReFightDialogue(); - break; - case 0x14: - GroudonPostStoryPreFightDialogue(); - break; - case 0x15: - MagmaCavernMidDialogue(); - break; - case 0x16: - sub_8089168(); - break; - case 0x17: - RayquazaPreFightDialogue(); - break; - case 0x18: - RayquazaReFightDialogue(); - break; - case 0x19: - RayquazaPostStoryPreFightDialogue(); - break; - case 0x1a: - sub_80897F0(); - break; - case 0x1b: - sub_8089878(); - break; - case 0x1c: - sub_80898E4(); - break; - case 0x1d: - case 0x1e: - MewtwoPreFightDialogue(); - break; - case 0x1f: - MewtwoReFightDialogue(); - break; - case 0x20: - EnteiPreFightDialogue(); - break; - case 0x21: - EnteiReFightDialogue(); - break; - case 0x22: - EnteiPostStoryPreFightDialogue(); - break; - case 0x23: - RaikouPreFightDialogue(); - break; - case 0x24: - RaikouReFightDialogue(); - break; - case 0x25: - RaikouPostStoryPreFightDialogue(); - break; - case 0x26: - SuicunePreFightDialogue(); - break; - case 0x27: - SuicuneReFightDialogue(); - break; - case 0x28: - SuicunePostStoryPreFightDialogue(); - break; - case 0x29: - HoOhPreFightDialogue(); - break; - case 0x2a: - HoOhReFightDialogue(); - break; - case 0x2b: - LatiosPreFightDialogue(); - break; - case 0x2c: - LatiosReFightDialogue(); - break; - case 0x2d: - sub_808AC3C(); - break; - case 0x2e: - RegirockPreFightDialogue(); - break; - case 0x2f: - RegicePreFightDialogue(); - break; - case 0x30: - RegisteelPreFightDialogue(); - break; - case 0x31: - JirachiPreFightDialogue(); - break; - case 0x32: - JirachiReFightDialogue(); - break; - case 0x33: - LugiaPreFightDialogue(); - break; - case 0x34: - KyogrePreFightDialogue(); - break; - case 0x35: - DeoxysPreFightDialogue(); - break; - case 0x36: - CelebiJoinDialogue(); - break; - case 0x37: - sub_808C998(); - break; - case 0x38: - MedichamRescueDialogue(); - break; - case 0x39: - DummyFightDialogue(); - break; - case 0x3a: - SmeargleRescueDialogue(); - break; - case 0x3b: - sub_808CD9C(); - break; - case 0x3C: - break; - } - sub_8085764(); - sub_80857B8(); - gDungeon->unk1356C = 0; - sub_8097FF8(); -} - -void sub_8084E00(Entity *entity, u8 param_2, bool8 param_3) -{ - if (param_2 != 0) { - switch(gDungeon->unk3A0D) { - case 0: + switch (gDungeon->cutscene) { + case CUTSCENE_NONE: break; - case 1: - case 2: - sub_8086BDC(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_STEEL_ATTEMPT1: + SkarmoryPreFightDialogue(); break; - case 4: - case 5: - sub_8086F54(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_STEEL_ATTEMPT2: + SkarmoryReFightDialogue(); break; - case 7: - case 8: - case 9: - sub_8087334(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_STEEL_POSTSTORY: + sub_8086E40(); break; - case 10: - case 0xb: - case 0xc: - sub_80878F4(param_2,gDungeon->unk3A0D); + case CUTSCENE_SINISTER_WOODS_ATTEMPT1: + TeamMeaniesPreFightDialogue(); break; - case 0xd: - case 0xe: - case 0xf: - sub_8088088(param_2,gDungeon->unk3A0D); + case CUTSCENE_SINISTER_WOODS_ATTEMPT2: + TeamMeaniesReFightDialogue(); break; - case 0x12: - case 0x13: - case 0x14: - sub_8088818(param_2,gDungeon->unk3A0D); + case CUTSCENE_SINISTER_WOODS_POSTSTORY: + sub_8087130(); break; - case 0x17: - case 0x18: - case 0x19: - sub_80893B4(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1: + ZapdosPreFightDialogue(); break; - case 0x1a: - case 0x1b: - sub_8089788(entity,param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2: + ZapdosReFightDialogue(); break; - case 0x1d: - case 0x1e: - case 0x1f: - sub_8089A00(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_THUNDER_PEAK_POSTSTORY: + ZapdosPostStoryPreFightDialogue(); break; - case 0x20: - case 0x21: - case 0x22: - sub_8089CFC(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1: + MoltresPreFightDialogue(); break; - case 0x23: - case 0x24: - case 0x25: - sub_8089FF0(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2: + MoltresReFightDialogue(); break; - case 0x26: - case 0x27: - case 0x28: - sub_808A36C(param_2,gDungeon->unk3A0D); + case CUTSCENE_MT_BLAZE_PEAK_POSTSTORY: + MoltresPostStoryPreFightDialogue(); break; - case 0x29: - case 0x2a: - sub_808A6E8(param_2,gDungeon->unk3A0D); + case CUTSCENE_FROSTY_GROTTO_ATTEMPT1: + ArticunoPreFightDialogue(); break; - case 0x2b: - case 0x2c: - case 0x2d: - sub_808AAF0(param_2,gDungeon->unk3A0D); + case CUTSCENE_FROSTY_GROTTO_ATTEMPT2: + ArticunoReFightDialogue(); break; - case 0x2e: - sub_808AE54(param_2,gDungeon->unk3A0D,&entity->pos); + case CUTSCENE_FROSTY_GROTTO_POSTSTORY: + ArticunoPostStoryPreFightDialogue(); break; - case 0x2f: - sub_808AEC8(param_2,gDungeon->unk3A0D,&entity->pos); + case CUTSCENE_MT_FREEZE_PEAK: + sub_8088608(); break; - case 0x30: - sub_808AF3C(param_2,gDungeon->unk3A0D,&entity->pos); + case CUTSCENE_MT_FREEZE_PEAK_POSTSTORY: + sub_8088618(); break; - case 0x31: - case 0x32: - sub_808B3E4(param_2,gDungeon->unk3A0D,param_3); + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1: + GroudonPreFightDialogue(); break; - case 0x33: - sub_808BE70(param_2,gDungeon->unk3A0D,param_3); + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2: + GroudonReFightDialogue(); break; - case 0x34: - sub_808C1A4(param_2,gDungeon->unk3A0D,param_3); + case CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY: + GroudonPostStoryPreFightDialogue(); break; - case 0x35: - sub_808C414(param_2,gDungeon->unk3A0D,param_3); + case CUTSCENE_MAGMA_CAVERN_MID: + MagmaCavernMidDialogue(); break; - case 0x36: - nullsub_100(param_2,gDungeon->unk3A0D,param_3); + case CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY: + sub_8089168(); break; - case 0x37: - sub_808C948(entity,gDungeon->unk3A0D); + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1: + RayquazaPreFightDialogue(); break; - case 0x38: - case 0x39: - case 0x3A: - case 0x3B: - case 0x3C: + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2: + RayquazaReFightDialogue(); + break; + case CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY: + RayquazaPostStoryPreFightDialogue(); + break; + case CUTSCENE_UPROAR_FOREST_ATTEMPT1: + sub_80897F0(); + break; + case CUTSCENE_UPROAR_FOREST_ATTEMPT2: + sub_8089878(); + break; + case CUTSCENE_UPROAR_FOREST_POSTSTORY: + sub_80898E4(); + break; + case CUTSCENE_WESTERN_CAVE_ATTEMPT1: + case CUTSCENE_WESTERN_CAVE_ATTEMPT2: + MewtwoPreFightDialogue(); + break; + case CUTSCENE_WESTERN_CAVE_POSTSTORY: + MewtwoReFightDialogue(); + break; + case CUTSCENE_FIERY_FIELD_ATTEMPT1: + EnteiPreFightDialogue(); + break; + case CUTSCENE_FIERY_FIELD_ATTEMPT2: + EnteiReFightDialogue(); + break; + case CUTSCENE_FIERY_FIELD_POSTSTORY: + EnteiPostStoryPreFightDialogue(); + break; + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT1: + RaikouPreFightDialogue(); + break; + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT2: + RaikouReFightDialogue(); + break; + case CUTSCENE_LIGHTNING_FIELD_POSTSTORY: + RaikouPostStoryPreFightDialogue(); + break; + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT1: + SuicunePreFightDialogue(); + break; + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT2: + SuicuneReFightDialogue(); + break; + case CUTSCENE_NORTHWIND_FIELD_POSTSTORY: + SuicunePostStoryPreFightDialogue(); + break; + case CUTSCENE_MT_FARAWAY: + HoOhPreFightDialogue(); + break; + case CUTSCENE_MT_FARAWAY_POSTSTORY: + HoOhReFightDialogue(); + break; + case CUTSCENE_NORTHERN_RANGE_ATTEMPT1: + LatiosPreFightDialogue(); + break; + case CUTSCENE_NORTHERN_RANGE_ATTEMPT2: + LatiosReFightDialogue(); + break; + case CUTSCENE_NORTHERN_RANGE_POSTSTORY: + sub_808AC3C(); + break; + case CUTSCENE_REGIROCK: + RegirockPreFightDialogue(); + break; + case CUTSCENE_REGICE: + RegicePreFightDialogue(); + break; + case CUTSCENE_REGISTEEL: + RegisteelPreFightDialogue(); + break; + case CUTSCENE_JIRACHI: + JirachiPreFightDialogue(); + break; + case CUTSCENE_JIRACHI_POSTSTORY: + JirachiReFightDialogue(); + break; + case CUTSCENE_SILVER_TRENCH: + LugiaPreFightDialogue(); + break; + case CUTSCENE_STORMY_SEA: + KyogrePreFightDialogue(); + break; + case CUTSCENE_METEOR_CAVE: + DeoxysPreFightDialogue(); + break; + case CUTSCENE_PURITY_FOREST: + CelebiJoinDialogue(); + break; + case CUTSCENE_MAZE_BOSS: + sub_808C998(); + break; + case CUTSCENE_MEDICHAM: + MedichamRescueDialogue(); + break; + case CUTSCENE_MEDICHAM_POSTSTORY: + DummyFightDialogue(); + break; + case CUTSCENE_HOWLING_FOREST: + SmeargleRescueDialogue(); + break; + case CUTSCENE_HOWLING_FOREST_POSTSTORY: + sub_808CD9C(); + break; + case NUM_CUTSCENES: break; } - if ((param_3 == 0) && (gDungeon->unk2 != 0)) { - DungeonStartNewBGM(999); - } - } + sub_8085764(); + sub_80857B8(); + gDungeon->unk1356C = FALSE; + FlushTempCutsceneFlags(); } -void sub_8085140(void) +void HandleBossFaint_Async(Entity *entity, u8 monsterBehavior, bool8 transformedIntoFriend) { - switch(gDungeon->unk3A0D) { - // NOTE: shortcut way to generate all cases from 0 - 0x3C properly + if (monsterBehavior == BEHAVIOR_FIXED_ENEMY) + return; + + switch (gDungeon->cutscene) { + case CUTSCENE_NONE: + break; + case CUTSCENE_MT_STEEL_ATTEMPT1: + case CUTSCENE_MT_STEEL_ATTEMPT2: + HandleSkarmoryBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_SINISTER_WOODS_ATTEMPT1: + case CUTSCENE_SINISTER_WOODS_ATTEMPT2: + HandleMeaniesBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1: + case CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2: + case CUTSCENE_MT_THUNDER_PEAK_POSTSTORY: + HandleZapdosBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1: + case CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2: + case CUTSCENE_MT_BLAZE_PEAK_POSTSTORY: + HandleMoltresBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_FROSTY_GROTTO_ATTEMPT1: + case CUTSCENE_FROSTY_GROTTO_ATTEMPT2: + case CUTSCENE_FROSTY_GROTTO_POSTSTORY: + HandleArticunoBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1: + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2: + case CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY: + HandleGroudonBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1: + case CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2: + case CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY: + HandleRayquazaBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_UPROAR_FOREST_ATTEMPT1: + case CUTSCENE_UPROAR_FOREST_ATTEMPT2: + HandleMankeyBossFaint(entity, monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_WESTERN_CAVE_ATTEMPT1: + case CUTSCENE_WESTERN_CAVE_ATTEMPT2: + case CUTSCENE_WESTERN_CAVE_POSTSTORY: + HandleMewtwoBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_FIERY_FIELD_ATTEMPT1: + case CUTSCENE_FIERY_FIELD_ATTEMPT2: + case CUTSCENE_FIERY_FIELD_POSTSTORY: + HandleEnteiBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT1: + case CUTSCENE_LIGHTNING_FIELD_ATTEMPT2: + case CUTSCENE_LIGHTNING_FIELD_POSTSTORY: + HandleRaikouBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT1: + case CUTSCENE_NORTHWIND_FIELD_ATTEMPT2: + case CUTSCENE_NORTHWIND_FIELD_POSTSTORY: + HandleSuicuneBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_MT_FARAWAY: + case CUTSCENE_MT_FARAWAY_POSTSTORY: + HandleHoOhBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_NORTHERN_RANGE_ATTEMPT1: + case CUTSCENE_NORTHERN_RANGE_ATTEMPT2: + case CUTSCENE_NORTHERN_RANGE_POSTSTORY: + HandleLatiosBossFaint(monsterBehavior, gDungeon->cutscene); + break; + case CUTSCENE_REGIROCK: + HandleRegirockBossFaint_Async(monsterBehavior, gDungeon->cutscene, &entity->pos); + break; + case CUTSCENE_REGICE: + HandleRegiceBossFaint_Async(monsterBehavior, gDungeon->cutscene, &entity->pos); + break; + case CUTSCENE_REGISTEEL: + HandleRegisteelBossFaint_Async(monsterBehavior, gDungeon->cutscene, &entity->pos); + break; + case CUTSCENE_JIRACHI: + case CUTSCENE_JIRACHI_POSTSTORY: + HandleJirachiBossFaint_Async(monsterBehavior, gDungeon->cutscene, transformedIntoFriend); + break; + case CUTSCENE_SILVER_TRENCH: + HandleLugiaBossFaint(monsterBehavior, gDungeon->cutscene, transformedIntoFriend); + break; + case CUTSCENE_STORMY_SEA: + HandleKyogreBossFaint(monsterBehavior, gDungeon->cutscene, transformedIntoFriend); + break; + case CUTSCENE_METEOR_CAVE: + HandleDeoxysNormalBossFaint(monsterBehavior, gDungeon->cutscene, transformedIntoFriend); + break; + case CUTSCENE_PURITY_FOREST: + HandleCelebiBossFaint(monsterBehavior, gDungeon->cutscene, transformedIntoFriend); + break; + case CUTSCENE_MAZE_BOSS: + HandleMazeBossFaint(entity, gDungeon->cutscene); + break; + case CUTSCENE_MEDICHAM: + case CUTSCENE_MEDICHAM_POSTSTORY: + case CUTSCENE_HOWLING_FOREST: + case CUTSCENE_HOWLING_FOREST_POSTSTORY: + case NUM_CUTSCENES: + break; + } + + if (!transformedIntoFriend && gDungeon->unk2 != DUNGEON_UNK2_0) + DungeonStartNewBGM(999); +} + +void sub_8085140_Async(void) +{ + switch (gDungeon->cutscene) { + // NOTE: shortcut way to generate all cases from [CUTSCENE_NONE, NUM_CUTSCENES] properly default: - case 0: - case 1: - case 0x3C: + case CUTSCENE_NONE: + case CUTSCENE_MT_STEEL_ATTEMPT1: + case NUM_CUTSCENES: break; - case 0x2e: - sub_808AFB0(gDungeon->unk3A0D); + case CUTSCENE_REGIROCK: + sub_808AFB0_Async(gDungeon->cutscene); break; - case 0x2f: - sub_808B030(gDungeon->unk3A0D); + case CUTSCENE_REGICE: + sub_808B030_Async(gDungeon->cutscene); break; - case 0x30: - sub_808B0B0(gDungeon->unk3A0D); + case CUTSCENE_REGISTEEL: + sub_808B0B0_Async(gDungeon->cutscene); break; } } -bool8 sub_808529C(s32 speciesId_) +bool8 MonCutsceneCompleted(s32 speciesId_) { - s32 r3; + s32 flag; s32 speciesId = 0; // This line serves no purpose other than generating the right asm. Feel free to remove it. speciesId += (s16) speciesId_; speciesId = (s16) speciesId_; - r3 = 0x40; + flag = NUM_CUTSCENE_FLAGS; switch (speciesId) { case MONSTER_SKARMORY: - r3 = 1; + flag = CUTSCENE_FLAG_MT_STEEL_COMPLETE; break; case MONSTER_EKANS: - r3 = 3; + flag = CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE; break; case MONSTER_GENGAR: - r3 = 3; + flag = CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE; break; case MONSTER_MEDICHAM: - r3 = 3; + flag = CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE; break; case MONSTER_ZAPDOS: - r3 = 5; + flag = CUTSCENE_FLAG_MT_THUNDER_PEAK_COMPLETE; break; case MONSTER_MOLTRES: - r3 = 7; + flag = CUTSCENE_FLAG_MT_BLAZE_PEAK_COMPLETE; break; case MONSTER_ARTICUNO: - r3 = 9; + flag = CUTSCENE_FLAG_FROSTY_GROTTO_COMPLETE; break; case MONSTER_GROUDON: - r3 = 0xC; + flag = CUTSCENE_FLAG_MAGMA_CAVERN_PIT_COMPLETE; break; case MONSTER_RAYQUAZA: - r3 = 0xF; + flag = CUTSCENE_FLAG_SKY_TOWER_SUMMIT_COMPLETE; break; case MONSTER_MEWTWO: - r3 = 0x13; + flag = CUTSCENE_FLAG_WESTERN_CAVE_COMPLETE; break; case MONSTER_ENTEI: - r3 = 0x15; + flag = CUTSCENE_FLAG_FIERY_FIELD_COMPLETE; break; case MONSTER_RAIKOU: - r3 = 0x17; + flag = CUTSCENE_FLAG_LIGHTNING_FIELD_COMPLETE; break; case MONSTER_SUICUNE: - r3 = 0x19; + flag = CUTSCENE_FLAG_NORTHWIND_FIELD_COMPLETE; break; case MONSTER_HO_OH: - r3 = 0x1A; + flag = CUTSCENE_FLAG_MT_FARAWAY_COMPLETE; break; case MONSTER_MANKEY: - r3 = 0x11; + flag = CUTSCENE_FLAG_UPROAR_FOREST_COMPLETE; break; case MONSTER_REGIROCK: - r3 = 0x1D; + flag = CUTSCENE_FLAG_REGI_ITEM_OBTAINED; break; case MONSTER_REGICE: - r3 = 0x1D; + flag = CUTSCENE_FLAG_REGI_ITEM_OBTAINED; break; case MONSTER_REGISTEEL: - r3 = 0x1D; + flag = CUTSCENE_FLAG_REGI_ITEM_OBTAINED; break; } - if (r3 != 0x40 && !sub_8098100(r3)) + if (flag != NUM_CUTSCENE_FLAGS && !GetCutsceneFlag(flag)) return FALSE; return TRUE; } @@ -748,7 +753,7 @@ void sub_8085374(void) s32 temp; Entity *leaderEntity = NULL; Entity *partnerEntity = NULL; - s32 species = sub_808D3F8()->speciesNum; + s32 species = GetPartnerMon2()->speciesNum; for (i = 0; i < MAX_TEAM_MEMBERS; i++) { entity = gDungeon->teamPokemon[i]; @@ -760,7 +765,7 @@ void sub_8085374(void) } } - if (leaderEntity == NULL || partnerEntity != NULL || gDungeon->unk644.unk18 != 0) + if (leaderEntity == NULL || partnerEntity != NULL || gDungeon->unk644.canChangeLeader) return; j = 0; @@ -964,7 +969,7 @@ static void sub_8085764(void) { entity = gDungeon->wildPokemon[index]; if ((EntityIsValid(entity)) && (GetEntInfo(entity)->monsterBehavior == BEHAVIOR_ALLY)) { - HandleFaint(entity,DUNGEON_EXIT_DEBUG_DAMAGE,&stackEntity); + HandleFaint_Async(entity,DUNGEON_EXIT_DEBUG_DAMAGE,&stackEntity); } } } @@ -972,13 +977,13 @@ static void sub_8085764(void) static void sub_80857B8(void) { u8 *direction; - int index; + s32 index; for (index = 0; index < DUNGEON_MAX_POKEMON; index++) { Entity *entity = gDungeon->activePokemon[index]; if (EntityIsValid(entity)) { EntityInfo *entityInfo = GetEntInfo(entity); - if (gDungeon->unk4 == 0 && gDungeon->unk2 == 0) { + if (gDungeon->unk4 == 0 && gDungeon->unk2 == DUNGEON_UNK2_0) { UpdateEntityPixelPos(entity, 0); entityInfo->unk15C = 0; entityInfo->unkFE = 99; @@ -993,8 +998,8 @@ static void sub_80857B8(void) void sub_8085860(s32 x, s32 y) { - sub_803F4A0(0); - sub_803F878(X_POS_TO_PIXELPOS(x), Y_POS_TO_PIXELPOS(y)); + sub_803F4A0(0); + sub_803F878(X_POS_TO_PIXELPOS(x), Y_POS_TO_PIXELPOS(y)); } UNUSED static void sub_8085890(s32 x, s32 y) @@ -1125,7 +1130,7 @@ bool8 ShouldRunMonsterAI(Entity *pokemon) case BEHAVIOR_JIRACHI: case BEHAVIOR_LUGIA: case BEHAVIOR_KYOGRE: - case BEHAVIOR_29: + case BEHAVIOR_DEOXYS_NORMAL: case BEHAVIOR_CELEBI: case BEHAVIOR_SMEARGLE: case BEHAVIOR_32: @@ -1152,7 +1157,7 @@ UNUSED static void sub_8085B0C(Entity *pokemon) while (local_28[index] != 0) { SetFacingDirection(pokemon, local_28[index]); - sub_803E708(6,0x46); + DungeonWaitFrames_Async(6,0x46); index++; } } @@ -1212,8 +1217,8 @@ bool8 sub_8085B80(struct_8085B80 *a0) void SetDungeonBGColorRGB(s32 r, s32 g, s32 b, bool8 a3, bool8 a4) { s32 i, palIndex, n; - const RGB *colorPtr; - RGB color; + const RGB_Struct *colorPtr; + RGB_Struct color; struct RgbS16 colorS16; n = 160; @@ -1364,48 +1369,48 @@ void sub_8085F44(s32 param_1) void sub_8085F78(void) { - switch(gDungeon->unk3A0D) { - case 0x12: - case 0x13: - case 0x14: + switch(gDungeon->cutscene) { + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1: + case CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2: + case CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY: sub_8088848(); break; - case 0x15: + case CUTSCENE_MAGMA_CAVERN_MID: sub_8088EE8(); break; - case 0x29: - case 0x2A: + case CUTSCENE_MT_FARAWAY: + case CUTSCENE_MT_FARAWAY_POSTSTORY: sub_808A718(); break; - case 0: - case 0x3C: + case CUTSCENE_NONE: + case NUM_CUTSCENES: default: break; } } -bool8 sub_80860A8(u8 id) +bool8 ItemInInventoryOrHeld(u8 id) { - Item *item; - EntityInfo *info; - Entity *entity; - int index; + s32 i; + for (i = 0; i < INVENTORY_SIZE; i++) { + Item *item = &gTeamInventoryRef->teamItems[i]; - for(index = 0; index < INVENTORY_SIZE; index++) - { - item = &gTeamInventoryRef->teamItems[index]; - if((item->flags & 1) != 0) - { - if((item->id) == id) return TRUE; + if ((item->flags & 1) != 0 && item->id == id) + return TRUE; + } + + for (i = 0; i < MAX_TEAM_MEMBERS; i++) { + Entity *entity = gDungeon->teamPokemon[i]; + + if (EntityIsValid(entity)) { + EntityInfo *info = GetEntInfo(entity); + + if (ItemExists(&info->heldItem) && info->heldItem.id == id) + return TRUE; } } - for(index = 0; index < MAX_TEAM_MEMBERS; index++) - { - entity = gDungeon->teamPokemon[index]; - if (((EntityIsValid(entity)) && (info = GetEntInfo(entity), ((info->heldItem).flags & 1))) && ((info->heldItem).id == id)) return TRUE; - } return FALSE; } @@ -1414,20 +1419,20 @@ UNUSED static void sub_8086124(Entity *entity, u8 param_2) GetEntInfo(entity)->unk160 = param_2; } -void sub_8086130(void) +void FrostyForestIntrusionCutscene_Async(void) { - DungeonFadeOutBGM(0x3c); - sub_803E708(0x3c,0x46); + DungeonFadeOutBGM(60); + DungeonWaitFrames_Async(60, 70); sub_8052FB8(gUnknown_810665C); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(30, 70); sub_8052FB8(gUnknown_810668C); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(30, 70); sub_8052FB8(gUnknown_81066D4); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(30, 70); sub_8052FB8(gUnknown_81066F0); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(30, 70); sub_8052FB8(gUnknown_810671C); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(30, 70); } void sub_80861A8(Entity *a0) @@ -1620,16 +1625,16 @@ static void sub_8086494(void) s32 i; sub_8085930(DIRECTION_NORTHEAST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_8085930(DIRECTION_EAST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_8085930(DIRECTION_SOUTHEAST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_8085930(DIRECTION_SOUTH); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_80855E4(sub_80863C8); @@ -1756,12 +1761,12 @@ void sub_8086690(void) void sub_80866C4(const struct DungeonDialogueStruct *dialogue) { - SpriteLookAroundEffect(CutsceneGetLeader()); - sub_803E708(10, 70); - DisplayDungeonDialogue(dialogue); - sub_803E708(10, 70); + CutsceneLookAroundEffect_Async(CutsceneGetLeader()); + DungeonWaitFrames_Async(10, 70); + DisplayDungeonDialogue_Async(dialogue); + DungeonWaitFrames_Async(10, 70); sub_8086494(); - gDungeon->unk2 = 1; + gDungeon->unk2 = DUNGEON_UNK2_1; } UNUSED static void sub_80866FC(void) @@ -1901,43 +1906,45 @@ void sub_8086910(Entity *entity) void sub_808692C(void) { sub_80859F0(DIRECTION_NORTHWEST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_80859F0(DIRECTION_WEST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_80859F0(DIRECTION_SOUTHWEST); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); sub_80859F0(DIRECTION_SOUTH); - sub_803E708(4, 70); + DungeonWaitFrames_Async(4, 70); } -void SpriteLookAroundEffect(Entity *entity) +void CutsceneLookAroundEffect_Async(Entity *entity) { - s8 dir = sub_8002984((s8) GetEntInfo(entity)->action.direction, 4); + s8 dir = (s8)GetEntInfo(entity)->action.direction; - sub_80869E4(entity, 4, 2, dir); - sub_803E708(15, 70); - dir = sub_8002984(dir, 5); - sub_80869E4(entity, 4, 1, dir); - sub_803E708(15, 70); - sub_80869E4(entity, 4, 2, (s8) sub_8002984(dir, 4)); - sub_803E708(15, 70); + dir = TransformDirection1(dir, DIR_TRANS_SPINLEFT2); + CutsceneLookDir_Async(entity, 4, DIR_TRANS_SPINLEFT1, dir); + DungeonWaitFrames_Async(15, 70); + dir = TransformDirection1(dir, DIR_TRANS_FLIP); + CutsceneLookDir_Async(entity, 4, DIR_TRANS_SPINRIGHT1, dir); + DungeonWaitFrames_Async(15, 70); + dir = TransformDirection1(dir, DIR_TRANS_SPINLEFT2); + CutsceneLookDir_Async(entity, 4, DIR_TRANS_SPINLEFT1, dir); + DungeonWaitFrames_Async(15, 70); } -void sub_80869E4(struct Entity *entity, s32 a1, u8 a2, s32 _someDirection) +void CutsceneLookDir_Async(struct Entity *entity, s32 numFrames, u8 dirTrans, s32 _someDirection) { s32 someDirection = (s8) _someDirection; struct EntityInfo *info = GetEntInfo(entity); s32 direction = (s8) info->action.direction; while (direction != someDirection) { - direction = (s8) sub_8002A70(direction, someDirection, a2); + direction = (s8) TransformDirection2(direction, someDirection, dirTrans); info->action.direction = direction; info->action.direction &= DIRECTION_MASK; sub_806CE68(entity, info->action.direction); - sub_803E708(a1, 70); + DungeonWaitFrames_Async(numFrames, 70); } } @@ -1955,38 +1962,37 @@ void sub_8086A54(Entity *pokemon) void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex) { - EntityInfo *entityInfo = GetEntInfo(pokemon); + EntityInfo *entityInfo = GetEntInfo(pokemon); - entityInfo->bossFlag = TRUE; + entityInfo->bossFlag = TRUE; - // BUG: Source of the Reviver Seed Boss Glitch - // - // Video to demonstration: - // https://www.youtube.com/watch?v=rHu7EehrZ68 - entityInfo->originalHP = entityInfo->maxHPStat; - if (newHP != 0) { - entityInfo->maxHPStat = newHP; - entityInfo->HP = newHP; - } + // BUG: Source of the Reviver Seed Boss Glitch + // + // Video to demonstration: + // https://www.youtube.com/watch?v=rHu7EehrZ68 + entityInfo->originalHP = entityInfo->maxHPStat; + if (newHP != 0) { + entityInfo->maxHPStat = newHP; + entityInfo->HP = newHP; + } - gDungeon->unk644.bossSongIndex = songIndex; - SetDefaultIQSkills(&entityInfo->IQSkillMenuFlags, entityInfo->bossFlag); - LoadIQSkills(pokemon); + gDungeon->unk644.bossSongIndex = songIndex; + SetDefaultIQSkills(&entityInfo->IQSkillMenuFlags, entityInfo->bossFlag); + LoadIQSkills(pokemon); } void sub_8086AC0(void) { - if(!IsFloorOver()) - if(gDungeon->unk2 == 0) - sub_8097FF8(); + if (!IsFloorOver() && gDungeon->unk2 == DUNGEON_UNK2_0) + FlushTempCutsceneFlags(); } -u8 sub_8086AE4(s16 _index) +bool8 sub_8086AE4(s16 _index) { s32 pokeIndex = _index; - if(gDungeon->unk644.unk18 == 0) - return 1; + if (!gDungeon->unk644.canChangeLeader) + return TRUE; else return HasRecruitedMon(pokeIndex); } diff --git a/src/dungeon_cutscene_articuno.c b/src/dungeon_cutscene_articuno.c index d3c32d778..bacdb23b5 100644 --- a/src/dungeon_cutscene_articuno.c +++ b/src/dungeon_cutscene_articuno.c @@ -81,7 +81,7 @@ void sub_8087FF8(void) sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); if (sub_8086AE4(MONSTER_ARTICUNO)) { - HandleFaint(articunoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(articunoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { LevelUpTarget(articunoEntity,articunoEntity,gArticunoConfigLevel,0,0); @@ -92,11 +92,11 @@ void sub_8087FF8(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_ARTICUNO); } -void sub_8088088(u8 param_1, u8 param_2) +void HandleArticunoBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0xD || param_2 == 0xE || param_2 == 0xF) && (param_1 == 0xD)) { - sub_8097FA8(0x9); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_FROSTY_GROTTO_ATTEMPT1 || cutscene == CUTSCENE_FROSTY_GROTTO_ATTEMPT2 || cutscene == CUTSCENE_FROSTY_GROTTO_POSTSTORY) && monsterBehavior == BEHAVIOR_ARTICUNO) { + SetTempCutsceneFlag(CUTSCENE_FLAG_FROSTY_GROTTO_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -110,70 +110,70 @@ void ArticunoPreFightDialogue(void) partnerEntity = CutsceneGetPartner(); articunoEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ARTICUNO); sub_8086448(); - SpriteLookAroundEffect(partnerEntity); - DisplayDungeonDialogue(gArticunoPreFightDialogue_1); - sub_803E708(10,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DisplayDungeonDialogue_Async(gArticunoPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); sub_8086598(); DungeonStopBGM(); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_2); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_3); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); SetFacingDirection(leaderEntity, DIRECTION_WEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_WEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_SOUTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_WEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); SetFacingDirection(leaderEntity, DIRECTION_WEST); - sub_803E708(10,0x46); - DisplayDungeonDialogue(gArticunoPreFightDialogue_4); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_5); - sub_803E708(10,0x46); - sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH); - sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gArticunoPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTH); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_NORTH); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(partnerEntity); + CutsceneLookAroundEffect_Async(partnerEntity); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(leaderEntity); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_6); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_7); - sub_803E708(10,0x46); + CutsceneLookAroundEffect_Async(leaderEntity); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_6); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0); // snow flurry gDungeon->weather.unkE265 = WEATHER_SNOW; sub_807EAA0(0,1); PlaySoundEffect(0x1ee); // flash effect? sub_8088574(); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_8); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_8); + DungeonWaitFrames_Async(10,0x46); ArticunoScreenFlash(); sub_8086738(); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_9); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_9); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1ea); sub_8088484(articunoEntity); sub_80865E8(); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_10); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_10); sub_806CDD4(articunoEntity,0xf,DIRECTION_SOUTH); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_11); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_11); sub_806CDD4(articunoEntity,0x10,DIRECTION_SOUTH); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPreFightDialogue_12); + DisplayDungeonDialogue_Async(&gArticunoPreFightDialogue_12); sub_806CDD4(articunoEntity,0xf,DIRECTION_SOUTH); - sub_803E708(0x10,0x46); + DungeonWaitFrames_Async(0x10,0x46); SetupBossFightHP(articunoEntity,0x1c2,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -187,15 +187,15 @@ void ArticunoReFightDialogue(void) articunoEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ARTICUNO); gDungeon->weather.unkE265 = WEATHER_SNOW; sub_807EAA0(0,1); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gArticunoReFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoReFightDialogue_1); sub_806CDD4(articunoEntity,0x10,DIRECTION_SOUTH); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoReFightDialogue_2); + DisplayDungeonDialogue_Async(&gArticunoReFightDialogue_2); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoReFightDialogue_3); + DisplayDungeonDialogue_Async(&gArticunoReFightDialogue_3); sub_806CDD4(articunoEntity,0xf,DIRECTION_SOUTH); - sub_803E708(0x28,0x46); + DungeonWaitFrames_Async(0x28,0x46); SetupBossFightHP(articunoEntity,0x1c2,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -217,21 +217,21 @@ void ArticunoPostStoryPreFightDialogue(void) ArticunoScreenFlash(); sub_8086738(); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gArticunoPostStoryPreFightDialogue_1); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gArticunoPostStoryPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); sub_8088484(articunoEntity); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gArticunoPostStoryPreFightDialogue_2); sub_806CDD4(articunoEntity,0xf,DIRECTION_SOUTH); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPostStoryPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gArticunoPostStoryPreFightDialogue_3); sub_806CDD4(articunoEntity,0x10,DIRECTION_SOUTH); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPostStoryPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gArticunoPostStoryPreFightDialogue_4); ArticunoScreenFlash(); - DisplayDungeonDialogue(&gArticunoPostStoryPreFightDialogue_5); + DisplayDungeonDialogue_Async(&gArticunoPostStoryPreFightDialogue_5); sub_806CDD4(articunoEntity,0xf,DIRECTION_SOUTH); - sub_803E708(0x28,0x46); + DungeonWaitFrames_Async(0x28,0x46); SetupBossFightHP(articunoEntity,0x1c2,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -262,19 +262,19 @@ static void ArticunoScreenFlash(void) SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(0,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1 / 2,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_celebi.c b/src/dungeon_cutscene_celebi.c index 19dd0211b..2383a7134 100644 --- a/src/dungeon_cutscene_celebi.c +++ b/src/dungeon_cutscene_celebi.c @@ -39,26 +39,26 @@ static void sub_808C9B0(Entity *param_1); void sub_808C5C0(void) { - Entity * leaderEntity; - Entity * celebiEntity; + Entity * leaderEntity; + Entity * celebiEntity; - u32 XPos; - s32 YPos; + u32 XPos; + s32 YPos; - leaderEntity = CutsceneGetLeader(); - celebiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_CELEBI); - DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST); - sub_80854D4(); - sub_8085930(DIRECTION_NORTH); - SetFacingDirection(celebiEntity, DIRECTION_SOUTH); - sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); - XPos = GetCameraXPos(); - YPos = GetCameraYPos(); - sub_803F878(XPos,YPos - 0x1000); - CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_CELEBI); + leaderEntity = CutsceneGetLeader(); + celebiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_CELEBI); + DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST); + sub_80854D4(); + sub_8085930(DIRECTION_NORTH); + SetFacingDirection(celebiEntity, DIRECTION_SOUTH); + sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); + XPos = GetCameraXPos(); + YPos = GetCameraYPos(); + sub_803F878(XPos,YPos - 0x1000); + CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_CELEBI); } -void nullsub_100(u8 r0, u8 r1, u8 r3) +void HandleCelebiBossFaint(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend) { } @@ -73,36 +73,36 @@ void CelebiJoinDialogue(void) celebiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_CELEBI); if ((HasRecruitedMon(MONSTER_CELEBI)) || (!CanEntityBeRecruited(celebiEntity))) { - HandleFaint(celebiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - SpriteLookAroundEffect(leaderEntity); - sub_803E708(10,0x46); + HandleFaint_Async(celebiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + CutsceneLookAroundEffect_Async(leaderEntity); + DungeonWaitFrames_Async(10,0x46); // ......... - DisplayDungeonDialogue(&gCelebiJoinDialogue_10); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_10); } else { - SpriteLookAroundEffect(leaderEntity); - sub_803E708(10,0x46); + CutsceneLookAroundEffect_Async(leaderEntity); + DungeonWaitFrames_Async(10,0x46); SpriteShockEffect(leaderEntity); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); // Oh? There's someone there. - DisplayDungeonDialogue(&gCelebiJoinDialogue_1); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_1); + DungeonWaitFrames_Async(10,0x46); sub_8086598(); sub_8086598(); sub_8086598(); sub_8086598(); // The Time-Traveling Pokemon {POKEMON_2} (Celebi)! - DisplayDungeonDialogue(&gCelebiJoinDialogue_2); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_2); PlaySoundEffect(0x1c7); sub_806CDD4(celebiEntity,10,DIRECTION_SOUTH); - sub_803E708(0x14,0x46); + DungeonWaitFrames_Async(0x14,0x46); sub_806CE68(celebiEntity, DIRECTION_SOUTH); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); PlaySoundEffect(0x1c7); sub_806CDD4(celebiEntity,10,DIRECTION_SOUTH); - DisplayDungeonDialogue(&gCelebiJoinDialogue_3); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_3); + DungeonWaitFrames_Async(10,0x46); state = 0; do @@ -115,7 +115,7 @@ void CelebiJoinDialogue(void) menuChoice = DisplayDungeonMenuMessage(0,gPtrPurityForestAllowCelebiToJoinText, gPurityForestAllowCelebiToJoinPrompt,0x701); } while (menuChoice < 1); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); if (menuChoice == 1) { @@ -127,26 +127,26 @@ void CelebiJoinDialogue(void) DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST); PlaySoundEffect(0x1c7); sub_80861D4(celebiEntity,0xd,DIRECTION_SOUTH); - sub_803E708(0x37,0x46); + DungeonWaitFrames_Async(0x37,0x46); PlaySoundEffect(0x1d5); - sub_803E708(0x1a,0x46); + DungeonWaitFrames_Async(0x1a,0x46); PlaySoundEffect(0x1d5); - sub_803E708(0x1c,0x46); - DisplayDungeonDialogue(&gCelebiJoinDialogue_4); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x1c,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_4); + DungeonWaitFrames_Async(10,0x46); HandleSpecialEntityJoinSequence(leaderEntity,celebiEntity,&celebiEntity); DungeonStartNewBGM(MUS_FRIEND_AREA_HEALING_FOREST); - DisplayDungeonDialogue(&gCelebiJoinDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_5); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1c7); sub_80861D4(celebiEntity,0xd,DIRECTION_SOUTH); - sub_803E708(0x37,0x46); + DungeonWaitFrames_Async(0x37,0x46); PlaySoundEffect(0x1d5); - sub_803E708(0x1a,0x46); + DungeonWaitFrames_Async(0x1a,0x46); PlaySoundEffect(0x1d5); - sub_803E708(0x1b,0x46); - DisplayDungeonDialogue(&gCelebiJoinDialogue_6); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x1b,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_6); + DungeonWaitFrames_Async(10,0x46); state = 2; } else @@ -165,26 +165,26 @@ void CelebiJoinDialogue(void) } else { - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gCelebiJoinDialogue_7); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_7); sub_80861F8(0x3e,celebiEntity,1); - sub_803E708(0x18,0x46); + DungeonWaitFrames_Async(0x18,0x46); sub_80861F8(0x3e,celebiEntity,1); - sub_803E708(0xe,0x46); - DisplayDungeonDialogue(&gCelebiJoinDialogue_8); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0xe,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_8); + DungeonWaitFrames_Async(10,0x46); sub_808C8E0(celebiEntity); - DisplayDungeonDialogue(&gCelebiJoinDialogue_9); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gCelebiJoinDialogue_9); + DungeonWaitFrames_Async(10,0x46); state = 2; } break; } } while (state != 2); } - DungeonFadeOutBGM(0x1e); - sub_803E708(0x1e,0x46); - gDungeon->unk2 = 1; + DungeonFadeOutBGM(30); + DungeonWaitFrames_Async(30, 70); + gDungeon->unk2 = DUNGEON_UNK2_1; } static void sub_808C8E0(Entity *entity) @@ -204,38 +204,42 @@ static void sub_808C8E0(Entity *entity) sub_8086A3C(entity); } +// TODO: Yeah that doesn't look like Celebi stuff. +// Check if it's a file split in blue... + void sub_808C938(void) { sub_80855E4(sub_808C9B0); } -void sub_808C948(Entity *entity, u8 param_2) +void HandleMazeBossFaint(Entity *entity, u8 cutscene) { - bool8 flag; - s32 index; - Entity *pokeEntity; + s32 i; + Entity *pokeEntity; - if (param_2 == 0x37) { - flag = FALSE; - for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++){ - pokeEntity = gDungeon->wildPokemon[index]; - if ((pokeEntity != entity) && (EntityIsValid(pokeEntity))) { - flag = TRUE; - break; - } + if (cutscene == CUTSCENE_MAZE_BOSS) { + bool8 stillAlive = FALSE; + + for (i = 0; i < DUNGEON_MAX_WILD_POKEMON; i++){ + pokeEntity = gDungeon->wildPokemon[i]; + if (pokeEntity != entity && EntityIsValid(pokeEntity)) { + stillAlive = TRUE; + break; + } + } + + if (!stillAlive) { + gDungeon->unk2 = DUNGEON_UNK2_1; + } } - if (!flag) { - gDungeon->unk2 = 1; - } - } } void sub_808C998(void) { // Defeat the opposing team to win // Be careful, your opponents are tough - DisplayDungeonDialogue(&gUnknown_8106720); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gUnknown_8106720); + DungeonWaitFrames_Async(0xA, 0x46); } static void sub_808C9B0(Entity *param_1) diff --git a/src/dungeon_cutscene_deoxys.c b/src/dungeon_cutscene_deoxys.c index 9a991f3c5..b4c6f576c 100644 --- a/src/dungeon_cutscene_deoxys.c +++ b/src/dungeon_cutscene_deoxys.c @@ -58,10 +58,10 @@ void sub_808C3A0(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_DEOXYS_NORMAL); } -void sub_808C414(u8 param_1,u8 param_2,u8 param_3) +void HandleDeoxysNormalBossFaint(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend) { - if ((param_2 == 0x35) && (param_1 == 0x1D)) { - gDungeon->unk2 = 1; + if (cutscene == CUTSCENE_METEOR_CAVE && monsterBehavior == BEHAVIOR_DEOXYS_NORMAL) { + gDungeon->unk2 = DUNGEON_UNK2_1; DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN); } } @@ -78,15 +78,15 @@ void DeoxysPreFightDialogue(void) sub_80866C4(&gDeoxysPreFightDialogue_5); } else { - DisplayDungeonDialogue(&gDeoxysPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gDeoxysPreFightDialogue_1); DungeonFadeInNewBGM(MUS_RAYQUAZAS_DOMAIN, 0x3c); sub_808C550(); - DisplayDungeonDialogue(&gDeoxysPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gDeoxysPreFightDialogue_2); DeoxysScreenFlash(); - DisplayDungeonDialogue(&gDeoxysPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gDeoxysPreFightDialogue_3); DeoxysScreenFlash(); - DisplayDungeonDialogue(&gDeoxysPreFightDialogue_4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gDeoxysPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); sub_808563C(SetupDeoxysFightHP); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -101,17 +101,17 @@ static void DeoxysScreenFlash(void) SetDungeonBGColorRGB(iVar1,0,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){ SetDungeonBGColorRGB(iVar1,iVar1,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){ SetDungeonBGColorRGB(iVar1,0,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } @@ -127,7 +127,7 @@ static void sub_808C550(void) static void sub_808C590(Entity *r0) { - HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); } static void SetupDeoxysFacingDirection(Entity *deoxysEntity) diff --git a/src/dungeon_cutscene_empty_summit.c b/src/dungeon_cutscene_empty_summit.c index 608fe33b2..991f3999f 100644 --- a/src/dungeon_cutscene_empty_summit.c +++ b/src/dungeon_cutscene_empty_summit.c @@ -33,7 +33,7 @@ void sub_80885A0(void) { DungeonFadeOutBGM(0x3c); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); DungeonStopBGM(); gDungeon->unk7 = 1; } @@ -44,7 +44,7 @@ void sub_80885C4(void) leaderEntity = CutsceneGetLeader(); DungeonFadeOutBGM(0x3c); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); DungeonStopBGM(); sub_80854D4(); sub_8085930(DIRECTION_NORTH); @@ -54,7 +54,7 @@ void sub_80885C4(void) void sub_8088608(void) { - gDungeon->unk2 = 1; + gDungeon->unk2 = DUNGEON_UNK2_1; } void sub_8088618(void) diff --git a/src/dungeon_cutscene_entei.c b/src/dungeon_cutscene_entei.c index c71550c82..61cbbb01f 100644 --- a/src/dungeon_cutscene_entei.c +++ b/src/dungeon_cutscene_entei.c @@ -59,7 +59,7 @@ void sub_8089C90(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); if (HasRecruitedMon(MONSTER_ENTEI)) { - HandleFaint(EnteiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(EnteiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { SetFacingDirection(EnteiEntity, DIRECTION_SOUTH); @@ -68,11 +68,11 @@ void sub_8089C90(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_ENTEI); } -void sub_8089CFC(u8 param_1, u8 param_2) +void HandleEnteiBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x20 || param_2 == 0x21 || param_2 == 0x22) && (param_1 == 0x12)) { - sub_8097FA8(0x15); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_FIERY_FIELD_ATTEMPT1 || cutscene == CUTSCENE_FIERY_FIELD_ATTEMPT2 || cutscene == CUTSCENE_FIERY_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_ENTEI) { + SetTempCutsceneFlag(CUTSCENE_FLAG_FIERY_FIELD_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -84,12 +84,12 @@ void EnteiPreFightDialogue(void) leaderEntity = CutsceneGetLeader(); EnteiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ENTEI); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gEnteiPreFightDialogue_1); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gEnteiPreFightDialogue_2); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPreFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gEnteiPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(EnteiEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -102,12 +102,12 @@ void EnteiReFightDialogue(void) leaderEntity = CutsceneGetLeader(); EnteiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ENTEI); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiReFightDialogue_1); + DisplayDungeonDialogue_Async(&gEnteiReFightDialogue_1); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiReFightDialogue_2); + DisplayDungeonDialogue_Async(&gEnteiReFightDialogue_2); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiReFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gEnteiReFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(EnteiEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -124,12 +124,12 @@ void EnteiPostStoryPreFightDialogue(void) } else { EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gEnteiPostStoryPreFightDialogue_1); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gEnteiPostStoryPreFightDialogue_2); EnteiScreenFlash(); - DisplayDungeonDialogue(&gEnteiPostStoryPreFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gEnteiPostStoryPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(EnteiEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -140,24 +140,24 @@ static void EnteiScreenFlash(void) s32 iVar1; PlaySoundEffect(0x1ed); - for(iVar1 = 250; iVar1 > 149; iVar1 -= 10) + for(iVar1 = 250; iVar1 >= 150; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); - for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) + DungeonWaitFrames_Async(10,70); + for(iVar1 = 250; iVar1 >= 200; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1, 0, 0, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1, iVar1 / 2, iVar1 / 2, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_groudon.c b/src/dungeon_cutscene_groudon.c index c55bc85b9..5f9a2ebc4 100644 --- a/src/dungeon_cutscene_groudon.c +++ b/src/dungeon_cutscene_groudon.c @@ -78,7 +78,7 @@ void sub_80886C4(void) sub_8085374(); sub_80854D4(); sub_8085930(DIRECTION_NORTH); - HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); SetFacingDirection(groudonEntity, DIRECTION_SOUTH); sub_8086A3C(groudonEntity); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); @@ -102,9 +102,9 @@ void sub_808875C(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); - HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); if (sub_8086AE4(MONSTER_GROUDON)) { - HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { LevelUpTarget(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0); @@ -116,11 +116,11 @@ void sub_808875C(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); } -void sub_8088818(u8 param_1, u8 param_2) +void HandleGroudonBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x12 || param_2 == 0x13 || param_2 == 0x14) && (param_1 == 0xE)) { - sub_8097FA8(0xC); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1 || cutscene == CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2 || cutscene == CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY) && monsterBehavior == BEHAVIOR_GROUDON_2) { + SetTempCutsceneFlag(CUTSCENE_FLAG_MAGMA_CAVERN_PIT_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -141,69 +141,69 @@ void GroudonPreFightDialogue(void) alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_1); groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2); sub_8086448(); - DisplayDungeonDialogue(GroudonPreFightDialogue_1); - sub_803E708(10,0x46); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_2); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(GroudonPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); sub_8086838(1,1,1); sub_808680C(); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); sub_808682C(); - sub_803E708(0x1e,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_3); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x1e,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); sub_8086838(1,1,1); sub_808680C(); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_4); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); GroudonScreenFlash(); - DisplayDungeonDialogue(&GroudonPreFightDialogue_5); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_6); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_6); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(partnerEntity); - DisplayDungeonDialogue(&GroudonPreFightDialogue_7); - sub_803E708(10,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); sub_808682C(); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); sub_80861B8(alakazamEntity,6,DIRECTION_NORTH); PlaySoundEffect(0x205); sub_8086738(); - HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - DisplayDungeonDialogue(&GroudonPreFightDialogue_8); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_9); - sub_803E708(10,0x46); + HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_8); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_9); + DungeonWaitFrames_Async(10,0x46); sub_8085930(DIRECTION_NORTH); sub_8086764(); - sub_803E708(0x28,0x46); + DungeonWaitFrames_Async(0x28,0x46); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(partnerEntity); - DisplayDungeonDialogue(GroudonPreFightDialogue_10); - sub_803E708(10,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DisplayDungeonDialogue_Async(GroudonPreFightDialogue_10); + DungeonWaitFrames_Async(10,0x46); sub_8086838(1,1,1); sub_808680C(); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(GroudonPreFightDialogue_11); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(GroudonPreFightDialogue_11); + DungeonWaitFrames_Async(10,0x46); DungeonStopBGM(); GroudonScreenFlash2(); - sub_803E708(0x1e,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_12); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&GroudonPreFightDialogue_13); - sub_803E708(10,0x46); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(0x1e,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_12); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&GroudonPreFightDialogue_13); + DungeonWaitFrames_Async(10,0x46); + DungeonWaitFrames_Async(0x1e,0x46); sub_808682C(); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); PlaySoundEffect(0x1fa); sub_8086738(); sub_8085930(DIRECTION_NORTH); - DisplayDungeonDialogue(GroudonPreFightDialogue_14); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(GroudonPreFightDialogue_14); + DungeonWaitFrames_Async(10,0x46); sub_8086A54(groudonEntity); sub_8085930(DIRECTION_NORTH); sub_8086764(); @@ -220,22 +220,22 @@ void GroudonReFightDialogue(void) groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_2); sub_8086838(1,1,1); sub_808680C(); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(gGroudonReFightDialogue_1); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(gGroudonReFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); GroudonScreenFlash(); - sub_803E708(0x1e,0x46); - DisplayDungeonDialogue(gGroudonReFightDialogue_2); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gGroudonReFightDialogue_3); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x1e,0x46); + DisplayDungeonDialogue_Async(gGroudonReFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gGroudonReFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); sub_808682C(); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); DungeonStopBGM(); PlaySoundEffect(0x1fa); sub_8086738(); - DisplayDungeonDialogue(gGroudonReFightDialogue_4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(gGroudonReFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); sub_8086A54(groudonEntity); sub_8085930(DIRECTION_NORTH); sub_8086764(); @@ -255,18 +255,18 @@ void GroudonPostStoryPreFightDialogue(void) sub_80866C4(&gUnknown_8103488); } else{ - DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_1); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gGroudonPostStoryPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); SceneGroudonMovement(groudonEntity); SceneGroudonMovement(groudonEntity); - DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gGroudonPostStoryPreFightDialogue_2); PlaySoundEffect(0x1f6); GroudonScreenFlash(); - DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gGroudonPostStoryPreFightDialogue_3); PlaySoundEffect(0x1f6); GroudonScreenFlash(); - DisplayDungeonDialogue(&gGroudonPostStoryPreFightDialogue_4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gGroudonPostStoryPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(groudonEntity,500,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -293,10 +293,10 @@ static void SceneGroudonMovement(Entity * groudonEntity) } sub_80856C8(groudonEntity,groudonEntity->pos.x,groudonEntity->pos.y + 1); sub_80861D4(groudonEntity,0xf,DIRECTION_SOUTH); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_808682C(); sub_8085930(DIRECTION_NORTH); - sub_803E708(0x22,0x46); + DungeonWaitFrames_Async(0x22,0x46); } static void GroudonScreenFlash(void) @@ -308,21 +308,21 @@ static void GroudonScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } @@ -335,21 +335,21 @@ static void GroudonScreenFlash2(void) SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1 / 2,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1 / 2,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_hooh.c b/src/dungeon_cutscene_hooh.c index 93c526feb..9bb085d60 100644 --- a/src/dungeon_cutscene_hooh.c +++ b/src/dungeon_cutscene_hooh.c @@ -65,7 +65,7 @@ void sub_808A668(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); if (HasRecruitedMon(MONSTER_HO_OH)) { - HandleFaint(HoOhEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(HoOhEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { SetFacingDirection(HoOhEntity, DIRECTION_SOUTH); @@ -75,11 +75,11 @@ void sub_808A668(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_HO_OH); } -void sub_808A6E8(u8 param_1, u8 param_2) +void HandleHoOhBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x29 || param_2 == 0x2A) && (param_1 == 0x15)) { - sub_8097FA8(0x1A); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_MT_FARAWAY || cutscene == CUTSCENE_MT_FARAWAY_POSTSTORY) && monsterBehavior == BEHAVIOR_HO_OH) { + SetTempCutsceneFlag(CUTSCENE_FLAG_MT_FARAWAY_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -99,30 +99,30 @@ void HoOhPreFightDialogue(void) local_14.x = leaderEntity->pixelPos.x; local_14.y = leaderEntity->pixelPos.y + -0x1000; ShiftCameraToPosition(&local_14,0x88); - sub_803E708(0x40,70); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_1); - sub_803E708(10,70); + DungeonWaitFrames_Async(0x40,70); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_1); + DungeonWaitFrames_Async(10,70); HoOhScreenFlash(); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_2); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_2); + DungeonWaitFrames_Async(10,70); sub_80855E4(sub_80868F4); sub_808680C(); PlaySoundEffect(0x1c5); - sub_803E708(0xfa,70); + DungeonWaitFrames_Async(0xfa,70); HoOhDropInEffect(HoOhEntity); StopSoundEffect(0x1c5); sub_808682C(); sub_80855E4(sub_8086910); sub_8085930(DIRECTION_NORTH); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_3); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_4); - sub_803E708(0x1e,70); - sub_803E708(0x1e,70); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_4); + DungeonWaitFrames_Async(0x1e,70); + DungeonWaitFrames_Async(0x1e,70); HoOhScreenFlash(); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_5); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_5); HoOhScreenFlash(); - DisplayDungeonDialogue(&gHoOhPreFightDialogue_6); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gHoOhPreFightDialogue_6); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(HoOhEntity,800,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -139,26 +139,26 @@ void HoOhReFightDialogue(void) local_14.x = leaderEntity->pixelPos.x; local_14.y = leaderEntity->pixelPos.y + -0x1000; ShiftCameraToPosition(&local_14,0x88); - sub_803E708(0x40,70); + DungeonWaitFrames_Async(0x40,70); if (HasRecruitedMon(MONSTER_HO_OH)) { sub_80866C4(&HoOhReFightDialogue_5); } else { - DisplayDungeonDialogue(&HoOhReFightDialogue_1); + DisplayDungeonDialogue_Async(&HoOhReFightDialogue_1); HoOhScreenFlash(); sub_80855E4(sub_80868F4); sub_808680C(); - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); HoOhDropInEffect(HoOhEntity); sub_808682C(); sub_80855E4(sub_8086910); sub_8085930(DIRECTION_NORTH); - DisplayDungeonDialogue(&HoOhReFightDialogue_2); + DisplayDungeonDialogue_Async(&HoOhReFightDialogue_2); HoOhScreenFlash(); - DisplayDungeonDialogue(&HoOhReFightDialogue_3); + DisplayDungeonDialogue_Async(&HoOhReFightDialogue_3); HoOhScreenFlash(); - DisplayDungeonDialogue(&HoOhReFightDialogue_4); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&HoOhReFightDialogue_4); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(HoOhEntity,800,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -196,18 +196,18 @@ static void HoOhScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_jirachi.c b/src/dungeon_cutscene_jirachi.c index d0077c3e1..2f64cdfec 100644 --- a/src/dungeon_cutscene_jirachi.c +++ b/src/dungeon_cutscene_jirachi.c @@ -35,8 +35,8 @@ #include "dungeon_8041AD0.h" -static void sub_808B50C(void); -static void JirachiWish(void); +static void sub_808B50C_Async(void); +static void JirachiWish_Async(void); static void JirachiWishGrantFlash(void); static void sub_808BB3C(DungeonPos *pos1); static void sub_808BBA8(Entity *jirachiEntity); @@ -78,7 +78,7 @@ void sub_808B35C(void) sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); if (HasRecruitedMon(MONSTER_JIRACHI)) { - HandleFaint(jirachiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(jirachiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { SetFacingDirection(jirachiEntity, DIRECTION_SOUTH); @@ -91,29 +91,24 @@ void sub_808B35C(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI); } -void sub_808B3E4(u8 param_1, u8 param_2, u8 param_3) +void HandleJirachiBossFaint_Async(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend) { - u8 uVar1; - if ((param_2 == 0x31 || param_2 == 0x32) && (param_1 == 0x1A)) { - sub_8097FA8(0x1E); - if(param_3 != 0) - { - gDungeon->unk2 = 1; - } - else { - uVar1 = gDungeon->unk1356C; - if(sub_80860A8(0x36) != 0) - { - JirachiWish(); + if ((cutscene == CUTSCENE_JIRACHI || cutscene == CUTSCENE_JIRACHI_POSTSTORY) && monsterBehavior == BEHAVIOR_JIRACHI) { + SetTempCutsceneFlag(CUTSCENE_FLAG_JIRACHI_COMPLETE); + if (transformedIntoFriend) + gDungeon->unk2 = DUNGEON_UNK2_1; + else { + bool8 b = gDungeon->unk1356C; + + if (ItemInInventoryOrHeld(ITEM_WISH_STONE)) + JirachiWish_Async(); + else + sub_808B50C_Async(); + + gDungeon->unk1356C = b; + UpdateMinimap(); } - else - { - sub_808B50C(); - } - gDungeon->unk1356C = uVar1; - UpdateMinimap(); } - } } void JirachiPreFightDialogue(void) @@ -124,26 +119,26 @@ void JirachiPreFightDialogue(void) leaderEntity = CutsceneGetLeader(); jirachiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_JIRACHI); sub_8086448(); - sub_803E708(0x40,70); - DisplayDungeonDialogue(&gJirachiPreFightDialogue_1); - sub_803E708(10,70); - SpriteLookAroundEffect(leaderEntity); - sub_803E708(10,70); - DisplayDungeonDialogue(&gJirachiPreFightDialogue_2); + DungeonWaitFrames_Async(0x40,70); + DisplayDungeonDialogue_Async(&gJirachiPreFightDialogue_1); + DungeonWaitFrames_Async(10,70); + CutsceneLookAroundEffect_Async(leaderEntity); + DungeonWaitFrames_Async(10,70); + DisplayDungeonDialogue_Async(&gJirachiPreFightDialogue_2); sub_80861F8(0x37,jirachiEntity,1); sub_80855E4(SpriteShockEffect); - sub_803E708(0x3c,70); + DungeonWaitFrames_Async(0x3c,70); JirachiDropInEffect(jirachiEntity); - sub_803E708(0x5a,70); - DisplayDungeonDialogue(&gJirachiPreFightDialogue_3); - sub_803E708(10,70); - DisplayDungeonDialogue(&gJirachiPreFightDialogue_4); - sub_803E708(10,70); + DungeonWaitFrames_Async(0x5a,70); + DisplayDungeonDialogue_Async(&gJirachiPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); + DisplayDungeonDialogue_Async(&gJirachiPreFightDialogue_4); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(jirachiEntity,0x15e,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } -static void sub_808B50C(void) +static void sub_808B50C_Async(void) { Entity * jirachiEntity; @@ -156,24 +151,24 @@ static void sub_808B50C(void) GetEntInfo(jirachiEntity)->unk15E = 0; sub_80861B8(jirachiEntity,0xe,DIRECTION_SOUTH); DungeonFadeOutBGM(0x1e); - sub_803E708(0x1e,70); + DungeonWaitFrames_Async(0x1e,70); // Fwaaaahhhh - DisplayDungeonDialogue(&gUnknown_810554C); + DisplayDungeonDialogue_Async(&gUnknown_810554C); DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST); // I think I had a dream, and I was fighting in it // Did I imagine it? // I'm sleepy so I'm going back to sleep. - DisplayDungeonDialogue(&gUnknown_8105558); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gUnknown_8105558); + DungeonWaitFrames_Async(10,70); JirachiSpinEffect(jirachiEntity); - DisplayDungeonDialogue(&gUnknown_81055F4); - sub_803E708(10,70); - gDungeon->unk2 = 1; + DisplayDungeonDialogue_Async(&gUnknown_81055F4); + DungeonWaitFrames_Async(10,70); + gDungeon->unk2 = DUNGEON_UNK2_1; } static const u8 sJirachiItems[] = {ITEM_PROTEIN, ITEM_CALCIUM, ITEM_IRON, ITEM_ZINC, ITEM_JOY_SEED, ITEM_GINSENG, ITEM_LIFE_SEED, ITEM_SITRUS_BERRY}; -static void JirachiWish(void) +static void JirachiWish_Async(void) { Entity *jirachiEntity; DungeonPos *LeaderPos; @@ -189,37 +184,37 @@ static void JirachiWish(void) GetEntInfo(jirachiEntity)->unk15E = 0; sub_80861B8(jirachiEntity,0xe,DIRECTION_SOUTH); sub_80855E4(sub_80861A8); - gDungeon->unk1356C = 1; + gDungeon->unk1356C = TRUE; DungeonFadeOutBGM(0x1e); - sub_803E708(0x1e,0x46); - DisplayDungeonDialogue(&gUnknown_8105668); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x1e,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105668); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1a7); - sub_803E708(0x96,0x46); + DungeonWaitFrames_Async(0x96,0x46); SpriteShockEffect(jirachiEntity); - DisplayDungeonDialogue(&gUnknown_8105674); + DisplayDungeonDialogue_Async(&gUnknown_8105674); DungeonStartNewBGM(MUS_FRIEND_AREA_FOREST); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_80856E0(jirachiEntity, DIRECTION_SOUTH); PlaySoundEffect(0x16a); - DisplayDungeonDialogue(&gUnknown_81056B8); - sub_803E708(10,0x46); - SpriteLookAroundEffect(jirachiEntity); - DisplayDungeonDialogue(&gUnknown_81056DC); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_81056B8); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookAroundEffect_Async(jirachiEntity); + DisplayDungeonDialogue_Async(&gUnknown_81056DC); + DungeonWaitFrames_Async(10,0x46); while( 1 ) { - while (1) { + while (TRUE) { wishChoice = DisplayDungeonMenuMessage(NULL,gUnknown_8105798,gUnknown_810579C,0x705); if (wishChoice >= 1) break; } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); if (wishChoice == 1) { s32 counter, index; DungeonPos pos; Item moneyItems [9]; // Lots of Money - DisplayDungeonDialogue(&gUnknown_810581C); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_810581C); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantDialogue(jirachiEntity); for(counter = 0; counter < 6; counter++) @@ -243,8 +238,8 @@ static void JirachiWish(void) DungeonPos pos; Item items [9]; // Lots of Items - DisplayDungeonDialogue(&gUnknown_8105974); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105974); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantDialogue(jirachiEntity); for(counter = 0; counter < 6; counter++) @@ -272,25 +267,25 @@ static void JirachiWish(void) if (friendArea == NUM_FRIEND_AREAS) { // You want a friend area? But you already have many friend areas... - DisplayDungeonDialogue(&gUnknown_8105A08); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105A08); + DungeonWaitFrames_Async(10,0x46); continue; } else { // You want a friend area? As you wish.. - DisplayDungeonDialogue(&gUnknown_8105AD4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105AD4); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantDialogue(jirachiEntity); GetEntInfo(jirachiEntity)->unk15D = 0; - DisplayDungeonDialogue(&gUnknown_8105B20); + DisplayDungeonDialogue_Async(&gUnknown_8105B20); UnlockFriendArea(friendArea); PlaySoundEffect(0xd4); leaderEntity = GetLeader(); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leaderEntity,0); WriteFriendAreaName(gFormatBuffer_Items[0],friendArea,FALSE); // Obtained the friend area! - DisplayDungeonDialogue(&gUnknown_8105B68); + DisplayDungeonDialogue_Async(&gUnknown_8105B68); } } if (wishChoice == 4) { @@ -298,8 +293,8 @@ static void JirachiWish(void) DungeonPos pos; Item strengthItems [9]; // More Strength.. - DisplayDungeonDialogue(&gUnknown_8105BA8); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105BA8); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantDialogue(jirachiEntity); for(counter = 0; counter < 5; counter++) @@ -320,34 +315,34 @@ static void JirachiWish(void) } } GetEntInfo(jirachiEntity)->unk15D = 0; - DisplayDungeonDialogue(&gUnknown_8105BF4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105BF4); + DungeonWaitFrames_Async(10,0x46); } if (wishChoice == 5) { s32 direction; // Something Good... - DisplayDungeonDialogue(&gUnknown_8105D2C); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105D2C); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantDialogue(jirachiEntity); GetEntInfo(jirachiEntity)->unk15D = 0; - DisplayDungeonDialogue(&gUnknown_8105D80); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105D80); + DungeonWaitFrames_Async(10,0x46); LeaderPos = &GetLeader()->pos; direction = GetDirectionTowardsPosition(&jirachiEntity->pos,LeaderPos); SetFacingDirection(jirachiEntity,direction); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gUnknown_8105D9C); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8105D9C); + DungeonWaitFrames_Async(10,0x46); gDungeon->unk644.unk30 = 1; } break; } - DisplayDungeonDialogue(&gUnknown_81058E0); + DisplayDungeonDialogue_Async(&gUnknown_81058E0); JirachiSpinEffect(jirachiEntity); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gUnknown_810593C); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_810593C); + DungeonWaitFrames_Async(10,0x46); EnableJirachiWishWarpTile(); } @@ -376,21 +371,21 @@ static void JirachiWishGrantFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 0xFA; iVar1 > 0xC7; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 0xFA; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } @@ -424,7 +419,7 @@ static void JirachiDropInEffect(Entity *jirachiEntity) iVar1 = IntToF248(160); iVar2 = IntToF248(2); PlaySoundEffect(0x1f8); - while (1) { + while (TRUE) { iVar1 -= iVar2; if (F248LessThanInt(iVar1, 24)) { iVar2 = IntToF248(1); @@ -443,7 +438,7 @@ static void JirachiSpinEffect(Entity * jirachiEntity) PlaySoundEffect(0x298); for(uVar1 = 0; uVar1 < 25; uVar1++){ SetFacingDirection(jirachiEntity, uVar1 & DIRECTION_MASK); - sub_803E708(3,0x46); + DungeonWaitFrames_Async(3,0x46); } GetEntInfo(jirachiEntity)->unk15E = 1; PlaySoundEffect(0x27f); @@ -456,17 +451,17 @@ static void JirachiWishGrantDialogue(Entity *jirachiEntity) GetEntInfo(jirachiEntity)->unk15D = 1; // Nnnnnnnnnn! - DisplayDungeonDialogue(&gUnknown_81058A8); + DisplayDungeonDialogue_Async(&gUnknown_81058A8); PlaySoundEffect(0x375); sub_80861F8(0x67,jirachiEntity,1); PlaySoundEffect(0x2a8); uVar2 = sub_80861F8(0x68,jirachiEntity,0); // Taaaaaaaah! - DisplayDungeonDialogue(&gUnknown_81058C4); + DisplayDungeonDialogue_Async(&gUnknown_81058C4); if (sub_800E9A8(uVar2)) { sub_800DC14(uVar2); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); JirachiWishGrantFlash(); } diff --git a/src/dungeon_cutscene_kyogre.c b/src/dungeon_cutscene_kyogre.c index 18c5e8be9..25b37825d 100644 --- a/src/dungeon_cutscene_kyogre.c +++ b/src/dungeon_cutscene_kyogre.c @@ -51,7 +51,7 @@ void sub_808C10C(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); if (HasRecruitedMon(MONSTER_KYOGRE)) { - HandleFaint(kyogreEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(kyogreEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { gDungeon->unk7 = 1; @@ -65,10 +65,10 @@ void sub_808C10C(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_GROUDON); } -void sub_808C1A4(u8 param_1,u8 param_2,u8 param_3) +void HandleKyogreBossFaint(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend) { - if ((param_2 == 0x34) && (param_1 == 0x1C)) { - gDungeon->unk2 = 1; + if (cutscene == CUTSCENE_STORMY_SEA && monsterBehavior == BEHAVIOR_KYOGRE) { + gDungeon->unk2 = DUNGEON_UNK2_1; DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); } } @@ -83,38 +83,38 @@ void KyogrePreFightDialogue(void) DungeonStopBGM(); if (HasRecruitedMon(MONSTER_KYOGRE)) { DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c); - SpriteLookAroundEffect(leaderEntity); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gKyogrePreFightDialogue_8); - sub_803E708(10,0x46); - gDungeon->unk2 = 1; + CutsceneLookAroundEffect_Async(leaderEntity); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_8); + DungeonWaitFrames_Async(10,0x46); + gDungeon->unk2 = DUNGEON_UNK2_1; } else { - DisplayDungeonDialogue(&gKyogrePreFightDialogue_1); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gKyogrePreFightDialogue_2); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); nullsub_99(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); // Gwwwwwooooooooh - DisplayDungeonDialogue(&gKyogrePreFightDialogue_3); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c); sub_808C360(); // My duels against {POKEMON_3} (Groudon) left us both exhausted - DisplayDungeonDialogue(&gKyogrePreFightDialogue_4); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_4); KyogreScreenFlash(); // I am {POKEMON_2} (Kyogre)! // The lord of the sea! - DisplayDungeonDialogue(&gKyogrePreFightDialogue_5); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_5); KyogreScreenFlash(); // Witness the destructive force of my waves! - DisplayDungeonDialogue(&gKyogrePreFightDialogue_6); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_6); KyogreScreenFlash(); // Marvel at my awesome // power! - DisplayDungeonDialogue(&gKyogrePreFightDialogue_7); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gKyogrePreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(KyogreEntity,600,MUS_BOSS_BATTLE); DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); @@ -134,17 +134,17 @@ static void KyogreScreenFlash(void) SetDungeonBGColorRGB(0,0,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){ SetDungeonBGColorRGB(0,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){ SetDungeonBGColorRGB(0,0,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_latios.c b/src/dungeon_cutscene_latios.c index 5136c8263..df783866f 100644 --- a/src/dungeon_cutscene_latios.c +++ b/src/dungeon_cutscene_latios.c @@ -77,16 +77,16 @@ void sub_808AA94(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); - HandleFaint(LatiosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(LatiosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS); } -void sub_808AAF0(u8 param_1, u8 param_2) +void HandleLatiosBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x2B || param_2 == 0x2C || param_2 == 0x2D) && (param_1 == 0x16)) { - sub_8097FA8(0x1C); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_NORTHERN_RANGE_ATTEMPT1 || cutscene == CUTSCENE_NORTHERN_RANGE_ATTEMPT2 || cutscene == CUTSCENE_NORTHERN_RANGE_POSTSTORY) && monsterBehavior == BEHAVIOR_LATIOS) { + SetTempCutsceneFlag(CUTSCENE_FLAG_NORTHERN_RANGE_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -106,19 +106,19 @@ void LatiosPreFightDialogue(void) local_19.x = 0xFC; sub_8085EC8(0x1bd,0,0,&local_19,1); - sub_803E708(0x1e,70); + DungeonWaitFrames_Async(0x1e,70); sub_8086448(); ShiftCameraToPosition(&local_18,0x18); - sub_803E708(2,70); + DungeonWaitFrames_Async(2,70); SpriteShockEffect(LatiosEntity); - sub_803E708(0x20,70); + DungeonWaitFrames_Async(0x20,70); sub_808692C(); - DisplayDungeonDialogue(&gLatiosPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gLatiosPreFightDialogue_1); LatiosScreenFlash(); - DisplayDungeonDialogue(&gLatiosPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gLatiosPreFightDialogue_2); LatiosScreenFlash(); - DisplayDungeonDialogue(&gLatiosPreFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gLatiosPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(LatiosEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -132,12 +132,12 @@ void LatiosReFightDialogue(void) LatiosEntity = GetEntityFromMonsterBehavior(BEHAVIOR_LATIOS); sub_8086448(); sub_808692C(); - DisplayDungeonDialogue(&gLatiosReFightDialogue_1); + DisplayDungeonDialogue_Async(&gLatiosReFightDialogue_1); LatiosScreenFlash(); - DisplayDungeonDialogue(&gLatiosPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gLatiosPreFightDialogue_2); LatiosScreenFlash(); - DisplayDungeonDialogue(&gLatiosPreFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gLatiosPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(LatiosEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -160,12 +160,12 @@ static void LatiosScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_lugia.c b/src/dungeon_cutscene_lugia.c index f34abfa65..a8c4f17d5 100644 --- a/src/dungeon_cutscene_lugia.c +++ b/src/dungeon_cutscene_lugia.c @@ -49,7 +49,7 @@ void sub_808BDEC(void) sub_80855E4(sub_8086A3C); if (HasRecruitedMon(MONSTER_LUGIA)) { DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); - HandleFaint(lugiaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(lugiaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { gDungeon->unk7 = 1; @@ -59,10 +59,10 @@ void sub_808BDEC(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_LUGIA); } -void sub_808BE70(u8 param_1,u8 param_2,u8 param_3) +void HandleLugiaBossFaint(u8 monsterBehavior, u8 cutscene, bool8 transformedIntoFriend) { - if ((param_2 == 0x33) && (param_1 == 0x1B)) { - gDungeon->unk2 = 1; + if (cutscene == CUTSCENE_SILVER_TRENCH && monsterBehavior == BEHAVIOR_LUGIA) { + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -80,26 +80,26 @@ void LugiaPreFightDialogue(void) else { DungeonStopBGM(); sub_8086448(); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_1); DungeonFadeInNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE,0x3c); sub_808C0CC(); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_2); LugiaScreenFlash(); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_3); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_4); PlaySoundEffect(0x1f8); sub_80861D4(lugiaEntity,0xd,DIRECTION_SOUTH); - sub_803E708(0x2b,0x46); + DungeonWaitFrames_Async(0x2b,0x46); sub_80861B8(lugiaEntity,0,DIRECTION_SOUTH); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_5); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_5); LugiaScreenFlash(); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_6); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_6); LugiaScreenFlash2(); SetDungeonBGColorRGB(-250,-250,-250,1,0); DungeonStopBGM(); sub_80861D4(lugiaEntity,7,DIRECTION_SOUTH); - DisplayDungeonDialogue(&gLugiaPreFightDialogue_7); + DisplayDungeonDialogue_Async(&gLugiaPreFightDialogue_7); LugiaScreenFlash(); SetupBossFightHP(lugiaEntity,800,MUS_BATTLE_WITH_RAYQUAZA); DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); @@ -116,17 +116,17 @@ static void LugiaScreenFlash(void) SetDungeonBGColorRGB(0,0,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10){ SetDungeonBGColorRGB(0,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10){ SetDungeonBGColorRGB(0,0,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } @@ -146,7 +146,7 @@ static void LugiaScreenFlash2(void) DungeonRunFrameActions(0x46); } - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); for(iVar1 = 0; iVar1 < 200; iVar1 += 100){ SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,0); @@ -158,7 +158,7 @@ static void LugiaScreenFlash2(void) DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_magma_cavern.c b/src/dungeon_cutscene_magma_cavern.c index 143a007d8..f341dac2f 100644 --- a/src/dungeon_cutscene_magma_cavern.c +++ b/src/dungeon_cutscene_magma_cavern.c @@ -72,8 +72,8 @@ void sub_8088E5C(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); - HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM); @@ -97,89 +97,89 @@ void MagmaCavernMidDialogue(void) partnerEntity = CutsceneGetPartner(); groudonEntity = GetEntityFromMonsterBehavior(BEHAVIOR_GROUDON_1); alakazamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ALAKAZAM_2); - sub_8052D44(IDStack,leaderEntity,partnerEntity); + BufferCutsceneProtagonists(IDStack,leaderEntity,partnerEntity); sub_8086448(); - SpriteLookAroundEffect(partnerEntity); + CutsceneLookAroundEffect_Async(partnerEntity); // Let's see.. // I wonder where we are? - DisplayDungeonDialogue(&MagmaCavernMidDialogue_1); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_1); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); // I know we've come pretty // far... // // I'm certain we've come quite // far already.. - DisplayDungeonDialogue(MagmaCavernMidDialogue_2); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(MagmaCavernMidDialogue_2); + DungeonWaitFrames_Async(10,0x46); DungeonStopBGM(); sub_80855E4(sub_80868F4); sub_808680C(); PlaySoundEffect(0x1c5); - sub_803E708(0x28,0x46); + DungeonWaitFrames_Async(0x28,0x46); // Waaah! // Qu-quake! - DisplayDungeonDialogue(&MagmaCavernMidDialogue_3); - sub_803E708(0x78,0x46); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_3); + DungeonWaitFrames_Async(0x78,0x46); StopSoundEffect(0x1c5); sub_808682C(); sub_80855E4(sub_8086910); - sub_803E708(0x14,0x46); + DungeonWaitFrames_Async(0x14,0x46); sub_8085930(DIRECTION_NORTH); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); // Whew! // It settled down. // // Whew // It's over. - DisplayDungeonDialogue(MagmaCavernMidDialogue_4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(MagmaCavernMidDialogue_4); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(partnerEntity); + CutsceneLookAroundEffect_Async(partnerEntity); PlaySoundEffect(0x1c7); sub_80856E0(partnerEntity, DIRECTION_NORTH); // Hey! {POKEMON_0}! // Over there! - DisplayDungeonDialogue(&MagmaCavernMidDialogue_5); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_5); GetEntInfo(groudonEntity)->unk15E = 0; GetEntInfo(alakazamEntity)->unk15E =0; pos.x = (groudonEntity->pixelPos.x + alakazamEntity->pixelPos.x) / 2; pos.y = (groudonEntity->pixelPos.y + alakazamEntity->pixelPos.y) / 2 + 0x800; ShiftCameraToPosition(&pos,0x20); - sub_803E708(0x3c,0x46); + DungeonWaitFrames_Async(0x3c,0x46); sub_80891F0(); // Hey! // Are you OK?! // // Hey! // Snap out of it! - DisplayDungeonDialogue(MagmaCavernMidDialogue_6); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(MagmaCavernMidDialogue_6); + DungeonWaitFrames_Async(10,0x46); // Urrrrgh... - DisplayDungeonDialogue(&MagmaCavernMidDialogue_7); - sub_803E708(10,0x46); - sub_80869E4(leaderEntity,4,2,DIRECTION_NORTHWEST); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_7); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_NORTHWEST); // What happened to you? // // What happened here? - DisplayDungeonDialogue(MagmaCavernMidDialogue_8); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(MagmaCavernMidDialogue_8); + DungeonWaitFrames_Async(10,0x46); // We challenged.. // {POKEMON_2}... // And wiped out.. - DisplayDungeonDialogue(&MagmaCavernMidDialogue_9); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&MagmaCavernMidDialogue_10); - sub_803E708(10,0x46); - sub_80869E4(leaderEntity,4,1,DIRECTION_NORTHEAST); - sub_80869E4(partnerEntity,4,1,DIRECTION_NORTHEAST); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_9); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_10); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTHEAST); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTHEAST); // Grrgh.. // We... It crushed us - DisplayDungeonDialogue(&MagmaCavernMidDialogue_11); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_11); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1d5); - SpriteLookAroundEffect(partnerEntity); + CutsceneLookAroundEffect_Async(partnerEntity); // That's right... // What happened to {POKEMON_3}? // Where is {POKEMON_3}? @@ -187,23 +187,23 @@ void MagmaCavernMidDialogue(void) // Wait... // What about {POKEMON_3}? // Where did {POKEMON_3} go? - DisplayDungeonDialogue(MagmaCavernMidDialogue_12); - sub_803E708(0x1e,0x46); + DisplayDungeonDialogue_Async(MagmaCavernMidDialogue_12); + DungeonWaitFrames_Async(0x1e,0x46); // {POKEMON_3} is... // Still battling {POKEMON_2}... - DisplayDungeonDialogue(&MagmaCavernMidDialogue_13); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_13); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); // {POKEMON_0}! // We've got to hurry! - DisplayDungeonDialogue(&MagmaCavernMidDialogue_14); + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_14); sub_8089294(); // Be careful! - DisplayDungeonDialogue(&MagmaCavernMidDialogue_15); - sub_803E708(10,0x46); - gDungeon->unk2 = 1; + DisplayDungeonDialogue_Async(&MagmaCavernMidDialogue_15); + DungeonWaitFrames_Async(10,0x46); + gDungeon->unk2 = DUNGEON_UNK2_1; } void sub_8089168(void) @@ -212,9 +212,9 @@ void sub_8089168(void) leaderEntity = CutsceneGetLeader(); sub_8086448(); - sub_803E708(10,0x46); - SpriteLookAroundEffect(leaderEntity); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookAroundEffect_Async(leaderEntity); + DungeonWaitFrames_Async(10,0x46); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } diff --git a/src/dungeon_cutscene_mankey.c b/src/dungeon_cutscene_mankey.c index 5960cfe8f..6e9fb073c 100644 --- a/src/dungeon_cutscene_mankey.c +++ b/src/dungeon_cutscene_mankey.c @@ -36,50 +36,44 @@ static void sub_8089908(Entity *r0); void sub_808970C(void) { - Entity *leaderEntity; - - leaderEntity = CutsceneGetLeader(); - DungeonStartNewBGM(MUS_TINY_WOODS); - sub_80854D4(); - sub_8085930(DIRECTION_NORTH); - sub_80855E4(sub_8086A3C); - sub_808563C(sub_8089908); - sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3); + Entity *leaderEntity = CutsceneGetLeader(); + DungeonStartNewBGM(MUS_TINY_WOODS); + sub_80854D4(); + sub_8085930(DIRECTION_NORTH); + sub_80855E4(sub_8086A3C); + sub_808563C(sub_8089908); + sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y -3); } void sub_808974C(void) { - Entity *leaderEntity; - - leaderEntity = CutsceneGetLeader(); - sub_80854D4(); - sub_8085930(DIRECTION_NORTH); - sub_80855E4(sub_8086A3C); - sub_808563C(sub_80898F8); - sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); + Entity *leaderEntity = CutsceneGetLeader(); + sub_80854D4(); + sub_8085930(DIRECTION_NORTH); + sub_80855E4(sub_8086A3C); + sub_808563C(sub_80898F8); + sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3); } -void sub_8089788(Entity *entity, u8 param_2, u8 param_3) +void HandleMankeyBossFaint(Entity *entity, u8 monsterBehavior, u8 cutscene) { - Entity *monEntity; - s32 index; - bool8 found = FALSE; + s32 i; + bool8 stillAlive = FALSE; - if (param_3 == 0x1A || param_3 == 0x1B) { - for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++) - { - monEntity = gDungeon->wildPokemon[index]; - if ((EntityIsValid(monEntity)) && (monEntity != entity) && (GetEntInfo(monEntity)->monsterBehavior == param_2)) { - found = TRUE; - break; - } - } + if (cutscene == CUTSCENE_UPROAR_FOREST_ATTEMPT1 || cutscene == CUTSCENE_UPROAR_FOREST_ATTEMPT2) { + for (i = 0; i < DUNGEON_MAX_WILD_POKEMON; i++) { + Entity *monEntity = gDungeon->wildPokemon[i]; + if (EntityIsValid(monEntity) && monEntity != entity && GetEntInfo(monEntity)->monsterBehavior == monsterBehavior) { + stillAlive = TRUE; + break; + } + } - if(!found){ - sub_8097FA8(0x11); - gDungeon->unk2 = 1; + if (!stillAlive){ + SetTempCutsceneFlag(CUTSCENE_FLAG_UPROAR_FOREST_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; + } } - } } void sub_80897F0(void) @@ -88,32 +82,32 @@ void sub_80897F0(void) leaderEntity = CutsceneGetLeader(); sub_8086448(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_808563C(SpriteShockEffect); - sub_803E708(0x20,0x46); + DungeonWaitFrames_Async(0x20,0x46); sub_808692C(); - DisplayDungeonDialogue(&gUnknown_8103BD8); + DisplayDungeonDialogue_Async(&gUnknown_8103BD8); // We don't like to brag or // nothing, but - DisplayDungeonDialogue(&gUnknown_8103C00); + DisplayDungeonDialogue_Async(&gUnknown_8103C00); // We get furious real easy // You know that?! - DisplayDungeonDialogue(&gUnknown_8103C3C); + DisplayDungeonDialogue_Async(&gUnknown_8103C3C); // What really irritates us is // when we see some dim witted face - DisplayDungeonDialogue(&gUnknown_8103C74); + DisplayDungeonDialogue_Async(&gUnknown_8103C74); // ......... // Wrooooooar! // That vacant expression - DisplayDungeonDialogue(&gUnknown_8103CC4); + DisplayDungeonDialogue_Async(&gUnknown_8103CC4); // Gwoooh // It's ticking me off! // I'm seeing red! - DisplayDungeonDialogue(&gUnknown_8103D0C); + DisplayDungeonDialogue_Async(&gUnknown_8103D0C); // Mukkkeeeeeh // Get 'em! It's frenzy time! - DisplayDungeonDialogue(&gUnknown_8103D50); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8103D50); + DungeonWaitFrames_Async(10,0x46); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -123,15 +117,15 @@ void sub_8089878(void) leaderEntity = CutsceneGetLeader(); sub_8086448(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_808563C(SpriteShockEffect); - sub_803E708(0x20,0x46); + DungeonWaitFrames_Async(0x20,0x46); sub_808692C(); - DisplayDungeonDialogue(&gUnknown_8103D8C); - DisplayDungeonDialogue(&gUnknown_8103D98); - DisplayDungeonDialogue(&gUnknown_8103DD8); - DisplayDungeonDialogue(&gUnknown_8103E28); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8103D8C); + DisplayDungeonDialogue_Async(&gUnknown_8103D98); + DisplayDungeonDialogue_Async(&gUnknown_8103DD8); + DisplayDungeonDialogue_Async(&gUnknown_8103E28); + DungeonWaitFrames_Async(10,0x46); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -143,7 +137,7 @@ void sub_80898E4(void) static void sub_80898F8(Entity *r0) { - HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); } static void sub_8089908(Entity *r0) diff --git a/src/dungeon_cutscene_meanies.c b/src/dungeon_cutscene_meanies.c index 180d18910..01f9a5fd7 100644 --- a/src/dungeon_cutscene_meanies.c +++ b/src/dungeon_cutscene_meanies.c @@ -63,26 +63,27 @@ void sub_8086F00(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[4], MONSTER_CATERPIE); } -void sub_8086F54(u8 param_1, u8 param_2) +void HandleMeaniesBossFaint(u8 monsterBehavior, u8 cutscene) { - s32 index; + s32 i; - if (param_2 == 4 || param_2 == 5) { - bool8 found = FALSE; - for (index = 0; index < 0x10; index++) { - struct Entity *entity = gDungeon->wildPokemon[index]; + if (cutscene == CUTSCENE_SINISTER_WOODS_ATTEMPT1 || cutscene == CUTSCENE_SINISTER_WOODS_ATTEMPT2) { + bool8 stillAlive = FALSE; + + for (i = 0; i < DUNGEON_MAX_WILD_POKEMON; i++) { + struct Entity *entity = gDungeon->wildPokemon[i]; if ((EntityIsValid(entity))) { struct EntityInfo *entInfo = GetEntInfo(entity); - if (entInfo->monsterBehavior != param_1) { - found = TRUE; + if (entInfo->monsterBehavior != monsterBehavior) { + stillAlive = TRUE; return; } } } - if (!found) { - sub_8097FA8(3); - gDungeon->unk2 = 1; + if (!stillAlive) { + SetTempCutsceneFlag(CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } } @@ -93,23 +94,23 @@ void TeamMeaniesPreFightDialogue(void) leaderEntity = CutsceneGetLeader(); sub_8086448(); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(gTeamMeaniesPreFightDialogue_1); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_2); - sub_803E708(10, 0x46); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(gTeamMeaniesPreFightDialogue_1); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_2); + DungeonWaitFrames_Async(10, 0x46); sub_8087144(); DungeonStartNewBGM(MUS_THERES_TROUBLE); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_3); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(gTeamMeaniesPreFightDialogue_4); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_5); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_6); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_7); - sub_803E708(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_3); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(gTeamMeaniesPreFightDialogue_4); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_5); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_6); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_7); + DungeonWaitFrames_Async(10, 0x46); ShiftCameraToPosition(&leaderEntity->pixelPos, 0x10); } @@ -121,25 +122,25 @@ void TeamMeaniesReFightDialogue(void) leaderEntity = CutsceneGetLeader(); partnerEntity = CutsceneGetPartner(); sub_8086448(); - DisplayDungeonDialogue(gTeamMeaniesReFightDialogue_1); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesPreFightDialogue_2); - sub_803E708(10, 0x46); + DisplayDungeonDialogue_Async(gTeamMeaniesReFightDialogue_1); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesPreFightDialogue_2); + DungeonWaitFrames_Async(10, 0x46); sub_8087144(); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(gTeamMeaniesReFightDialogue_2); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesReFightDialogue_3); - sub_803E708(10, 0x46); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(gTeamMeaniesReFightDialogue_2); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesReFightDialogue_3); + DungeonWaitFrames_Async(10, 0x46); sub_806CDD4(leaderEntity, 6, DIRECTION_NORTH); sub_806CDD4(partnerEntity, 6, DIRECTION_NORTH); - sub_803E708(10, 0x46); + DungeonWaitFrames_Async(10, 0x46); sub_806CDD4(leaderEntity, 7, DIRECTION_NORTH); sub_806CDD4(partnerEntity, 7, DIRECTION_NORTH); - sub_803E708(10, 0x46); - DisplayDungeonDialogue(&gTeamMeaniesReFightDialogue_4); - DisplayDungeonDialogue(&gTeamMeaniesReFightDialogue_5); - sub_803E708(10, 0x46); + DungeonWaitFrames_Async(10, 0x46); + DisplayDungeonDialogue_Async(&gTeamMeaniesReFightDialogue_4); + DisplayDungeonDialogue_Async(&gTeamMeaniesReFightDialogue_5); + DungeonWaitFrames_Async(10, 0x46); ShiftCameraToPosition(&leaderEntity->pixelPos, 0x10); } diff --git a/src/dungeon_cutscene_medicham.c b/src/dungeon_cutscene_medicham.c index 3909a66b9..0a87cfa47 100644 --- a/src/dungeon_cutscene_medicham.c +++ b/src/dungeon_cutscene_medicham.c @@ -53,38 +53,38 @@ void MedichamRescueDialogue(void) s32 counter; medichamEntity = GetEntityFromMonsterBehavior(BEHAVIOR_MEDICHAM); - SpriteLookAroundEffect(medichamEntity); - sub_803E708(0xA, 0x46); + CutsceneLookAroundEffect_Async(medichamEntity); + DungeonWaitFrames_Async(0xA, 0x46); // Oh my I can't seem to find a way out... - DisplayDungeonDialogue(&gMedichamRescueDialogue_1); - sub_803E708(0xA, 0x46); - sub_80869E4(medichamEntity, 4, 2, DIRECTION_NORTH); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gMedichamRescueDialogue_1); + DungeonWaitFrames_Async(0xA, 0x46); + CutsceneLookDir_Async(medichamEntity, 4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH); + DungeonWaitFrames_Async(0xA, 0x46); // What am I to do...? - DisplayDungeonDialogue(&gMedichamRescueDialogue_2); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gMedichamRescueDialogue_2); + DungeonWaitFrames_Async(0xA, 0x46); sub_8086448(); sub_8086598(); - sub_803E708(0x20, 0x46); + DungeonWaitFrames_Async(0x20, 0x46); SpriteShockEffect(medichamEntity); - sub_803E708(0x20, 0x46); - sub_80869E4(medichamEntity, 4, 2, DIRECTION_SOUTH); - DisplayDungeonDialogue(&gMedichamRescueDialogue_3); - sub_803E708(0xA, 0x46); + DungeonWaitFrames_Async(0x20, 0x46); + CutsceneLookDir_Async(medichamEntity, 4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH); + DisplayDungeonDialogue_Async(&gMedichamRescueDialogue_3); + DungeonWaitFrames_Async(0xA, 0x46); PlaySoundEffect(0x1c7); sub_806CDD4(medichamEntity, 0xA, DIRECTION_SOUTH); - sub_803E708(0x14, 0x46); + DungeonWaitFrames_Async(0x14, 0x46); sub_806CE68(medichamEntity, DIRECTION_SOUTH); - sub_803E708(0x4, 0x46); + DungeonWaitFrames_Async(0x4, 0x46); PlaySoundEffect(0x1c7); sub_806CDD4(medichamEntity, 0xA, DIRECTION_SOUTH); - sub_803E708(0x14, 0x46); + DungeonWaitFrames_Async(0x14, 0x46); // Yes Yes // I am so lucky // // There appears to be no one here - DisplayDungeonDialogue(&gMedichamRescueDialogue_4); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gMedichamRescueDialogue_4); + DungeonWaitFrames_Async(0xA, 0x46); sub_806CDD4(medichamEntity, 0, DIRECTION_SOUTH); for(counter = 0x17; counter >= 0; counter--) { @@ -92,9 +92,9 @@ void MedichamRescueDialogue(void) DungeonRunFrameActions(0x46); } sub_806CE68(medichamEntity, DIRECTION_SOUTH); - sub_803E708(0x20, 0x46); + DungeonWaitFrames_Async(0x20, 0x46); sub_8042B0C(medichamEntity); - HandleFaint(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); gDungeon->unk4 = 1; gDungeon->unk11 = 4; } @@ -109,7 +109,7 @@ void sub_808CB5C(void) DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); sub_80854D4(); sub_8085930(DIRECTION_NORTH); - HandleFaint(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_MEDICHAM); } diff --git a/src/dungeon_cutscene_mewtwo.c b/src/dungeon_cutscene_mewtwo.c index 7595a0353..8ea6d23d0 100644 --- a/src/dungeon_cutscene_mewtwo.c +++ b/src/dungeon_cutscene_mewtwo.c @@ -65,7 +65,7 @@ void sub_8089978(void) sub_80855E4(sub_8086A3C); if(HasRecruitedMon(MONSTER_MEWTWO)){ DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); - HandleFaint(MewtwoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(MewtwoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { gDungeon->unk7 = 1; @@ -76,11 +76,11 @@ void sub_8089978(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_MEWTWO); } -void sub_8089A00(u8 param_1, u8 param_2) +void HandleMewtwoBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x1d || param_2 == 0x1e || param_2 == 0x1f) && (param_1 == 0x11)) { - sub_8097FA8(0x13); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_WESTERN_CAVE_ATTEMPT1 || cutscene == CUTSCENE_WESTERN_CAVE_ATTEMPT2 || cutscene == CUTSCENE_WESTERN_CAVE_POSTSTORY) && monsterBehavior == BEHAVIOR_MEWTWO) { + SetTempCutsceneFlag(CUTSCENE_FLAG_WESTERN_CAVE_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -92,21 +92,21 @@ void MewtwoPreFightDialogue(void) leaderEntity = CutsceneGetLeader(); MewtwoEntity = GetEntityFromMonsterBehavior(BEHAVIOR_MEWTWO); sub_8086448(); - DisplayDungeonDialogue(&gMewtwoPreFightDialogue_1); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMewtwoPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); sub_8086794(); - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(0x1e,0x46); MewtwoDropInEffect(MewtwoEntity); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(&gMewtwoPreFightDialogue_2); - DisplayDungeonDialogue(&gMewtwoPreFightDialogue_3); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(&gMewtwoPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gMewtwoPreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); MewtwoScreenFlash(); - DisplayDungeonDialogue(&gMewtwoPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gMewtwoPreFightDialogue_4); MewtwoScreenFlash(); - DisplayDungeonDialogue(&gMewtwoPreFightDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMewtwoPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(MewtwoEntity,900,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -123,16 +123,16 @@ void MewtwoReFightDialogue(void) sub_80866C4(&gMewtwoReFightDialogue_5); } else { - DisplayDungeonDialogue(&gMewtwoReFightDialogue_1); + DisplayDungeonDialogue_Async(&gMewtwoReFightDialogue_1); DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE); sub_8086794(); MewtwoDropInEffect(MewtwoEntity); - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(&gMewtwoReFightDialogue_2); + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(&gMewtwoReFightDialogue_2); MewtwoScreenFlash(); - DisplayDungeonDialogue(&gMewtwoReFightDialogue_3); + DisplayDungeonDialogue_Async(&gMewtwoReFightDialogue_3); MewtwoScreenFlash(); - DisplayDungeonDialogue(&gMewtwoReFightDialogue_4); + DisplayDungeonDialogue_Async(&gMewtwoReFightDialogue_4); SetupBossFightHP(MewtwoEntity,900,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -170,19 +170,19 @@ static void MewtwoScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,0,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_moltres.c b/src/dungeon_cutscene_moltres.c index c1f82da5a..02fa8b0dc 100644 --- a/src/dungeon_cutscene_moltres.c +++ b/src/dungeon_cutscene_moltres.c @@ -72,7 +72,7 @@ void sub_8087848(void) sub_8085930(DIRECTION_WEST); sub_80855E4(sub_8086A3C); if (sub_8086AE4(MONSTER_MOLTRES)) { - HandleFaint(moltresEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(moltresEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { LevelUpTarget(moltresEntity,moltresEntity,gMoltresConfigLevel,0,0); @@ -86,11 +86,11 @@ void sub_8087848(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_MOLTRES); } -void sub_80878F4(u8 param_1, u8 param_2) +void HandleMoltresBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0xA || param_2 == 0xB || param_2 == 0xC) && (param_1 == 0x9)) { - sub_8097FA8(0x7); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1 || cutscene == CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2 || cutscene == CUTSCENE_MT_BLAZE_PEAK_POSTSTORY) && monsterBehavior == BEHAVIOR_MOLTRES) { + SetTempCutsceneFlag(CUTSCENE_FLAG_MT_BLAZE_PEAK_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -105,60 +105,60 @@ void MoltresPreFightDialogue(void) moltresEntity = GetEntityFromMonsterBehavior(BEHAVIOR_MOLTRES); MoltresScreenFlash1(0xc,5); sub_8086500(); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_1); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_NORTHWEST); - sub_803E708(4,0x46); - SpriteLookAroundEffect(partnerEntity); - sub_803E708(10,0x46); - DisplayDungeonDialogue(gMoltresPreFightDialogue_2); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTHWEST); + DungeonWaitFrames_Async(4,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gMoltresPreFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash1(0xc,5); MoltresScreenFlash2(9,5); - DisplayDungeonDialogue(gMoltresPreFightDialogue_3); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(gMoltresPreFightDialogue_4); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,2,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gMoltresPreFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gMoltresPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); sub_8086690(); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); sub_8085930(DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); sub_8085930(DIRECTION_NORTH); PlaySoundEffect(0x2f2); DungeonStopBGM(); MoltresScreenDarken(); - DisplayDungeonDialogue(gMoltresPreFightDialogue_6); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_7); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(gMoltresPreFightDialogue_6); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1cf); sub_80856E0(partnerEntity, DIRECTION_NORTH); - sub_803E708(10,0x46); - DisplayDungeonDialogue(gMoltresPreFightDialogue_8); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gMoltresPreFightDialogue_8); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash3(); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_9); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_9); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash1(9,5); MoltresScreenFlash2(0xb,5); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_10); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_10); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash1(0xc,5); MoltresScreenFlash2(9,5); MoltresDropInEffect(moltresEntity); sub_808663C(); MoltresScreenFlash3(); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_11); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_11); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash2(0xb,6); - DisplayDungeonDialogue(&gMoltresPreFightDialogue_12); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPreFightDialogue_12); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(moltresEntity,400,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -174,33 +174,33 @@ void MoltresReFightDialogue(void) moltresEntity = GetEntityFromMonsterBehavior(BEHAVIOR_MOLTRES); MoltresScreenFlash1(10,5); sub_8086500(); - sub_803E708(10,0x46); - SpriteLookAroundEffect(partnerEntity); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gMoltresReFightDialogue_1); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(gMoltresReFightDialogue_2); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,2,DIRECTION_WEST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresReFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gMoltresReFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); sub_8086690(); MoltresScreenDarken(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); sub_8085930(DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); sub_8085930(DIRECTION_NORTH); MoltresDropInEffect(moltresEntity); sub_808663C(); MoltresScreenFlash3(); - DisplayDungeonDialogue(&gMoltresReFightDialogue_3); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresReFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); MoltresScreenFlash2(0xb,6); - DisplayDungeonDialogue(gMoltresReFightDialogue_4); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gMoltresReFightDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(gMoltresReFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresReFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(moltresEntity,400,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -216,29 +216,29 @@ void MoltresPostStoryPreFightDialogue(void) sub_808654C(); if (sub_8086AE4(MONSTER_MOLTRES)) { sub_8085930(DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); sub_8085930(DIRECTION_NORTH); - sub_803E708(4,0x46); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gUnknown_8100D3C); - sub_803E708(10,0x46); - gDungeon->unk2 = 1; + DungeonWaitFrames_Async(4,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8100D3C); + DungeonWaitFrames_Async(10,0x46); + gDungeon->unk2 = DUNGEON_UNK2_1; } else { - DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gMoltresPostStoryPreFightDialogue_1); sub_8085930(DIRECTION_NORTHWEST); - sub_803E708(4,0x46); + DungeonWaitFrames_Async(4,0x46); sub_8085930(DIRECTION_NORTH); MoltresDropInEffect(moltresEntity); - DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gMoltresPostStoryPreFightDialogue_2); MoltresScreenFlash1(0xc,5); MoltresScreenFlash2(9,5); - DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gMoltresPostStoryPreFightDialogue_3); MoltresScreenFlash3(); - DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gMoltresPostStoryPreFightDialogue_4); MoltresScreenFlash2(0xb,6); - DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gMoltresPostStoryPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(moltresEntity,400,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -292,13 +292,13 @@ static void MoltresScreenFlash2(s32 xArg, s32 yArg) SetDungeonBGColorRGB(i, 0, 0, 1, 1); DungeonRunFrameActions(0x46); } - sub_803E708(0xA, 0x46); + DungeonWaitFrames_Async(0xA, 0x46); for (i = 250; i >= 0; i -= 10) { SetDungeonBGColorRGB(i, 0, 0, 1, 1); DungeonRunFrameActions(0x46); } - sub_803E708(0xA, 0x46); + DungeonWaitFrames_Async(0xA, 0x46); sub_8085EB0(); sub_8085F44(r6); @@ -315,14 +315,14 @@ static void MoltresScreenFlash3(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(0x1e,0x46); PlaySoundEffect(0x1ed); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1 / 2,1,1); DungeonRunFrameActions(0x46); } - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(0x1e,0x46); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_raikou.c b/src/dungeon_cutscene_raikou.c index 497828fe7..af8cba5d1 100644 --- a/src/dungeon_cutscene_raikou.c +++ b/src/dungeon_cutscene_raikou.c @@ -75,7 +75,7 @@ void sub_8089F8C(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); if (HasRecruitedMon(MONSTER_RAIKOU)) { - HandleFaint(RaikouEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(RaikouEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { SetFacingDirection(RaikouEntity, DIRECTION_SOUTH); @@ -84,11 +84,11 @@ void sub_8089F8C(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_RAIKOU); } -void sub_8089FF0(u8 param_1, u8 param_2) +void HandleRaikouBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x23 || param_2 == 0x24 || param_2 == 0x25) && (param_1 == 0x13)) { - sub_8097FA8(0x17); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_LIGHTNING_FIELD_ATTEMPT1 || cutscene == CUTSCENE_LIGHTNING_FIELD_ATTEMPT2 || cutscene == CUTSCENE_LIGHTNING_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_RAIKOU) { + SetTempCutsceneFlag(CUTSCENE_FLAG_LIGHTNING_FIELD_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -99,20 +99,20 @@ void RaikouPreFightDialogue(void) leaderEntity = CutsceneGetLeader(); RaikouEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAIKOU); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_1); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_2); gDungeon->weather.unkE265 = WEATHER_RAIN; sub_807EAA0(0,1); - sub_803E708(10,70); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_3); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_4); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_5); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_5); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPreFightDialogue_6); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gRaikouPreFightDialogue_6); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(RaikouEntity,0x28a,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -127,12 +127,12 @@ void RaikouReFightDialogue(void) gDungeon->weather.unkE265 = WEATHER_RAIN; sub_807EAA0(0,1); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouReFightDialogue_1); + DisplayDungeonDialogue_Async(&gRaikouReFightDialogue_1); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouReFightDialogue_2); + DisplayDungeonDialogue_Async(&gRaikouReFightDialogue_2); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouReFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gRaikouReFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(RaikouEntity,0x28a,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -150,13 +150,13 @@ void RaikouPostStoryPreFightDialogue(void) else { gDungeon->weather.unkE265 = WEATHER_RAIN; sub_807EAA0(0,1); - DisplayDungeonDialogue(&gRaikouPostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gRaikouPostStoryPreFightDialogue_1); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gRaikouPostStoryPreFightDialogue_2); RaikouScreenFlash(); - DisplayDungeonDialogue(&gRaikouPostStoryPreFightDialogue_3); - sub_803E708(10,70); - SetupBossFightHP(RaikouEntity,0x28a,MUS_BOSS_BATTLE); + DisplayDungeonDialogue_Async(&gRaikouPostStoryPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); + SetupBossFightHP(RaikouEntity,650,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } } @@ -171,19 +171,19 @@ static void RaikouScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_rayquaza.c b/src/dungeon_cutscene_rayquaza.c index 6e2f12151..4243bb6e5 100644 --- a/src/dungeon_cutscene_rayquaza.c +++ b/src/dungeon_cutscene_rayquaza.c @@ -65,7 +65,7 @@ void sub_8089328(void) sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); if (sub_8086AE4(MONSTER_RAYQUAZA)) { - HandleFaint(rayquazaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(rayquazaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { LevelUpTarget(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0); @@ -75,11 +75,11 @@ void sub_8089328(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA); } -void sub_80893B4(u8 param_1, u8 param_2) +void HandleRayquazaBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x17 || param_2 == 0x18 || param_2 == 0x19) && (param_1 == 0xF)) { - sub_8097FA8(0xF); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1 || cutscene == CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2 || cutscene == CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY) && monsterBehavior == BEHAVIOR_RAYQUAZA) { + SetTempCutsceneFlag(CUTSCENE_FLAG_SKY_TOWER_SUMMIT_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -93,33 +93,33 @@ void RayquazaPreFightDialogue(void) partnerEntity = CutsceneGetPartner(); rayquazaEntity = GetEntityFromMonsterBehavior(BEHAVIOR_RAYQUAZA); sub_8086448(); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_1); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_2); sub_80856E0(partnerEntity, DIRECTION_NORTH); - SpriteLookAroundEffect(partnerEntity); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(gRayquazaPreFightDialogue_3); - sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH); - sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_4); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_5); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_6); + CutsceneLookAroundEffect_Async(partnerEntity); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gRayquazaPreFightDialogue_3); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_NORTH); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTH); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_4); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_6); RayquazaScreenFlash(); PlaySoundEffect(0x1da); // Rayquaza Cry - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_7); RayquazaDropInEffect(rayquazaEntity); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_8); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_8); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_9); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_9); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_10); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_10); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_11); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_11); SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -134,16 +134,16 @@ void RayquazaReFightDialogue(void) sub_8086448(); RayquazaScreenFlash(); PlaySoundEffect(0x1da); // Rayquaza Cry - DisplayDungeonDialogue(&gRayquazaPreFightDialogue_7); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gRayquazaPreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); RayquazaDropInEffect(rayquazaEntity); - DisplayDungeonDialogue(&gRayquazaReFightDialogue_1); + DisplayDungeonDialogue_Async(&gRayquazaReFightDialogue_1); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaReFightDialogue_2); + DisplayDungeonDialogue_Async(&gRayquazaReFightDialogue_2); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaReFightDialogue_3); + DisplayDungeonDialogue_Async(&gRayquazaReFightDialogue_3); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaReFightDialogue_4); + DisplayDungeonDialogue_Async(&gRayquazaReFightDialogue_4); SetupBossFightHP(rayquazaEntity,600,MUS_BATTLE_WITH_RAYQUAZA); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -161,15 +161,15 @@ void RayquazaPostStoryPreFightDialogue(void) } else { PlaySoundEffect(0x1da); // Rayquaza Cry - DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gRayquazaPostStoryPreFightDialogue_1); RayquazaDropInEffect(rayquazaEntity); - DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gRayquazaPostStoryPreFightDialogue_2); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gRayquazaPostStoryPreFightDialogue_3); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gRayquazaPostStoryPreFightDialogue_4); RayquazaScreenFlash(); - DisplayDungeonDialogue(&gRayquazaPostStoryPreFightDialogue_5); + DisplayDungeonDialogue_Async(&gRayquazaPostStoryPreFightDialogue_5); SetupBossFightHP(rayquazaEntity,600,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -207,18 +207,18 @@ static void RayquazaScreenFlash(void) SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1 / 2, iVar1, 0, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1 / 2, iVar1, iVar1 / 2, 1, 1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_regis.c b/src/dungeon_cutscene_regis.c index 8040ea9f5..f948a2b3c 100644 --- a/src/dungeon_cutscene_regis.c +++ b/src/dungeon_cutscene_regis.c @@ -40,238 +40,237 @@ static void SetupRegisteelFightHP(Entity *r0); void sub_808ACC0(void) { - Entity * entity; - - if (HasRecruitedMon(MONSTER_REGIROCK)) { - entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGIROCK); - HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - sub_8097FA8(0x22); - sub_8097FA8(0x1d); - sub_808B1CC(ITEM_ROCK_PART); - } - else if (sub_80860A8(ITEM_ROCK_PART) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else { - sub_8098044(0x22); - sub_8098044(0x1d); + if (HasRecruitedMon(MONSTER_REGIROCK)) { + Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGIROCK); + HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + sub_808B1CC(ITEM_ROCK_PART); + } + else if (ItemInInventoryOrHeld(ITEM_ROCK_PART)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); sub_80855E4(SetupRegiFacingDirection); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGIROCK); - } + } } void sub_808AD48(void) { - Entity * entity; - - if (HasRecruitedMon(MONSTER_REGICE)) { - entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGICE); - HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - sub_8097FA8(0x22); - sub_8097FA8(0x1d); - sub_808B1CC(ITEM_ICE_PART); - } - else if (sub_80860A8(ITEM_ICE_PART) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else { - sub_8098044(0x22); - sub_8098044(0x1d); + if (HasRecruitedMon(MONSTER_REGICE)) { + Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGICE); + HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + sub_808B1CC(ITEM_ICE_PART); + } + else if (ItemInInventoryOrHeld(ITEM_ICE_PART)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); sub_80855E4(SetupRegiFacingDirection); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGICE); - } + } } void sub_808ADCC(void) { - - Entity * entity; - - if (HasRecruitedMon(MONSTER_REGISTEEL)) { - entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGISTEEL); - HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - sub_8097FA8(0x22); - sub_8097FA8(0x1d); - sub_808B1CC(ITEM_STEEL_PART); - } - else if (sub_80860A8(ITEM_STEEL_PART) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) { - sub_8098044(0x22); - sub_8097FA8(0x1d); - } - else { - sub_8098044(0x22); - sub_8098044(0x1d); + if (HasRecruitedMon(MONSTER_REGISTEEL)) { + Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGISTEEL); + HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + sub_808B1CC(ITEM_STEEL_PART); + } + else if (ItemInInventoryOrHeld(ITEM_STEEL_PART)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + SetTempCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + } + else { + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED); + UnsetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); sub_80855E4(SetupRegiFacingDirection); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGISTEEL); - } -} - -void sub_808AE54(u8 param_1,u8 param_2,DungeonPos *param_3) -{ - Entity * leaderEntity; - s16 IDStack[2]; - Item item; - - - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_2 == 0x2E) && (param_1 == 0x17)) { - sub_808B1CC(ITEM_NOTHING); - if (!sub_8098100(0x1d)) { - ItemIdToItem(&item,ITEM_ROCK_PART,0); - SpawnDroppedItemWrapper(GetLeader(),param_3,&item); - DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); - // Something fell from Regirock's body - // Regirock was apparently guarding this item - DisplayDungeonDialogue(&gRegirockPostFightDialogue_1); } - } } -void sub_808AEC8(u8 param_1,u8 param_2,DungeonPos *param_3) +void HandleRegirockBossFaint_Async(u8 monsterBehavior, u8 cutscene, DungeonPos *pos) { - Entity * leaderEntity; - s16 IDStack[2]; - Item item; + Entity *leaderEntity; + s16 IDStack[2]; + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_2 == 0x2F) && (param_1 == 0x18)) { - sub_808B1CC(ITEM_NOTHING); - if (!sub_8098100(0x1d)) { - ItemIdToItem(&item,ITEM_ICE_PART,0); - SpawnDroppedItemWrapper(GetLeader(),param_3,&item); - DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); - // Something fell from Regice's body - // Regice was apparently guarding this item - DisplayDungeonDialogue(&gRegicePostFightDialogue_1); + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGIROCK && monsterBehavior == BEHAVIOR_REGIROCK) { + sub_808B1CC(ITEM_NOTHING); + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED)) { + Item item; + + ItemIdToItem(&item, ITEM_ROCK_PART, FALSE); + SpawnDroppedItemWrapper(GetLeader(),pos,&item); + DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); + // Something fell from Regirock's body + // Regirock was apparently guarding this item + DisplayDungeonDialogue_Async(&gRegirockPostFightDialogue_1); + } } - } } -void sub_808AF3C(u8 param_1,u8 param_2,DungeonPos *param_3) +void HandleRegiceBossFaint_Async(u8 monsterBehavior, u8 cutscene, DungeonPos *pos) { - Entity * leaderEntity; - s16 IDStack[2]; - Item item; + Entity *leaderEntity; + s16 IDStack[2]; + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_2 == 0x30) && (param_1 == 0x19)) { - sub_808B1CC(ITEM_NOTHING); - if (!sub_8098100(0x1d)) { - ItemIdToItem(&item,ITEM_STEEL_PART,0); - SpawnDroppedItemWrapper(GetLeader(),param_3, &item); - DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); - // Something fell from Registeel's body - // Registeel was apparently guarding this item - DisplayDungeonDialogue(&gRegisteelPostFightDialogue_1); + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGICE && monsterBehavior == BEHAVIOR_REGICE) { + sub_808B1CC(ITEM_NOTHING); + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED)) { + Item item; + + ItemIdToItem(&item, ITEM_ICE_PART, FALSE); + SpawnDroppedItemWrapper(GetLeader(), pos, &item); + DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); + // Something fell from Regice's body + // Regice was apparently guarding this item + DisplayDungeonDialogue_Async(&gRegicePostFightDialogue_1); + } } - } } -void sub_808AFB0(u8 param_1) +void HandleRegisteelBossFaint_Async(u8 monsterBehavior, u8 cutscene, DungeonPos *pos) { - Entity * leaderEntity; - s16 IDStack [2]; + Entity *leaderEntity; + s16 IDStack[2]; - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_1 == 0x2E) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ROCK_PART) != 0)) { - sub_8097FD0(0x1d); - SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0); - // {POKEMON_0} obtained the Rock Part that Regirock was guarding - DisplayDungeonDialogue(&gRegirockPostFightDialogue_2); - sub_80421C0(0,0xd4); - sub_803E708(10,70); - sub_8046D20(); - } + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); + + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGISTEEL && monsterBehavior == BEHAVIOR_REGISTEEL) { + sub_808B1CC(ITEM_NOTHING); + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED)) { + Item item; + + ItemIdToItem(&item, ITEM_STEEL_PART, FALSE); + SpawnDroppedItemWrapper(GetLeader(), pos, &item); + DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT); + // Something fell from Registeel's body + // Registeel was apparently guarding this item + DisplayDungeonDialogue_Async(&gRegisteelPostFightDialogue_1); + } + } } -void sub_808B030(u8 param_1) +void sub_808AFB0_Async(u8 cutscene) { - Entity * leaderEntity; - s16 IDStack [2]; + Entity *leaderEntity; + s16 IDStack[2]; - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_1 == 0x2F) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ICE_PART) != 0)) { - sub_8097FD0(0x1d); - SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0); - // {POKEMON_0} obtained the Ice Part that Regice was guarding - DisplayDungeonDialogue(&gRegicePostFightDialogue_2); - sub_80421C0(0,0xd4); - sub_803E708(10,70); - sub_8046D20(); - } + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); + + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGIROCK && !GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED) && ItemInInventoryOrHeld(ITEM_ROCK_PART)) { + SetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0); + // {POKEMON_0} obtained the Rock Part that Regirock was guarding + DisplayDungeonDialogue_Async(&gRegirockPostFightDialogue_2); + sub_80421C0(0, 212); + DungeonWaitFrames_Async(10, 70); + PotentiallyCreateMusicBox_Async(); + } } -void sub_808B0B0(u8 param_1) +void sub_808B030_Async(u8 cutscene) { - Entity * leaderEntity; - s16 IDStack [2]; + Entity *leaderEntity; + s16 IDStack[2]; - leaderEntity = CutsceneGetLeader(); - sub_8052D44(IDStack,leaderEntity,0); - if (!sub_8098100(0x22) && (param_1 == 0x30) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_STEEL_PART) != 0)) { - sub_8097FD0(0x1d); - SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0); - // {POKEMON_0} obtained the Steel Part that Registeel was guarding - DisplayDungeonDialogue(&gRegisteelPostFightDialogue_2); - sub_80421C0(0,0xd4); - sub_803E708(10,70); - sub_8046D20(); - } + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); + + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGICE && !GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED) && ItemInInventoryOrHeld(ITEM_ICE_PART)) { + SetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0); + // {POKEMON_0} obtained the Ice Part that Regice was guarding + DisplayDungeonDialogue_Async(&gRegicePostFightDialogue_2); + sub_80421C0(0, 212); + DungeonWaitFrames_Async(10, 70); + PotentiallyCreateMusicBox_Async(); + } +} + +void sub_808B0B0_Async(u8 cutscene) +{ + Entity *leaderEntity; + s16 IDStack[2]; + + leaderEntity = CutsceneGetLeader(); + BufferCutsceneProtagonists(IDStack, leaderEntity, NULL); + + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED) && cutscene == CUTSCENE_REGISTEEL && !GetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED) && ItemInInventoryOrHeld(ITEM_STEEL_PART)) { + SetCutsceneFlag(CUTSCENE_FLAG_REGI_ITEM_OBTAINED); + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0); + // {POKEMON_0} obtained the Steel Part that Registeel was guarding + DisplayDungeonDialogue_Async(&gRegisteelPostFightDialogue_2); + sub_80421C0(0, 212); + DungeonWaitFrames_Async(10, 70); + PotentiallyCreateMusicBox_Async(); + } } void RegirockPreFightDialogue(void) { - if (!sub_8098100(0x22)) { + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED)) { sub_8085930(DIRECTION_NORTH); // INTRUDER ALERT // EXTERMINATE - DisplayDungeonDialogue(&gRegirockPreFightDialogue_1); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gRegirockPreFightDialogue_1); + DungeonWaitFrames_Async(10, 70); sub_808563C(SetupRegirockFightHP); } } void RegicePreFightDialogue(void) { - if (!sub_8098100(0x22)) { + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED)) { sub_8085930(DIRECTION_NORTH); // INTRUDER ALERT // EXTERMINATE - DisplayDungeonDialogue(&gRegicePreFightDialogue_1); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gRegicePreFightDialogue_1); + DungeonWaitFrames_Async(10,70); sub_808563C(SetupRegiceFightHP); } } void RegisteelPreFightDialogue(void) { - if (!sub_8098100(0x22)) { + if (!GetCutsceneFlag(CUTSCENE_FLAG_REGI_RECRUITED)) { sub_8085930(DIRECTION_NORTH); // INTRUDER ALERT // EXTERMINATE - DisplayDungeonDialogue(&gRegisteelPreFightDialogue_1); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gRegisteelPreFightDialogue_1); + DungeonWaitFrames_Async(10,70); sub_808563C(SetupRegisteelFightHP); } } @@ -288,7 +287,7 @@ static void sub_808B1CC(u8 itemID) if ((pos.x < 0) || (pos.y < 0)) { entity = GetLeader(); if (entity == NULL) { - gDungeon->unk2 = 1; + gDungeon->unk2 = DUNGEON_UNK2_1; return; } pos.x = entity->pos.x; @@ -297,9 +296,8 @@ static void sub_808B1CC(u8 itemID) sub_807FE04(&pos, 0); tile = GetTileMut(pos.x, pos.y); tile->terrainFlags = tile->terrainFlags | TERRAIN_TYPE_STAIRS; - if (((itemID != ITEM_NOTHING) && (sub_80860A8(itemID) == 0)) && - (sub_80860A8(ITEM_MUSIC_BOX) == 0)) { - ItemIdToItem(&item,itemID,0); + if (itemID != ITEM_NOTHING && !ItemInInventoryOrHeld(itemID) && !ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) { + ItemIdToItem(&item, itemID, FALSE); pos.y--; SpawnItem(&pos,&item,1); } diff --git a/src/dungeon_cutscene_skarmory.c b/src/dungeon_cutscene_skarmory.c index dfbaf6d50..27f896d17 100644 --- a/src/dungeon_cutscene_skarmory.c +++ b/src/dungeon_cutscene_skarmory.c @@ -64,18 +64,18 @@ void sub_8086B94(void) diglettEntity = GetEntityFromMonsterBehavior(BEHAVIOR_DIGLETT); skarmoryEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SKARMORY); - HandleFaint(skarmoryEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - HandleFaint(diglettEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(skarmoryEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(diglettEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); sub_80854D4(); sub_8085930(DIRECTION_NORTH); sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y); } -void sub_8086BDC(u8 param_1, u8 param_2) +void HandleSkarmoryBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 1 || param_2 == 2) && param_1 == 3) { - sub_8097FA8(1); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_MT_STEEL_ATTEMPT1 || cutscene == CUTSCENE_MT_STEEL_ATTEMPT2) && monsterBehavior == BEHAVIOR_SKARMORY) { + SetTempCutsceneFlag(CUTSCENE_FLAG_MT_STEEL_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -101,40 +101,40 @@ void SkarmoryPreFightDialogue(void) pos2.y = skarmoryEntity->pixelPos.y + 0x2000; sub_8086448(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); SpriteShockEffect(partnerEntity); - sub_803E708(0x20,0x46); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_1); + DungeonWaitFrames_Async(0x20,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryPreFightDialogue_1); ShiftCameraToPosition(&pos1,0x40); - sub_803E708(0x40,0x46); + DungeonWaitFrames_Async(0x40,0x46); ShiftCameraToPosition(&pos2,0x30); - DisplayDungeonDialogue(gSkarmoryPreFightDialogue_2); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(gSkarmoryPreFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); GetEntInfo(diglettEntity)->unk15D = 1; ShiftCameraToPosition(&pos1,0x30); - DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_3); // Diglett: ...I...\nI'm scared. - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryPreFightDialogue_3); // Diglett: ...I...\nI'm scared. + DungeonWaitFrames_Async(10,0x46); ShiftCameraToPosition(&pos2,0x20); - sub_803E708(0x20,0x46); + DungeonWaitFrames_Async(0x20,0x46); SkarmoryEntry(skarmoryEntity); - DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_4); // Skarmory: You!\nWhat do you think you're doing here?! - sub_803E708(10,0x46); - DisplayDungeonDialogue(gSkarmoryPreFightDialogue_5); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_6); - sub_803E708(10,0x46); - DisplayDungeonDialogue(gSkarmoryPreFightDialogue_7); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryPreFightDialogue_4); // Skarmory: You!\nWhat do you think you're doing here?! + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gSkarmoryPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryPreFightDialogue_6); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gSkarmoryPreFightDialogue_7); + DungeonWaitFrames_Async(10,0x46); sub_806CDD4(skarmoryEntity,0xd,DIRECTION_SOUTH); - DisplayDungeonDialogue(&gSkarmoryPreFightDialogue_8); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(gSkarmoryPreFightDialogue_9); - sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH); - sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryPreFightDialogue_8); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gSkarmoryPreFightDialogue_9); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_NORTH); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTH); + DungeonWaitFrames_Async(10,0x46); DungeonStartNewBGM(MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -150,27 +150,27 @@ void SkarmoryReFightDialogue(void) pos.x = skarmoryEntity->pixelPos.x; pos.y = skarmoryEntity->pixelPos.y + 0x2000; sub_8086448(); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); SkarmoryEntry(skarmoryEntity); ShiftCameraToPosition(&pos,0x10); - DisplayDungeonDialogue(&gSkarmoryReFightDialogue_1); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gSkarmoryReFightDialogue_2); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryReFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryReFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); sub_806CDD4(skarmoryEntity,0xd,DIRECTION_SOUTH); - DisplayDungeonDialogue(&gSkarmoryReFightDialogue_3); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gSkarmoryReFightDialogue_3); + DungeonWaitFrames_Async(10,0x46); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); DungeonStartNewBGM(MUS_BOSS_BATTLE); } void sub_8086E40(void) { - SpriteLookAroundEffect(CutsceneGetLeader()); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gUnknown_8100D3C); - sub_803E708(10,0x46); - gDungeon->unk2 = 1; + CutsceneLookAroundEffect_Async(CutsceneGetLeader()); + DungeonWaitFrames_Async(10, 70); + DisplayDungeonDialogue_Async(&gUnknown_8100D3C); + DungeonWaitFrames_Async(10, 70); + gDungeon->unk2 = DUNGEON_UNK2_1; } static void SkarmoryEntry(Entity * skarmoryEntity) @@ -178,6 +178,6 @@ static void SkarmoryEntry(Entity * skarmoryEntity) sub_806CDD4(skarmoryEntity,0xf,DIRECTION_SOUTH); sub_8086A54(skarmoryEntity); PlaySoundEffect(0x1f8); - sub_803E708(0x44,0x46); + DungeonWaitFrames_Async(0x44,0x46); } diff --git a/src/dungeon_cutscene_smeargle.c b/src/dungeon_cutscene_smeargle.c index 04d98233f..3aa54e10c 100644 --- a/src/dungeon_cutscene_smeargle.c +++ b/src/dungeon_cutscene_smeargle.c @@ -57,40 +57,40 @@ void SmeargleRescueDialogue(void) s32 counter; smeargleEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SMEARGLE); - SpriteLookAroundEffect(smeargleEntity); - sub_803E708(0xA, 0x46); + CutsceneLookAroundEffect_Async(smeargleEntity); + DungeonWaitFrames_Async(0xA, 0x46); // Ohhh... // I've lost my bearings - DisplayDungeonDialogue(&gSmeargleRescueDialogue_1); - sub_803E708(0xA, 0x46); - sub_80869E4(smeargleEntity, 4, 2, DIRECTION_NORTH); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gSmeargleRescueDialogue_1); + DungeonWaitFrames_Async(0xA, 0x46); + CutsceneLookDir_Async(smeargleEntity, 4, DIR_TRANS_SPINLEFT1, DIRECTION_NORTH); + DungeonWaitFrames_Async(0xA, 0x46); // I can't get out... // I'm hungry... // I'm in trouble - DisplayDungeonDialogue(&gSmeargleRescueDialogue_2); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gSmeargleRescueDialogue_2); + DungeonWaitFrames_Async(0xA, 0x46); sub_8086448(); sub_8086598(); - sub_803E708(0x20, 0x46); + DungeonWaitFrames_Async(0x20, 0x46); SpriteShockEffect(smeargleEntity); - sub_803E708(0x20, 0x46); - sub_80869E4(smeargleEntity, 4, 2, DIRECTION_SOUTH); + DungeonWaitFrames_Async(0x20, 0x46); + CutsceneLookDir_Async(smeargleEntity, 4, DIR_TRANS_SPINLEFT1, DIRECTION_SOUTH); // Oh! You are? - DisplayDungeonDialogue(&gSmeargleRescueDialogue_3); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gSmeargleRescueDialogue_3); + DungeonWaitFrames_Async(0xA, 0x46); PlaySoundEffect(0x1c7); sub_806CDD4(smeargleEntity, 0xA, DIRECTION_SOUTH); - sub_803E708(0x14, 0x46); + DungeonWaitFrames_Async(0x14, 0x46); sub_806CE68(smeargleEntity, DIRECTION_SOUTH); - sub_803E708(0x4, 0x46); + DungeonWaitFrames_Async(0x4, 0x46); PlaySoundEffect(0x1c7); sub_806CDD4(smeargleEntity, 0xA, DIRECTION_SOUTH); - sub_803E708(0x14, 0x46); + DungeonWaitFrames_Async(0x14, 0x46); // Did you maybe come to rescue me? // Am I glad to see you - DisplayDungeonDialogue(&gSmeargleRescueDialogue_4); - sub_803E708(0xA, 0x46); + DisplayDungeonDialogue_Async(&gSmeargleRescueDialogue_4); + DungeonWaitFrames_Async(0xA, 0x46); sub_806CDD4(smeargleEntity, 0, DIRECTION_SOUTH); for(counter = 0x17; counter >= 0; counter--) { @@ -98,9 +98,9 @@ void SmeargleRescueDialogue(void) DungeonRunFrameActions(0x46); } sub_806CE68(smeargleEntity, DIRECTION_SOUTH); - sub_803E708(0x20, 0x46); + DungeonWaitFrames_Async(0x20, 0x46); sub_8042B0C(smeargleEntity); - HandleFaint(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); gDungeon->unk4 = 1; gDungeon->unk11 = 4; } @@ -116,7 +116,7 @@ void sub_808CD44(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); sub_80855E4(sub_8086A3C); - HandleFaint(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); + HandleFaint_Async(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0); sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3); CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_SMEARGLE); } diff --git a/src/dungeon_cutscene_suicune.c b/src/dungeon_cutscene_suicune.c index e9ed25d9d..4bb40d8a5 100644 --- a/src/dungeon_cutscene_suicune.c +++ b/src/dungeon_cutscene_suicune.c @@ -77,7 +77,7 @@ void sub_808A308(void) sub_80854D4(); sub_8085930(DIRECTION_NORTH); if (HasRecruitedMon(MONSTER_SUICUNE)) { - HandleFaint(SuicuneEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(SuicuneEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH); @@ -86,11 +86,11 @@ void sub_808A308(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_SUICUNE); } -void sub_808A36C(u8 param_1, u8 param_2) +void HandleSuicuneBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 0x26 || param_2 == 0x27 || param_2 == 0x28) && (param_1 == 0x14)) { - sub_8097FA8(0x19); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_NORTHWIND_FIELD_ATTEMPT1 || cutscene == CUTSCENE_NORTHWIND_FIELD_ATTEMPT2 || cutscene == CUTSCENE_NORTHWIND_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_SUICUNE) { + SetTempCutsceneFlag(CUTSCENE_FLAG_NORTHWIND_FIELD_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -102,22 +102,22 @@ void SuicunePreFightDialogue(void) leaderEntity = CutsceneGetLeader(); SuicuneEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SUICUNE); sub_8086448(); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_1); - sub_803E708(10,70); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_2); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_1); + DungeonWaitFrames_Async(10,70); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_2); + DungeonWaitFrames_Async(10,70); sub_80426C8(1,2); - sub_803E708(0x3c,70); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_3); - sub_803E708(10,70); + DungeonWaitFrames_Async(0x3c,70); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_3); + DungeonWaitFrames_Async(10,70); sub_808A528(SuicuneEntity); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_4); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_5); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_4); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_5); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_6); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_6); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicunePreFightDialogue_7); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gSuicunePreFightDialogue_7); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(SuicuneEntity,0x28a,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -129,12 +129,12 @@ void SuicuneReFightDialogue(void) leaderEntity = CutsceneGetLeader(); SuicuneEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SUICUNE); - DisplayDungeonDialogue(&gSuicuneReFightDialogue_1); + DisplayDungeonDialogue_Async(&gSuicuneReFightDialogue_1); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicuneReFightDialogue_2); + DisplayDungeonDialogue_Async(&gSuicuneReFightDialogue_2); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicuneReFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gSuicuneReFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(SuicuneEntity,0x28a,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -150,12 +150,12 @@ void SuicunePostStoryPreFightDialogue(void) sub_80866C4(&gSuicunePostStoryPreFightDialogue_4); } else { - DisplayDungeonDialogue(&gSuicunePostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gSuicunePostStoryPreFightDialogue_1); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicunePostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gSuicunePostStoryPreFightDialogue_2); SuicuneScreenFlash(); - DisplayDungeonDialogue(&gSuicunePostStoryPreFightDialogue_3); - sub_803E708(10,70); + DisplayDungeonDialogue_Async(&gSuicunePostStoryPreFightDialogue_3); + DungeonWaitFrames_Async(10,70); SetupBossFightHP(SuicuneEntity,0x28a,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -193,19 +193,19 @@ static void SuicuneScreenFlash(void) SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 > 199; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); for(iVar1 = 250; iVar1 >= 0; iVar1 -= 10) { SetDungeonBGColorRGB(iVar1,iVar1,iVar1,1,1); DungeonRunFrameActions(70); } - sub_803E708(10,70); + DungeonWaitFrames_Async(10,70); sub_8085EB0(); } diff --git a/src/dungeon_cutscene_zapdos.c b/src/dungeon_cutscene_zapdos.c index bd587214b..ab48a5136 100644 --- a/src/dungeon_cutscene_zapdos.c +++ b/src/dungeon_cutscene_zapdos.c @@ -74,8 +74,8 @@ void sub_808729C(void) sub_80854D4(); sub_8085930(4); sub_80855E4(sub_8086A3C); - if (sub_8086AE4(0x91) != 0) { - HandleFaint(zapdosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + if (sub_8086AE4(MONSTER_ZAPDOS)) { + HandleFaint_Async(zapdosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); } else { LevelUpTarget(zapdosEntity,zapdosEntity,gZapdosConfigLevel,0,0); @@ -87,11 +87,11 @@ void sub_808729C(void) CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ZAPDOS); } -void sub_8087334(u8 param_1, u8 param_2) +void HandleZapdosBossFaint(u8 monsterBehavior, u8 cutscene) { - if ((param_2 == 7 || param_2 == 8 || param_2 == 9) && (param_1 == 8)) { - sub_8097FA8(5); - gDungeon->unk2 = 1; + if ((cutscene == CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1 || cutscene == CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2 || cutscene == CUTSCENE_MT_THUNDER_PEAK_POSTSTORY) && monsterBehavior == BEHAVIOR_ZAPDOS) { + SetTempCutsceneFlag(CUTSCENE_FLAG_MT_THUNDER_PEAK_COMPLETE); + gDungeon->unk2 = DUNGEON_UNK2_1; } } @@ -113,27 +113,27 @@ void ZapdosPreFightDialogue(void) partnerEntity = CutsceneGetPartner(); zapdosEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ZAPDOS); sub_8086448(); - sub_803E708(10,0x46); - SpriteLookAroundEffect(partnerEntity); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,1,DIRECTION_EAST); - sub_80869E4(leaderEntity,4,2,DIRECTION_WEST); - DisplayDungeonDialogue(gUnknown_81014B0); - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,4,2,DIRECTION_NORTH); - sub_80869E4(leaderEntity,4,1,DIRECTION_NORTH); - DisplayDungeonDialogue(gUnknown_8101504); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookAroundEffect_Async(partnerEntity); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_EAST); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_WEST); + DisplayDungeonDialogue_Async(gUnknown_81014B0); + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,4,DIR_TRANS_SPINLEFT1,DIRECTION_NORTH); + CutsceneLookDir_Async(leaderEntity,4,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTH); + DisplayDungeonDialogue_Async(gUnknown_8101504); + DungeonWaitFrames_Async(10,0x46); ZapdosScreenFlash(3); DungeonStopBGM(); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gUnknown_81015A0); + DisplayDungeonDialogue_Async(&gUnknown_81015A0); ZapdosDropInEffect(zapdosEntity); DungeonStartNewBGM(MUS_RISING_FEAR); sub_806CDD4(partnerEntity,6,DIRECTION_NORTH); - DisplayDungeonDialogue(&gUnknown_81015D4); // Waah! - sub_803E708(10,0x46); - sub_80869E4(partnerEntity,2,1,DIRECTION_SOUTHEAST); + DisplayDungeonDialogue_Async(&gUnknown_81015D4); // Waah! + DungeonWaitFrames_Async(10,0x46); + CutsceneLookDir_Async(partnerEntity,2,DIR_TRANS_SPINRIGHT1,DIRECTION_SOUTHEAST); puStack_38 = (struct Zapdos1) {1, 2, 12, 0, 1, 0, 0, 0, 0, 9, 9, 0}; puStack_34[0] = puStack_38.unk0; @@ -146,13 +146,13 @@ void ZapdosPreFightDialogue(void) GetEntInfo(partnerEntity)->unk15F = 0; GetEntInfo(partnerEntity)->unk15D = 1; - sub_80869E4(partnerEntity,2,2,DIRECTION_NORTH); - DisplayDungeonDialogue(&gUnknown_81015E8); // I warned you! I have no mercy for meddlers - sub_803E708(0x3c,0x46); - DisplayDungeonDialogue(&gUnknown_8101624); - sub_803E708(10,0x46); + CutsceneLookDir_Async(partnerEntity,2,DIR_TRANS_SPINLEFT1,DIRECTION_NORTH); + DisplayDungeonDialogue_Async(&gUnknown_81015E8); // I warned you! I have no mercy for meddlers + DungeonWaitFrames_Async(0x3c,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8101624); + DungeonWaitFrames_Async(10,0x46); GetEntInfo(partnerEntity)->unk15D = 0; - sub_80869E4(partnerEntity,2,2,DIRECTION_NORTHWEST); + CutsceneLookDir_Async(partnerEntity,2,DIR_TRANS_SPINLEFT1,DIRECTION_NORTHWEST); puStack_30 = (struct Zapdos2) {5, 2, 12, 0, 4, 2, 12, 0, 4, 0, 0, 0, 0, 8, 7, 0}; puStack_4c[0] = puStack_30.unk0; @@ -162,18 +162,18 @@ void ZapdosPreFightDialogue(void) DungeonRunFrameActions(0x46); } - sub_80869E4(partnerEntity,2,1,DIRECTION_NORTHEAST); - DisplayDungeonDialogue(gUnknown_810165C); - sub_803E708(10,0x46); + CutsceneLookDir_Async(partnerEntity,2,DIR_TRANS_SPINRIGHT1,DIRECTION_NORTHEAST); + DisplayDungeonDialogue_Async(gUnknown_810165C); + DungeonWaitFrames_Async(10,0x46); ZapdosScreenFlash(3); - DisplayDungeonDialogue(&gUnknown_8101750); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_8101750); + DungeonWaitFrames_Async(10,0x46); ZapdosScreenFlash(1); - DisplayDungeonDialogue(&gUnknown_810178C); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_810178C); + DungeonWaitFrames_Async(10,0x46); ZapdosScreenFlash(2); - DisplayDungeonDialogue(&gUnknown_81017B4); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_81017B4); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(zapdosEntity,300, MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -186,19 +186,19 @@ void ZapdosReFightDialogue(void) leaderEntity = CutsceneGetLeader(); zapdosEntity = GetEntityFromMonsterBehavior(BEHAVIOR_ZAPDOS); sub_8086448(); - sub_803E708(10,0x46); - DisplayDungeonDialogue(gZapdosReFightDialogue_1); - sub_803E708(10,0x46); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(gZapdosReFightDialogue_1); + DungeonWaitFrames_Async(10,0x46); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gUnknown_81015A0); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gUnknown_81015A0); + DungeonWaitFrames_Async(10,0x46); ZapdosDropInEffect(zapdosEntity); - sub_803E708(10,0x46); - DisplayDungeonDialogue(&gZapdosReFightDialogue_2); + DungeonWaitFrames_Async(10,0x46); + DisplayDungeonDialogue_Async(&gZapdosReFightDialogue_2); ZapdosScreenFlash(1); - DisplayDungeonDialogue(&gZapdosReFightDialogue_3); + DisplayDungeonDialogue_Async(&gZapdosReFightDialogue_3); ZapdosScreenFlash(2); - DisplayDungeonDialogue(&gZapdosReFightDialogue_4); + DisplayDungeonDialogue_Async(&gZapdosReFightDialogue_4); SetupBossFightHP(zapdosEntity,300,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -217,16 +217,16 @@ void ZapdosPostStoryPreFightDialogue(void) else { ZapdosScreenFlash(1); PlaySoundEffect(0x1da); - DisplayDungeonDialogue(&gZapdosPostStoryPreFightDialogue_1); + DisplayDungeonDialogue_Async(&gZapdosPostStoryPreFightDialogue_1); ZapdosDropInEffect(zapdosEntity); - DisplayDungeonDialogue(&gZapdosPostStoryPreFightDialogue_2); + DisplayDungeonDialogue_Async(&gZapdosPostStoryPreFightDialogue_2); ZapdosScreenFlash(1); - DisplayDungeonDialogue(&gZapdosPostStoryPreFightDialogue_3); + DisplayDungeonDialogue_Async(&gZapdosPostStoryPreFightDialogue_3); ZapdosScreenFlash(2); - DisplayDungeonDialogue(&gZapdosPostStoryPreFightDialogue_4); + DisplayDungeonDialogue_Async(&gZapdosPostStoryPreFightDialogue_4); ZapdosScreenFlash(2); - DisplayDungeonDialogue(&gZapdosPostStoryPreFightDialogue_5); - sub_803E708(10,0x46); + DisplayDungeonDialogue_Async(&gZapdosPostStoryPreFightDialogue_5); + DungeonWaitFrames_Async(10,0x46); SetupBossFightHP(zapdosEntity,300,MUS_BOSS_BATTLE); ShiftCameraToPosition(&leaderEntity->pixelPos,0x10); } @@ -245,7 +245,7 @@ static void ZapdosDropInEffect(Entity *zapdosEntity) GetEntInfo(zapdosEntity)->unk174 = IntToF248(iVar1); DungeonRunFrameActions(0x46); } - sub_803E708(0x1e,0x46); + DungeonWaitFrames_Async(0x1e,0x46); } static void ZapdosScreenFlash(s32 numFlashes) diff --git a/src/dungeon_damage.c b/src/dungeon_damage.c index 13bced3a3..ee92e4ad3 100644 --- a/src/dungeon_damage.c +++ b/src/dungeon_damage.c @@ -50,7 +50,7 @@ #include "dungeon_tilemap.h" #include "effect_main.h" -static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8); +static bool8 HandleDealingDamageInternal_Async(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8); static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 type, DamageStruct *dmgStruct); static void sub_806F500(void); static void sub_806F63C(Entity *param_1); @@ -67,14 +67,14 @@ static const s48_16 gUnknown_8106F3C = {0x0, 0x8000}; static const s48_16 gUnknown_8106F44 = {0x0, 0xE666}; static const s48_16 gUnknown_8106F4C = {0x0, 0x18000}; -void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, bool32 arg8, s32 argC) +void HandleDealingDamage_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, bool32 arg8, s32 argC) { bool32 r9; // Some compiler weirdness, because it won't match without creating dungeonExitReason_ again s32 dungeonExitReason = dungeonExitReason_; s32 returnDmg = 0; - if (HandleDealingDamageInternal(attacker, target, dmgStruct, isFalseSwipe, giveExp, dungeonExitReason, argC)) + if (HandleDealingDamageInternal_Async(attacker, target, dmgStruct, isFalseSwipe, giveExp, dungeonExitReason, argC)) return; if (dmgStruct->tookNoDamage) return; @@ -127,7 +127,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct * if (returnDmg) { struct DamageStruct sp; - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCFA4); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FCFA4); sp.dmg = (dmgStruct->dmg * returnDmg) / 4; sp.type = dmgStruct->type; sp.residualDmgType = RESIDUAL_DAMAGE_COUNTERATTACK; @@ -135,7 +135,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct * sp.isCrit = FALSE; sp.unkE = 0; sp.tookNoDamage = FALSE; - HandleDealingDamageInternal(target, attacker, &sp, FALSE, giveExp, dungeonExitReason, argC); + HandleDealingDamageInternal_Async(target, attacker, &sp, FALSE, giveExp, dungeonExitReason, argC); } } if (!EntityIsValid(attacker) || !EntityIsValid(target)) @@ -224,7 +224,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct * } else { sub_8041D00(destBondTarget, target); - DealDamageToEntity(destBondTarget, dmgStruct->dmg, RESIDUAL_DAMAGE_DESTINY_BOND, DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND); + DealDamageToEntity_Async(destBondTarget, dmgStruct->dmg, RESIDUAL_DAMAGE_DESTINY_BOND, DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND); } } } @@ -235,7 +235,7 @@ static inline u32 ItemId(Item *item) return item->id; } -static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8) +static bool8 HandleDealingDamageInternal_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8) { s32 hpBefore, hpChange; EntityInfo *targetData; @@ -263,14 +263,14 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc if (dungeonExitReason != DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG && AbilityIsActive(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCA90); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FCA90); sub_8042238(attacker, target); dmgStruct->tookNoDamage = TRUE; return FALSE; } if (targetData->frozenClassStatus.status == STATUS_FROZEN) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9600); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9600); sub_8042238(attacker, target); dmgStruct->tookNoDamage = TRUE; return FALSE; @@ -295,17 +295,17 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc if (targetData->unk152 == 0) { if (dmgStruct->isCrit) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9614); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9614); } switch (dmgStruct->typeEffectiveness) { case EFFECTIVENESS_IMMUNE: - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9630); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9630); break; case EFFECTIVENESS_RESIST: - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9654); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9654); break; case EFFECTIVENESS_SUPER: - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9670); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9670); break; } } @@ -315,15 +315,15 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc if (dmgStruct->dmg == 0) { if (ShouldDisplayEntity(attacker) && ShouldDisplayEntity(target)) { if (targetData->unk152 == 0) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688); } sub_8042238(attacker, target); } else { if (targetData->unk152 == 0) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688); } - sub_803E708(0x1E, 0x18); + DungeonWaitFrames_Async(0x1E, 0x18); } dmgStruct->tookNoDamage = TRUE; return FALSE; @@ -331,12 +331,12 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc else if (dmgStruct->dmg == 9999) { if (arg8 != 0 && ShouldDisplayEntity(target)) { unkTile = GetTileAtEntitySafe(target); - sub_803E708(0x14, 0x18); + DungeonWaitFrames_Async(0x14, 0x18); unkTile->spawnOrVisibilityFlags.spawn |= SPAWN_FLAG_TRAP; UpdateTrapsVisibility(); } if (targetData->unk152 == 0) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F96A8); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F96A8); } targetData->unkA0 = 999; } @@ -357,12 +357,12 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_803ED30(-dmgStruct->dmg, target, 1, -1); } if (targetData->unk152 == 0 && str != NULL) { - TryDisplayDungeonLoggableMessage3(attacker, target, str); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, str); } } else { if (targetData->unk152 == 0 && str != NULL) { - TryDisplayDungeonLoggableMessage3(attacker, target, str); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, str); } } } @@ -404,12 +404,12 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc if (targetData->reflectClassStatus.status == STATUS_ENDURING) { if (targetData->HP == 0) { targetData->HP = 1; - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_8100548); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_8100548); } } else if (isFalseSwipe == TRUE && targetData->HP == 0) { targetData->HP = 1; - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_810056C); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_810056C); } hpChange = hpBefore - targetData->HP; @@ -417,7 +417,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc hpChange = 0; if (var_24 || unkTile != NULL) - sub_803E708(0xA, 0x18); + DungeonWaitFrames_Async(0xA, 0x18); if (targetData->HP != 0) { if (var_24) { @@ -441,15 +441,15 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc } if (unkTile != NULL) { - sub_803E708(0x14, 0x18); + DungeonWaitFrames_Async(0x14, 0x18); target->unk22 = 2; - sub_803E708(0xA, 0x18); + DungeonWaitFrames_Async(0xA, 0x18); unkTile->spawnOrVisibilityFlags.spawn &= ~(SPAWN_FLAG_TRAP); UpdateTrapsVisibility(); } else if (var_24) { target->unk22 = 1; - sub_803E708(0x1E, 0x18); + DungeonWaitFrames_Async(0x1E, 0x18); } r8 = 1; @@ -461,42 +461,42 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (dmgStruct->residualDmgType == RESIDUAL_DAMAGE_MOVE_FAIL || dmgStruct->residualDmgType == RESIDUAL_DAMAGE_RECOIL) { if (targetData->isNotTeamMember) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9E44); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9E44); } else { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9E44); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9E44); } } else if (targetData->isNotTeamMember) { if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DF0[r8]); } else { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9CC0[r8]); + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9CC0[r8]); } } else { DungeonMon *recruitedMon = &gRecruitedPokemonRef->dungeonTeam[targetData->teamIndex]; - if (targetData->isTeamLeader || (targetData->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER && gDungeon->unk644.unk18 == 0)) { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9CEC[r8]); + if (targetData->isTeamLeader || (targetData->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER && !gDungeon->unk644.canChangeLeader)) { + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9CEC[r8]); } else if (IsExperienceLocked(targetData->joinedAt.id)) { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DAC[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DAC[r8]); } else if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DF0[r8]); } else if (sub_806A58C(recruitedMon->recruitedPokemonId)) { if (gDungeon->unk644.unk19 != 0) { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D8C[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D8C[r8]); } else { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D84[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D84[r8]); } } else { - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D28[r8]); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D28[r8]); } } @@ -534,7 +534,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_806CCB4(target, sub_806CEBC(target)); UpdateStatusIconFlags(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD46C); sub_806F63C(target); return FALSE; } @@ -564,7 +564,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_8042148(target); monPos = teamMember->pos; - HandleFaint(teamMember, DUNGEON_EXIT_WAS_POSSESSED, target); + HandleFaint_Async(teamMember, DUNGEON_EXIT_WAS_POSSESSED, target); sub_80694C0(target, monPos.x, monPos.y, 1); UpdateEntityPixelPos(target, NULL); target->unk22 = 0; @@ -592,7 +592,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc UpdateStatusIconFlags(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], teamMember, 0); - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD484); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD484); sub_806F63C(target); return FALSE; } @@ -645,7 +645,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_806CCB4(target, sub_806CEBC(target)); UpdateStatusIconFlags(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); - DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C); + DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD46C); sub_806F63C(target); return FALSE; } @@ -676,7 +676,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc if (exp == 0) exp = 1; if (attackerData->isTeamLeader) { - sub_80980B4(targetData->id); + SetMonSeenFlag(targetData->id); } if (targetData->grudge) { attackerData->unk14B = 1; @@ -714,19 +714,19 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc sub_8069D4C(&sp, target); if (TryRecruitMonster(attacker, target)) { - if (!HandleMonsterJoinSequence(attacker, target, &sp)) { - HandleFaint(target, DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED, attacker); + if (!MonsterJoinSequence_Async(attacker, target, &sp)) { + HandleFaint_Async(target, DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED, attacker); } else { gUnknown_202F221 = 1; } } else { - HandleFaint(target, dungeonExitReason, attacker); + HandleFaint_Async(target, dungeonExitReason, attacker); } } else { - HandleFaint(target, dungeonExitReason, attacker); + HandleFaint_Async(target, dungeonExitReason, attacker); } return TRUE; @@ -826,7 +826,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty } if (torrentVisualFlag) { sub_80428EC(pokemon); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDA8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDA8); } } if ((type == TYPE_GRASS) && (AbilityIsActive(pokemon, ABILITY_OVERGROW))) { @@ -838,7 +838,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty } if (overgrowVisualFlag) { sub_80428D8(pokemon); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FED88); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FED88); } } if ((type == TYPE_BUG) && (AbilityIsActive(pokemon, ABILITY_SWARM))) { @@ -850,7 +850,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty } if (swarmVisualFlag) { sub_8042978(pokemon); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDC8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDC8); } } if ((type == TYPE_FIRE) && (AbilityIsActive(pokemon, ABILITY_BLAZE))) { @@ -862,7 +862,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty } if (blazeVisualFlag) { sub_804298C(pokemon); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDE8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDE8); } } if (!(F48_16_IsZero(param_1)) && (MonsterIsType(pokemon, type))) { @@ -1034,7 +1034,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType, } if (visFlags_attacker_1) { sub_80428B0(attacker); - TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE04); // Guts boosted its power + TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE04); // Guts boosted its power } } @@ -1049,7 +1049,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType, } if (visFlags_attacker_2) { sub_80428C4(attacker); - TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE2C); // It's special ability boosted Attack + TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE2C); // It's special ability boosted Attack } } @@ -1090,7 +1090,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType, } if (visFlags_target) { sub_8042940(target); - TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE54); // Its special ability quickened attacks! + TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE54); // Its special ability quickened attacks! } } @@ -1286,10 +1286,10 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3 targetInfo->unk152 = 1; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FAE00); // Fire moves won't become stronger! + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FAE00); // Fire moves won't become stronger! } else { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FADD8); // m1 used Flash Fire to absorb fire! + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FADD8); // m1 used Flash Fire to absorb fire! } } } @@ -1395,7 +1395,7 @@ void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct D dmgStruct->residualDmgType = RESIDUAL_DAMAGE_REGULAR; } -void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason_) +void DealDamageToEntity_Async(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason_) { Entity spEntity; struct DamageStruct dmgStruct; @@ -1409,10 +1409,10 @@ void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeo dmgStruct.isCrit = FALSE; dmgStruct.unkE = 0; dmgStruct.tookNoDamage = FALSE; - HandleDealingDamage(&spEntity, entity, &dmgStruct, FALSE, FALSE, dungeonExitReason, FALSE, 0); + HandleDealingDamage_Async(&spEntity, entity, &dmgStruct, FALSE, FALSE, dungeonExitReason, FALSE, 0); } -void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason_, s32 residualDmgType, s32 arg_10, s32 arg_14) +void sub_806F370_Async(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason_, s32 residualDmgType, s32 arg_10, s32 arg_14) { s32 i; struct DamageStruct dmgStruct; @@ -1447,7 +1447,7 @@ void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *t dmgStruct.tookNoDamage = FALSE; } - HandleDealingDamage(pokemon, target, &dmgStruct, FALSE, giveExp, dungeonExitReason, arg_10, arg_14); + HandleDealingDamage_Async(pokemon, target, &dmgStruct, FALSE, giveExp, dungeonExitReason, arg_10, arg_14); if (tookNoDamage != NULL) { *tookNoDamage = dmgStruct.tookNoDamage; } diff --git a/src/dungeon_engine.c b/src/dungeon_engine.c index ad5c4024f..a2eef83df 100644 --- a/src/dungeon_engine.c +++ b/src/dungeon_engine.c @@ -23,11 +23,11 @@ #include "dungeon_entity_movement.h" #include "dungeon_wind.h" -static void sub_8044454(void); -static bool8 RunLeaderTurn(bool8); -static void sub_8044574(void); -static void sub_8044820(void); -static void TrySpawnMonsterAndActivatePlusMinus(void); +static void sub_8044454_Async(void); +static bool8 RunLeaderTurn_Async(bool8); +static void sub_8044574_Async(void); +static void sub_8044820_Async(void); +static void TrySpawnMonsterAndActivatePlusMinus_Async(void); static void sub_8044AB4(void); EWRAM_DATA DungeonPos gLeaderPosition = {0}; @@ -41,31 +41,42 @@ const s16 gSpeedTurns[NUM_SPEED_COUNTERS][25] = { [4] = {40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64}, }; -void RunFractionalTurn(bool8 param_1) +void RunFractionalTurn_Async(bool8 param_1) { bool8 cVar2; - if (IsFloorOver()) return; - TrySpawnMonsterAndActivatePlusMinus(); - if (IsFloorOver()) return; - cVar2 = RunLeaderTurn(param_1); - if (IsFloorOver()) return; + if (IsFloorOver()) + return; + + TrySpawnMonsterAndActivatePlusMinus_Async(); + if (IsFloorOver()) + return; + + cVar2 = RunLeaderTurn_Async(param_1); + if (IsFloorOver()) + return; if (cVar2) { UpdateWindTurns(); - if (IsFloorOver()) return; + if (IsFloorOver()) + return; } - if (IsFloorOver()) return; - sub_8044574(); - if (IsFloorOver()) return; - sub_8044820(); - if (IsFloorOver()) return; + if (IsFloorOver()) + return; + + sub_8044574_Async(); + if (IsFloorOver()) + return; + + sub_8044820_Async(); + if (IsFloorOver()) + return; + sub_8044AB4(); - if (++gDungeon->unk644.fractionalTurn == 24) { + if (++gDungeon->unk644.fractionalTurn == 24) gDungeon->unk644.fractionalTurn = 0; - } } -static bool8 RunLeaderTurn(bool8 param_1) +static bool8 RunLeaderTurn_Async(bool8 param_1) { EntityInfo *entityInfo; s32 movSpeed; @@ -80,12 +91,12 @@ static bool8 RunLeaderTurn(bool8 param_1) if (GetEntInfo(entity)->attacking) return FALSE; - while (1) { + while (TRUE) { entity = GetLeader(); if (entity == NULL) return FALSE; - if (DisplayActions(0) == 0 && (gDungeon->unk644.unk28 != 0 || (gDungeon->unk644.unk2F != 0))) { - DungeonRunFrameActions(0xc); + if (!DisplayActions_Async(NULL) && (gDungeon->unk644.unk28 != 0 || gDungeon->unk644.unk2F != 0)) { + DungeonRunFrameActions(12); } GetEntInfo(entity)->speedStageChanged = FALSE; if (IsFloorOver()) @@ -107,9 +118,9 @@ static bool8 RunLeaderTurn(bool8 param_1) gDungeon->noActionInProgress = FALSE; if (IsFloorOver()) break; - ExecuteEntityDungeonAction(entity); + ExecuteEntityDungeonAction_Async(entity); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); if (IsFloorOver()) break; entityInfo = GetEntInfo(entity); @@ -118,7 +129,7 @@ static bool8 RunLeaderTurn(bool8 param_1) } if (IsFloorOver()) break; - sub_8044454(); + sub_8044454_Async(); if (IsFloorOver()) break; @@ -137,7 +148,7 @@ static bool8 RunLeaderTurn(bool8 param_1) return TRUE; } -static void sub_8044454(void) +static void sub_8044454_Async(void) { Entity *entity; EntityInfo *entityInfo; @@ -155,9 +166,9 @@ static void sub_8044454(void) if (EntityIsValid(entity)) { EnemyEvolution(entity); RunMonsterAI(entity, 0); - ExecuteEntityDungeonAction(entity); + ExecuteEntityDungeonAction_Async(entity); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); entityInfo->flags = (entityInfo->flags & ~(MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)) | MOVEMENT_FLAG_UNK_14; } } @@ -165,7 +176,7 @@ static void sub_8044454(void) } } -void sub_80444F4(Entity *pokemon) +void sub_80444F4_Async(Entity *pokemon) { Entity *entity; EntityInfo *entityInfo; @@ -180,9 +191,9 @@ void sub_80444F4(Entity *pokemon) if ((EntityIsValid(entity)) && (pokemon != entity) && (entityInfo = GetEntInfo(entity), (entityInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY))) { if (IsFloorOver()) break; RunMonsterAI(entity, 0); - ExecuteEntityDungeonAction(entity); + ExecuteEntityDungeonAction_Async(entity); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); } } } @@ -194,7 +205,7 @@ struct Struct_8044574 struct Struct_8044574 *next; }; -static void sub_8044574(void) +static void sub_8044574_Async(void) { s32 i, id; struct Struct_8044574 sp0[4]; @@ -231,10 +242,10 @@ static void sub_8044574(void) EnemyEvolution(teamMon); for (j = 0; j < 3; j++) { RunMonsterAI(teamMon, 0); - if (IsFloorOver() || !ExecuteEntityDungeonAction(teamMon)) + if (IsFloorOver() || !ExecuteEntityDungeonAction_Async(teamMon)) break; sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); if (IsFloorOver()) break; } @@ -288,9 +299,9 @@ static void sub_8044574(void) info->recalculateFollow = TRUE; info->aiAllySkip = FALSE; RunMonsterAI(entity,1); - ExecuteEntityDungeonAction(entity); + ExecuteEntityDungeonAction_Async(entity); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); EntityIsValid(entity); // Does nothing } ptr = ptr->next; @@ -303,7 +314,7 @@ static void sub_8044574(void) if (EntityIsValid(teamMon)) { EntityInfo *teamMonInfo = GetEntInfo(teamMon); if (teamMonInfo->aiAllySkip) { - ApplyEndOfTurnEffects(teamMon); + DoEndOfTurnEffects_Async(teamMon); if (EntityIsValid(teamMon)) { EnemyEvolution(teamMon); teamMonInfo->aiAllySkip = FALSE; @@ -314,7 +325,7 @@ static void sub_8044574(void) } } -static void sub_8044820(void) +static void sub_8044820_Async(void) { s32 movSpeed; EntityInfo *entityInfo; @@ -347,9 +358,9 @@ static void sub_8044820(void) EnemyEvolution(entity); RunMonsterAI(entity, 0); if (IsFloorOver()) break; - ExecuteEntityDungeonAction(entity); + ExecuteEntityDungeonAction_Async(entity); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); if (IsFloorOver()) break; } } @@ -364,7 +375,7 @@ static void sub_8044820(void) entity2 = gDungeon->wildPokemon[index]; if ((EntityIsValid(entity2)) && (entityInfo2 = GetEntInfo(entity2), entityInfo2->aiAllySkip)) { - ApplyEndOfTurnEffects(entity2); + DoEndOfTurnEffects_Async(entity2); if (EntityIsValid(entity2)) { EnemyEvolution(entity2); entityInfo2->aiAllySkip = FALSE; @@ -374,7 +385,7 @@ static void sub_8044820(void) } } -static void TrySpawnMonsterAndActivatePlusMinus(void) +static void TrySpawnMonsterAndActivatePlusMinus_Async(void) { EntityInfo * entityInfo; Entity *entity; @@ -417,7 +428,7 @@ static void TrySpawnMonsterAndActivatePlusMinus(void) } } } - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); } } @@ -428,13 +439,13 @@ static void sub_8044AB4(void) if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn + 1] != 0) { for (index = 0; index < DUNGEON_MAX_POKEMON; index++) { if (EntityIsValid(gDungeon->activePokemon[index])) { - DisplayActions(0); + DisplayActions_Async(0); break; } } sub_807EAA0(1,0); sub_8086AC0(); - TryForcedLoss(0); + TryForcedLoss_Async(FALSE); } } @@ -444,10 +455,10 @@ bool8 IsFloorOver(void) if (GetLeader() == NULL) { gDungeon->unk644.unk10 = 1; } - else if (gDungeon->unk2 == 1) { + else if (gDungeon->unk2 == DUNGEON_UNK2_1) { gDungeon->unk644.unk10 = 2; } - else if (gDungeon->unk2 != 2) { + else if (gDungeon->unk2 != DUNGEON_UNK2_PITFALL_TRAP) { return FALSE; } else { @@ -459,11 +470,8 @@ bool8 IsFloorOver(void) bool8 sub_8044B84(void) { - if(gDungeon->unk10 != 0) - { + if (gDungeon->unk10 != 0) return TRUE; - } - else { - return IsFloorOver(); - } + + return IsFloorOver(); } diff --git a/src/dungeon_entity_movement.c b/src/dungeon_entity_movement.c index d3e8147f6..46a2b1929 100644 --- a/src/dungeon_entity_movement.c +++ b/src/dungeon_entity_movement.c @@ -143,7 +143,7 @@ static void sub_8075050(EntityInfo *info, Unk_Entity_x184 *strPtr) } } -bool8 DisplayActions(Entity *a0) +bool8 DisplayActions_Async(Entity *a0) { s32 i, j, loop; Entity *savedEntityPtr; @@ -274,16 +274,16 @@ bool8 DisplayActions(Entity *a0) if (IsFloorOver()) break; - TryForcedLoss(0); - ApplyEndOfTurnEffects(mon); + TryForcedLoss_Async(FALSE); + DoEndOfTurnEffects_Async(mon); if (!EntityIsValid(mon)) continue; if (IsFloorOver()) break; EnemyEvolution(mon); - sub_8046D20(); - TryTriggerMonsterHouseWithMsg(mon, gDungeon->forceMonsterHouse); + PotentiallyCreateMusicBox_Async(); + TryTriggerMonsterHouseWithMsg_Async(mon, gDungeon->forceMonsterHouse); } if (!EntityIsValid(mon)) continue; @@ -302,7 +302,7 @@ bool8 DisplayActions(Entity *a0) sub_8086AC0(); if (!IsFloorOver()) { - sub_8085140(); + sub_8085140_Async(); gDungeon->unkB8 = savedEntityPtr; } else { @@ -466,7 +466,7 @@ bool8 CheckEntityTileForInteraction(Entity *entity) return FALSE; } -void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse) +void TryTriggerMonsterHouseWithMsg_Async(Entity *pokemon, bool8 forcedMonsterHouse) { if (EntityIsValid(pokemon) && !GetEntInfo(pokemon)->isNotTeamMember @@ -475,11 +475,11 @@ void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse) && (GetTileAtEntitySafe(pokemon)->terrainFlags & TERRAIN_TYPE_IN_MONSTER_HOUSE)) { // It's a monster house! - LogMessageByIdWithPopupCheckUser(GetLeader(), gPtrItsaMonsterHouseMessage); + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gPtrItsaMonsterHouseMessage); gDungeon->unk644.monsterHouseTriggeredEvent = TRUE; - TriggerMonsterHouse(pokemon, forcedMonsterHouse); + TriggerMonsterHouse_Async(pokemon, forcedMonsterHouse); sub_8041888(0); if (sub_803F428(&pokemon->pos)) - sub_803E708(0x78, 0x39); + DungeonWaitFrames_Async(0x78, 0x39); } } diff --git a/src/dungeon_exit.c b/src/dungeon_exit.c index 8283fcd7b..6024c86c0 100644 --- a/src/dungeon_exit.c +++ b/src/dungeon_exit.c @@ -90,11 +90,11 @@ bool8 sub_8083C50(void) return FALSE; } -bool8 sub_8083C88(u8 param_1) +bool8 sub_8083C88(u8 dungeonMissionKind) { DungeonExitSummary *exitSummary = &gDungeon->exitSummary; - if ((!HasCheckpoint(gDungeon->unk644.dungeonLocation.id) && (gDungeon->unk644.unk18 != 0 || param_1 != 0)) + if ((!HasCheckpoint(gDungeon->unk644.dungeonLocation.id) && (gDungeon->unk644.canChangeLeader || dungeonMissionKind != DUNGEON_MISSION_UNK0)) || exitSummary->exitReason != DUNGEON_EXIT_CLEARED_DUNGEON) { return TRUE; } diff --git a/src/dungeon_generation.c b/src/dungeon_generation.c index bf247b6f9..e3346a67d 100644 --- a/src/dungeon_generation.c +++ b/src/dungeon_generation.c @@ -223,7 +223,7 @@ void GenerateFloor(void) // Attempt to generate random grid dimensions attempts = 32; - while (1) { + while (TRUE) { if (layout != LAYOUT_LARGE_0x8) { gridSizeX = DungeonRandRange(2, 9); gridSizeY = DungeonRandRange(2, 8); @@ -1250,7 +1250,7 @@ static void GenerateExtraHallways(struct GridCell grid[GRID_CELL_LEN][GRID_CELL_ roomId = GetTile(currX, currY)->room; // Walk in the random direction until out of the room - while (1) { + while (TRUE) { if (roomId != GetTile(currX, currY)->room) break; // gAdjacentTileOffsets gives us the proper (x,y) offset to move one tile in the given direction. @@ -1259,7 +1259,7 @@ static void GenerateExtraHallways(struct GridCell grid[GRID_CELL_LEN][GRID_CELL_ } // Keep walking until an obstacle is encountered - while (1) { + while (TRUE) { if (GetTerrainType(GetTile(currX, currY)) != TERRAIN_TYPE_NORMAL) break; @@ -1796,7 +1796,7 @@ static void AssignGridCellConnections(struct GridCell grid[GRID_CELL_LEN][GRID_C // Make sure our cardinalDirection isn't going into a border // If so, rotate counterclockwise - while (1) { + while (TRUE) { bool8 notOk = FALSE; switch (cardinalDirection & CARDINAL_DIRECTION_MASK) { case CARDINAL_DIR_RIGHT: @@ -1870,7 +1870,7 @@ static void AssignGridCellConnections(struct GridCell grid[GRID_CELL_LEN][GRID_C return; // No dead ends, add some extra connections! - while (1) { + while (TRUE) { bool8 more = FALSE; // Locate potential dead ends @@ -3573,13 +3573,13 @@ static void GenerateMaze(struct GridCell *gridCell, bool8 useSecondaryTerrain) */ static void GenerateMazeLine(s32 x0, s32 y0, s32 xMin, s32 yMin, s32 xMax, s32 yMax, bool8 useSecondaryTerrain, u32 roomIndex) { - while (1) { + while (TRUE) { s32 direction = DungeonRandInt(NUM_CARDINAL_DIRECTIONS); s32 i = 0; SetTerrainObstacleChecked(GetTileMut(x0, y0), useSecondaryTerrain, roomIndex); - while (1) { + while (TRUE) { s32 offsetX, offsetY; s32 posX, posY; @@ -4288,7 +4288,7 @@ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHou // Spawn an item tile->spawnOrVisibilityFlags.spawn |= SPAWN_FLAG_ITEM; } - else if (gDungeon->unk644.unk18) { + else if (gDungeon->unk644.canChangeLeader) { tile->spawnOrVisibilityFlags.spawn |= SPAWN_FLAG_TRAP; } @@ -4646,7 +4646,7 @@ static void GenerateSecondaryTerrainFormations(u32 flag, FloorProperties *floorP x = DungeonRandRange(2, DUNGEON_MAX_SIZE_X - 2); dirX = 0; - while (1) { + while (TRUE) { // Fill in tiles in chunks of size 2-7 before changing the flow direction numTilesFill = DungeonRandInt(6) + 2; while (numTilesFill != 0) { @@ -5631,7 +5631,7 @@ bool8 StairsAlwaysReachable(s32 stairsX, s32 stairsY, bool8 markUnreachable) // Uses a semi-BFS starting from the stairs until all reachable tiles // have been visited - while (1) { + while (TRUE) { s32 checked = 0; sNumTilesReachableFromStairs += 1; diff --git a/src/dungeon_generation_fixed.c b/src/dungeon_generation_fixed.c index 96578503b..5108f4552 100644 --- a/src/dungeon_generation_fixed.c +++ b/src/dungeon_generation_fixed.c @@ -295,7 +295,7 @@ static const struct FixedRoomEntitiesInfo sFixedRoomEntities[204] = { }, [34] = { .speciesId = MONSTER_DEOXYS_NORMAL, - .monsterBehavior = BEHAVIOR_29, + .monsterBehavior = BEHAVIOR_DEOXYS_NORMAL, .trapId = NUM_TRAPS, .roomId = 0, }, @@ -988,7 +988,7 @@ void sub_8051E7C(Entity *pokemon) Tile *tile = GetTileMut(pokemon->pos.x, pokemon->pos.y - 1); if (!(tile->terrainFlags & TERRAIN_TYPE_UNK_x1000)) { - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDF0); // It can't be used here! + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDF0); // It can't be used here! } else if (!gDungeon->unk3A09) { s32 x, y; @@ -1048,11 +1048,11 @@ void sub_8051E7C(Entity *pokemon) sub_8049B8C(); UpdateTrapsVisibility(); sub_80429FC(&pos); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDD0); // The closed corridor was opened! - sub_803E708(0x14, 0x3C); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDD0); // The closed corridor was opened! + DungeonWaitFrames_Async(0x14, 0x3C); } else { - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDF0); // It can't be used here! + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDF0); // It can't be used here! } } diff --git a/src/dungeon_item_action.c b/src/dungeon_item_action.c index 93404fcda..32991adcc 100644 --- a/src/dungeon_item_action.c +++ b/src/dungeon_item_action.c @@ -110,7 +110,7 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti PlaySoundEffect(0x14d); sub_8045BF8(gFormatBuffer_Items[0],item); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBB8); // $m0 caught the $i0 + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBB8); // $m0 caught the $i0 info->heldItem = *item; sub_806A6E8(target); } @@ -126,10 +126,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti if (item->flags & ITEM_FLAG_STICKY) { sub_8045BF8(gFormatBuffer_Items[0],item); - TryDisplayDungeonLoggableMessage3(pokemon,target,gItemStickyDoesntWorkText); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gItemStickyDoesntWorkText); if (param_1) { u8 uStack_24; - sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); EnemyEvolution(pokemon); return; } @@ -145,10 +145,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti if (GetItemCategory(item->id) == CATEGORY_TMS_HMS || GetItemCategory(item->id) == CATEGORY_LINK_BOX) { if (param_1) { u8 uStack_23; - sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE458); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE458); } } else { @@ -349,10 +349,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti default: if (param_1) { u8 auStack_22; - sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE458); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE458); } break; } @@ -379,7 +379,7 @@ static void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4) static void sub_8048340(Entity *pokemon, Entity *target, u32 r2) { - sub_806F370(pokemon, target, r2, 1, 0, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ROCK, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(pokemon, target, r2, 1, 0, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ROCK, RESIDUAL_DAMAGE_REGULAR, 0, 0); } static void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2) @@ -433,7 +433,7 @@ static void CheriBerryItemAction(Entity *pokemon, Entity *target) EndBurnClassStatus(pokemon, target); else // Pointer to "But nothing happened!" - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4); } static void PechaBerryItemAction(Entity *pokemon, Entity *target) @@ -442,7 +442,7 @@ static void PechaBerryItemAction(Entity *pokemon, Entity *target) if (ENTITY_POISONED(entInfo)) EndBurnClassStatus(pokemon, target); else - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4); // Pointer to "But nothing happened!" + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4); // Pointer to "But nothing happened!" } static void WarpSeedItemAction(Entity *pokemon, Entity *target) @@ -473,7 +473,7 @@ static void StunSeedItemAction(Entity *pokemon, Entity *target) static void PlainSeedItemAction(Entity *pokemon, Entity *target) { // Pointer to "But nothing happened!" - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4); } static void DoomSeedItemAction(Entity *pokemon, Entity *target) @@ -489,7 +489,7 @@ static void RawstBerryItemAction(Entity *pokemon, Entity *target) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); // Pointer to "But nothing happened!" - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FB580); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FB580); } } @@ -503,15 +503,15 @@ static void HungerSeedItemAction(Entity *pokemon, Entity * target) entityInfo = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); if (IqSkillIsEnabled(target, IQ_SELF_CURER)) - TryDisplayDungeonLoggableMessage3(pokemon, target, gPtrSelfHealPreventedHungerMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gPtrSelfHealPreventedHungerMessage); else { if (FixedPointToInt(entityInfo->belly) != 0) { entityInfo->belly = IntToFixedPoint(0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9740); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9740); } else - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9760); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9760); } } } @@ -547,18 +547,18 @@ static void GinsengItemAction(Entity *pokemon, Entity * target) } if (isMoveBoosted) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE454); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE454); if (moveBoost != 1) { - sub_803E708(10,0x40); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE434); + DungeonWaitFrames_Async(10,0x40); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE434); } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE40C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE40C); } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE40C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE40C); } } @@ -575,7 +575,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) entityInfo_1 = entityInfo; if (gDungeon->unk644.unk31 != 0) { dmg = gBlastSeedThrownBossDmgValue; - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here... + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here... } else { dmg = gBlastSeedThrownDmgValue; @@ -583,7 +583,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) if (entityInfo_1->frozenClassStatus.status == STATUS_FROZEN) { EndFrozenClassStatus(pokemon, target); } - sub_806F370(pokemon, target, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(pokemon, target, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0); } else { @@ -591,14 +591,14 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) entity = sub_80696FC(pokemon); if (entity == NULL) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FDBA0); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FDBA0); } else { entityInfo = GetEntInfo(entity); if (gDungeon->unk644.unk31 != 0) { dmg = gBlastSeedEatenBossDmgValue; - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here... + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here... } else { dmg = gBlastSeedEatenDmgValue; @@ -606,7 +606,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3) if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) { EndFrozenClassStatus(pokemon, entity); } - sub_806F370(pokemon, entity, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(pokemon, entity, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0); } } } @@ -644,7 +644,7 @@ static void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 gummiIndex targetInfo->IQ = 999; } if (baseIQ == targetInfo->IQ) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD644); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD644); } else { iVar5 = currIQ - baseIQ; @@ -657,8 +657,8 @@ static void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 gummiIndex if (((iVar5 < 9) && (iVar3 = 1, iVar5 < 5)) && (iVar3 = 3, 2 < iVar5)) { iVar3 = 2; } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD648[iVar4]); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD6E8[iVar3]); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD648[iVar4]); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD6E8[iVar3]); LoadIQSkills(target); DisplayMsgIfNewIqSkillLearned(targetInfo,baseIQ); } @@ -700,11 +700,11 @@ bool8 sub_8048950(Entity *param_1,Item *item) moveID = GetItemMoveID(item->id); if ((item->flags & ITEM_FLAG_STICKY)) { - DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1); + DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1); return FALSE; } else if (IsHMItem(item->id)) { - DisplayDungeonMessage(0,gPtrCantUseInDungeonMessage,1); + DisplayDungeonMessage_Async(0,gPtrCantUseInDungeonMessage,1); return FALSE; } else @@ -751,13 +751,13 @@ bool8 sub_8048A68(Entity *param_1,Item *item) DungeonMon *pokemon; if ((item->flags & ITEM_FLAG_STICKY)) { - DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1); + DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1); return FALSE; } else { - if (gDungeon->unk644.unk18 == 0) { - DisplayDungeonMessage(0,gUnknown_80F9BD8,1); + if (!gDungeon->unk644.canChangeLeader) { + DisplayDungeonMessage_Async(0,gUnknown_80F9BD8,1); return FALSE; } else @@ -814,7 +814,7 @@ bool8 HandleLinkBoxAction(Entity *entity, Item *item) ActionContainer originalAction; if (ItemSticky(item)) { - DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1); + DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1); return FALSE; } @@ -842,12 +842,12 @@ bool8 HandleLinkBoxAction(Entity *entity, Item *item) } originalAction = *entityActionPtr; - while (1) { + while (TRUE) { ClearMonsterActionFields(entityActionPtr); if (ShowDungeonMovesMenu(entity2,1,0,0,1)) { if (!ret) break; - if (DisplayDungeonYesNoMessage(0,gUnknown_80FECA0,1) == 1) + if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FECA0,1) == 1) break; } @@ -893,14 +893,14 @@ bool8 sub_8048D50(Entity *pokemon, Item *item) if ((item->flags & ITEM_FLAG_STICKY) != 0) { sub_8045BF8(gFormatBuffer_Items[0], item); - LogMessageByIdWithPopupCheckUser(pokemon,gItemStickyDoesntWorkText); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gItemStickyDoesntWorkText); return FALSE; } else { if ((entityInfo->muzzled.muzzled == TRUE) && (IsEdibleItem(item->id))) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FDCA4); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FDCA4); return FALSE; } } @@ -911,7 +911,7 @@ static void KeyItemAction(Entity *pokemon, Entity *target, u8 r2) { u8 temp; if(r2 != 0) - sub_806F370(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ITEM, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ITEM, RESIDUAL_DAMAGE_REGULAR, 0, 0); else sub_8051E7C(pokemon); } @@ -942,27 +942,27 @@ static void GrimyFoodItemAction(Entity *pokemon, Entity * target) static void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrIcePartCrumbledMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrIcePartCrumbledMessage); } static void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrRockPartCrumbledMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrRockPartCrumbledMessage); } static void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrSteelPartCrumbledMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrSteelPartCrumbledMessage); } static void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrWishStoneCrumbledMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrWishStoneCrumbledMessage); } static void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2) { sub_80421C0(pokemon, 0xD6); - LogMessageByIdWithPopupCheckUser(pokemon, gPtrMusicBoxPlayedCrumbledMessage); - sub_803E708(0x3C, 0x46); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrMusicBoxPlayedCrumbledMessage); + DungeonWaitFrames_Async(0x3C, 0x46); } diff --git a/src/dungeon_items.c b/src/dungeon_items.c index 9725e1929..07c46294e 100644 --- a/src/dungeon_items.c +++ b/src/dungeon_items.c @@ -28,8 +28,8 @@ #include "dungeon_vram.h" #include "sprite.h" -static void MusicBoxCreation(void); -static u8 sub_8046D70(void); +static void MusicBoxCreation_Async(void); +static bool8 sub_8046D70(void); static EWRAM_INIT u8 sUnkItemTileNums[8] = {0x15, 0x00, 0x16, 0x00, 0x15, 0x00, 0x16, 0x00}; static EWRAM_INIT u8 sUnkItemMatrixNums[8] = {0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02}; @@ -142,7 +142,7 @@ void CreateFloorItems(void) } } -void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) +void TryLeaderItemPickUp_Async(struct DungeonPos *pos, bool8 printMsg) { Item *tileItem; int inventoryIds[INVENTORY_SIZE + 1]; @@ -164,7 +164,7 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) } sub_8045BF8(gFormatBuffer_Items[0],tileItem); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); - LogMessageByIdWithPopupCheckUser(leader,gMonSteppedOnItem); + LogMessageByIdWithPopupCheckUser_Async(leader,gMonSteppedOnItem); } else if (ShouldMonsterRunAwayAndShowEffect(leader,1)) { if (!printMsg) { @@ -172,14 +172,14 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) } sub_8045BF8(gFormatBuffer_Items[0],tileItem); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); - LogMessageByIdWithPopupCheckUser(leader,gMonTerrifiedCouldntPickUpItem); + LogMessageByIdWithPopupCheckUser_Async(leader,gMonTerrifiedCouldntPickUpItem); } else if (GetItemCategory(tileItem->id) == CATEGORY_POKE) { PlaySoundEffect(0x14c); AddToTeamMoney(GetMoneyValue(tileItem)); sub_8045BF8(gFormatBuffer_Items[0],tileItem); RemoveGroundItem(pos,TRUE); - LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem); + LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem); DisplayItemTip(tileItem->id); } else { @@ -248,10 +248,10 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) RemoveGroundItem(pos,TRUE); PlaySoundEffect(0x14a); if (inventoryIds[index] < 0) { - LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem2); + LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem2); } else { - LogMessageByIdWithPopupCheckUser(leader,gPickedUpItemToolbox); + LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItemToolbox); } DisplayItemTip(tileItem->id); return; @@ -269,7 +269,7 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) } sub_8045BF8(gFormatBuffer_Items[0],tileItem); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); - LogMessageByIdWithPopupCheckUser(leader,gMonSteppedOnItem); + LogMessageByIdWithPopupCheckUser_Async(leader,gMonSteppedOnItem); } else { PlaySoundEffect(0x14a); @@ -277,16 +277,16 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg) leaderInfo->heldItem = *tileItem; sub_8045BF8(gFormatBuffer_Items[0],tileItem); RemoveGroundItem(pos,TRUE); - LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem2); + LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem2); } else if (AddItemToInventory(tileItem) != 0) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); - LogMessageByIdWithPopupCheckUser(leader,gMonCouldntPickUpItem); + LogMessageByIdWithPopupCheckUser_Async(leader,gMonCouldntPickUpItem); } else { sub_8045BF8(gFormatBuffer_Items[0],tileItem); RemoveGroundItem(pos,TRUE); - LogMessageByIdWithPopupCheckUser(leader,gPickedUpItemToolbox); + LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItemToolbox); } DisplayItemTip(tileItem->id); } @@ -460,7 +460,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du if (tileObject != NULL && GetEntityType(tileObject) == ENTITY_TRAP) { sub_8046734(entity2, &entity2->pos); sub_807FE44(&entity2->pos, 1); - LogMessageByIdWithPopupCheckUser(entity1, gUnknown_80FED30); + LogMessageByIdWithPopupCheckUser_Async(entity1, gUnknown_80FED30); if (!ItemExists(item)) return; } @@ -475,7 +475,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du i = 1; } - while (1) { + while (TRUE) { if (gUnknown_80F4468[i].x == 99) { var_24 = FALSE; break; @@ -499,16 +499,16 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du DrawMinimapTile(localPos.x, localPos.y); switch (GetTerrainType(GetTile(localPos.x, localPos.y))) { case TERRAIN_TYPE_NORMAL: - LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellOnGround); + LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellOnGround); break; case TERRAIN_TYPE_SECONDARY: - LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellInWater); + LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellInWater); break; case TERRAIN_TYPE_WALL: - LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemBuried); + LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemBuried); break; case TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL: - LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellOutOfSight); + LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellOutOfSight); break; } } @@ -523,7 +523,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du } sub_804219C(&pixelPos); - LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemLost); + LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemLost); } } @@ -647,10 +647,10 @@ void sub_804687C(Entity *entity, DungeonPos *pos1, DungeonPos *pos2, Item *item, if (!r1) { if (count > 1) { - LogMessageByIdWithPopupCheckUser(entity, gAllItemsLost); + LogMessageByIdWithPopupCheckUser_Async(entity, gAllItemsLost); } else { - LogMessageByIdWithPopupCheckUser(entity, gItemLost); + LogMessageByIdWithPopupCheckUser_Async(entity, gItemLost); } } else { @@ -659,7 +659,7 @@ void sub_804687C(Entity *entity, DungeonPos *pos1, DungeonPos *pos2, Item *item, bool8 hallucinating; if (r9) { - LogMessageByIdWithPopupCheckUser(entity, gSeveralItemsLost); + LogMessageByIdWithPopupCheckUser_Async(entity, gSeveralItemsLost); } dirMaybe = 0; @@ -719,31 +719,31 @@ static void sub_8046CE4(Item *item,s32 param_2) item->quantity = 1; } -void sub_8046D20(void) +void PotentiallyCreateMusicBox_Async(void) { - u8 cVar1; + bool8 b = gDungeon->unk8; - cVar1 = gDungeon->unk8; gDungeon->unk8 = sub_8046D70(); - if (((gDungeon->unk8 == 1) && (cVar1 == 0)) && - (DisplayDungeonYesNoMessage(0, gUnknown_80FA408, 1) == 1)) { + + if (gDungeon->unk8 == TRUE && !b && DisplayDungeonYesNoMessage_Async(NULL, gUnknown_80FA408, TRUE) == TRUE) { gDungeon->unk4 = 1; gDungeon->unk11 = 2; } else { - MusicBoxCreation(); + MusicBoxCreation_Async(); } } -static u8 sub_8046D70(void) +static bool8 sub_8046D70(void) { + // Insane if (gDungeon->unk644.unk46) - return 0; + return FALSE; else - return 0; + return FALSE; } -static void MusicBoxCreation(void) +static void MusicBoxCreation_Async(void) { bool8 musicBoxOnce; bool8 createMusicBox; @@ -792,22 +792,22 @@ static void MusicBoxCreation(void) if (createMusicBox) { Entity *leader = GetLeader(); sub_80855E4(sub_80861A8); - gDungeon->unk1356C = 1; - DisplayDungeonMessage(0,gUnknown_810531C,1); - sub_803E708(0x3c,0x41); - DisplayDungeonMessage(0,gUnknown_8105360,1); - sub_80869E4(leader,4,10,0); + gDungeon->unk1356C = TRUE; + DisplayDungeonMessage_Async(0,gUnknown_810531C,1); + DungeonWaitFrames_Async(0x3c,0x41); + DisplayDungeonMessage_Async(0,gUnknown_8105360,1); + CutsceneLookDir_Async(leader,4,DIR_TRANS_10,0); sub_80416E0(&leader->pixelPos,0x10c,FALSE); sub_80421C0(leader,0xd7); - sub_803E708(0x3c,0x41); + DungeonWaitFrames_Async(0x3c,0x41); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); - DisplayDungeonMessage(0,gUnknown_81053A8,1); - sub_803E708(10,0x41); + DisplayDungeonMessage_Async(0,gUnknown_81053A8,1); + DungeonWaitFrames_Async(10,0x41); PlaySoundEffect(0xd4); - DisplayDungeonMessage(0,gUnknown_8105434,1); - sub_803E708(10,0x41); - sub_804178C(1); - gDungeon->unk1356C = 0; + DisplayDungeonMessage_Async(0,gUnknown_8105434,1); + DungeonWaitFrames_Async(10,0x41); + sub_804178C_Async(1); + gDungeon->unk1356C = FALSE; UpdateMinimap(); } } diff --git a/src/dungeon_jobs.c b/src/dungeon_jobs.c index d3c0054ca..84581c485 100644 --- a/src/dungeon_jobs.c +++ b/src/dungeon_jobs.c @@ -23,7 +23,7 @@ void sub_80842F0(void) gDungeon->unk644.unk33 = 0; gDungeon->unk644.unk46 = 0; - if (gDungeon->unk644.unk34 != 2) + if (gDungeon->unk644.missionKind != DUNGEON_MISSION_ACCEPTEDJOB_RELATED) return; for (i = 0; i < MAX_ACCEPTED_JOBS; i++) { @@ -89,12 +89,12 @@ void sub_8084448(Entity *pokemon) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],pokemon,0); if (!sub_8070BC0(pokemon)) { - DisplayDungeonMessage(0,gUnknown_80FA464,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA464,1); return; } if (gDungeon->unk644.unk46 != 0) { - if (DisplayDungeonYesNoMessage(0, gUnknown_80FA32C, 1) != 1) + if (DisplayDungeonYesNoMessage_Async(0, gUnknown_80FA32C, 1) != 1) return; BufferItemName(gFormatBuffer_Items[0], gDungeon->unk644.unk46, 0); for (i = 0; i < INVENTORY_SIZE; i++) { @@ -109,34 +109,34 @@ void sub_8084448(Entity *pokemon) } if (i == INVENTORY_SIZE) { - DisplayDungeonMessage(0, gUnknown_80FA448, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FA448, 1); return; } ZeroOutItem(&gTeamInventoryRef->teamItems[i]); FillInventoryGaps(); - DisplayDungeonMessage(0, gUnknown_80FA2B0, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FA2B0, 1); str = gUnknown_80FA370; } else { - if (DisplayDungeonYesNoMessage(0, gUnknown_80FA2F0, 1) != 1) + if (DisplayDungeonYesNoMessage_Async(0, gUnknown_80FA2F0, 1) != 1) return; - DisplayDungeonMessage(0, gUnknown_80FA260, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FA260, 1); str = gUnknown_80FA36C; } sub_80843BC(entInfo->id); sub_8042A34(&pokemon->pos); - HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - sub_804178C(1); - while(1) { - if (DisplayDungeonYesNoMessage(0,str,1) == 1) { - if (DisplayDungeonYesNoMessage(0,gUnknown_80FA394,0) == 1) { + HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + sub_804178C_Async(1); + while (TRUE) { + if (DisplayDungeonYesNoMessage_Async(0,str,1) == 1) { + if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA394,0) == 1) { gDungeon->unk4 = 1; gDungeon->unk11 = 2; return; } } - else if (DisplayDungeonYesNoMessage(0,gUnknown_80FA3B8,0) == 1) { + else if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA3B8,0) == 1) { return; } } @@ -151,7 +151,7 @@ void sub_80845E0(Entity *pokemon) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],pokemon,0); if (!sub_8070BC0(pokemon)) { - DisplayDungeonMessage(0,gUnknown_80FA530,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA530,1); return; } @@ -166,37 +166,37 @@ void sub_80845E0(Entity *pokemon) } } if (entity == NULL) { - DisplayDungeonMessage(0,gUnknown_80FA52C,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA52C,1); return; } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[2],entity,0); if (!sub_8070BC0(entity)) { - DisplayDungeonMessage(0,gUnknown_80FA54C,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA54C,1); return; } if (!CanSeeTarget(pokemon,entity)) { - DisplayDungeonMessage(0,gUnknown_80FA500,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA500,1); return; } - DisplayDungeonMessage(0,gUnknown_80FA4D4,1); + DisplayDungeonMessage_Async(0,gUnknown_80FA4D4,1); sub_80843BC(info1->id); info2->joinedAt.id = gDungeon->unk644.dungeonLocation.id; sub_8042A34(&pokemon->pos); sub_8042A34(&entity->pos); - HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); - sub_804178C(1); - while(1) { - if (DisplayDungeonYesNoMessage(0,gUnknown_80FA4D8,1) == 1) { - if (DisplayDungeonYesNoMessage(0,gUnknown_80FA394,0) == 1) { + HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + HandleFaint_Async(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0); + sub_804178C_Async(1); + while (TRUE) { + if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA4D8,1) == 1) { + if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA394,0) == 1) { gDungeon->unk4 = 1; gDungeon->unk11 = 2; return; } } - else if (DisplayDungeonYesNoMessage(0,gUnknown_80FA3B8,0) == 1) { + else if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80FA3B8,0) == 1) { return; } } diff --git a/src/dungeon_kecleon_shop.c b/src/dungeon_kecleon_shop.c index 18556a4e3..d3b84ba28 100644 --- a/src/dungeon_kecleon_shop.c +++ b/src/dungeon_kecleon_shop.c @@ -81,7 +81,7 @@ void sub_807EC28(bool8 arg0) if (!prevTileWasShop) { if (isShopTile == TRUE) { if (sameRoom) { - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE674, TRUE); // Ah welcome! + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE674, TRUE); // Ah welcome! } return; } @@ -124,9 +124,9 @@ void sub_807EC28(bool8 arg0) } } } - LOOP_BREAK: } +LOOP_BREAK: if (sub_8070BC0(leader)) { sub_806CE34(leader, GetDirectionTowardsPosition(&leader->pos, &wildMon->pos)); } @@ -156,7 +156,7 @@ void sub_807EC28(bool8 arg0) sub_807F33C(); } else if (prevTileWasShop == TRUE && !isShopTile && sameRoom) { - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE65C, TRUE); // I await your next visit + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE65C, TRUE); // I await your next visit } } } @@ -188,7 +188,7 @@ void sub_807EF84(void) Tile *tile = GetTileAtEntitySafe(GetLeader()); if (tile->terrainFlags & TERRAIN_TYPE_SHOP) { if (val != 2) { - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE63C, 1); // This is very disappointing, please return any items before you leave. + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE63C, 1); // This is very disappointing, please return any items before you leave. } } else { @@ -196,7 +196,7 @@ void sub_807EF84(void) } } else { - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE5F0, 1); // Looking forward to seeing you again! + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE5F0, 1); // Looking forward to seeing you again! } } @@ -213,7 +213,7 @@ static void sub_807EFFC(bool8 arg0) return; gFormatArgs[0] = gDungeon->unk644.unk4C; - if (DisplayDungeonYesNoMessage(&dialogueInfo, gUnknown_80FE5C0, TRUE) == 1) { // For the merch you have left, I shall pay X. Is that acceptable? + if (DisplayDungeonYesNoMessage_Async(&dialogueInfo, gUnknown_80FE5C0, TRUE) == 1) { // For the merch you have left, I shall pay X. Is that acceptable? s32 x, y; DungeonPos pos; s32 local_24; @@ -243,7 +243,7 @@ static void sub_807EFFC(bool8 arg0) } gDungeon->unk644.unk50 += (gDungeon->unk644.unk48 - local_24); - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE4F4, 1); // Your patronage is valued + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE4F4, 1); // Your patronage is valued } } @@ -262,11 +262,11 @@ static s32 sub_807F19C(bool8 arg0) } gFormatArgs[0] = diff; - if (DisplayDungeonYesNoMessage(&dialogueInfo, gUnknown_80FE568, TRUE) != 1) { // The merchandise you have chosen costs X + if (DisplayDungeonYesNoMessage_Async(&dialogueInfo, gUnknown_80FE568, TRUE) != 1) { // The merchandise you have chosen costs X return 1; } if (gTeamInventoryRef->teamMoney < diff) { - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE520, TRUE); // You don't have enough money. + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE520, TRUE); // You don't have enough money. return 2; } PlaySoundEffect(0x14c); @@ -302,7 +302,7 @@ static s32 sub_807F19C(bool8 arg0) } } gDungeon->unk644.unk50 = gDungeon->unk644.unk48; - DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE4D4, TRUE); // Thank you very much. + DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE4D4, TRUE); // Thank you very much. } return 0; @@ -314,7 +314,7 @@ static void sub_807F33C(void) gDungeon->unk644.stoleFromKecleon = 1; gDungeon->unk644.unk2B = 1; - LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FE4B8); // Help! Thief! I've been robbed! Help me catch the thief. + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FE4B8); // Help! Thief! I've been robbed! Help me catch the thief. for (x = 0; x < DUNGEON_MAX_SIZE_X; x++) { for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) { const Tile *tile = GetTile(x,y); diff --git a/src/dungeon_leveling.c b/src/dungeon_leveling.c index 304bffda6..5297a8945 100644 --- a/src/dungeon_leveling.c +++ b/src/dungeon_leveling.c @@ -119,7 +119,7 @@ void EnemyEvolution(Entity *entity) info->exp += expGained; gFormatArgs[0] = expGained; SetMessageArgument_2(gFormatBuffer_Monsters[0],info,0); - TryDisplayDungeonLoggableMessage3(entityPtr,target,gUnknown_80F9E64); // $m0 gained $d0 Exp Points + TryDisplayDungeonLoggableMessage3_Async(entityPtr,target,gUnknown_80F9E64); // $m0 gained $d0 Exp Points flag = LevelUp(entityPtr,target,1,1); } } @@ -159,7 +159,7 @@ void EnemyEvolution(Entity *entity) if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex); - TryDisplayDungeonLoggableMessage3(entityPtr,target,gUnknown_80FF730); // $i0 was added to $m0's list of usable tactics + TryDisplayDungeonLoggableMessage3_Async(entityPtr,target,gUnknown_80FF730); // $i0 was added to $m0's list of usable tactics } } } @@ -223,7 +223,7 @@ void LevelUpTarget(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 pa if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF730); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF730); } } } @@ -231,7 +231,7 @@ void LevelUpTarget(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 pa info->unk149 = 0; if ((flag == 0) && (param_4 != 0)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F9B74); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F9B74); } } } @@ -263,7 +263,7 @@ static void sub_807218C(Entity *pokemon) } else if(info->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER) { - if(gDungeon->unk644.unk18 == 0) + if (!gDungeon->unk644.canChangeLeader) r3 = 1; } sub_806A3D4(buffer, r1, 3, r3); @@ -272,7 +272,7 @@ static void sub_807218C(Entity *pokemon) { strcpy(buffer, gUnknown_80FCF18); } - DisplayDungeonMessage(0, buffer, 1); + DisplayDungeonMessage_Async(0, buffer, 1); buffer[0] = 0; @@ -311,7 +311,7 @@ static void sub_807218C(Entity *pokemon) } if(buffer[0]) - DisplayDungeonMessage(0, buffer, 1); + DisplayDungeonMessage_Async(0, buffer, 1); TryPointCameraToMonster(GetLeader(), 0); } @@ -346,7 +346,7 @@ void LevelDownTarget(Entity *pokemon, Entity *target, u32 level) if(!flag) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9B94); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9B94); } } } @@ -395,7 +395,7 @@ static bool8 LevelUp(Entity *pokemon, Entity *target, u8 param_3, u8 param_4) sub_8083D58(); gFormatArgs[0] = level; SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0); - DisplayDungeonLoggableMessageTrue(target, gUnknown_80F9E80); + DisplayDungeonLoggableMessageTrue_Async(target, gUnknown_80F9E80); } } flag = TRUE; @@ -542,12 +542,12 @@ static bool8 sub_80725A4(Entity *pokemon, Entity *target) { gFormatArgs[0] = info->level; sub_80421C0(target, 0xD3 << 1); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9EC8); // $m0 dropped to Level $d0! + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9EC8); // $m0 dropped to Level $d0! return TRUE; } else { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9EEC); // $m0's level didn't drop! + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9EEC); // $m0's level didn't drop! return FALSE; } } @@ -618,8 +618,8 @@ static void sub_8072778(Entity *pokemon, Entity *target, u8 param_2, u8 param_3) if (!info->isNotTeamMember && param_3) { if (!sp_0xCC && param_2) { - sub_803E708(0xA, 0x6); - DisplayDungeonMessage(0, gUnknown_80F9FA4, 1); + DungeonWaitFrames_Async(0xA, 0x6); + DisplayDungeonMessage_Async(0, gUnknown_80F9FA4, 1); } sp_0xCC = 1; sub_8063E70(target, localMoves, 1, 0); @@ -687,7 +687,7 @@ bool8 sub_8072938(Entity *target, u16 moveId) r10 = FALSE; if (!info->isNotTeamMember) { - DisplayDungeonMessage(0, gUnknown_80FDF40, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FDF40, 1); if (!sub_8063E70(target, localMoves, TRUE, TRUE)) { return FALSE; } @@ -784,7 +784,7 @@ static void sub_8072B78(Entity *pokemon, Entity *target, s16 id) ResetMonEntityData(entityInfo,0); sub_8069E0C(target); sub_806CCB4(target,7); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE2EC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE2EC); sub_8042A44(target); sub_8083D78(); if (id_s32 == MONSTER_NINJASK) { diff --git a/src/dungeon_list_menu.c b/src/dungeon_list_menu.c index ba61ffc82..38b002232 100644 --- a/src/dungeon_list_menu.c +++ b/src/dungeon_list_menu.c @@ -29,23 +29,23 @@ static const WindowTemplate sWinTemplateDummy = WIN_TEMPLATE_DUMMY; // Never used in-game. It's slightly narrower as it doesn't have space for go/envelope icons. static const WindowTemplate sWinTemplateNarrow = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 14, .height = 14, - .unk10 = 14, + .totalHeight = 14, .unk12 = 0, .header = NULL, }; static const WindowTemplate sWinTemplateWide = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 16, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = NULL, }; diff --git a/src/dungeon_logic.c b/src/dungeon_logic.c index 0bf5c5215..4f7fb462c 100644 --- a/src/dungeon_logic.c +++ b/src/dungeon_logic.c @@ -382,7 +382,7 @@ s32 sub_8070828(Entity *pokemon, bool8 displayMessage) } if (displayMessage && SetVisualFlags(GetEntInfo(pokemon), 0x40, flag)) { sub_80429B4(pokemon); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FEE80); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FEE80); } if (flag) { return 2; @@ -1206,7 +1206,7 @@ bool8 SafeguardIsActive(Entity * pokemon, Entity * target, bool8 displayMessage) if (GetEntInfo(target)->reflectClassStatus.status == STATUS_SAFEGUARD) { if (displayMessage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC2FC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC2FC); } return TRUE; } @@ -1218,7 +1218,7 @@ bool8 IsProtectedFromStatDrops(Entity * pokemon, Entity * target, bool8 displayM if (GetEntInfo(target)->reflectClassStatus.status == STATUS_MIST) { if (displayMessage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FC31C); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FC31C); } return TRUE; } @@ -1226,7 +1226,7 @@ bool8 IsProtectedFromStatDrops(Entity * pokemon, Entity * target, bool8 displayM if (AbilityIsActive(target, ABILITY_CLEAR_BODY) || AbilityIsActive(target, ABILITY_WHITE_SMOKE)) { if (displayMessage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCEFC); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCEFC); } return TRUE; } diff --git a/src/dungeon_main.c b/src/dungeon_main.c index 8085bc66a..087540590 100644 --- a/src/dungeon_main.c +++ b/src/dungeon_main.c @@ -94,7 +94,7 @@ void DungeonHandlePlayerInput(void) gDungeon->unk12 = 0; TryPointCameraToMonster(GetLeader(), 1); if (sub_80701A4(GetLeader())) { - sub_803E708(60, 16); + DungeonWaitFrames_Async(60, 16); return; } @@ -115,7 +115,7 @@ void DungeonHandlePlayerInput(void) } sub_806A914(1, 1, 1); - while (1) { + while (TRUE) { Entity *leader = GetLeader(); EntityInfo *leaderInfo = GetEntInfo(leader); @@ -191,7 +191,7 @@ void DungeonHandlePlayerInput(void) } } else if (ShouldMonsterRunAwayAndShowEffect(leader, TRUE)) { - LogMessageByIdWithPopupCheckUser(leader, gUnknown_80FD4B0); + LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80FD4B0); SetLeaderActionFields(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; break; @@ -206,7 +206,7 @@ void DungeonHandlePlayerInput(void) } } if (i == MAX_MON_MOVES) { - LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A28); + LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80F8A28); break; } @@ -232,7 +232,7 @@ void DungeonHandlePlayerInput(void) } } if (!canUseMove) { - LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A4C); + LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80F8A4C); } else { SetMonsterActionFields(&leaderInfo->action, ACTION_USE_MOVE_PLAYER); @@ -365,8 +365,8 @@ void DungeonHandlePlayerInput(void) sub_8052210(1); UpdateMinimap(); SetBGOBJEnableFlags(0x1E); - sub_803E708(0xA, 0x2F); - while (1) { + DungeonWaitFrames_Async(0xA, 0x2F); + while (TRUE) { DungeonRunFrameActions(0x2F); if (gRealInputs.pressed & SELECT_BUTTON) break; @@ -456,7 +456,7 @@ void DungeonHandlePlayerInput(void) if (!(canMoveFlags & 2)) { if (canMoveFlags & 1) { if (immobilizedMsg != NULL) { - LogMessageByIdWithPopupCheckUser(leader, immobilizedMsg); + LogMessageByIdWithPopupCheckUser_Async(leader, immobilizedMsg); } SetLeaderActionFields(ACTION_PASS_TURN); gDungeon->unk644.unk2F = 1; @@ -904,7 +904,7 @@ static bool8 sub_805EC4C(Entity *a0, u8 a1) if (IsChargingAnyTwoTurnMove(tileMonster, FALSE)) return FALSE; if (!sub_8070F80(a0, entityInfo->action.direction)) return FALSE; - if (a1 != 0 && sub_807049C(tileMonster, &a0->pos) && !DisplayDungeonYesNoMessage(0, gUnknown_8100208, 0)) return FALSE; + if (a1 != 0 && sub_807049C(tileMonster, &a0->pos) && !DisplayDungeonYesNoMessage_Async(0, gUnknown_8100208, 0)) return FALSE; SetMonsterActionFields(&entityInfo->action, ACTION_WALK); if (gRealInputs.held & B_BUTTON) { @@ -971,7 +971,7 @@ void CheckLeaderTile(void) case ENTITY_ITEM: { Item *item = GetItemInfo(tileObject); if (!(item->flags & ITEM_FLAG_IN_SHOP)) { - TryLeaderItemPickUp(&leader->pos, 1); + TryLeaderItemPickUp_Async(&leader->pos, 1); } else { gDungeon->unk5C0 = 4; @@ -1033,13 +1033,13 @@ void sub_805F02C(void) EntityInfo *leaderInfo = GetEntInfo(leader); if (r8->isTeamLeader) { - DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9BD8); + DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9BD8); } else if (PlayerHasItemWithFlag(ITEM_FLAG_IN_SHOP) || sub_807EF48()) { - DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C08); + DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9C08); } else if (gDungeon->unk644.stoleFromKecleon) { - DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C2C); + DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9C2C); } else { gDungeon->unk644.emptyBellyAlert = 0; @@ -1073,7 +1073,7 @@ void sub_805F02C(void) sub_8041AD0(leader); sub_8041AE0(GetLeader()); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], r7, 0); - LogMessageByIdWithPopupCheckUser(r7, gUnknown_80F9BB0); + LogMessageByIdWithPopupCheckUser_Async(r7, gUnknown_80F9BB0); sub_807EC28(FALSE); r8->unk64 = 0; leaderInfo->unk64 = 0; @@ -1131,13 +1131,13 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1) PlayDungeonStartButtonSE(); } - while (1) { + while (TRUE) { if (r10 < 0) { SetLeaderActionToNothing(TRUE); gTeamMenuChosenId = -1; PrintOnMainMenu(printAll); TryPointCameraToMonster(GetLeader(), 0); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1D); if (gRealInputs.repeated & DPAD_DOWN) { @@ -1208,16 +1208,16 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1) } } else if (action == ACTION_SET_ITEM) { - HandleSetItemAction(GetLeader(), TRUE); + HandleSetItemAction_Async(GetLeader(), TRUE); SetLeaderActionToNothing(TRUE); - sub_803E708(0x50, 0x4D); + DungeonWaitFrames_Async(0x50, 0x4D); sub_8052210(0); break; } else if (action == ACTION_UNSET_ITEM) { - HandleUnsetItemAction(GetLeader(), TRUE); + HandleUnsetItemAction_Async(GetLeader(), TRUE); SetLeaderActionToNothing(TRUE); - sub_803E708(0x50, 0x4D); + DungeonWaitFrames_Async(0x50, 0x4D); sub_8052210(0); break; } @@ -1290,7 +1290,7 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1) } } - while (1) { + while (TRUE) { s32 r9, teamMonsCount; SetLeaderActionToNothing(0); @@ -1443,7 +1443,7 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1) } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0); - DisplayDungeonMessage(0, gUnknown_80FDE18, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FDE18, 1); } r10 = -1; @@ -1581,7 +1581,7 @@ bool8 DungeonGiveNameToRecruitedMon(u8 *name) do { DungeonRunFrameActions(0xE); - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); r4 = sub_8016080(); } while (r4 == 0); CleanConfirmNameMenu(); diff --git a/src/dungeon_map.c b/src/dungeon_map.c index a99f45c2c..232cf4757 100644 --- a/src/dungeon_map.c +++ b/src/dungeon_map.c @@ -31,7 +31,7 @@ struct UnkStruct1 struct DungeonMapGfx { struct UnkStruct1 *gfx; - RGB *pal; + RGB_Struct *pal; }; enum { diff --git a/src/dungeon_menu_items.c b/src/dungeon_menu_items.c index 34640c978..17270847a 100644 --- a/src/dungeon_menu_items.c +++ b/src/dungeon_menu_items.c @@ -85,10 +85,10 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, - .width = 0x12, - .height = 0x10, - .unk10 = 0x10, + .pos = { 2, 2 }, + .width = 18, + .height = 16, + .totalHeight = 16, .header = &header, }, [1] = WIN_TEMPLATE_DUMMY, @@ -109,13 +109,13 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) sUnknown_202F258 = sub_8060D64(sUnknown_202F248, var_30, var_34, var_28, a0); if (sUnknown_202F258 == 0) { - DisplayDungeonMessage(0, gUnknown_80F8B24, 1); + DisplayDungeonMessage_Async(0, gUnknown_80F8B24, 1); return TRUE; } r8 = 0; sUnknown_202F240 = 0; - while (1) + while (TRUE) { s32 id; Entity *r4; @@ -157,7 +157,7 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) TryPointCameraToMonster(r4, 0); ChangeDungeonCameraPos(&r4->pos, 0, 1, 1); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x14); if (!var_30) { @@ -274,7 +274,7 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) SetSubMenuActions(a0); sub_8060800(&header, gDungeonMenu.currPage); CreateDungeonMenuSubWindow(&windows.id[0], 0x16); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x14); if (gRealInputs.repeated & DPAD_DOWN) { @@ -333,9 +333,9 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) } gDungeon->unk181e8.unk18212 = 0; - sub_803E708(2, 0x61); + DungeonWaitFrames_Async(2, 0x61); sub_804AA60(); - sub_803E708(2, 0x61); + DungeonWaitFrames_Async(2, 0x61); return inputAction; } @@ -348,10 +348,10 @@ static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 showWhichWindow, b Window *txtStrPtr; WindowTemplate whichWindow = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 4}, + .pos = { 2, 4 }, .width = 6, .height = 2, - .unk10 = 2, + .totalHeight = 2, .unk12 = 0, .header = NULL, }; @@ -369,31 +369,35 @@ static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 showWhichWindow, b gDungeonMenu.unk14.x = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); gDungeon->unk181e8.unk18212 = 0; + switch (sUnknown_202F248[a0]) { case 0: - case 1: - windows->id[0].unk10 = 0x10; - windows->id[0].height = 0x10; - header->width = 0xC; - gDungeonMenu.firstEntryY = 0x10; - gDungeonMenu.entriesPerPage = 0xA; + case 1: { + windows->id[0].totalHeight = 16; + windows->id[0].height = 16; + header->width = 12; + gDungeonMenu.firstEntryY = 16; + gDungeonMenu.entriesPerPage = 10; gDungeon->unk181e8.unk18212 = 1; break; - case 2: - windows->id[0].unk10 = 4; + } + case 2: { + windows->id[0].totalHeight = 4; windows->id[0].height = 4; header->width = 6; - gDungeonMenu.firstEntryY = 0x12; + gDungeonMenu.firstEntryY = 18; gDungeonMenu.entriesPerPage = 1; break; + } case 3: - default: - windows->id[0].unk10 = 4; + default: { + windows->id[0].totalHeight = 4; windows->id[0].height = 4; - header->width = 0xC; - gDungeonMenu.firstEntryY = 0x12; + header->width = 12; + gDungeonMenu.firstEntryY = 18; gDungeonMenu.entriesPerPage = 1; break; + } } if (showWhichWindow) { diff --git a/src/dungeon_menu_moves.c b/src/dungeon_menu_moves.c index ae251cf4d..ebfade567 100644 --- a/src/dungeon_menu_moves.c +++ b/src/dungeon_menu_moves.c @@ -65,7 +65,7 @@ void ShowMovesFromTeamMenu(ActionContainer *a0) Entity *entityOrg = gDungeon->teamPokemon[id]; Entity *entityNew = entityOrg; - while (1) { + while (TRUE) { s32 i, count, countUntilId; countUntilId = 0; @@ -168,10 +168,10 @@ bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMo .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -304,7 +304,7 @@ bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMo leaderInfo->action.actionParameters[0].actionUseIndex = entity->unk24; leaderInfo->action.actionParameters[1].actionUseIndex = sChosenMoveSlotId; sub_803EAF0(0, NULL); - sub_803E708(8, 0x1B); + DungeonWaitFrames_Async(8, 0x1B); ret = FALSE; break; } @@ -350,7 +350,7 @@ bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMo sub_8009524(2); CreateDungeonMenuSubWindow(&windows.id[0], 0x16); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1B); if (gRealInputs.repeated & DPAD_DOWN) { @@ -390,7 +390,7 @@ bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMo if (unkBool) { sub_803EAF0(0, NULL); - sub_803E708(8, 0x1E); + DungeonWaitFrames_Async(8, 0x1E); } return ret; @@ -401,10 +401,10 @@ static void ShowMovesMenuWindows(Entity *entity, EntityInfo *entInfo, bool8 redC s32 i, movesCount; WindowTemplate windowNew = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 14}, + .pos = { 2, 14 }, .width = 26, .height = 3, - .unk10 = 3, + .totalHeight = 3, .unk12 = 0, .header = NULL, }; @@ -432,7 +432,7 @@ static void ShowMovesMenuWindows(Entity *entity, EntityInfo *entInfo, bool8 redC gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); - windows->id[0].height = windows->id[0].unk10 = CalcEntriesTotalHeight(4, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows->id[0].height = windows->id[0].totalHeight = CalcEntriesTotalHeight(4, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header->width = 13; windows->id[0].pos.x = 2; windows->id[1] = windows->id[3]; @@ -600,7 +600,7 @@ static void ShowMovesInfoWindow(Move *moves, s32 firstMoveId, s32 movesCount) } currId = 0; - while (1) { + while (TRUE) { s32 statusesCount; s32 inputAction = 0; @@ -623,7 +623,7 @@ static void ShowMovesInfoWindow(Move *moves, s32 firstMoveId, s32 movesCount) gDungeonMenu.entriesPerPage = 0; DungeonShowWindows(&windows, TRUE); statusesCount = unk_PrintMoveDescription(currId, &moves[firstMoveId + currId], 0, statuses); - while (1) { + while (TRUE) { if (statusesCount != 0) { ShowStatusDescriptionMenuArrow(); } @@ -735,12 +735,12 @@ void ActionSetOrUnsetMove(ActionContainer *a0, bool8 flagToSet) PlaySoundEffect(0x133); if (flagToSet) { if (!wasSet) { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B40); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B40); } else { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B64); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B64); } - sub_803E708(0x78, 0x1F); + DungeonWaitFrames_Async(0x78, 0x1F); } } @@ -844,12 +844,12 @@ void ActionDelinkMoves(ActionContainer *a0, bool8 showMsg) PlaySoundEffect(0x133); if (showMsg) { if (unlInked) { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B88); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B88); } else { - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BB4); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BB4); } - sub_803E708(0x78, 0x1F); + DungeonWaitFrames_Async(0x78, 0x1F); } } @@ -901,10 +901,10 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -916,12 +916,12 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP Move movesLocal[8]; sChosenMoveSlotId = 0; - while (1) { + while (TRUE) { s32 inputAction; s32 yesNoAnswer; sub_8064228(entity, moves, &windows, &header); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1E); if (gRealInputs.repeated & DPAD_DOWN) { @@ -968,7 +968,7 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP if (inputAction == 2) { sub_803EAF0(0, NULL); - sub_803E708(8, 0x1B); + DungeonWaitFrames_Async(8, 0x1B); ASM_MATCH_TRICK(sChosenMoveSlotId); ShowMovesInfoWindow(moves, sChosenMoveSlotId, MAX_MON_MOVES); continue; @@ -977,7 +977,7 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP sub_8064310(moves); CreateDungeonMenuSubWindow(&windows.id[0], 22); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1B); @@ -1037,7 +1037,7 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP linked = TRUE; } BufferMoveName(gFormatBuffer_Items[0], move, NULL); - yesNoAnswer = DisplayDungeonYesNoMessage(NULL, (!linked) ? gUnknown_80FDF70 : gUnknown_80FDF00, FALSE); + yesNoAnswer = DisplayDungeonYesNoMessage_Async(NULL, (!linked) ? gUnknown_80FDF70 : gUnknown_80FDF00, FALSE); } else { yesNoAnswer = 1; @@ -1108,7 +1108,7 @@ static void sub_8064228(Entity *entity, Move *moves, WindowTemplates *windows, W gDungeonMenu.unk14.x = 0; gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); - windows->id[0].height = windows->id[0].unk10 = CalcEntriesTotalHeight(count, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows->id[0].height = windows->id[0].totalHeight = CalcEntriesTotalHeight(count, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header->width = 14; windows->id[0].pos.x = 2; windows->id[1] = windows->id[3]; diff --git a/src/dungeon_menu_others.c b/src/dungeon_menu_others.c index 75c990a82..0680f3010 100644 --- a/src/dungeon_menu_others.c +++ b/src/dungeon_menu_others.c @@ -75,11 +75,11 @@ void ShowDungeonOthersMenu(void) sOthersCursorId = 0; unkAlwaysFalse = FALSE; - while (1) { + while (TRUE) { bool8 bPress = FALSE; PrintOthersMenuOptions(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -152,11 +152,11 @@ enum { static void ShowGameOptionsMenu(void) { - while (1) { + while (TRUE) { bool8 bPress = FALSE; PrintGameOptions(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -220,12 +220,12 @@ static bool8 ShowDungeonOptions(void) bool8 bPress = FALSE; gDungeonMenu.menuIndex = 0; - while (1) { + while (TRUE) { bPress = FALSE; dpadMoved = FALSE; PrintDungeonOptions(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -281,12 +281,12 @@ static bool8 ShowOthersOptions(void) bool8 bPress = FALSE; gDungeonMenu.menuIndex = 0; - while (1) { + while (TRUE) { bPress = FALSE; dpadMoved = FALSE; PrintOthersOptions(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -349,7 +349,7 @@ static void TrySetNewGameOptions(bool8 bPressed) } if (optionsChanged) { - if (DisplayDungeonYesNoMessage(0, gUnknown_80FEBF8, TRUE) == 1) { + if (DisplayDungeonYesNoMessage_Async(0, gUnknown_80FEBF8, TRUE) == 1) { *gGameOptionsRef = sChangedGameOptions; sub_803E13C(); LoadDungeonMapPalette(); @@ -359,7 +359,7 @@ static void TrySetNewGameOptions(bool8 bPressed) static void AskToResetToDefault(void) { - if (DisplayDungeonYesNoMessage(0, gUnknown_80FEC28, FALSE) == 1) { + if (DisplayDungeonYesNoMessage_Async(0, gUnknown_80FEC28, FALSE) == 1) { InitializeGameOptions(FALSE); sub_803E13C(); } @@ -368,11 +368,11 @@ static void AskToResetToDefault(void) static void ShowQuickSaveGiveUpMenu(void) { bool8 unkAlwaysFalse = FALSE; - while (1) { + while (TRUE) { bool8 bPress = FALSE; PrintQuickSaveMenuOptions(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -417,7 +417,7 @@ static void ShowQuickSaveGiveUpMenu(void) static void ShowMissionObjectivesMenu(void) { - sub_80319A4(gDungeon->unk644.unk34, gDungeon->unk644.dungeonLocation.id, 0); + sub_80319A4(gDungeon->unk644.missionKind, gDungeon->unk644.dungeonLocation.id, 0); do { DungeonRunFrameActions(0x47); } while (sub_80319F8() == 0); @@ -426,7 +426,7 @@ static void ShowMissionObjectivesMenu(void) static bool8 AskToQuickSave(void) { - if (DisplayDungeonYesNoMessage(NULL, gUnknown_80FDE6C, FALSE) != 1) { + if (DisplayDungeonYesNoMessage_Async(NULL, gUnknown_80FDE6C, FALSE) != 1) { return TRUE; } SetMonsterActionFields(GetLeaderActionContainer(), ACTION_QUICK_SAVE); @@ -435,7 +435,7 @@ static bool8 AskToQuickSave(void) static bool8 AskToGiveUp(void) { - if (DisplayDungeonYesNoMessage(NULL, gUnknown_80FDEB8, FALSE) != 1) { + if (DisplayDungeonYesNoMessage_Async(NULL, gUnknown_80FDEB8, FALSE) != 1) { return TRUE; } SetMonsterActionFields(GetLeaderActionContainer(), ACTION_GIVE_UP); @@ -452,10 +452,10 @@ static void PrintOthersMenuOptions(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -482,7 +482,7 @@ static void PrintOthersMenuOptions(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 18; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -515,10 +515,10 @@ static void PrintQuickSaveMenuOptions(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -545,7 +545,7 @@ static void PrintQuickSaveMenuOptions(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 18; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -568,10 +568,10 @@ static void PrintGameOptions(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 12, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -598,7 +598,7 @@ static void PrintGameOptions(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 12; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(optionsCount, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -623,10 +623,10 @@ static void PrintDungeonOptions(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -653,7 +653,7 @@ static void PrintDungeonOptions(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 24; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(DUNGEON_OPTIONS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(DUNGEON_OPTIONS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -714,10 +714,10 @@ static void PrintOthersOptions(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -744,7 +744,7 @@ static void PrintOthersOptions(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 24; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(OTHERS_OPTIONS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(OTHERS_OPTIONS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -843,11 +843,11 @@ static bool8 UnknownOthersOption(void) static void ShowHintsMenu(void) { - while (1) { + while (TRUE) { bool8 bPress = FALSE; PrintHintsMenu(); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if (gRealInputs.repeated & DPAD_DOWN) { @@ -887,10 +887,10 @@ static void PrintHintsMenu(void) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 12, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -916,7 +916,7 @@ static void PrintHintsMenu(void) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 12; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(HINTS_COUNT_RED_VERSION, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(HINTS_COUNT_RED_VERSION, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -933,17 +933,17 @@ static void ShowChosenHintWindow(s32 hintId) { bool8 dsControls = (gGameOptionsRef->controls != CONTROLS_GBA); - while (1) { + while (TRUE) { bool8 dpadPressed = FALSE; WindowHeader header; WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 12, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -967,7 +967,7 @@ static void ShowChosenHintWindow(s32 hintId) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); windows.id[0].width = 24; - windows.id[0].height = windows.id[0].unk10 = CalcEntriesTotalHeight(HINTS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; + windows.id[0].height = windows.id[0].totalHeight = CalcEntriesTotalHeight(HINTS_COUNT, DEFAULT_MENU_ENTRY_HEIGHT) + 2; header.width = 10; windows.id[0].pos.x = 2; DungeonShowWindows(&windows, TRUE); @@ -978,7 +978,7 @@ static void ShowChosenHintWindow(s32 hintId) PrintFormattedStringOnWindow(8, 16, gHintsDescriptions[dsControls][hintId], 0, '\0'); sub_80073E0(0); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x24); if ((gRealInputs.pressed & DPAD_RIGHT) || gDungeonMenu.touchScreen.dpad_right) { diff --git a/src/dungeon_menu_recruitment.c b/src/dungeon_menu_recruitment.c index c0d561c32..b845b2bce 100644 --- a/src/dungeon_menu_recruitment.c +++ b/src/dungeon_menu_recruitment.c @@ -51,10 +51,10 @@ static const WindowTemplates sRecruitmentSearchWindows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 14, - .unk10 = 18, + .totalHeight = 18, .unk12 = 2, .header = &sRecruitmentWindowHeader, }, @@ -71,16 +71,16 @@ void ShowRecruitmentSearchMenu(void) s32 currTabId = 0; if (!IsRecruitingEnabled(gDungeon->unk644.dungeonLocation.id)) { - DisplayDungeonMessage(NULL, gUnknown_80FA5F4, TRUE); + DisplayDungeonMessage_Async(NULL, gUnknown_80FA5F4, TRUE); } else if (gDungeon->unk644.unk19) { - DisplayDungeonMessage(NULL, gUnknown_80FA61C, TRUE); + DisplayDungeonMessage_Async(NULL, gUnknown_80FA61C, TRUE); } else { struct MonRecruitList tabsData[2]; SetRecruitableMons(tabsData); - while (1) { + while (TRUE) { bool8 closeWindow = FALSE; struct MonRecruitList *currTabData = &tabsData[currTabId]; @@ -102,7 +102,7 @@ void ShowRecruitmentSearchMenu(void) gDungeonMenu.leftRightArrowsPos.x = (gWindows[0].x + 16) * 8; gDungeonMenu.leftRightArrowsPos.y = ((gWindows[0].y + 1) * 8) - 2; - while (1) { + while (TRUE) { s32 touchScreenArrow; bool8 scroll = FALSE; @@ -325,7 +325,7 @@ static void SetRecruitableMons(struct MonRecruitList *tabsData) unrecruitableRate = (u16) -999; if (recruitRate == unrecruitableRate) continue; - if (speciesId == MONSTER_MEW && !sub_80860A8(122)) + if (speciesId == MONSTER_MEW && !ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) continue; } else { diff --git a/src/dungeon_menu_stairs.c b/src/dungeon_menu_stairs.c index 899cf8b6d..cb3d146d8 100644 --- a/src/dungeon_menu_stairs.c +++ b/src/dungeon_menu_stairs.c @@ -29,17 +29,17 @@ static void ShowStairsDescription(DungeonPos *pos); // Pretty much a copy of ShowDungeonTileMenu void ShowDungeonStairsMenu(Entity *mon) { - while (1) { + while (TRUE) { s32 inputAction = 0; WindowHeader header; WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 4, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -57,7 +57,7 @@ void ShowDungeonStairsMenu(Entity *mon) gDungeonMenu.cursorArrowPos.y = 0; CreateDungeonMenuSubWindow(&windows.id[0], 22); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x2E); if (gRealInputs.repeated & DPAD_DOWN) { @@ -146,7 +146,7 @@ static void AddStairsSubMenuOptions(Entity *mon) // Again, almost identical to its Tile counterpart. static void ShowStairsDescription(DungeonPos *pos) { - while (1) { + while (TRUE) { u8 floorType; bool8 bPress; STATUSTEXTS(statuses); @@ -156,10 +156,10 @@ static void ShowStairsDescription(DungeonPos *pos) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 26, .height = 12, - .unk10 = 12, + .totalHeight = 12, .unk12 = 0, .header = &header, }, @@ -183,7 +183,7 @@ static void ShowStairsDescription(DungeonPos *pos) PrintStringOnWindow(8, 24, gUnknown_80F7F70[floorType], 0, '\0'); sub_80073E0(0); statusesCount = PrepareStatusStringArrays(gUnknown_80F7F70[floorType], statuses); - while (1) { + while (TRUE) { if (statusesCount != 0) { ShowStatusDescriptionMenuArrow(); } @@ -205,7 +205,7 @@ static void ShowStairsDescription(DungeonPos *pos) for (i = 0; i < statusesCount; i++) { ShowStatusDescriptionMenu(statuses[i], &menuSub); - while (1) { + while (TRUE) { if (i < statusesCount - 1) { ShowStatusDescriptionMenuArrow(); } diff --git a/src/dungeon_menu_team.c b/src/dungeon_menu_team.c index 080bd3586..e5e5865a8 100644 --- a/src/dungeon_menu_team.c +++ b/src/dungeon_menu_team.c @@ -83,10 +83,10 @@ bool8 ShowDungeonTeamMenu(Entity *a0) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 14, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &sTeamWindowHeader, }, @@ -108,14 +108,14 @@ bool8 ShowDungeonTeamMenu(Entity *a0) windows.id[0].pos.y++; } - while (1) { + while (TRUE) { s32 id; bool32 r4; ret = FALSE; PrintOnDungeonTeamMenu(&sp, &windows, TRUE); r10 = FALSE; - while (1) { + while (TRUE) { s32 id = sp.unk4[gDungeonMenu.menuIndex]; if (id >= 0) { Entity *teamMon = gDungeon->teamPokemon[id]; @@ -182,7 +182,7 @@ bool8 ShowDungeonTeamMenu(Entity *a0) } CreateDungeonMenuSubWindow(&windows.id[0], 0x12); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1B); if (gRealInputs.repeated & DPAD_DOWN) { @@ -278,7 +278,7 @@ static void PrintOnDungeonTeamMenu(struct UnkFieldTeamMenuStruct *a0, WindowTemp if (withHeader) { height += 2; } - windows->id[0].unk10 = height; + windows->id[0].totalHeight = height; windows->id[0].height = height; sTeamWindowHeader.width = 8; if (a2) { @@ -360,7 +360,7 @@ static void AddTeamSubMenuOptions(struct UnkFieldTeamMenuStruct *a0) AddActionToDungeonSubMenu(ACTION_CHECK_SUMMARY, 0); AddActionToDungeonSubMenu(ACTION_CHECK_MOVES, 0); if (!monInfo->isTeamLeader) { - if (!gDungeon->unk644.unk19 && (monInfo->joinedAt.id != DUNGEON_JOIN_LOCATION_PARTNER || gDungeon->unk644.unk18)) { + if (!gDungeon->unk644.unk19 && (monInfo->joinedAt.id != DUNGEON_JOIN_LOCATION_PARTNER || gDungeon->unk644.canChangeLeader)) { AddActionToDungeonSubMenu(0x34, 0); } AddActionToDungeonSubMenu(ACTION_TALK_MENU, 0); @@ -369,7 +369,7 @@ static void AddTeamSubMenuOptions(struct UnkFieldTeamMenuStruct *a0) if (!monInfo->isTeamLeader) { AddActionToDungeonSubMenu(ACTION_CHANGE_TACTICS, 0); } - if (!monInfo->isTeamLeader && gDungeon->unk644.unk18 && CanLeaderSwitch(gDungeon->unk644.dungeonLocation.id)) { + if (!monInfo->isTeamLeader && gDungeon->unk644.canChangeLeader && CanLeaderSwitch(gDungeon->unk644.dungeonLocation.id)) { bool32 r5; AddActionToDungeonSubMenu(0x3B, 0); @@ -415,10 +415,10 @@ void ShowDungeonTacticsMenu(ActionContainer *a0) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 14, - .unk10 = 18, + .totalHeight = 18, .unk12 = 2, .header = &sTeamWindowHeader, }, @@ -437,7 +437,7 @@ void ShowDungeonTacticsMenu(ActionContainer *a0) monInfo = GetEntInfo(teamMon); menuIndex = 0; scrollFirstId = 0; - while (1) { + while (TRUE) { s32 i; bool32 addCursor = TRUE; bool32 loopBreak = FALSE; @@ -465,7 +465,7 @@ void ShowDungeonTacticsMenu(ActionContainer *a0) ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); sub_80137B0(&gDungeonMenu, 0); gDungeonMenu.menuIndex = menuIndex; - while (1) { + while (TRUE) { s32 i; AddMenuCursorSprite(&gDungeonMenu); @@ -528,7 +528,7 @@ void ShowDungeonTacticsMenu(ActionContainer *a0) SetActionUnusableInDungeonSubMenu(0x2F); } CreateDungeonMenuSubWindow(&windows.id[0], 0x16); - while (1) { + while (TRUE) { changed = FALSE; AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x3D); @@ -640,10 +640,10 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 14, - .unk10 = 18, + .totalHeight = 18, .unk12 = 2, .header = &sTeamWindowHeader, }, @@ -695,7 +695,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) monSummaryInfo.unk56 = 0; gDungeonMenu.menuIndex = 0; - while (1) { + while (TRUE) { bool8 loopBreak = FALSE; bool8 hasIqSkills = FALSE; bool8 hasStatusProblems = FALSE; @@ -757,7 +757,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) gDungeonMenu.menuIndex = r8; } - while (1) { + while (TRUE) { s32 touchScreenArrow; bool8 downArrowShown, upArrowShown; @@ -973,7 +973,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) PlayDungeonConfirmationSE(); AddActionToDungeonSubMenu(0xC, 0); CreateDungeonMenuSubWindow(&windows.id[0], 0x16); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1C); if (gRealInputs.repeated & DPAD_DOWN) { @@ -1013,7 +1013,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) SetActionUnusableInDungeonSubMenu(0x28); } CreateDungeonMenuSubWindow(&windows.id[0], 0x16); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x1C); if (gRealInputs.repeated & DPAD_DOWN) { @@ -1162,7 +1162,7 @@ void ShowStatusesDescriptionMenu(s32 count, STATUSTEXTS(statuses)) ResetTouchScreenMenuInput(&menuSub); for (i = 0; i < count; i++) { ShowStatusDescriptionMenu(statuses[i], &menuSub); - while (1) { + while (TRUE) { if (i < count - 1) { ShowStatusDescriptionMenuArrow(); } @@ -1187,7 +1187,7 @@ static void ShowIqDescriptionWindow(u8 iqSkillId) WindowHeader header; STATUSTEXTS(result); - while (1) { + while (TRUE) { s32 count; bool8 bPress; @@ -1206,7 +1206,7 @@ static void ShowIqDescriptionWindow(u8 iqSkillId) PrintFormattedStringOnWindow(8, 16, GetIQSkillDescription(iqSkillId), 0, '\0'); sub_80073E0(0); count = PrepareStatusStringArrays(GetIQSkillDescription(iqSkillId), result); - while (1) { + while (TRUE) { if (count != 0) { ShowStatusDescriptionMenuArrow(); } @@ -1230,7 +1230,7 @@ static void ShowIqDescriptionWindow(u8 iqSkillId) ShowStatusesDescriptionMenu(count, result); } - sub_803E708(4, 0x3E); + DungeonWaitFrames_Async(4, 0x3E); } static void ShowTacticDescriptionWindow(u8 tacticId) @@ -1259,7 +1259,7 @@ static void ShowTacticDescriptionWindow(u8 tacticId) PrintFormattedStringOnWindow(8, 16, GetTacticsDescription(tacticId), 0, '\0'); sub_80073E0(0); count = PrepareStatusStringArrays(GetTacticsDescription(tacticId), result); - while (1) { + while (TRUE) { if (count != 0) { ShowStatusDescriptionMenuArrow(); } @@ -1283,7 +1283,7 @@ static void ShowTacticDescriptionWindow(u8 tacticId) ShowStatusesDescriptionMenu(count, result); } - sub_803E708(4, 0x3E); + DungeonWaitFrames_Async(4, 0x3E); } static void ShowStatusInfoWindow(s32 statusId) @@ -1295,10 +1295,10 @@ static void ShowStatusInfoWindow(s32 statusId) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 26, .height = 12, - .unk10 = 12, + .totalHeight = 12, .unk12 = 0, .header = &header, }, @@ -1321,7 +1321,7 @@ static void ShowStatusInfoWindow(s32 statusId) PrintFormattedStringOnWindow(8, 16, sub_808E51C(statusId), 0, '\0'); sub_80073E0(0); - while (1) { + while (TRUE) { GetTouchScreenMenuInput(&menuSub, 0); DungeonRunFrameActions(22); if ((gRealInputs.pressed & A_BUTTON) || menuSub.a_button) { @@ -1334,25 +1334,25 @@ static void ShowStatusInfoWindow(s32 statusId) } } - sub_803E708(4, 0x3E); + DungeonWaitFrames_Async(4, 0x3E); } static const WindowHeader sBottomWindowHeader = {1, 0, 15, 0}; static const WindowTemplate sMovesSubMenu = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 10}, + .pos = { 2, 10 }, .width = 18, .height = 8, - .unk10 = 8, + .totalHeight = 8, .unk12 = 0, .header = &sBottomWindowHeader, }; static const WindowTemplate sItemSubMenu = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 10}, + .pos = { 2, 10 }, .width = 18, .height = 4, - .unk10 = 4, + .totalHeight = 4, .unk12 = 0, .header = &sBottomWindowHeader, }; @@ -1364,19 +1364,19 @@ Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId) .id = { [0] = { .type = WINDOW_TYPE_NORMAL, // Since the window has a header, it should probably be WINDOW_TYPE_WTIH_HEADER. - .pos = {14, 2}, + .pos = { 14, 2 }, .width = 14, .height = 16, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &sTeamWindowHeader, }, [1] = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 10, .height = 2, - .unk10 = 2, + .totalHeight = 2, .unk12 = 0, .header = NULL, }, @@ -1404,7 +1404,7 @@ Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId) sub_80073E0(1); prevId = -985; // Magic number or does it actually mean anything? - while (1) { + while (TRUE) { currId = unkStruct.unk4[gDungeonMenu.menuIndex]; if (currId >= 0) { @@ -1453,7 +1453,7 @@ Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId) sub_804AA60(); TryPointCameraToMonster(GetLeader(), 0); sub_803EAF0(0, NULL); - sub_803E708(4, 0x3E); + DungeonWaitFrames_Async(4, 0x3E); if (bPress) { return NULL; } diff --git a/src/dungeon_menu_tile.c b/src/dungeon_menu_tile.c index 7e37fbdce..02537ad32 100644 --- a/src/dungeon_menu_tile.c +++ b/src/dungeon_menu_tile.c @@ -27,17 +27,17 @@ static void ShowTileDescription(DungeonPos *pos); void ShowDungeonTileMenu(Entity *mon) { - while (1) { + while (TRUE) { s32 inputAction = 0; WindowHeader header; WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 18, .height = 4, - .unk10 = 16, + .totalHeight = 16, .unk12 = 0, .header = &header, }, @@ -55,7 +55,7 @@ void ShowDungeonTileMenu(Entity *mon) gDungeonMenu.cursorArrowPos.y = 0; CreateDungeonMenuSubWindow(&windows.id[0], 22); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x2D); if (gRealInputs.repeated & DPAD_DOWN) { @@ -137,7 +137,7 @@ static void AddTileSubMenuOptions(Entity *mon) static void ShowTileDescription(DungeonPos *pos) { - while (1) { + while (TRUE) { const Tile *tile; Entity *object; Trap *trap; @@ -149,10 +149,10 @@ static void ShowTileDescription(DungeonPos *pos) .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 26, .height = 12, - .unk10 = 12, + .totalHeight = 12, .unk12 = 0, .header = &header, }, @@ -185,7 +185,7 @@ static void ShowTileDescription(DungeonPos *pos) PrintStringOnWindow(8, 24, gTrapDescriptions[trap->id], 0, '\0'); sub_80073E0(0); statusesCount = PrepareStatusStringArrays(gTrapDescriptions[trap->id], statuses); - while (1) { + while (TRUE) { if (statusesCount != 0) { ShowStatusDescriptionMenuArrow(); } @@ -207,7 +207,7 @@ static void ShowTileDescription(DungeonPos *pos) for (i = 0; i < statusesCount; i++) { ShowStatusDescriptionMenu(statuses[i], &menuSub); - while (1) { + while (TRUE) { if (i < statusesCount - 1) { ShowStatusDescriptionMenuArrow(); } diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 4934b5fbe..8da0e6852 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -35,7 +35,7 @@ static EWRAM_DATA SpriteOAM sUnknown_202F1F0 = {0}; EWRAM_INIT bool8 gUnknown_203B434 = TRUE; static bool8 sub_8052DC0(Entity *); -static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2); +static void DisplayMessageAddToLog_Async(Entity *pokemon, const u8 *str, bool8 r2); void sub_80521D0(void) { @@ -74,26 +74,26 @@ void sub_805229C(void) return sub_80526D0(0x50); } -void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str) +void LogMessageByIdWithPopupCheckUser_Async(Entity *pokemon, const u8 *str) { if (ShouldDisplayEntity(pokemon)){ - DisplayMessageAddToLog(pokemon, str, TRUE); + DisplayMessageAddToLog_Async(pokemon, str, TRUE); } } -UNUSED void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str) +UNUSED void TryDisplayDungeonLoggableMessage2_Async(Entity *pokemon, const u8 *str) { if (ShouldDisplayEntity(pokemon)){ - DisplayMessageAddToLog(pokemon, str, FALSE); + DisplayMessageAddToLog_Async(pokemon, str, FALSE); } } -void DisplayDungeonLoggableMessageFalse(Entity *pokemon, const u8 *str) +void DisplayDungeonLoggableMessageFalse_Async(Entity *pokemon, const u8 *str) { - DisplayMessageAddToLog(pokemon, str, FALSE); + DisplayMessageAddToLog_Async(pokemon, str, FALSE); } -void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str) +void TryDisplayDungeonLoggableMessage3_Async(Entity *attacker, Entity *target, const u8 *str) { u8 flag; flag = ShouldDisplayEntity(attacker) ? TRUE : FALSE; @@ -103,11 +103,11 @@ void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u } if(flag) { - DisplayMessageAddToLog(attacker, str, TRUE); + DisplayMessageAddToLog_Async(attacker, str, TRUE); } } -void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str) +void TryDisplayDungeonLoggableMessage4_Async(Entity *attacker, Entity *target, const u8 *str) { u8 flag; flag = ShouldDisplayEntity(attacker) ? TRUE : FALSE; @@ -117,11 +117,11 @@ void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u } if(flag) { - DisplayMessageAddToLog(attacker, str, FALSE); + DisplayMessageAddToLog_Async(attacker, str, FALSE); } } -void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, const u8 *str) +void LogMessageByIdWithPopupCheckUserUnknown_Async(Entity *pokemon, DungeonPos *pos, const u8 *str) { u8 flag; flag = ShouldDisplayEntity(pokemon) ? TRUE : FALSE; @@ -131,16 +131,16 @@ void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, c } if(flag) { - DisplayMessageAddToLog(pokemon, str, TRUE); + DisplayMessageAddToLog_Async(pokemon, str, TRUE); } } -void DisplayDungeonLoggableMessageTrue(Entity *pokemon, const u8 *str) +void DisplayDungeonLoggableMessageTrue_Async(Entity *pokemon, const u8 *str) { - DisplayMessageAddToLog(pokemon, str, TRUE); + DisplayMessageAddToLog_Async(pokemon, str, TRUE); } -static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2) +static void DisplayMessageAddToLog_Async(Entity *pokemon, const u8 *str, bool8 r2) { u8 txt[64]; bool8 r7; @@ -157,8 +157,8 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2) sLastLogMsgEntity = pokemon; gUnknown_203B434 = FALSE; r9 = FALSE; - while (1) { - while (1) { + while (TRUE) { + while (TRUE) { s32 val = gDungeon->unk1BDD4.unk1C060; if (++val == UNK_1BBD4_STR_COUNT) { val = 0; @@ -190,7 +190,7 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2) } if (r9) { - gDungeon->unk1BDD4.unk1C064 = 0xF0; + gDungeon->unk1BDD4.unk1C064 = 240; if (gDungeon->unk1BDD4.unk1C06C == 0) { gDungeon->unk1BDD4.unk1C06C = 1; } @@ -229,7 +229,7 @@ void xxx_draw_string_80524F0(void) AddDoubleUnderScoreHighlight(0, 0, strPtr->unk1C066 - 1, 0xE0, 7); } - while (1) { + while (TRUE) { txtPtr = HandleSpecialCharFormat(txtPtr, &sp); if (*txtPtr == '\0' || *txtPtr == '\r' || *txtPtr == '\n') break; @@ -298,18 +298,18 @@ void sub_8052740(s32 a0) } // Prints string in dialogue box and waits for A/B button press -#define PRINT_STRING_WAIT_PRESS(chosenMenuIndex) \ +#define PRINT_STRING_WAIT_PRESS_ASYNC(chosenMenuIndex) \ { \ s32 unkPrintRet; \ \ do { \ - DrawDialogueBoxString(); \ + DrawDialogueBoxString_Async(); \ DungeonRunFrameActions(9); \ unkPrintRet = sub_80144A4(chosenMenuIndex);\ } while (unkPrintRet != 0); \ } -void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2) +void DisplayDungeonMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2) { MonPortraitMsg monPortrait, *monPortraitPtr; s32 chosenMenuIndex; @@ -341,7 +341,7 @@ void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 CreateMenuDialogueBoxAndPortrait(str, 0, 0, NULL, NULL, 3, 0, monPortraitPtr, (a2 != FALSE) ? 0x701 : 0x400); gDungeon->unk1BDD4.unk1C05F = 1; - PRINT_STRING_WAIT_PRESS(&chosenMenuIndex); + PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex); gDungeon->unk1BDD4.unk1C05F = 0; if (monPortrait.faceFile != NULL) { @@ -359,18 +359,18 @@ void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 } } - sub_803E708(8, 9); + DungeonWaitFrames_Async(8, 9); } void DisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str) { - DisplayDungeonMessage(NULL, str, TRUE); - DisplayDungeonLoggableMessageFalse(pokemon, str); + DisplayDungeonMessage_Async(NULL, str, TRUE); + DisplayDungeonLoggableMessageFalse_Async(pokemon, str); } static const u16 sUnknownDialogueFlags[] = {0x30D, 0x10D, 0x30D, 0x10D, 0x301, 1, 0x11}; -void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo) +void DisplayDungeonDialogue_Async(const struct DungeonDialogueStruct *dialogueInfo) { MonPortraitMsg monPortrait; s32 leaderId, partnerId, dialogueMonId; @@ -426,7 +426,7 @@ void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo) InlineStrcpy(gSpeakerNameBuffer, _("{COLOR YELLOW}{SPEECH_BUBBLE}{RESET}")); } - while (1) { + while (TRUE) { if (dialogueInfo->allowType == DIALOGUE_ALLOW_ALL) break; if (dialogueInfo->allowType == DIALOGUE_ONLY_SQUIRTLE_TOTODILE && (dialogueMonId == MONSTER_SQUIRTLE || dialogueMonId == MONSTER_TOTODILE)) @@ -468,7 +468,7 @@ void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo) sub_803EAF0(2, NULL); sub_8052210(FALSE); CreateDialogueBoxAndPortrait(dialogueInfo->str, 0, monPortraitPtr, sUnknownDialogueFlags[dialogueInfo->type]); - PRINT_STRING_WAIT_PRESS(&chosenMenuIndex); + PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex); if (monPortraitPtr != NULL) { CloseFile(monPortraitPtr->faceFile); @@ -478,10 +478,10 @@ void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo) LoadDungeonMapPalette(); sub_803EAF0(0, NULL); } - sub_803E708(8, 9); + DungeonWaitFrames_Async(8, 9); } -bool32 DisplayDungeonYesNoMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool32 defaultYes) +bool32 DisplayDungeonYesNoMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool32 defaultYes) { MonPortraitMsg monPortrait, *monPortraitPtr; s32 chosenMenuIndex; @@ -515,7 +515,7 @@ bool32 DisplayDungeonYesNoMessage(struct MonDialogueSpriteInfo *monSpriteInfo, c CreateYesNoDialogueBoxAndPortrait_DefaultNo(str, monPortraitPtr, 0x300); // Yes/No - cursor starts at NO } - PRINT_STRING_WAIT_PRESS(&chosenMenuIndex); + PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex); if (monPortrait.faceFile != NULL) { CloseFile(monPortrait.faceFile); @@ -558,7 +558,7 @@ s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const } CreateMenuDialogueBoxAndPortrait(str, 0, -1, menuItems, NULL, 3, 0, monPortraitPtr, unkArg); - PRINT_STRING_WAIT_PRESS(&chosenMenuIndex); + PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex); if (monPortrait.faceFile != NULL) { CloseFile(monPortrait.faceFile); @@ -569,24 +569,24 @@ s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const return chosenMenuIndex; } -void sub_8052D44(s16 *ids, Entity *leader, Entity *partner) +void BufferCutsceneProtagonists(s16 destIDs[2], Entity *leader, Entity *partner) { if (EntityIsValid(leader)) { - SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], leader, 0); - ids[0] = GetEntInfo(leader)->apparentID; + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], leader, COLOR_WHITE); + destIDs[0] = GetEntInfo(leader)->apparentID; } else { InlineStrcpy(gFormatBuffer_Monsters[0], "??"); - ids[0] = 0; + destIDs[0] = 0; } if (EntityIsValid(partner)) { - SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], partner, 0); - ids[1] = GetEntInfo(partner)->apparentID; + SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], partner, COLOR_WHITE); + destIDs[1] = GetEntInfo(partner)->apparentID; } else { InlineStrcpy(gFormatBuffer_Monsters[1], "??"); - ids[1] = 0; + destIDs[1] = 0; } } @@ -595,7 +595,7 @@ static bool8 sub_8052DC0(Entity *entity) return ShouldDisplayEntity(entity); } -static inline bool32 DislayTutorialMsg(Entity *leader, const struct TutorialFlagMsg *tutorial, bool32 unkFunctionCall) +static inline bool32 DislayTutorialMsg(Entity *leader, const TutorialFlagMsg *tutorial, bool32 unkFunctionCall) { const u8 *str; s32 flag = tutorial->flagId; @@ -605,9 +605,9 @@ static inline bool32 DislayTutorialMsg(Entity *leader, const struct TutorialFlag SetTutorialFlag(flag); sub_8083E28(); str = tutorial->str; - DisplayDungeonMessage(NULL, str, TRUE); + DisplayDungeonMessage_Async(NULL, str, TRUE); if (unkFunctionCall) { - DisplayDungeonLoggableMessageFalse(leader, str); + DisplayDungeonLoggableMessageFalse_Async(leader, str); } return TRUE; } @@ -662,10 +662,10 @@ void DisplayItemTip(u8 itemId) void DisplayYouReachedDestFloorStr(void) { if (gDungeon->unkA != 0) { - DisplayDungeonMessage(NULL, gUnknown_80FF6F8, 1); // But the pokemon you seek isn't here... + DisplayDungeonMessage_Async(NULL, gUnknown_80FF6F8, 1); // But the pokemon you seek isn't here... } else { - DisplayDungeonMessage(NULL, gUnknown_80FF6A4, 1); + DisplayDungeonMessage_Async(NULL, gUnknown_80FF6A4, 1); } } @@ -682,7 +682,7 @@ void sub_8052FB8(const u8 *str) CreateMenuDialogueBoxAndPortrait(str, 0, 0, NULL, NULL, 2, 0, NULL, 0x30); r9 = 0; - while (1) { + while (TRUE) { if (r8 < 62) { r8++; for (j = 0; j < 8; j++) { @@ -711,7 +711,7 @@ void sub_8052FB8(const u8 *str) if (gRealInputs.pressed & AB_BUTTONS) break; } - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); DungeonRunFrameActions(9); } @@ -719,7 +719,7 @@ void sub_8052FB8(const u8 *str) for (j = 0; j < 8; j++) { SetBGPaletteBufferColorRGB(240 + j, &gFontPalette[j], r8 / 2, NULL); } - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); DungeonRunFrameActions(9); r8--; } @@ -730,12 +730,12 @@ void sub_8052FB8(const u8 *str) for (j = 0; j < 8; j++) { SetBGPaletteBufferColorArray(240 + j, &gFontPalette[j]); } - sub_803E708(8, 9); + DungeonWaitFrames_Async(8, 9); } const u8 *GetCurrentDungeonName(void) { - if (gDungeon->unk644.unk34 == 1) { + if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { return GetDungeonName1(DUNGEON_OUT_ON_RESCUE); } else { diff --git a/src/dungeon_message_log.c b/src/dungeon_message_log.c index d0cc19949..91b37b6cd 100644 --- a/src/dungeon_message_log.c +++ b/src/dungeon_message_log.c @@ -94,7 +94,7 @@ bool32 DisplayMessageLog(void) sMessageLogFlags = 0; PutStringsOnMessageLog(); - while (1) { + while (TRUE) { s32 touchScreenArrow; bool32 scroll = FALSE; @@ -170,7 +170,7 @@ static bool8 TryScrollLogUp(s32 touchScreenArrow) s32 y; s32 arrId; - while (1) + while (TRUE) { arrId = gDungeon->unk16 + sMessageLogCursor; y = 2; @@ -221,7 +221,7 @@ static bool8 TryScrollLogDown(s32 touchScreenArrow) s32 y; s32 arrId; - while (1) + while (TRUE) { arrId = gDungeon->unk16 + sMessageLogCursor; y = 128; diff --git a/src/dungeon_misc.c b/src/dungeon_misc.c index a7701e608..2e7729549 100644 --- a/src/dungeon_misc.c +++ b/src/dungeon_misc.c @@ -235,13 +235,13 @@ void sub_8068A84(Pokemon *pokemon) if (totalBodySize >= 7) { PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,0); if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) { - DisplayDungeonMessage(0,gUnknown_80FE0F4,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0F4,1); } else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) { - DisplayDungeonMessage(0,gUnknown_80FE0F8,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0F8,1); } else { - DisplayDungeonMessage(0,gUnknown_80FE0AC,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0AC,1); } } else { @@ -258,26 +258,26 @@ void sub_8068A84(Pokemon *pokemon) ZeroOutItem(&monPtr->itemSlot); PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,6); if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) { - DisplayDungeonMessage(0,gUnknown_80FE168,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE168,1); } else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) { ; } else { - DisplayDungeonMessage(0,gUnknown_80FE134,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE134,1); } return; } } PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,6); if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) { - DisplayDungeonMessage(0,gUnknown_80FE0F4,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0F4,1); } else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) { - DisplayDungeonMessage(0,gUnknown_80FE0F8,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0F8,1); } else { - DisplayDungeonMessage(0,gUnknown_80FE0AC,1); + DisplayDungeonMessage_Async(0,gUnknown_80FE0AC,1); } } } @@ -370,8 +370,8 @@ void sub_8068BDC(bool8 a0) } else { WriteFriendAreaName(gFormatBuffer_Items[0], friendAreaId, FALSE); - DisplayDungeonMessage(NULL, gUnknown_80FE1A4, TRUE); // The Friend Area is full, a friend must be released. - while (1) { + DisplayDungeonMessage_Async(NULL, gUnknown_80FE1A4, TRUE); // The Friend Area is full, a friend must be released. + while (TRUE) { ShowRecruitReleaseMenu(friendAreaId, j - areaCapacity.maxPokemon, j, monPointers); for (id = 0; id < j; id++) { Pokemon *monPtr = monPointers[id]; @@ -384,7 +384,7 @@ void sub_8068BDC(bool8 a0) if (id == j) break; - if (DisplayDungeonYesNoMessage(NULL, gUnknown_80FE20C, TRUE) == TRUE) // If you dismiss this mon, it may never join you again. Bid farewell to it? + if (DisplayDungeonYesNoMessage_Async(NULL, gUnknown_80FE20C, TRUE) == TRUE) // If you dismiss this mon, it may never join you again. Bid farewell to it? break; } @@ -447,7 +447,7 @@ static inline void ClearMonItemId(Pokemon *mon) mon->heldItem.id = ITEM_NOTHING; } -void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) +void HandleFaint_Async(Entity *entity, s32 dungeonExitReason_, Entity *param_3) { u16 joinId; Entity EStack_a4; @@ -486,7 +486,7 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) entity->isVisible = FALSE; gLeaderPointer = NULL; joinId = entInfo->joinedAt.id; - if (joinId == DUNGEON_JOIN_LOCATION_PARTNER && gDungeon->unk644.unk18 == 0) { + if (joinId == DUNGEON_JOIN_LOCATION_PARTNER && !gDungeon->unk644.canChangeLeader) { gDungeon->unk10 = 1; entInfo->HP = 0; SubstitutePlaceholderStringTags(gDungeon->faintStringBuffer,entity,0); @@ -498,20 +498,20 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) joinId = entity->isVisible; joinId = entity->unk22;joinId = entity->isVisible; joinId = entity->unk22;joinId = entity->isVisible; joinId = entity->unk22; #endif if (entInfo->isTeamLeader) { - sub_803E708(0x3c,0x49); + DungeonWaitFrames_Async(0x3c,0x49); DisplayMessageLog(); if (gDungeon->unk6 == 0) { if (gDungeon->unk644.stoleFromKecleon == 0 && dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT && dungeonExitReason != DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT && dungeonExitReason != DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE - && gDungeon->unk3A0D == 0 + && gDungeon->cutscene == CUTSCENE_NONE && gDungeon->unk644.unk37 >= 0 - && gDungeon->unk644.unk34 != TRUE) + && gDungeon->unk644.missionKind != DUNGEON_MISSION_OUTONRESCUE) { if (gDungeon->unk644.unk37 > 0) { - if (DisplayDungeonYesNoMessage(NULL,gUnknown_80FE268,1) == 1) { - DisplayDungeonMessage(NULL,gUnknown_80FE28C,1); + if (DisplayDungeonYesNoMessage_Async(NULL,gUnknown_80FE268,1) == 1) { + DisplayDungeonMessage_Async(NULL,gUnknown_80FE28C,1); gDungeon->unk4 = 1; gDungeon->unk6 = 1; gDungeon->unk644.unk10 = 1; @@ -520,7 +520,7 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) } } else { - DisplayDungeonMessage(NULL,gUnknown_80FE2D0,1); + DisplayDungeonMessage_Async(NULL,gUnknown_80FE2D0,1); } } } @@ -579,10 +579,10 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) } if (GetLeader() != NULL && dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT && !entInfo->isTeamLeader && !gDungeon->unk10) { - sub_8084E00(entity,entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND); + HandleBossFaint_Async(entity, entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND); if (IS_DEOXYS_FORM_MONSTER(entInfo->apparentID) && !IsFloorwideFixedRoom() && entInfo->isNotTeamMember) { gDungeon->deoxysDefeat = 1; - DisplayDungeonLoggableMessageTrue(entity,gUnknown_80FA580); + DisplayDungeonLoggableMessageTrue_Async(entity,gUnknown_80FA580); sub_803E178(); UpdateTrapsVisibility(); } @@ -605,7 +605,7 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3) if (entInfo->isTeamLeader) { uVar10 = TRUE; } - if (gDungeon->unk644.unk18 == 0 && entInfo->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER) { + if (!gDungeon->unk644.canChangeLeader && entInfo->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER) { uVar10 = TRUE; } @@ -846,7 +846,7 @@ void SetMonSummaryInfoFromEntity(struct MonSummaryInfo *param_1, Entity *target) param_1->unk44[0].level = 0; param_1->unk44[1].level = 0; param_1->IQSkills = info->IQSkillMenuFlags; - if (gDungeon->unk644.unk16 != 0) { + if (gDungeon->unk644.unlockedEvolutions) { param_1->evoStringId = sub_806A4DC(info); } else { @@ -1146,7 +1146,7 @@ void sub_8069F9C(Entity *pokemon, Entity *target, Move *move) targetInfo->abilities[abilityIndex] = abilities[randomIndex]; gDungeon->unkC = 1; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCC7C); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCC7C); sub_8042900(target); EndAbilityImmuneStatus(pokemon, target); } @@ -1170,7 +1170,7 @@ void sub_8069F9C(Entity *pokemon, Entity *target, Move *move) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); str = GetUnformattedTypeString(targetInfo->types[0]); strcpy(gFormatBuffer_Items[0], str); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCAC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCAC); sub_8042968(target); } } @@ -1195,7 +1195,7 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); typeString = GetUnformattedTypeString(uVar2_u32); strcpy(gFormatBuffer_Items[0],typeString); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCC8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCC8); } } } @@ -1256,12 +1256,12 @@ void TryPointCameraToMonster(Entity *pokemon, u8 param_2) { if ((EntityIsValid(pokemon)) && (GetEntityType(pokemon) == ENTITY_MONSTER) && (gDungeon->unk181e8.cameraTarget != pokemon)) { if (param_2 != '\0') { - sub_804178C(1); + sub_804178C_Async(1); while (gDungeon->unk12 < 0x3c) { DungeonRunFrameActions(0x34); } } - sub_803E708(4,0x44); + DungeonWaitFrames_Async(4,0x44); PointCameraToMonster(pokemon); DiscoverMinimap(&pokemon->pos); gDungeon->unk12 = 0; @@ -1352,6 +1352,7 @@ bool8 sub_806A458(Entity *pokemon) return (count > 1); } +// Evolution string related s32 sub_806A4DC(EntityInfo *info) { Pokemon pokemon; @@ -1458,7 +1459,7 @@ void sub_806A5B8(Entity *entity) } if (str != NULL) { - LogMessageByIdWithPopupCheckUser(entity, str); + LogMessageByIdWithPopupCheckUser_Async(entity, str); } } } @@ -1542,7 +1543,7 @@ void DisplayMsgIfNewIqSkillLearned(EntityInfo *info, s32 iqBefore) if (hadIqSkillBefore != hasIqSkillNow) { strcpy(gFormatBuffer_Items[0], GetIQSkillName(i)); - DisplayDungeonLoggableMessageTrue(NULL, gUnknown_80FEAC4); // IQ rose! \n It learned the IQ skill 'i0' + DisplayDungeonLoggableMessageTrue_Async(NULL, gUnknown_80FEAC4); // IQ rose! \n It learned the IQ skill 'i0' } } } @@ -1604,13 +1605,13 @@ void sub_806A9B4(Entity *entity, s32 moveIndex) s32 ret = sub_80935B8(info->moves.moves, moveIndex); if (ret == 0) { - LogMessageByIdWithPopupCheckUser(entity, gPtrLinkedMovesComeApartMessage); + LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkedMovesComeApartMessage); } else if (ret == 1) { - LogMessageByIdWithPopupCheckUser(entity, gPtrLinkMoveOneUseWarningMessage); + LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkMoveOneUseWarningMessage); } else if (ret == 2) { - LogMessageByIdWithPopupCheckUser(entity, gPtrLinkMoveTwoUsesWarningMessage); + LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkMoveTwoUsesWarningMessage); } } } diff --git a/src/dungeon_mon_recruit.c b/src/dungeon_mon_recruit.c index e0bf3e86c..3b9820641 100644 --- a/src/dungeon_mon_recruit.c +++ b/src/dungeon_mon_recruit.c @@ -48,16 +48,14 @@ bool8 TryRecruitMonster(Entity *attacker, Entity *target) if (gDungeon->fixedRoomNumber != FIXED_ROOM_FROSTY_GROTTO_ARTICUNO && gDungeon->fixedRoomNumber != FIXED_ROOM_MT_BLAZE_PEAK_MOLTRES && gDungeon->fixedRoomNumber != FIXED_ROOM_WESTERN_CAVE_MEWTWO - && gDungeon->fixedRoomNumber != FIXED_ROOM_MT_FARAWAY_HO_OH - ) { - if (gDungeon->fixedRoomNumber >= FIXED_ROOM_TEAM_SHIFTY_BOSS - && gDungeon->fixedRoomNumber <= FIXED_ROOM_RESCUE_TEAM_2_BOSS - ) { - if (gDungeon->unk644.unk18 == 0) + && gDungeon->fixedRoomNumber != FIXED_ROOM_MT_FARAWAY_HO_OH) { + + if (gDungeon->fixedRoomNumber >= FIXED_ROOM_TEAM_SHIFTY_BOSS && gDungeon->fixedRoomNumber <= FIXED_ROOM_RESCUE_TEAM_2_BOSS) { + if (!gDungeon->unk644.canChangeLeader) return FALSE; } else if (gDungeon->fixedRoomNumber == FIXED_ROOM_RESCUE_TEAM_MAZE_BOSS) { - if (gDungeon->unk644.unk15 == 0) + if (!gDungeon->unk644.canRecruitRescueTeamMazeBosses) return FALSE; if (!sub_8097900(MONSTER_DEOXYS_NORMAL)) return FALSE; @@ -85,8 +83,7 @@ bool8 TryRecruitMonster(Entity *attacker, Entity *target) targetInfo->id == MONSTER_REGIROCK || targetInfo->id == MONSTER_REGICE || targetInfo->id == MONSTER_REGISTEEL) - && HasRecruitedMon(targetInfo->id)) - { + && HasRecruitedMon(targetInfo->id)) { return FALSE; } @@ -107,9 +104,9 @@ bool8 TryRecruitMonster(Entity *attacker, Entity *target) if (recruitRate == -999) return FALSE; - if (HasHeldItem(attacker, ITEM_FRIEND_BOW)) { + if (HasHeldItem(attacker, ITEM_FRIEND_BOW)) recruitRate += gFriendBowRecruitRateUpValue; - } + recruitRate += gRecruitRateByLevel[attackerInfo->level]; if (rand >= recruitRate) return FALSE; @@ -191,10 +188,10 @@ bool8 IsMonsterRecruitable(s32 species) if (!gDungeon->unk644.canRecruit) { return FALSE; } - else if (!sub_808529C(id)) { + else if (!MonCutsceneCompleted(id)) { return FALSE; } - else if (id == MONSTER_MEW && gDungeon->unk644.unk34 == 1) { + else if (id == MONSTER_MEW && gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { return FALSE; } else if (id == MONSTER_LATIAS) { @@ -225,7 +222,7 @@ bool8 IsMonsterRecruitable(s32 species) } } -bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3) +bool8 MonsterJoinSequence_Async(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3) { DungeonMon *dungeonMon; int pokeIndex; @@ -241,9 +238,9 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru sub_806CE68(entity2, direction); CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[0],param_3->id); - if (DisplayDungeonYesNoMessage(0,gUnknown_80F9FE8,1) == 0) { + if (DisplayDungeonYesNoMessage_Async(0,gUnknown_80F9FE8,1) == 0) { if (param_3->id != MONSTER_JIRACHI) { - LogMessageByIdWithPopupCheckUser(entity1,gText_Pokemon0WentAway); + LogMessageByIdWithPopupCheckUser_Async(entity1,gText_Pokemon0WentAway); } return FALSE; } @@ -254,7 +251,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru } if (pokeIndex == MAX_TEAM_MEMBERS) { - LogMessageByIdWithPopupCheckUser(entity1,gText_ThePokemonCouldntJoinTeam); + LogMessageByIdWithPopupCheckUser_Async(entity1,gText_ThePokemonCouldntJoinTeam); return FALSE; } @@ -262,7 +259,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru UnlockFriendArea(friendArea); unlockedFriendArea = TRUE; } - HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1); + HandleFaint_Async(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1); dungeonMon = &gRecruitedPokemonRef->dungeonTeam[pokeIndex]; dungeonMon->flags = POKEMON_FLAG_EXISTS | POKEMON_FLAG_ON_TEAM; dungeonMon->isTeamLeader = FALSE; @@ -294,25 +291,25 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru IncrementAdventureNumJoined(); if (SpawnTeamMember(param_3->id,param_3->pos.x,param_3->pos.y,dungeonMon,&local_2c,0,1) == 0) { - LogMessageByIdWithPopupCheckUser(entity1,gText_ButItCouldntJoinTheTeam); + LogMessageByIdWithPopupCheckUser_Async(entity1,gText_ButItCouldntJoinTheTeam); dungeonMon->flags = 0; } else { sub_8083D88(); - sub_803E708(0xa0,0x46); - if (DisplayDungeonYesNoMessage(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) { + DungeonWaitFrames_Async(0xa0,0x46); + if (DisplayDungeonYesNoMessage_Async(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) { while (DungeonGiveNameToRecruitedMon(dungeonMon->name) == 0) { - DisplayDungeonMessage(0,gText_PleaseGiveNicknameNewMember,TRUE); + DisplayDungeonMessage_Async(0,gText_PleaseGiveNicknameNewMember,TRUE); } } sub_808D9DC(gFormatBuffer_Monsters[0],dungeonMon,0); - LogMessageByIdWithPopupCheckUser(entity1,gText_Pokemon0JoinedToGoOnAdventures); + LogMessageByIdWithPopupCheckUser_Async(entity1,gText_Pokemon0JoinedToGoOnAdventures); if (unlockedFriendArea) { Entity *leader = CutsceneGetLeader(); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); sub_8092558(gFormatBuffer_FriendArea, friendArea); PlaySound(0xce); - DisplayDungeonMessage(0,gText_Pokemon0GainedAccessToFriendArea,1); + DisplayDungeonMessage_Async(0,gText_Pokemon0GainedAccessToFriendArea,1); } if (param_3->id == MONSTER_MEW) { gDungeon->unk4 = 1; @@ -419,14 +416,14 @@ bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **e unlockedFriendArea = TRUE; } IncrementAdventureNumJoined(); - HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1); + HandleFaint_Async(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1); if (SpawnTeamMember(local_74.id,local_74.pos.x,local_74.pos.y,dungeonMon,&local_2c,0,0) == 0) { dungeonMon->flags = 0; } else { - if (DisplayDungeonYesNoMessage(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) { + if (DisplayDungeonYesNoMessage_Async(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) { while (!DungeonGiveNameToRecruitedMon(dungeonMon->name)) { - DisplayDungeonMessage(0,gText_PleaseGiveNicknameNewMember,TRUE); + DisplayDungeonMessage_Async(0,gText_PleaseGiveNicknameNewMember,TRUE); } } if (unlockedFriendArea) { @@ -434,7 +431,7 @@ bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **e SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0); sub_8092558(gFormatBuffer_FriendArea, friendArea); PlaySound(0xce); - DisplayDungeonMessage(0,gText_Pokemon0GainedAccessToFriendArea,1); + DisplayDungeonMessage_Async(0,gText_Pokemon0GainedAccessToFriendArea,1); } sub_808D9DC(gFormatBuffer_Monsters[3],dungeonMon,0); *entityPtr = local_2c; diff --git a/src/dungeon_mon_spawn.c b/src/dungeon_mon_spawn.c index 069c428bc..5c3adfe1b 100644 --- a/src/dungeon_mon_spawn.c +++ b/src/dungeon_mon_spawn.c @@ -255,7 +255,7 @@ void sub_806B168(void) } } - if (gDungeon->unk644.unk18 == 0) { + if (!gDungeon->unk644.canChangeLeader) { for (i = 0; i < MAX_TEAM_MEMBERS; i++) { DungeonMon *currMonPtr = monPtrs[i]; if (currMonPtr != NULL && currMonPtr->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER) { @@ -292,7 +292,7 @@ void sub_806B168(void) skipSecondLoop = FALSE; j = 0; - while (1) { + while (TRUE) { unkPosition = gUnknown_80F4598[j]; if (unkPosition.x == 99) break; @@ -310,7 +310,7 @@ void sub_806B168(void) continue; j = 0; - while (1) { + while (TRUE) { unkPosition = gUnknown_80F4598[j]; if (unkPosition.x == 99) break; @@ -371,7 +371,7 @@ void sub_806B404(void) currMonPtr->recruitedPokemonId = UNK_RECRUITED_POKEMON_ID_5AA5; skipNextLoop = FALSE; j = 0; - while (1) { + while (TRUE) { unkPosition = gUnknown_80F4598[j]; if (unkPosition.x == 99) break; @@ -390,7 +390,7 @@ void sub_806B404(void) skipNextLoop = FALSE; j = 0; - while (1) { + while (TRUE) { unkPosition = gUnknown_80F4598[j]; if (unkPosition.x == 99) break; @@ -444,7 +444,7 @@ void SpawnWildMonsOnFloor(void) s32 x, y; bool8 r8 = (gDungeon->unk644.unk44 != 0); - if (sub_80860A8(ITEM_MUSIC_BOX) && !HasRecruitedMon(MONSTER_MEW)) { + if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX) && !HasRecruitedMon(MONSTER_MEW)) { gDungeon->unk37FF = FALSE; } else { diff --git a/src/dungeon_monster_house.c b/src/dungeon_monster_house.c index 4ea690223..37e9506ad 100644 --- a/src/dungeon_monster_house.c +++ b/src/dungeon_monster_house.c @@ -75,7 +75,7 @@ void TryWakeSleepingWildPokemon(void) } } -void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse) +void TriggerMonsterHouse_Async(Entity *entity, bool8 forcedMonsterHouse) { u8 monsterHouseRoomId; DungeonPos positions[100]; @@ -170,7 +170,7 @@ void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse) if (newMonster->unk1C < IntToF248(1)) { break; } - DungeonRunFrameActions(0x57); + DungeonRunFrameActions(87); } newMonster->unk1C = IntToF248(0); } @@ -179,6 +179,6 @@ void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse) } - sub_804178C(1); + sub_804178C_Async(1); } diff --git a/src/dungeon_move.c b/src/dungeon_move.c index b4e03e5be..1e84be40f 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -46,7 +46,7 @@ extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *); -static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_); +static s32 TryHitTarget_Async(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_); EWRAM_DATA s32 gUnknown_202F208 = 0; EWRAM_DATA s32 gUnknown_202F20C = 0; @@ -99,7 +99,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, && GetEntInfo(snatchMon)->dungeonSpriteId == gDungeon->unk17B3C && targetInfo->unkFF == 0) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FCD28); // The move was snatched. + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FCD28); // The move was snatched. currTarget = snatchMon; } } @@ -112,7 +112,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, && ((targetInfo->unkFF == 0 && lightRodInfo->unkFF == 0) || currTarget == lightRodMon)) { sub_8042930(lightRodMon); - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FCD0C); // A Lightningrod took the move + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FCD0C); // A Lightningrod took the move currTarget = lightRodMon; lightRodRedirect = TRUE; } @@ -127,7 +127,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, s32 direction1 = targetInfo->action.direction; s32 direction2 = targetInfo->action.direction; if (IsFloorwideFixedRoom()) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD88); // A mysterious force prevents moves from being passed off! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD88); // A mysterious force prevents moves from being passed off! } else { s32 j; @@ -142,25 +142,25 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, s32 k; for (k = 0; k < 24; k++) { sub_806CE68(currTarget, direction1); - sub_803E708(2, 0x43); + DungeonWaitFrames_Async(2, 0x43); direction1++; direction1 &= DIRECTION_MASK; } while (direction1 != direction2) { sub_806CE68(currTarget, direction1); - sub_803E708(2, 0x43); + DungeonWaitFrames_Async(2, 0x43); direction1++; direction1 &= DIRECTION_MASK; } sub_806CE68(currTarget, direction1); - sub_803E708(2, 0x43); + DungeonWaitFrames_Async(2, 0x43); } targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gPassScarfBellyDownValue)); if (move->id == MOVE_REGULAR_ATTACK) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off } else { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD20); // Move was passed off + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD20); // Move was passed off } currTargetSaved = currTarget; currTarget = tileEntity; @@ -169,10 +169,10 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, } if (j == 8) { if (move->id == MOVE_REGULAR_ATTACK) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDAC); // There's no one to pass off to! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDDAC); // There's no one to pass off to! } else { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD48); //There's no one to pass off to! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD48); //There's no one to pass off to! } } } @@ -193,7 +193,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, if (!lightRodRedirect) { if (targetInfo->reflectClassStatus.status == STATUS_MAGIC_COAT) { if (IsReflectedByMagicCoat(moveId) && sub_8055988(attacker, currTarget)) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC52C); // The target~27s Magic Coat bounced it back! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC52C); // The target~27s Magic Coat bounced it back! sub_8041B48(currTarget); sub_80559DC(currTarget, attacker); currTarget = attacker; @@ -210,7 +210,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, && ((target & 0xF) == 0 || (target & 0xF) == 4 || (target & 0xF) == 5 || (target & 0xF) == 2) && sub_8055988(attacker, currTarget)) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC558); // The target~27s Mirror Move returned it! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC558); // The target~27s Mirror Move returned it! sub_8041BA8(currTarget); sub_80559DC(currTarget, attacker); currTarget = attacker; @@ -226,7 +226,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, s32 targetFlagsAnd = targetFlags & 0xF; if ((targetFlagsAnd == 0 || targetFlagsAnd == 4 || targetFlagsAnd == 5 || targetFlagsAnd == 2) && !r4) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0); - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC574); // protected itself! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC574); // protected itself! moveHits = FALSE; } } @@ -239,7 +239,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, if (moveHits) { if (AbilityIsActive(currTarget, ABILITY_SOUNDPROOF) && IsSoundMove(move)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0); - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move! moveHits = FALSE; } } @@ -258,7 +258,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, } if (ShouldDisplayEntity(currTarget)) { - sub_803E708(4, 0x4A); + DungeonWaitFrames_Async(4, 0x4A); sub_8041168(attacker, currTarget, move, NULL); } @@ -272,16 +272,16 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move, SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(currTarget), 0); // Interesting that these 3 strings are the same. Curious if that's the case in Blue/Europe versions. if (attacker == currTarget) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9380); // The move missed + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9380); // The move missed } else if (GetTreatmentBetweenMonsters(attacker, currTarget, TRUE, FALSE) == 0) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9384); // The move missed + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9384); // The move missed } else if (lightRodRedirect) { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F93A4); // The move missed + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F93A4); // The move missed } else { - TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9364); // is unaffected! + TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9364); // is unaffected! } if (ShouldDisplayEntity(currTarget)) { @@ -1341,7 +1341,7 @@ s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modif CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1); dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId); - return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason); + return TryHitTarget_Async(attacker, target, move, &dmgStruct, dungeonExitReason); } s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId) @@ -1353,10 +1353,10 @@ s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1); dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId); - return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason); + return TryHitTarget_Async(attacker, target, move, &dmgStruct, dungeonExitReason); } -static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 dungeonExitReason_) +static s32 TryHitTarget_Async(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 dungeonExitReason_) { s32 dungeonExitReason = dungeonExitReason_; // It's happening again... if (AccuracyCalc(attacker, target, move, ACCURACY_2, TRUE)) { // Move hits @@ -1368,17 +1368,17 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam gDungeon->illuminateMonSpawnGenID = target->spawnGenID; } - HandleDealingDamage(attacker, target, dmgStruct, isFalseSwipe, TRUE, dungeonExitReason, TRUE, 0); + HandleDealingDamage_Async(attacker, target, dmgStruct, isFalseSwipe, TRUE, dungeonExitReason, TRUE, 0); } else { SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(target), 0); if (ShouldDisplayEntity(attacker) && ShouldDisplayEntity(target)) { sub_803ED30(9999, target, 1, -1); - TryDisplayDungeonLoggableMessage4(attacker, target, gUnknown_80F9688); // It took no damage! + TryDisplayDungeonLoggableMessage4_Async(attacker, target, gUnknown_80F9688); // It took no damage! sub_8042238(attacker, target); } else { - TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688); // It took no damage! + TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688); // It took no damage! } dmgStruct->tookNoDamage = TRUE; } @@ -1394,13 +1394,13 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam return dmgStruct->dmg; } -s32 sub_8055864(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId) +s32 sub_8055864_Async(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId) { struct DamageStruct dmgStruct; s32 moveType = GetMoveTypeForMonster(attacker, move); sub_806F2BC(attacker, target, moveType, param_4, &dmgStruct); - HandleDealingDamage(attacker, target, &dmgStruct, FALSE, TRUE, GetDungeonExitReasonFromMoveOrItem(move, itemId), TRUE, 0); + HandleDealingDamage_Async(attacker, target, &dmgStruct, FALSE, TRUE, GetDungeonExitReasonFromMoveOrItem(move, itemId), TRUE, 0); if (dmgStruct.tookNoDamage) { return 0; } diff --git a/src/dungeon_move_util.c b/src/dungeon_move_util.c index f63311fe6..5884eede7 100644 --- a/src/dungeon_move_util.c +++ b/src/dungeon_move_util.c @@ -68,17 +68,17 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 attackerInfo->unk159 = 0; if (attackerInfo->cringeClassStatus.status == STATUS_CRINGE) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC714); // is cringing! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC714); // is cringing! return FALSE; } else if (attackerInfo->cringeClassStatus.status == STATUS_INFATUATED) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC718); // is infatuated! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC718); // is infatuated! return FALSE; } else if (attackerInfo->burnClassStatus.status == STATUS_PARALYSIS) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A8); // is paralyzed! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6A8); // is paralyzed! return FALSE; } @@ -100,7 +100,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 isLinkedMove = (j > 1); moveId = firstMoveId; - while (1) { + while (TRUE) { Move *currMove = &attackerInfo->moves.moves[moveId]; if (!EntityIsValid(attacker) || IsFloorOver()) break; @@ -132,7 +132,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 else { if (!statusMoveMatch) { BufferMoveName(gFormatBuffer_Items[0], currMove, NULL); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80F93C8); // The move can't be used! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80F93C8); // The move can't be used! moveUsable = FALSE; } } @@ -147,7 +147,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 assistMove.id = sub_8057144(attacker); BufferMoveName(gFormatBuffer_Items[0], &assistMove, NULL); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist: + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FD2DC); // Assist: moveWasUsed = TryUseChosenMove(attacker, var_34, itemId, arg_0, isLinkedMove, &assistMove); } else { @@ -165,16 +165,16 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 if (unkBefore == gUnknown_202F208) { if (itemId == 0) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC690); // The currMove failed! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC690); // The currMove failed! } else { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A4); // The Orb failed! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6A4); // The Orb failed! } } } } - sub_804178C(1); + sub_804178C_Async(1); if (!EntityIsValid(attacker) || IsFloorOver()) break; if (++moveId >= MAX_MON_MOVES) @@ -197,11 +197,11 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3 assistMove.id = sub_8057144(attacker); movePtr = &assistMove; BufferMoveName(gFormatBuffer_Items[0], &assistMove, NULL); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist: + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FD2DC); // Assist: } TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr); } - sub_804178C(1); + sub_804178C_Async(1); } } } @@ -228,48 +228,48 @@ void TriggerTargetAbilityEffect(Entity *attacker) EntityInfo *entInfo = GetEntInfo(attacker); if (entInfo->abilityEffectFlags & ABILITY_FLAG_ARENA_TRAP) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement! ImmobilizedStatusTarget(attacker, attacker); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_SHADOW_TAG) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement! ImmobilizedStatusTarget(attacker, attacker); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_MAGNET_PULL) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement! ImmobilizedStatusTarget(attacker, attacker); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_STATIC) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF0C); // Static caused paralysis! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF0C); // Static caused paralysis! TryInflictParalysisStatus(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PRLZ) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF30); // Effect Spore scattered spores + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF30); // Effect Spore scattered spores TryInflictParalysisStatus(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_POISON_POINT) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF4C); // Poison Point struck! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF4C); // Poison Point struck! PoisonedStatusTarget(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PSN) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF50); // Effect Spore scattered spores! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF50); // Effect Spore scattered spores! PoisonedStatusTarget(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF54); // Effect Spore scattered spores! SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gSleepTurnRange, TRUE), TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn! + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF74); // Flame Body caused a burn! BurnedStatusTarget(attacker, attacker, TRUE, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_CUTE_CHARM) { - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation InfatuateStatusTarget(attacker, attacker, TRUE); } if (entInfo->abilityEffectFlags & ABILITY_FLAG_STENCH) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEFD0); // A horrid stench billowed out + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEFD0); // A horrid stench billowed out sub_80428A0(attacker); entInfo->terrifiedTurns = gStenchTerrifiedTurnsNo; } @@ -292,14 +292,14 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, msg = NULL; targetsArray[0] = NULL; - sub_804178C(1); + sub_804178C_Async(1); if (move->id == MOVE_METRONOME) { gMetronomeCalledArrayId = DungeonRandInt(METRONOME_AVAILABLE_CALLED_MOVES); InitPokemonMove(&metronomeMove, gMetronomeCalledMoves[gMetronomeCalledArrayId].moveID); metronomeMove.moveFlags = move->moveFlags; metronomeMove.moveFlags2 = move->moveFlags2; sub_8056468(attacker, move, gUnknown_80FECBC, targetsArray, itemId, TRUE, FALSE); - sub_804178C(1); + sub_804178C_Async(1); move = &metronomeMove; } else if (move->id == MOVE_NATURE_POWER) @@ -315,7 +315,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, naturePwrMove.moveFlags = move->moveFlags; naturePwrMove.moveFlags2 = move->moveFlags2; sub_8056468(attacker, move, gUnknown_80FECE0, targetsArray, itemId, TRUE, FALSE); - sub_804178C(1); + sub_804178C_Async(1); move = &naturePwrMove; } @@ -359,24 +359,24 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, if (GetEntInfo(attacker)->muzzled.muzzled == TRUE && FailsWhileMuzzled(move->id)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - LogMessageByIdWithPopupCheckUser(attacker, msg); - sub_803E708(0xA, 0x3F); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC710); // is muzzled! + LogMessageByIdWithPopupCheckUser_Async(attacker, msg); + DungeonWaitFrames_Async(0xA, 0x3F); + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC710); // is muzzled! return FALSE; } else if (!moveUsable) { SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0); if (itemId == 0) { BufferMoveName(gFormatBuffer_Items[0], move, NULL); - LogMessageByIdWithPopupCheckUser(attacker, msg); - sub_803E708(0xA, 0x3F); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6D0); // But the move couldn't be used! + LogMessageByIdWithPopupCheckUser_Async(attacker, msg); + DungeonWaitFrames_Async(0xA, 0x3F); + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6D0); // But the move couldn't be used! } else { BufferItemName(gFormatBuffer_Items[0], itemId, NULL); - LogMessageByIdWithPopupCheckUser(attacker, msg); - sub_803E708(0xA, 0x3F); - LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used! + LogMessageByIdWithPopupCheckUser_Async(attacker, msg); + DungeonWaitFrames_Async(0xA, 0x3F); + LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used! } return FALSE; } @@ -500,10 +500,10 @@ bool8 sub_8056468(Entity *entity, Move *move, const u8 *str, Entity **targetsArr } if (move->id != MOVE_REGULAR_ATTACK) { - DisplayDungeonLoggableMessageTrue(entity, str); + DisplayDungeonLoggableMessageTrue_Async(entity, str); } else { - DisplayDungeonLoggableMessageFalse(entity, str); + DisplayDungeonLoggableMessageFalse_Async(entity, str); } } @@ -726,7 +726,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32 if (var_34 >= 0) { sub_800DC14(var_34); } - sub_804178C(1); + sub_804178C_Async(1); gDungeon->unk1BDD4.unk1C05E = 0; if (targetArrId > 0) { @@ -734,7 +734,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32 UseMoveAgainstTargets(targetsArray, attacker, move, itemId, isLinkedMove); } else if (a2 == 1 && sub_803F428(&var_68)) { - sub_803E708(1, 0x4A); + DungeonWaitFrames_Async(1, 0x4A); sub_8041168(attacker, NULL, move, &var_68); } } diff --git a/src/dungeon_name_banner.c b/src/dungeon_name_banner.c index f6df7d8b9..7a4e7b57c 100644 --- a/src/dungeon_name_banner.c +++ b/src/dungeon_name_banner.c @@ -41,7 +41,7 @@ struct DungeonNameFontFileData struct DungeonNamePaletteFileData { - RGB pal[16]; + RGB_Struct pal[16]; }; void ShowDungeonNameBanner_Async(void) diff --git a/src/dungeon_projectile_throw.c b/src/dungeon_projectile_throw.c index bcee44498..0eb7af0fe 100644 --- a/src/dungeon_projectile_throw.c +++ b/src/dungeon_projectile_throw.c @@ -65,7 +65,7 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos, SetUnk1C05E(TRUE); - while (1) { + while (TRUE) { s32 i; DungeonPos prevPos = projectile->pos; @@ -185,7 +185,7 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos, SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); sub_8045C08(gFormatBuffer_Items[0], item); - TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94C4); + TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94C4); endMsg = TrySendImmobilizeSleepEndMsg(thrower, target); sub_80479B8(1, (lockOnActive || a4->unk0) ? 1 : 0, endMsg, thrower, target, item); } @@ -198,10 +198,10 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos, sub_8045BF8(gFormatBuffer_Items[0], item); if (a4->unk0) { - TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94D8); + TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94D8); } else { - TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94F0); + TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94F0); } } } @@ -217,7 +217,7 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos, break; case 2: sub_8045C08(gFormatBuffer_Items[0], item); - LogMessageByIdWithPopupCheckUser(thrower, gUnknown_80F9530); + LogMessageByIdWithPopupCheckUser_Async(thrower, gUnknown_80F9530); break; } } @@ -359,17 +359,17 @@ void HandleCurvedProjectileThrow(Entity *thrower, Item *item, DungeonPos *startP bool8 immobiSlpEndMsg; sub_806CE94(hitResult.target, 8); - TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F94C4); + TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F94C4); immobiSlpEndMsg = TrySendImmobilizeSleepEndMsg(thrower, hitResult.target); sub_80479B8(1, (lockOnSpecs || a4->unk0 != 0) ? 1 : 0, immobiSlpEndMsg, thrower, hitResult.target, item); throwResult = 0; } else { if (hasBounceBand) { - TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F9510); + TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F9510); } else { - TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F94F0); + TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F94F0); } throwResult = 1; } diff --git a/src/dungeon_recruit_release_menu.c b/src/dungeon_recruit_release_menu.c index aa6de89d4..6d0d435f2 100644 --- a/src/dungeon_recruit_release_menu.c +++ b/src/dungeon_recruit_release_menu.c @@ -55,23 +55,23 @@ static const WindowTemplates sReleaseMenuWindowTemplates = { .id = { [0] = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {0x02, 0x02}, - .width = 0x11, - .height = 0x0E, - .unk10 = 0x12, - .unk12 = 0x02, + .pos = { 2, 2 }, + .width = 17, + .height = 14, + .totalHeight = 18, + .unk12 = 2, .header = &sReleaseMenuWinHeader }, [1] = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, - .pos = {0x15, 0x04}, - .width = 0x07, - .height = 0x04, - .unk10 = 0x04, + .pos = { 21, 4 }, + .width = 7, + .height = 4, + .totalHeight = 4, .unk12 = 0, .header = NULL }, @@ -92,11 +92,11 @@ void ShowRecruitReleaseMenu(u8 a0, s32 a1, s32 a2, Pokemon **a3) a3[i]->flags &= ~(POKEMON_FLAG_x8000); } - while (1) { + while (TRUE) { sub_8068310(a2, a3); if (gUnknown_202F310 >= a1) break; - while (1) { + while (TRUE) { s32 r7 = 0, r5 = 0; sReleaseMenuWinHeader.count = 1; @@ -121,7 +121,7 @@ void ShowRecruitReleaseMenu(u8 a0, s32 a1, s32 a2, Pokemon **a3) gDungeonMenu.windowId = 0; ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); sub_80137B0(&gDungeonMenu, 0); - while (1) { + while (TRUE) { s32 touchScreenArrow; AddMenuCursorSprite(&gDungeonMenu); @@ -232,7 +232,7 @@ void ShowRecruitReleaseMenu(u8 a0, s32 a1, s32 a2, Pokemon **a3) continue; } - if (DisplayDungeonYesNoMessage(NULL, gUnknown_80FDFB8, TRUE) == 1) { + if (DisplayDungeonYesNoMessage_Async(NULL, gUnknown_80FDFB8, TRUE) == 1) { break; } else { @@ -270,7 +270,7 @@ void ShowRecruitReleaseMenu(u8 a0, s32 a1, s32 a2, Pokemon **a3) sub_8045064(); CreateDungeonMenuSubWindow(&winTemplates.id[0], 0x15); - while (1) { + while (TRUE) { AddMenuCursorSprite(&gDungeonMenu); DungeonRunFrameActions(0x37); @@ -383,13 +383,16 @@ static void ShowPokemonSummary(Pokemon *a0) winTemplates.id[0].type = WINDOW_TYPE_WITH_HEADER; winTemplates.id[0].pos.x = 2; winTemplates.id[0].pos.y = 2; - winTemplates.id[0].width = 0x12; - winTemplates.id[0].height = 0xE; - winTemplates.id[0].unk10 = 0x12; + winTemplates.id[0].width = 18; + winTemplates.id[0].height = 14; + winTemplates.id[0].totalHeight = 18; winTemplates.id[0].unk12 = 2; winTemplates.id[0].header = &sReleaseMenuWinHeader; + winTemplates.id[1].type = WINDOW_TYPE_NORMAL; + winTemplates.id[2].type = WINDOW_TYPE_NORMAL; + winTemplates.id[3].type = WINDOW_TYPE_NORMAL; r7 = 0; @@ -397,7 +400,7 @@ static void ShowPokemonSummary(Pokemon *a0) unkStruct.unk56 = 0; gDungeonMenu.menuIndex = 0; - while (1) { + while (TRUE) { bool32 loopBreak = FALSE; s32 spF8[4] = {2, 3, 4, 5}; @@ -418,13 +421,13 @@ static void ShowPokemonSummary(Pokemon *a0) ResetTouchScreenMenuInput(&gDungeonMenu.touchScreen); DungeonShowWindows(&winTemplates, 1); - SetMonSummaryInfo(&unkStruct, a0, gDungeon->unk644.unk16); + SetMonSummaryInfo(&unkStruct, a0, gDungeon->unk644.unlockedEvolutions); ShowPokemonSummaryWindow(spF8[r7], r7, &unkStruct, &var_C8, 0); gDungeonMenu.leftRightArrowsPos.x = (gWindows[0].x + 15) * 8; gDungeonMenu.leftRightArrowsPos.y = ((gWindows[0].y + 1) * 8) - 2; - while (1) { + while (TRUE) { s32 r5; AddMenuCursorSprite(&gDungeonMenu); diff --git a/src/dungeon_serializer.c b/src/dungeon_serializer.c index ec7530bd5..00224b639 100644 --- a/src/dungeon_serializer.c +++ b/src/dungeon_serializer.c @@ -403,7 +403,7 @@ static void WriteDungeonFloor(DataSerializer *seri) WriteBool8(seri, gDungeon->unk3A0A); WriteBool8(seri, gDungeon->unk3A0B); WriteU8(seri, gDungeon->monsterHouseRoom); - WriteU8(seri, gDungeon->unk3A0D); + WriteU8(seri, gDungeon->cutscene); WriteS16(seri, gDungeon->tileset); WriteS16(seri,gDungeon->unk3A10); WriteS16(seri, gDungeon->unk3A12); @@ -765,7 +765,7 @@ static void ReadDungeonFloor(DataSerializer *seri) gDungeon->unk3A0A = ReadBool8(seri); gDungeon->unk3A0B = ReadBool8(seri); gDungeon->monsterHouseRoom = ReadU8(seri); - gDungeon->unk3A0D = ReadU8(seri); + gDungeon->cutscene = ReadU8(seri); gDungeon->tileset = ReadS16(seri); gDungeon->unk3A10 = ReadS16(seri); gDungeon->unk3A12 = ReadS16(seri); diff --git a/src/dungeon_strings.c b/src/dungeon_strings.c index 61572e186..e5de5d565 100644 --- a/src/dungeon_strings.c +++ b/src/dungeon_strings.c @@ -1025,64 +1025,64 @@ const u8 *const gUnknown_80FEF98 = _("Cute Charm caused infatuation!"); const u8 *const gUnknown_80FEFD0 = _("A horrid stench billowed out!\n{POKEMON_0} became terrified!"); const u8 *const gUnknown_80FEFF4 = _("Transform can't be used here!"); const u8 *const gUnknown_80FF01C = _("{POKEMON_0}'s Synchronize took effect!"); -const struct TutorialFlagMsg gUnknown_80FF020 = { - 0x00, _("Head for the destination while attacking\nfoes with {A_BUTTON}.\nTry not to let a partner faint!") +const TutorialFlagMsg gUnknown_80FF020 = { + TUTORIAL_FLAG_STAIRS_AND_SURVIVE, _("Head for the destination while attacking\nfoes with {A_BUTTON}.\nTry not to let a partner faint!") }; -const struct TutorialFlagMsg gUnknown_80FF080 = { - 0x01, _("Foes won't move until you do.\nOpen the menu with {B_BUTTON} and\nthink before you act!") +const TutorialFlagMsg gUnknown_80FF080 = { + TUTORIAL_FLAG_OPEN_MENU, _("Foes won't move until you do.\nOpen the menu with {B_BUTTON} and\nthink before you act!") }; -const struct TutorialFlagMsg gUnknown_80FF0D8 = { - 0x02, _("Your team regains HP as it moves.\nHold {B_BUTTON} then press {A_BUTTON} to recover\nHP quickly on the spot.") +const TutorialFlagMsg gUnknown_80FF0D8 = { + TUTORIAL_FLAG_REGAIN_HP, _("Your team regains HP as it moves.\nHold {B_BUTTON} then press {A_BUTTON} to recover\nHP quickly on the spot.") }; -const struct TutorialFlagMsg gUnknown_80FF13C = { - 0x0c, _("Defeat foes using moves instead of\n{A_BUTTON} attacks for more Exp. Points.\nChoose and set the move you want to use.") +const TutorialFlagMsg gUnknown_80FF13C = { + TUTORIAL_FLAG_MOVES, _("Defeat foes using moves instead of\n{A_BUTTON} attacks for more Exp. Points.\nChoose and set the move you want to use.") }; -const struct TutorialFlagMsg gUnknown_80FF1B4 = { - 0x0d, _("Choose a partner with the Team command\nand set its tactics and IQ skills.\nCooperation with partners is the key!") +const TutorialFlagMsg gUnknown_80FF1B4 = { + TUTORIAL_FLAG_TEAM_MANAGEMENT, _("Choose a partner with the Team command\nand set its tactics and IQ skills.\nCooperation with partners is the key!") }; -const struct TutorialFlagMsg gMovementTutorial = { - 0x0e, _("Hold {B_BUTTON} then press {DPAD} to speed up\nmovement. Hold {R_BUTTON} then press {DPAD}\nto move only diagonally.") +const TutorialFlagMsg gMovementTutorial = { + TUTORIAL_FLAG_MOVEMENT, _("Hold {B_BUTTON} then press {DPAD} to speed up\nmovement. Hold {R_BUTTON} then press {DPAD}\nto move only diagonally.") }; -const struct TutorialFlagMsg gHungerTutorial = { - 0x0f, _("Eat an Apple or Gummi when your Belly\ngoes down. Being famished can cause\nfainting, so check your Belly in the menu.") +const TutorialFlagMsg gHungerTutorial = { + TUTORIAL_FLAG_MANAGE_BELLY2, _("Eat an Apple or Gummi when your Belly\ngoes down. Being famished can cause\nfainting, so check your Belly in the menu.") }; -const struct TutorialFlagMsg gFoodTutorial = { - 0x03, _("Eating an Apple or Gummi fills your Belly.\nChoose them under Items in the menu\nand eat one before your Belly gets empty.") +const TutorialFlagMsg gFoodTutorial = { + TUTORIAL_FLAG_MANAGE_BELLY1, _("Eating an Apple or Gummi fills your Belly.\nChoose them under Items in the menu\nand eat one before your Belly gets empty.") }; -const struct TutorialFlagMsg gOranTutorial = { - 0x04, _("An Oran Berry restores HP.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") +const TutorialFlagMsg gOranTutorial = { + TUTORIAL_FLAG_ORAN_BERRY, _("An Oran Berry restores HP.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") }; -const struct TutorialFlagMsg gCheriTutorial = { - 0x05, _("A Cheri Berry heals paralysis.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") +const TutorialFlagMsg gCheriTutorial = { + TUTORIAL_FLAG_CHERI_BERRY, _("A Cheri Berry heals paralysis.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") }; -const struct TutorialFlagMsg gBlastSeedTutorial = { - 0x06, _("A Blast Seed flames the foe you\nare facing.\nTurn to face the foe, then use the item.") +const TutorialFlagMsg gBlastSeedTutorial = { + TUTORIAL_FLAG_BLAST_SEED, _("A Blast Seed flames the foe you\nare facing.\nTurn to face the foe, then use the item.") }; -const struct TutorialFlagMsg gUnknown_80FF4A0 = { - 0x07, _("Gravelerocks can be lobbed at distant foes.\nSet them for use under Items.\nHold {L_BUTTON} then press {R_BUTTON} to throw them.") +const TutorialFlagMsg gUnknown_80FF4A0 = { + TUTORIAL_FLAG_GRAVELEROCK, _("Gravelerocks can be lobbed at distant foes.\nSet them for use under Items.\nHold {L_BUTTON} then press {R_BUTTON} to throw them.") }; -const struct TutorialFlagMsg gPechaTutorial = { - 0x09, _("A Pecha Berry heals any kind of poisoning.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") +const TutorialFlagMsg gPechaTutorial = { + TUTORIAL_FLAG_PECHA_BERRY, _("A Pecha Berry heals any kind of poisoning.\nOpen the menu with {B_BUTTON} and\nselect it under Items.") }; -const struct TutorialFlagMsg gSleepSeedTutorial = { - 0x0a, _("Throw a Sleep Seed at a foe to put it\nto sleep for a little while.\nEating it will put you to sleep!") +const TutorialFlagMsg gSleepSeedTutorial = { + TUTORIAL_FLAG_SLEEP_SEED, _("Throw a Sleep Seed at a foe to put it\nto sleep for a little while.\nEating it will put you to sleep!") }; -const struct TutorialFlagMsg gMoneyTutorial = { - 0x0b, _("{POKE} is the money in this world.\nCollect and save it to buy useful\nitems.") +const TutorialFlagMsg gMoneyTutorial = { + TUTORIAL_FLAG_MONEY, _("{POKE} is the money in this world.\nCollect and save it to buy useful\nitems.") }; const u8 *const gUnknown_80FF674 = _("You're a thief!\nYou're not recognized as a rescuer!"); diff --git a/src/dungeon_submenu.c b/src/dungeon_submenu.c index cda890277..3c94740f5 100644 --- a/src/dungeon_submenu.c +++ b/src/dungeon_submenu.c @@ -19,11 +19,14 @@ void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) .id = { [0] = WIN_TEMPLATE_DUMMY, [1] = { + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, - .pos = {22, 4}, + .pos = { 22, 4 }, .width = 6, .height = 4, - .unk10 = 4, + .totalHeight = 4, + .unk12 = 0, + .header = NULL, }, [2] = WIN_TEMPLATE_DUMMY, [3] = WIN_TEMPLATE_DUMMY, @@ -31,7 +34,7 @@ void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) }; windows.id[0] = *mainWindow; - windows.id[0].unk0 = 0x80; + windows.id[0].flags = WINTEMPLATE_FLAG_x80; gDungeonMenu.menuIndex = 0; gDungeonMenu.entriesPerPage = gDungeonSubMenuItemsCount; @@ -49,7 +52,7 @@ void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) windows.id[1].pos.x = subWindowX; windows.id[1].width = 28 - subWindowX; - windows.id[1].height = windows.id[1].unk10 = CalcEntriesTotalHeight(gDungeonMenu.entriesPerPage, 0); + windows.id[1].height = windows.id[1].totalHeight = CalcEntriesTotalHeight(gDungeonMenu.entriesPerPage, 0); DungeonShowWindows(&windows, FALSE); sub_80137B0(&gDungeonMenu, windows.id[1].height * 8); sub_80073B8(1); diff --git a/src/dungeon_tilemap.c b/src/dungeon_tilemap.c index 8201487f7..dab23d3b7 100644 --- a/src/dungeon_tilemap.c +++ b/src/dungeon_tilemap.c @@ -149,7 +149,7 @@ void sub_803F4A0(Entity *a0) UpdateCamera(0); sub_803F38C(); - if (gDungeon->unk1356C == 0) { + if (!gDungeon->unk1356C) { sub_806CD90(); } } @@ -172,7 +172,7 @@ void PointCameraToMonster(Entity *a0) UpdateCamera(0); sub_803F38C(); - if (gDungeon->unk1356C == 0) { + if (!gDungeon->unk1356C) { sub_806CD90(); } UpdateTrapsVisibility(); @@ -382,7 +382,7 @@ void sub_803F9CC(void) Entity *cameraTarget = gDungeon->unk181e8.cameraTarget; bool32 r5 = FALSE; - if (gDungeon->unk1356C != 0 || gDungeon->unk181e8.unk18218 != 0 || sub_800EC74() != 0) { + if (gDungeon->unk1356C || gDungeon->unk181e8.unk18218 != 0 || sub_800EC74() != 0) { r5 = FALSE; } else if (cameraTarget != NULL && GetEntityType(cameraTarget) == ENTITY_MONSTER) { @@ -709,7 +709,7 @@ void HandleLuminousOrbAction(Entity *pokemon) UpdateCamera(0); UpdateTrapsVisibility(); UpdateMinimap(); - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD040); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD040); } void sub_8040094(u8 r0) diff --git a/src/dungeon_turn_effects.c b/src/dungeon_turn_effects.c index 5e9013cc5..1a210520c 100644 --- a/src/dungeon_turn_effects.c +++ b/src/dungeon_turn_effects.c @@ -44,7 +44,7 @@ #include "dungeon_entity_movement.h" #include "dungeon_main.h" -void ApplyEndOfTurnEffects(Entity *entity) +void DoEndOfTurnEffects_Async(Entity *entity) { s32 rand; EntityInfo *entityInfo; @@ -63,8 +63,8 @@ void ApplyEndOfTurnEffects(Entity *entity) entityInfo->turnsSinceWarpScarfActivation = WARP_SCARF_ACTIVATION_CHANCES_COUNT - 1; if (DungeonRandInt(100) < gWarpScarfActivationChances[entityInfo->turnsSinceWarpScarfActivation]) { entityInfo->turnsSinceWarpScarfActivation = 0; - sub_80444F4(entity); - DisplayActions(NULL); + sub_80444F4_Async(entity); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; WarpTarget(entity, entity, 0, NULL); @@ -124,8 +124,8 @@ void ApplyEndOfTurnEffects(Entity *entity) if (FixedPointToInt(entityInfo->belly) == 0) { sub_805E804(); - sub_80444F4(entity); - DisplayActions(NULL); + sub_80444F4_Async(entity); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; if (gDungeon->unk644.emptyBellyAlert < MAX_EMPTY_BELLY_ALERT_STEPS) @@ -144,7 +144,7 @@ void ApplyEndOfTurnEffects(Entity *entity) } TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, 1, RESIDUAL_DAMAGE_HUNGER, DUNGEON_EXIT_FAINTED_FROM_HUNGER); + DealDamageToEntity_Async(entity, 1, RESIDUAL_DAMAGE_HUNGER, DUNGEON_EXIT_FAINTED_FROM_HUNGER); entityInfo->bellyEmpty = TRUE; if (FixedPointToInt(entityInfo->belly) != 0) str = NULL; @@ -156,8 +156,8 @@ void ApplyEndOfTurnEffects(Entity *entity) if (str != NULL) { if (sound) PlaySoundEffect(0x153); - LogMessageByIdWithPopupCheckUser(entity, str); - sub_803E708(30, 0x32); + LogMessageByIdWithPopupCheckUser_Async(entity, str); + DungeonWaitFrames_Async(30, 0x32); } } @@ -166,12 +166,12 @@ void ApplyEndOfTurnEffects(Entity *entity) if (gDungeon->weather.weatherDamageCounter == 0) { if (GetApparentWeather(entity) == WEATHER_HAIL) { if (!MonsterIsType(entity, TYPE_ICE)) { - DealDamageToEntity(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER); + DealDamageToEntity_Async(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER); } } else if (GetApparentWeather(entity) == WEATHER_SANDSTORM) { if (!MonsterIsType(entity, TYPE_GROUND) && !MonsterIsType(entity, TYPE_ROCK) && !MonsterIsType(entity, TYPE_STEEL)) { - DealDamageToEntity(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER); + DealDamageToEntity_Async(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER); } } if (!EntityIsValid(entity) || IsFloorOver()) @@ -181,7 +181,7 @@ void ApplyEndOfTurnEffects(Entity *entity) // Abilities check rand = DungeonRandInt(100); if (AbilityIsActive(entity, ABILITY_SHED_SKIN) && rand < gShedSkinActivateChance && MonsterHasNegativeStatus(entity)) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; sub_8079F20(entity, entity, 1, 0); @@ -196,7 +196,7 @@ void ApplyEndOfTurnEffects(Entity *entity) // Statuses if (entityInfo->sleepClassStatus.status == STATUS_YAWNING) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; sub_80420B8(entity); @@ -204,12 +204,12 @@ void ApplyEndOfTurnEffects(Entity *entity) if (entityInfo->burnClassStatus.status == STATUS_BURN) { if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; entityInfo->burnClassStatus.damageCountdown = gBurnDmgCountdown; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, gBurnDmgValue, RESIDUAL_DAMAGE_BURN, DUNGEON_EXIT_FAINTED_FROM_BURN); + DealDamageToEntity_Async(entity, gBurnDmgValue, RESIDUAL_DAMAGE_BURN, DUNGEON_EXIT_FAINTED_FROM_BURN); } if (!EntityIsValid(entity) || IsFloorOver()) return; @@ -217,12 +217,12 @@ void ApplyEndOfTurnEffects(Entity *entity) if (entityInfo->burnClassStatus.status == STATUS_POISONED) { if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; entityInfo->burnClassStatus.damageCountdown = gPoisonDmgCountdown; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, gPoisonDmgValue, RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON); + DealDamageToEntity_Async(entity, gPoisonDmgValue, RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON); } if (!EntityIsValid(entity) || IsFloorOver()) return; @@ -236,12 +236,12 @@ void ApplyEndOfTurnEffects(Entity *entity) if (turns >= BAD_POISON_DMG_TURN_VALUES_COUNT - 1) turns = BAD_POISON_DMG_TURN_VALUES_COUNT - 1; - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON); + DealDamageToEntity_Async(entity, gBadPoisonDmgValuesByTurn[turns], RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON); } if (!EntityIsValid(entity) || IsFloorOver()) return; @@ -249,32 +249,32 @@ void ApplyEndOfTurnEffects(Entity *entity) if (entityInfo->frozenClassStatus.status == STATUS_CONSTRICTION) { if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; entityInfo->frozenClassStatus.damageCountdown = gConstrictionDmgCountdown; TrySendImmobilizeSleepEndMsg(entity, entity); sub_8041C4C(entity, entityInfo->frozenClassStatus.unk4); - DealDamageToEntity(entity, gConstrictionDmgValue, RESIDUAL_DAMAGE_CONSTRICT, DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION); + DealDamageToEntity_Async(entity, gConstrictionDmgValue, RESIDUAL_DAMAGE_CONSTRICT, DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION); } if (!EntityIsValid(entity) || IsFloorOver()) return; } else if (entityInfo->frozenClassStatus.status == STATUS_WRAPPED) { if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; entityInfo->frozenClassStatus.damageCountdown = gWrapDmgCountdown; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, gWrapDmgValue, RESIDUAL_DAMAGE_WRAP, DUNGEON_EXIT_FAINTED_FROM_WRAP); + DealDamageToEntity_Async(entity, gWrapDmgValue, RESIDUAL_DAMAGE_WRAP, DUNGEON_EXIT_FAINTED_FROM_WRAP); } if (!EntityIsValid(entity) || IsFloorOver()) return; } else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) { if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; entityInfo->frozenClassStatus.damageCountdown = gIngrainHealCountdown; @@ -288,12 +288,12 @@ void ApplyEndOfTurnEffects(Entity *entity) if (dmg == 0) dmg = 1; entityInfo->curseClassStatus.damageCountdown = gCurseDmgCountdown; - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, dmg, RESIDUAL_DAMAGE_CURSE, DUNGEON_EXIT_FELLED_BY_CURSE); + DealDamageToEntity_Async(entity, dmg, RESIDUAL_DAMAGE_CURSE, DUNGEON_EXIT_FELLED_BY_CURSE); } if (!EntityIsValid(entity) || IsFloorOver()) return; @@ -315,17 +315,17 @@ void ApplyEndOfTurnEffects(Entity *entity) } else { bool8 dmgUser = AbilityIsActive(entity, ABILITY_LIQUID_OOZE); - sub_80444F4(entity); - DisplayActions(NULL); + sub_80444F4_Async(entity); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || !EntityIsValid(target) || IsFloorOver()) return; if (entityInfo->frozenClassStatus.status != STATUS_FROZEN) { TrySendImmobilizeSleepEndMsg(entity, entity); - DealDamageToEntity(entity, hp, RESIDUAL_DAMAGE_LEECH_SEED, DUNGEON_EXIT_DRAINED_BY_LEECH_SEED); + DealDamageToEntity_Async(entity, hp, RESIDUAL_DAMAGE_LEECH_SEED, DUNGEON_EXIT_DRAINED_BY_LEECH_SEED); if (dmgUser) { TrySendImmobilizeSleepEndMsg(target, target); - DealDamageToEntity(target, hp, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); + DealDamageToEntity_Async(target, hp, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); } else { HealTargetHP(target, target, hp, 0, TRUE); @@ -341,17 +341,17 @@ void ApplyEndOfTurnEffects(Entity *entity) if (entityInfo->perishSongTurns != 0) { sub_80838EC(&entityInfo->perishSongTurns); if (entityInfo->perishSongTurns == 0) { - DisplayActions(NULL); + DisplayActions_Async(NULL); if (!EntityIsValid(entity) || IsFloorOver()) return; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FEB30); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FEB30); TrySendImmobilizeSleepEndMsg(entity, entity); if (entityInfo->reflectClassStatus.status == STATUS_PROTECT) { - LogMessageByIdWithPopupCheckUser(entity, gPtrProtectSavedItMessage); + LogMessageByIdWithPopupCheckUser_Async(entity, gPtrProtectSavedItMessage); } else { - DealDamageToEntity(entity, 9999, RESIDUAL_DAMAGE_PERISH_SONG, DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG); + DealDamageToEntity_Async(entity, 9999, RESIDUAL_DAMAGE_PERISH_SONG, DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG); } if (!EntityIsValid(entity) || IsFloorOver()) return; @@ -365,7 +365,7 @@ void ApplyEndOfTurnEffects(Entity *entity) if (!CheckVariousStatuses2(entity, FALSE) && !CannotAttack(entity, FALSE) && !CheckVariousStatuses(entity)) { Move bideMove; - DisplayActions(NULL); + DisplayActions_Async(NULL); InitPokemonMove(&bideMove, MOVE_BIDE_2); bideMove.moveFlags |= MOVE_FLAG_LAST_USED; TryUseChosenMove(entity, 0, 0, 0, 0, &bideMove); @@ -385,7 +385,7 @@ void ApplyEndOfTurnEffects(Entity *entity) entityInfo->bideClassStatus.status = 0; entityInfo->unk14A = 0; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FABD8); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FABD8); } } @@ -541,7 +541,7 @@ void TickStatusAndHealthRegen(Entity *entity) sub_80838EC(&entityInfo->terrifiedTurns); if (entityInfo->terrifiedTurns == 0) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gPtrStenchWavedOffMessage); + LogMessageByIdWithPopupCheckUser_Async(entity, gPtrStenchWavedOffMessage); } } @@ -565,7 +565,7 @@ void TickStatusAndHealthRegen(Entity *entity) if (oldSpdStage != newSpdStage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0); - LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FA124[newSpdStage]); + LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FA124[newSpdStage]); } } } diff --git a/src/dungeon_util.c b/src/dungeon_util.c index b58b6bb3d..fcbe9497c 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -601,12 +601,12 @@ s32 GetTeamMemberEntityIndex(Entity *pokemon) return -1; } -void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 param_3) +void SubstitutePlaceholderStringTags(u8 *buffer, Entity *entity, u32 monsterColorNum) { switch(GetEntityType(entity)) { case ENTITY_MONSTER: - SetMessageArgument_2(buffer, GetEntInfo(entity), param_3); + SetMessageArgument_2(buffer, GetEntInfo(entity), monsterColorNum); break; case ENTITY_ITEM: sub_8045BF8(buffer, GetItemData_1(entity)); diff --git a/src/dungeon_vram.c b/src/dungeon_vram.c index 901de9857..543959639 100644 --- a/src/dungeon_vram.c +++ b/src/dungeon_vram.c @@ -46,7 +46,7 @@ struct DungeonPalFile extern struct DungeonPalFile *gDungeonPaletteFile; extern struct DungeonPalFile *gUnknown_202EC94; -extern RGB gUnknown_202ECA4[]; +extern RGB_Struct gUnknown_202ECA4[33]; extern OpenedFile *gUnknown_202EC9C; static void sub_803E490(u32); @@ -260,7 +260,7 @@ void sub_803E668(u32 unused) sUnknown_202EDD4--; } -void sub_803E708(s32 numFrames, u32 a1) +void DungeonWaitFrames_Async(s32 numFrames, u32 a1) { while (numFrames != 0) { DungeonRunFrameActions(a1); @@ -354,12 +354,12 @@ void sub_803E830(void) gUnknown_203B40D = 0; } -static const RGB sBlackRgb = {0, 0, 0}; +static const RGB_Struct sBlackRgb = {0, 0, 0}; void sub_803E874(bool8 r10, s32 r9) { s32 i, index, count; - const RGB *color; + const RGB_Struct *color; color = gDungeonPaletteFile->unk4; SetBGPaletteBufferColorRGB(0, &sBlackRgb, gDungeonBrightness, gDungeon->colorRamp); @@ -412,7 +412,7 @@ void sub_803E874(bool8 r10, s32 r9) void BgColorCallNullsub4(void) { s32 i, index, count; - const RGB *color; + const RGB_Struct *color; color = ((struct DungeonPalFile*) gDungeon->paletFile)->unk4; index = 256; @@ -427,7 +427,7 @@ void BgColorCallNullsub4(void) void sub_803EA10(void) { s32 i, index, count; - const RGB *color; + const RGB_Struct *color; color= gDungeonPaletteFile->unk4; SetBGPaletteBufferColorRGB(0, &sBlackRgb, gDungeonBrightness, gDungeon->colorRamp); @@ -461,10 +461,10 @@ static const WindowTemplates gUnknown_80F62B0 = .id = { [0] = { .type = WINDOW_TYPE_0, - .pos = {2, 15}, + .pos = { 2, 15 }, .width = 26, .height = 5, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }, @@ -479,10 +479,10 @@ static const WindowTemplates gUnknown_80F6310 = .id = { [0] = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 3}, + .pos = { 2, 3 }, .width = 6, .height = 7, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }, @@ -497,28 +497,28 @@ static const WindowTemplates gUnknown_80F6370 = .id = { [0] = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 3}, + .pos = { 2, 3 }, .width = 6, .height = 7, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }, [1] = { .type = WINDOW_TYPE_NORMAL, - .pos = {10, 4}, + .pos = { 10, 4 }, .width = 17, .height = 2, - .unk10 = 2, + .totalHeight = 2, .unk12 = 0, .header = NULL, }, [2] = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 13}, + .pos = { 2, 13 }, .width = 26, .height = 6, - .unk10 = 6, + .totalHeight = 6, .unk12 = 0, .header = NULL, }, @@ -531,10 +531,10 @@ static const WindowTemplates gUnknown_80F63D0 = .id = { [0] = { .type = WINDOW_TYPE_NORMAL, - .pos = {2, 3}, + .pos = { 2, 3 }, .width = 26, .height = 14, - .unk10 = 18, + .totalHeight = 18, .unk12 = 2, .header = NULL, }, diff --git a/src/dungeon_wild_mon_spawn.c b/src/dungeon_wild_mon_spawn.c index 05e7dd674..e379ab8df 100644 --- a/src/dungeon_wild_mon_spawn.c +++ b/src/dungeon_wild_mon_spawn.c @@ -79,7 +79,7 @@ void TrySpawnWildMonster(void) } } if (illuminateEntity != NULL) { - DisplayDungeonLoggableMessageTrue(0,gText_Pokemon0Blinked); + DisplayDungeonLoggableMessageTrue_Async(0,gText_Pokemon0Blinked); sub_8042920(illuminateEntity); } diff --git a/src/dungeon_wind.c b/src/dungeon_wind.c index 9f1aa6802..ac6a98939 100644 --- a/src/dungeon_wind.c +++ b/src/dungeon_wind.c @@ -37,9 +37,9 @@ void UpdateWindTurns(void) if (gDungeon->unk644.windTurns < 0xfa) { sub_805E804(); TryPointCameraToMonster(leader,1); - DisplayActions(leader); + DisplayActions_Async(leader); if (!IsFloorOver()) { - LogMessageByIdWithPopupCheckUser(leader,gText_SomethingStirring); + LogMessageByIdWithPopupCheckUser_Async(leader,gText_SomethingStirring); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],0); gDungeon->unk644.windPhase = 1; } @@ -49,9 +49,9 @@ void UpdateWindTurns(void) if (gDungeon->unk644.windTurns < 0x96) { sub_805E804(); TryPointCameraToMonster(leader,1); - DisplayActions(leader); + DisplayActions_Async(leader); if (!IsFloorOver()) { - LogMessageByIdWithPopupCheckUser(leader,gText_SomethingApproaching); + LogMessageByIdWithPopupCheckUser_Async(leader,gText_SomethingApproaching); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],1); gDungeon->unk644.windPhase = 2; } @@ -61,9 +61,9 @@ void UpdateWindTurns(void) if (gDungeon->unk644.windTurns < 0x32) { sub_805E804(); TryPointCameraToMonster(leader,1); - DisplayActions(leader); + DisplayActions_Async(leader); if (!IsFloorOver()) { - LogMessageByIdWithPopupCheckUser(leader,gText_ItsGettingCloser); + LogMessageByIdWithPopupCheckUser_Async(leader,gText_ItsGettingCloser); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],2); gDungeon->unk644.windPhase = 3; } @@ -73,12 +73,12 @@ void UpdateWindTurns(void) if (gDungeon->unk644.windTurns < 1) { sub_805E804(); TryPointCameraToMonster(leader,1); - DisplayActions(leader); + DisplayActions_Async(leader); if (!IsFloorOver()) { - LogMessageByIdWithPopupCheckUser(leader,gText_ItsRightNearbyGustingHard); + LogMessageByIdWithPopupCheckUser_Async(leader,gText_ItsRightNearbyGustingHard); sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],3); gDungeon->unk644.windPhase = 4; - HandleFaint(leader,DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,leader); + HandleFaint_Async(leader,DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,leader); } } } diff --git a/src/effect_main.c b/src/effect_main.c index dd3e245ed..de4f96b00 100644 --- a/src/effect_main.c +++ b/src/effect_main.c @@ -81,7 +81,7 @@ extern s16 gUnknown_2026E4E; extern void sub_8009BE4(void); -extern void sub_809971C(u16 a0, const RGB *a1, int a2); +extern void sub_809971C(u16 a0, const RGB_Struct *a1, int a2); static s32 sub_800E900(s32 a0); static s32 sub_800E2C0(s32); diff --git a/src/effect_sub_1.c b/src/effect_sub_1.c index 1337f5b5b..76f761d4a 100644 --- a/src/effect_sub_1.c +++ b/src/effect_sub_1.c @@ -27,7 +27,7 @@ struct unkStruct_203B0D0_sub s32 unk14; s32 unk18; s32 unk1C; - const RGB *ramp; + const RGB_Struct *ramp; }; struct unkStruct_203B0D0 { @@ -38,7 +38,7 @@ struct unkStruct_203B0D0 { static EWRAM_INIT struct unkStruct_203B0D0 *gUnknown_203B0D0 = NULL; -extern void sub_809971C(u16 a0, const RGB *a1, int a2); +extern void sub_809971C(u16 a0, const RGB_Struct *a1, int a2); void sub_800ED38(s32 r0) { @@ -197,7 +197,7 @@ void sub_800EF64(void) sub_8005674(sub->fileData, sub->unk18); switch (gUnknown_203B0D0->unk0) { case 1: { - const RGB *pal = sub->fileData->pal; + const RGB_Struct *pal = sub->fileData->pal; sub_809971C((sub->unkC + 16) * 16, pal, 0x10); break; } diff --git a/src/event_flag.c b/src/event_flag.c index c376dc932..cef812506 100644 --- a/src/event_flag.c +++ b/src/event_flag.c @@ -68,7 +68,7 @@ void ThoroughlyResetScriptVars(void) SetScriptVarValue(NULL,START_MODE,0); SetScriptVarValue(NULL,CLEAR_COUNT,0); SetScriptVarValue(NULL,WEATHER_KIND,-1); - SetScriptVarValue(NULL,PLAYER_KIND,0); + SetScriptVarValue(NULL, PLAYER_KIND, 0); SetScriptVarValue(NULL,PARTNER1_KIND,0); SetScriptVarValue(NULL,PARTNER2_KIND,0); SetScriptVarValue(NULL,NEW_FRIEND_KIND,0); @@ -440,10 +440,10 @@ UNUSED static void ScriptVarStringPopFirstChar(s16 varId,u32 param_2,s32 maxLen) #endif // arm9.bin::0200F508 -void GetScriptVarScenario(s32 param_1,u32 *param_2,u32 *param_3) +void GetScriptVarScenario(s32 varID, u32 *outMain, u32 *outSub) { - *param_2 = GetScriptVarArrayValue(NULL, (s16)param_1, 0); - *param_3 = GetScriptVarArrayValue(NULL, (s16)param_1, 1); + *outMain = GetScriptVarArrayValue(NULL, (s16)varID, 0); + *outSub = GetScriptVarArrayValue(NULL, (s16)varID, 1); } // arm9.bin::0200F36C @@ -478,15 +478,15 @@ void ScenarioCalc(s16 param_1,s32 param_2,s32 param_3) } break; case 4: - if (ScriptVarScenarioBefore(SCENARIO_SUB1,31,0) == 0) { + if (!ScriptVarScenarioBefore(SCENARIO_SUB1,31,0)) { SetAdventureAchievement(AA_TEAM_BASE_DONE); } - if (ScriptVarScenarioBefore(SCENARIO_SUB1,32,0) == 0) { + if (!ScriptVarScenarioBefore(SCENARIO_SUB1,32,0)) { SetAdventureAchievement(AA_SMEARGLE); } break; case 0xC: - if(ScriptVarScenarioBefore(SCENARIO_SUB9,55,2) == 0) { + if(!ScriptVarScenarioBefore(SCENARIO_SUB9,55,2)) { SetAdventureAchievement(AA_BROKE_CURSE); } break; @@ -529,14 +529,14 @@ bool8 ScriptVarScenarioEqual(s16 varId,u32 pMain,s32 pSub) } // arm9.bin::0200F1d8 -bool8 ScriptVarScenarioAfter(s16 varId,u32 pMain,s32 pSub) +bool8 ScriptVarScenarioAfter(s16 varId, u32 pMain, s32 pSub) { s32 sMain; s32 sSub; sMain = GetScriptVarArrayValue(NULL, varId, 0); sSub = GetScriptVarArrayValue(NULL, varId, 1); - if (sMain == 0x3a) { + if (sMain == 58) { // DS: Assert(FALSE, "debug mode scenario comp %3d %3d %3d", varId, pMain, pSub) return FALSE; } else if (sMain > pMain) { @@ -551,17 +551,17 @@ bool8 ScriptVarScenarioAfter(s16 varId,u32 pMain,s32 pSub) // arm9.bin::0200ECE0 void sub_8001D88(void) { - u32 local_c; - u32 auStack8; + u32 sMain_sub; + u32 sMain_main; - GetScriptVarScenario(3, &auStack8, &local_c); - if (auStack8 < 1 || auStack8 > 0x1b) + GetScriptVarScenario(SCENARIO_MAIN, &sMain_main, &sMain_sub); + if (sMain_main < 1 || sMain_main > 0x1b) return; - if (ScriptVarScenarioBefore(SCENARIO_SUB1,0x1f,0) != 0) { + if (ScriptVarScenarioBefore(SCENARIO_SUB1,31,0) != 0) { if (ScriptVarScenarioAfter(SCENARIO_MAIN,0xf,7) != 0) { - ScenarioCalc(SCENARIO_SUB1,0x1f,0); - sub_8097418(0xe,1); + ScenarioCalc(SCENARIO_SUB1,31,0); + SetRescueScenarioConquered(RESCUE_DUNGEON_UPROAR_FOREST, TRUE); SetScriptVarValue(NULL,BASE_LEVEL,2); } else { @@ -572,32 +572,31 @@ void sub_8001D88(void) } if ((ScriptVarScenarioEqual(SCENARIO_SUB1,0x1f,0)) && (GetFriendAreaStatus(SKY_BLUE_PLAINS))) { ScenarioCalc(SCENARIO_SUB1,0x1f,1); - sub_809733C(0xf,1); + sub_809733C(RESCUE_DUNGEON_HOWLING_FOREST, TRUE); } - if (auStack8 > 0x11) { - sub_80973A8(0x25,1); - if (((FindItemInInventory(ITEM_HM_DIVE) != -1) || (gTeamInventoryRef->teamStorage[ITEM_HM_DIVE] != 0)) || - (ScriptVarScenarioAfter(SCENARIO_SUB2,0x21,3) != 0)) { - sub_80973A8(0x22,1); + if (sMain_main > 0x11) { + sub_80973A8(RESCUE_DUNGEON_WATERFALL_POND, TRUE); + if (FindItemInInventory(ITEM_HM_DIVE) != -1 || gTeamInventoryRef->teamStorage[ITEM_HM_DIVE] != 0 || ScriptVarScenarioAfter(SCENARIO_SUB2,0x21,3)) { + sub_80973A8(RESCUE_DUNGEON_SOLAR_CAVE, TRUE); } if (GetFriendAreaStatus(FURNACE_DESERT) != 0) { - sub_80973A8(0x1f,1); + sub_80973A8(RESCUE_DUNGEON_DESERT_REGION, TRUE); } if (GetFriendAreaStatus(BOULDER_CAVE)) { - sub_80973A8(0x20,1); + sub_80973A8(RESCUE_DUNGEON_SOUTHERN_CAVERN, TRUE); } if (GetFriendAreaStatus(DRAGON_CAVE)) { - sub_80973A8(0x21,1); + sub_80973A8(RESCUE_DUNGEON_WYVERN_HILL, TRUE); } if (GetFriendAreaStatus(SECRETIVE_FOREST)) { - sub_80973A8(0x23,1); + sub_80973A8(RESCUE_DUNGEON_DARKNIGHT_RELIC, TRUE); } if (GetFriendAreaStatus(SERENE_SEA)) { - sub_80973A8(0x24,1); - sub_80973A8(0x28,1); + sub_80973A8(RESCUE_DUNGEON_GRAND_SEA, TRUE); + sub_80973A8(RESCUE_DUNGEON_FAR_OFF_SEA, TRUE); } - if ((GetFriendAreaStatus(AGED_CHAMBER_AN)) && (GetFriendAreaStatus(AGED_CHAMBER_O_EXCLAIM))) { - sub_80973A8(0x26,1); + if (GetFriendAreaStatus(AGED_CHAMBER_AN) && GetFriendAreaStatus(AGED_CHAMBER_O_EXCLAIM)) { + sub_80973A8(RESCUE_DUNGEON_UNOWN_RELIC, TRUE); } if (ScriptVarScenarioEqual(SCENARIO_SUB2,0,0)) { ScenarioCalc(SCENARIO_SUB2,0x21,1); @@ -611,24 +610,24 @@ void sub_8001D88(void) } } if (!ScriptVarScenarioBefore(SCENARIO_SUB6,0x30,0)) { - if ((ScriptVarScenarioEqual(SCENARIO_SUB2,0x22,0)) && HasRecruitedMon(MONSTER_ARTICUNO) && HasRecruitedMon(MONSTER_ZAPDOS) && HasRecruitedMon(MONSTER_MOLTRES)) { + if (ScriptVarScenarioEqual(SCENARIO_SUB2,0x22,0) && HasRecruitedMon(MONSTER_ARTICUNO) && HasRecruitedMon(MONSTER_ZAPDOS) && HasRecruitedMon(MONSTER_MOLTRES)) { ScenarioCalc(SCENARIO_SUB2,0x22,1); } - if (((ScriptVarScenarioEqual(SCENARIO_SUB8,0,0)) && (ScriptVarScenarioAfter(SCENARIO_SUB2,0x21,3) != 0)) && + if ((ScriptVarScenarioEqual(SCENARIO_SUB8,0,0) && (ScriptVarScenarioAfter(SCENARIO_SUB2,0x21,3))) && (GetFriendAreaStatus(SKY_BLUE_PLAINS))) { ScenarioCalc(SCENARIO_SUB8,0x33,1); } if (GetFriendAreaStatus(SKY_BLUE_PLAINS)) { - sub_80973A8(0x27,1); + sub_80973A8(RESCUE_DUNGEON_JOYOUS_TOWER, TRUE); } if (GetFriendAreaStatus(SKY_BLUE_PLAINS)) { - sub_80973A8(0x29,1); + sub_80973A8(RESCUE_DUNGEON_PURITY_FOREST, TRUE); } } if (!ScriptVarScenarioBefore(SCENARIO_SUB2,0x22,0)) { if (ScriptVarScenarioEqual(SCENARIO_SUB7,0,0)) { ScenarioCalc(SCENARIO_SUB7,0x31,1); - sub_809733C(0x1b,1); + sub_809733C(RESCUE_DUNGEON_BURIED_RELIC, TRUE); } if ((ScriptVarScenarioEqual(SCENARIO_SUB9,0,0)) && (!ScriptVarScenarioBefore(SCENARIO_SUB8,0x34,0))) { ScenarioCalc(SCENARIO_SUB9,0x35,1); @@ -773,7 +772,7 @@ bool8 JudgeVarWithVar(u8 *param_1, s16 param_2, s16 param_3, enum FlagJudgeOpera #if (GAME_VERSION == VERSION_RED) UNUSED static s32 sub_8002354(u32 param_1) { - if (param_1 < 0x3b) { + if (param_1 < 59) { return gUnknown_80B6D90[param_1].num; } else { @@ -783,7 +782,7 @@ UNUSED static s32 sub_8002354(u32 param_1) UNUSED static const u8 *sub_8002374(u32 param_1) { - if (param_1 < 0x3b) { + if (param_1 < 59) { return gUnknown_80B6D90[param_1].text; } else { @@ -793,10 +792,10 @@ UNUSED static const u8 *sub_8002374(u32 param_1) UNUSED static const u8 *sub_8002394(u32 param_1) { - if (param_1 - 0x12 < 9) { - return gUnknown_80B714C[param_1 - 0x12]; + if (param_1 - 18 < 9) { + return gUnknown_80B714C[param_1 - 18]; } - else if (param_1 == 0xf) { + else if (param_1 == 15) { return "1-1"; // 1-1 } else { @@ -816,69 +815,68 @@ UNUSED static const u8 *sub_80023C4(u32 param_1) #endif // arm9.bin::0200E654 -// 6 checks for post game being reached -bool8 sub_80023E4(u32 param_1) +bool8 CheckQuest(s32 questID) { - switch(param_1) { - case 0: - return ScriptVarScenarioAfter(SCENARIO_MAIN,2,-1); - case 1: - return ScriptVarScenarioAfter(SCENARIO_MAIN,3,3); - case 2: - return ScriptVarScenarioAfter(SCENARIO_MAIN,4,3); - case 3: - return ScriptVarScenarioAfter(SCENARIO_MAIN,5,0); - case 4: - return (ScriptVarScenarioAfter(SCENARIO_MAIN,0xb,0) && ScriptVarScenarioBefore(SCENARIO_MAIN,0xd,0)); - case 5: - return (ScriptVarScenarioAfter(SCENARIO_MAIN,0xb,3) && ScriptVarScenarioBefore(SCENARIO_MAIN,0xf,0)); - case 6: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0x11,-1); - case 7: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0x12,2); - case 8: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0x12,3); - case 9: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0x12,-1); - case 10: - return ScriptVarScenarioAfter(SCENARIO_MAIN,5,4); - case 0xb: - return ScriptVarScenarioAfter(SCENARIO_MAIN,5,4); - case 0xc: - return (!ScriptVarScenarioEqual(SCENARIO_MAIN,0xb,2) && !ScriptVarScenarioEqual(SCENARIO_MAIN,0xb,3)); - case 0xd: - return ScriptVarScenarioEqual(SCENARIO_MAIN,0x10,2); - case 0xe: - return !ScriptVarScenarioBefore(SCENARIO_MAIN,5,7); - case 0xf: - return !ScriptVarScenarioBefore(SCENARIO_MAIN,0xf,0); - case 0x10: - return ScriptVarScenarioAfter(SCENARIO_MAIN,7,-1); - case 0x11: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0xc,-1); - case 0x12: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0xd,-1); - case 0x13: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0xf,-1); - case 0x14: - return ScriptVarScenarioAfter(SCENARIO_MAIN,0x10,-1); - case 0x15: - return ScriptVarScenarioAfter(SCENARIO_SUB2,0x21,-1); - case 0x16: - return ScriptVarScenarioAfter(SCENARIO_SUB2,0x22,-1); - case 0x17: - return ScriptVarScenarioAfter(SCENARIO_SUB3,0x24,-1); - case 0x18: - return ScriptVarScenarioAfter(SCENARIO_SUB4,0x2a,-1); - case 0x19: - return ScriptVarScenarioAfter(SCENARIO_SUB5,0x2c,-1); - case 0x1a: - return ScriptVarScenarioAfter(SCENARIO_SUB7,0x31,-1); - case 0x1b: - return RescueScenarioConquered(0x29); - case 0x1c: + switch (questID) { + case QUEST_SET_TEAM_NAME: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 2, -1); + case QUEST_UNK1: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 3, 3); + case QUEST_CAN_ACCESS_JOBS: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 4, 3); + case QUEST_CAN_RECRUIT: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 5, 0); + case QUEST_SQUARE_ASLEEP: + return (ScriptVarScenarioAfter(SCENARIO_MAIN, 11, 0) && ScriptVarScenarioBefore(SCENARIO_MAIN, 13, 0)); + case QUEST_UNK5: + return (ScriptVarScenarioAfter(SCENARIO_MAIN, 11, 3) && ScriptVarScenarioBefore(SCENARIO_MAIN, 15, 0)); + case QUEST_REACHED_POSTGAME: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 17, -1); + case QUEST_UNLOCKED_EVOLUTIONS: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 18, 2); + case QUEST_CAN_CHANGE_LEADER: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 18, 3); + case QUEST_CAN_DEPOSIT_PARTNER: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 18, -1); + case QUEST_UNK10: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 5, 4); + case QUEST_UNK11: // Never checked? Same as above. + return ScriptVarScenarioAfter(SCENARIO_MAIN, 5, 4); + case QUEST_UNK12: + return (!ScriptVarScenarioEqual(SCENARIO_MAIN, 11, 2) && !ScriptVarScenarioEqual(SCENARIO_MAIN, 11, 3)); + case QUEST_IN_WORLD_CALAMITY: + return ScriptVarScenarioEqual(SCENARIO_MAIN, 16, 2); + case QUEST_MAZE_14: + return !ScriptVarScenarioBefore(SCENARIO_MAIN, 5, 7); + case QUEST_MAZE_15: + return !ScriptVarScenarioBefore(SCENARIO_MAIN, 15, 0); + case QUEST_LEGEND_ZAPDOS: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 7, -1); + case QUEST_LEGEND_MOLTRES: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 12, -1); + case QUEST_LEGEND_ARTICUNO: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 13, -1); + case QUEST_LEGEND_GROUDON: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 15, -1); + case QUEST_LEGEND_RAYQUAZA: + return ScriptVarScenarioAfter(SCENARIO_MAIN, 16, -1); + case QUEST_LEGEND_KYOGRE: + return ScriptVarScenarioAfter(SCENARIO_SUB2, 33, -1); + case QUEST_LEGEND_LUGIA: + return ScriptVarScenarioAfter(SCENARIO_SUB2, 34, -1); + case QUEST_LEGEND_DEOXYS: + return ScriptVarScenarioAfter(SCENARIO_SUB3, 36, -1); + case QUEST_LEGEND_HO_OH: + return ScriptVarScenarioAfter(SCENARIO_SUB4, 42, -1); + case QUEST_LEGEND_MEWTWO: + return ScriptVarScenarioAfter(SCENARIO_SUB5, 44, -1); + case QUEST_LEGEND_MEW: + return ScriptVarScenarioAfter(SCENARIO_SUB7, 49, -1); + case QUEST_LEGEND_CELEBI: + return RescueScenarioConquered(RESCUE_DUNGEON_PURITY_FOREST); + case QUEST_LUCARIO_RANK: // Never checked? return GetRescueTeamRank() == LUCARIO_RANK; - case 0x1d: + case QUEST_COMPLETED_ALL_MAZES: return HasCompletedAllMazes(); default: return FALSE; @@ -923,7 +921,7 @@ bool8 sub_80026CC(s16 r0) } // arm9.bin::0200E568 -void sub_80026E8(s16 r0, bool8 r1) +void ScriptUnlockFriendArea(s16 r0, bool8 r1) { UnlockFriendArea(MapIdToFriendAreaId(r0)); } diff --git a/src/exclusive_pokemon.c b/src/exclusive_pokemon.c index e8faf27e2..f0d5144c5 100644 --- a/src/exclusive_pokemon.c +++ b/src/exclusive_pokemon.c @@ -3,78 +3,82 @@ #include "exclusive_pokemon.h" #include "dungeon_data.h" -EWRAM_INIT struct ExclusivePokemonData *gUnknown_203B498 = {0}; -EWRAM_DATA struct ExclusivePokemonData gExclusivePokemonInfo = {0}; +EWRAM_INIT ExclusivePokemonData *gExclusiveMonPtr = { NULL }; + +EWRAM_DATA ExclusivePokemonData gExclusivePokemonInfo = { 0 }; + +// This file is more of a pokedex rather than just exclusive mon stuff void LoadExclusivePokemon(void) { - gUnknown_203B498 = &gExclusivePokemonInfo; + gExclusiveMonPtr = &gExclusivePokemonInfo; } -struct ExclusivePokemonData *GetExclusivePokemon(void) +ExclusivePokemonData *GetExclusivePokemon(void) { return &gExclusivePokemonInfo; } void InitializeExclusivePokemon(void) { - s32 counter; - memset(gUnknown_203B498, 0, sizeof(struct ExclusivePokemonData)); - for(counter = 0; counter < NUM_EXCLUSIVE_POKEMON; counter++) - { - gUnknown_203B498->Exclusives[counter] = gExclusivePokemon[counter].in_rrt; + s32 i; + + memset(gExclusiveMonPtr, 0, sizeof(ExclusivePokemonData)); + + for (i = 0; i < NUM_EXCLUSIVE_POKEMON; i++) { + gExclusiveMonPtr->exclusives[i] = gExclusivePokemon[i].in_rrt; } } -void sub_8097FA8(u8 param_1) +void SetTempCutsceneFlag(u8 flag) { - gUnknown_203B498->unk48[param_1 / 32] |= 1 << ((param_1 % 32)); + gExclusiveMonPtr->tempCutsceneFlags[flag / 32] |= 1 << (flag % 32); } -void sub_8097FD0(u8 param_1) +void SetCutsceneFlag(u8 flag) { - gUnknown_203B498->unk3C[param_1 / 32] |= 1 << ((param_1 % 32)); + gExclusiveMonPtr->cutsceneFlags[flag / 32] |= 1 << (flag % 32); } -void sub_8097FF8(void) +void FlushTempCutsceneFlags(void) { - s32 index; + s32 i; - for (index = 0; index < 0x40; index++) { - if ((gUnknown_203B498->unk48[index / 32] & (1 << (index % 32))) != 0) { - gUnknown_203B498->unk3C[index / 32] |= (1 << (index % 32)); + for (i = 0; i < NUM_CUTSCENE_FLAGS; i++) { + if ((gExclusiveMonPtr->tempCutsceneFlags[i / 32] & (1 << (i % 32))) != 0) { + gExclusiveMonPtr->cutsceneFlags[i / 32] |= 1 << (i % 32); } } - sub_8098080(); + + ClearTempCutsceneFlags(); } -void sub_8098044(u8 param_1) +void UnsetCutsceneFlag(u8 flag) { - gUnknown_203B498->unk3C[param_1 / 32] &= ~(1 << (((param_1 % 32)))); - gUnknown_203B498->unk48[param_1 / 32] &= ~(1 << (((param_1 % 32)))); + gExclusiveMonPtr->cutsceneFlags[flag / 32] &= ~(1 << (flag % 32)); + gExclusiveMonPtr->tempCutsceneFlags[flag / 32] &= ~(1 << (flag % 32)); } -void sub_8098080(void) +void ClearTempCutsceneFlags(void) { - s32 index; + s32 i; - for(index = 0; index < 0x3; index++) - { - gUnknown_203B498->unk48[index] = 0; - } + for (i = 0; i < CUTSCENE_FLAGS_U32STORAGE; i++) + gExclusiveMonPtr->tempCutsceneFlags[i] = 0; } -u8 sub_80980A4(void) +bool8 sub_80980A4(void) { - u32 temp = gUnknown_203B498->unk0; - gUnknown_203B498->unk0 = 1; + bool8 temp = gExclusiveMonPtr->unk0; + gExclusiveMonPtr->unk0 = TRUE; return temp; } -void sub_80980B4(s16 pokeID) +void SetMonSeenFlag(s16 monID) { - s32 pokeID_s32 = pokeID; + s32 pokeID_s32 = monID; s32 pokeID_s32_1 = pokeID_s32; + if (pokeID_s32 == MONSTER_DECOY) return; if (pokeID_s32 == MONSTER_STATUE) @@ -82,141 +86,135 @@ void sub_80980B4(s16 pokeID) if (pokeID_s32 == MONSTER_RAYQUAZA_CUTSCENE) return; - gUnknown_203B498->unk4[pokeID_s32 / 32] |= 1 << (s16)(pokeID_s32_1 % 32); + gExclusiveMonPtr->monSeenFlags[pokeID_s32 / 32] |= 1 << (s16)(pokeID_s32_1 % 32); } -bool8 sub_8098100(u8 param_1) +bool8 GetCutsceneFlag(u8 flag) { - if (param_1 > 0x3f) { + if (flag >= NUM_CUTSCENE_FLAGS) return FALSE; - } - else - { - return (gUnknown_203B498->unk3C[param_1 / 32] & (1 << (param_1 % 32))) != 0; - } + + return (gExclusiveMonPtr->cutsceneFlags[flag / 32] & (1 << (flag % 32))) != 0; } -bool8 sub_8098134(s16 pokeID) +bool8 GetMonSeenFlag(s16 monID) { s32 pokeID_s32; s32 pokeID_s32_1; - pokeID_s32 = pokeID; + pokeID_s32 = monID; pokeID_s32_1 = pokeID_s32; - return ((gUnknown_203B498->unk4[pokeID_s32 / 32] & (1 << (s16)(pokeID_s32_1 % 32))) != 0); + return (gExclusiveMonPtr->monSeenFlags[pokeID_s32 / 32] & (1 << (s16)(pokeID_s32_1 % 32))) != 0; } -void SetTutorialFlag(s32 index) +void SetTutorialFlag(s32 flag) { - gUnknown_203B498->unk54[index / 32] |= (1 << (index % 32)); + gExclusiveMonPtr->tutorialFlags[flag / 32] |= (1 << (flag % 32)); } -bool32 GetTutorialFlag(s32 index) +bool8 GetTutorialFlag(s32 flag) { - if (index > 0x1e) { + if (flag >= NUM_TUTORIAL_FLAGS) return FALSE; - } - else { - return (((gUnknown_203B498->unk54[index / 32]) & (1 << (index % 32))) != 0); - } + + return ((gExclusiveMonPtr->tutorialFlags[flag / 32]) & (1 << (flag % 32))) != 0; } bool8 IsExclusivePokemonUnlocked(s32 pokeID) { - s32 index; + s32 i; s32 pokeID_s32 = (s16) pokeID; - for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) - { - if(gExclusivePokemon[index].poke_id == pokeID_s32) - return gUnknown_203B498->Exclusives[index]; + for (i = 0; i < NUM_EXCLUSIVE_POKEMON; i++) { + if (gExclusivePokemon[i].poke_id == pokeID_s32) + return gExclusiveMonPtr->exclusives[i]; } + return TRUE; } void UnlockExclusivePokemon(s16 pokeID) { - s32 index; - s32 pokeID_s32; + s32 i; + s32 pokeID_s32 = pokeID; - pokeID_s32 = pokeID; - - for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) - { - if(gExclusivePokemon[index].poke_id == pokeID_s32) - gUnknown_203B498->Exclusives[index] = TRUE; + for (i = 0; i < NUM_EXCLUSIVE_POKEMON; i++) { + if (gExclusivePokemon[i].poke_id == pokeID_s32) + gExclusiveMonPtr->exclusives[i] = TRUE; } } void WriteExclusivePokemon(DataSerializer *r0) { - s32 index; - u8 *puVar2; + s32 i; - u8 stack_0; - u8 stack_1; - u8 stack_2; - u8 neg_1; - u8 zero; + u8 neg_1 = -1; + u8 zero = 0; - neg_1 = -1; - zero = 0; + WriteBits(r0, &gExclusiveMonPtr->unk0, 1); - WriteBits(r0, gUnknown_203B498, 1); - for(index = 0; index < MONSTER_MAX; index++) - { - stack_0 = sub_8098134(index); - WriteBits(r0, &stack_0, 1); + for (i = 0; i < MONSTER_MAX; i++) { + bool8 b = GetMonSeenFlag(i); + WriteBits(r0, &b, 1); } - for(index = 0; index < 64; index++) - { - stack_1 = sub_8098100(index); - WriteBits(r0, &stack_1, 1); + + for (i = 0; i < NUM_CUTSCENE_FLAGS; i++) { + bool8 b = GetCutsceneFlag(i); + WriteBits(r0, &b, 1); } - for(index = 0; index < 31; index++) - { - stack_2 = GetTutorialFlag(index); - WriteBits(r0, &stack_2, 1); + + for (i = 0; i < NUM_TUTORIAL_FLAGS; i++) { + bool8 b = GetTutorialFlag(i); + WriteBits(r0, &b, 1); } - for(index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) - { - if(gUnknown_203B498->Exclusives[index]) - puVar2 = &neg_1; + + for (i = 0; i < NUM_EXCLUSIVE_POKEMON; i++) { + u8 *p; + + if (gExclusiveMonPtr->exclusives[i]) + p = &neg_1; else - puVar2 = &zero; - WriteBits(r0, puVar2, 1); + p = &zero; + + WriteBits(r0, p, 1); } } void ReadExclusivePokemon(DataSerializer *r0) { - s32 index; + s32 i; - memset(gUnknown_203B498, 0, sizeof(struct ExclusivePokemonData)); - ReadBits(r0, gUnknown_203B498, 1); - for (index = 0; index < MONSTER_MAX; index++) { - u8 stack_0; - ReadBits(r0, &stack_0, 1); - if(stack_0) - sub_80980B4(index); + memset(gExclusiveMonPtr, 0, sizeof(ExclusivePokemonData)); + + ReadBits(r0, &gExclusiveMonPtr->unk0, 1); + + for (i = 0; i < MONSTER_MAX; i++) { + bool8 b; + ReadBits(r0, &b, 1); + if (b) + SetMonSeenFlag(i); } - for (index = 0; index < 64; index++) { - u8 stack_1; - ReadBits(r0, &stack_1, 1); - if(stack_1) - sub_8097FA8(index); + + for (i = 0; i < NUM_CUTSCENE_FLAGS; i++) { + bool8 b; + ReadBits(r0, &b, 1); + if (b) + SetTempCutsceneFlag(i); } - for (index = 0; index < 31; index++) { - u8 stack_2; - ReadBits(r0, &stack_2, 1); - if(stack_2) - SetTutorialFlag(index); + + for (i = 0; i < NUM_TUTORIAL_FLAGS; i++) { + bool8 b; + ReadBits(r0, &b, 1); + if (b) + SetTutorialFlag(i); } - for (index = 0; index < NUM_EXCLUSIVE_POKEMON; index++) { - u8 stack_3; - ReadBits(r0, &stack_3, 1); + + for (i = 0; i < NUM_EXCLUSIVE_POKEMON; i++) { + bool8 b; + ReadBits(r0, &b, 1); do; while(0); // do/while needed for matching - jiang - gUnknown_203B498->Exclusives[index] = (stack_3 & 1) != 0; + gExclusiveMonPtr->exclusives[i] = (b & 1) != 0; } - sub_8097FF8(); + + FlushTempCutsceneFlags(); } diff --git a/src/explosion.c b/src/explosion.c index 57b745eb8..ce0355f70 100644 --- a/src/explosion.c +++ b/src/explosion.c @@ -102,16 +102,16 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para if (index != DUNGEON_MAX_POKEMON) { sub_804218C(pokemon,target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96EC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96EC); } else if (GetApparentWeather(target) == WEATHER_RAIN) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96EC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96EC); } else { sub_804216C(pokemon,target,param_4); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96BC); flag = FALSE; posPtr = (gUnknown_8107178)[param_4]; @@ -198,7 +198,7 @@ static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 dungeonEx newHP /= 2; } } - sub_806F370(pokemon,target,newHP,0,&flag,moveType,dungeonExitReason,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,newHP,0,&flag,moveType,dungeonExitReason,RESIDUAL_DAMAGE_REGULAR,0,0); } } } diff --git a/src/expose_trap.c b/src/expose_trap.c index ce6a3952d..b5988ea14 100644 --- a/src/expose_trap.c +++ b/src/expose_trap.c @@ -58,12 +58,12 @@ void sub_807D3CC(Entity *param_1) } } if (flag) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FD2F8); // All traps were exposed + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FD2F8); // All traps were exposed UpdateMinimap(); UpdateTrapsVisibility(); } else { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FD320); // There appears to be no hidden traps. + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FD320); // There appears to be no hidden traps. } } diff --git a/src/felicity_bank.c b/src/felicity_bank.c index c8c496a1a..4b0234d44 100644 --- a/src/felicity_bank.c +++ b/src/felicity_bank.c @@ -135,17 +135,17 @@ static void sub_801645C(void) switch (sFelicityBankWork->currState) { case 2: - sFelicityBankWork->unkA8.id[0].unk0 = 0x80; - sFelicityBankWork->unkA8.id[1].unk0 = 0x80; - sFelicityBankWork->unkA8.id[2].unk0 = 0x80; + sFelicityBankWork->unkA8.id[0].flags = WINTEMPLATE_FLAG_x80; + sFelicityBankWork->unkA8.id[1].flags = WINTEMPLATE_FLAG_x80; + sFelicityBankWork->unkA8.id[2].flags = WINTEMPLATE_FLAG_x80; sFelicityBankWork->unkA8.id[3] = sUnknown_80DB6F4; ResetUnusedInputStruct(); ShowWindows(&sFelicityBankWork->unkA8, TRUE, FALSE); break; case FELICITY_BANK_STORE_HOW_MUCH: case FELICITY_BANK_TAKE_HOW_MUCH: - sFelicityBankWork->unkA8.id[0].unk0 = 0x80; - sFelicityBankWork->unkA8.id[1].unk0 = 0x80; + sFelicityBankWork->unkA8.id[0].flags = WINTEMPLATE_FLAG_x80; + sFelicityBankWork->unkA8.id[1].flags = WINTEMPLATE_FLAG_x80; sFelicityBankWork->unkA8.id[3] = sUnknown_80DB6F4; sFelicityBankWork->unkA8.id[2] = sUnknown_80DB70C; ResetUnusedInputStruct(); diff --git a/src/friend_area_action_menu.c b/src/friend_area_action_menu.c index bae42e9b9..9952a4054 100644 --- a/src/friend_area_action_menu.c +++ b/src/friend_area_action_menu.c @@ -250,7 +250,7 @@ void CreateFriendActionMenu(void) sUnknown_203B2BC->unk16C[loopMax] = 1; } loopMax += 1; - if(sub_80023E4(8) && !pokeStruct->isTeamLeader) + if(CheckQuest(QUEST_CAN_CHANGE_LEADER) && !pokeStruct->isTeamLeader) { sUnknown_203B2BC->menuItems[loopMax].text = sMakeLeader; sUnknown_203B2BC->menuItems[loopMax].menuAction = FRIEND_AREA_ACTION_MENU_ACTION_MAKE_LEADER; @@ -434,7 +434,7 @@ void sub_80278B4(void) break; case FRIEND_AREA_ACTION_MENU_ACTION_MAKE_LEADER: newLeader = &gRecruitedPokemonRef->pokemon[sUnknown_203B2BC->targetPoke]; - playerStruct = GetPlayerPokemonStruct(); + playerStruct = GetLeaderMon1(); if (!newLeader->isTeamLeader) { playerStruct->isTeamLeader = FALSE; newLeader->isTeamLeader = TRUE; @@ -702,7 +702,7 @@ bool8 sub_8027D9C(Pokemon *pokeStruct) var1 = 1; if(var1 != 0) { - if(!sub_80023E4(8)) + if(!CheckQuest(QUEST_CAN_CHANGE_LEADER)) return FALSE; } } @@ -714,8 +714,8 @@ bool8 sub_8027D9C(Pokemon *pokeStruct) bool8 sub_8027DCC(Pokemon *pokeStruct) { u32 var1; - if(sub_808D3BC() != pokeStruct) - if(sub_808D3F8() != pokeStruct) + if(GetLeaderMon2() != pokeStruct) + if(GetPartnerMon2() != pokeStruct) if(!pokeStruct->isTeamLeader) { var1 = 0; @@ -723,7 +723,7 @@ bool8 sub_8027DCC(Pokemon *pokeStruct) var1 = 1; if(var1 != 0) { - if(sub_80023E4(8)) + if(CheckQuest(QUEST_CAN_CHANGE_LEADER)) goto check; } else diff --git a/src/friend_areas_map_util.c b/src/friend_areas_map_util.c index c456a8327..fe3d6eb1e 100644 --- a/src/friend_areas_map_util.c +++ b/src/friend_areas_map_util.c @@ -55,7 +55,7 @@ void FriendAreasMap_InitGfx(void) u8 filename[12]; s32 i, size; - Pokemon *pokeStruct = GetPlayerPokemonStruct(); + Pokemon *pokeStruct = GetLeaderMon1(); OpenedFile *file = OpenFileAndGetFileDataPtr(gUnknown_80D408C[0], &gTitleMenuFileArchive); OpenedFile *file2 = OpenFileAndGetFileDataPtr(gUnknown_80D408C[1], &gTitleMenuFileArchive); @@ -180,7 +180,7 @@ static bool8 FadeScreen(void) if (gFriendAreasMapPtr->brightness < 31) { s32 i; - RGB *color = (void *) gFriendAreasMapPtr->unk0[0]->data; + RGB_Struct *color = (void *)gFriendAreasMapPtr->unk0[0]->data; if (++gFriendAreasMapPtr->brightness >= 31) { gFriendAreasMapPtr->brightness = 31; @@ -190,7 +190,7 @@ static bool8 FadeScreen(void) SetBGPaletteBufferColorRGB(i, color, gFriendAreasMapPtr->brightness, NULL); } - color = (void *) gFriendAreasMapPtr->unk0[1]->data; + color = (void *)gFriendAreasMapPtr->unk0[1]->data; for (i = 0; i < 240; color++, i++) { SetBGPaletteBufferColorRGB(i + 256, color, gFriendAreasMapPtr->brightness, NULL); } @@ -259,17 +259,18 @@ void FriendAreasMap_PrintCurrAreaName(void) windows.id[0].pos.y = 2; windows.id[0].width = 21; windows.id[0].height = 2; - windows.id[0].unk10 = 2; + windows.id[0].totalHeight = 2; + windows.id[1].type = WINDOW_TYPE_NORMAL; + windows.id[2].type = WINDOW_TYPE_NORMAL; + windows.id[3].type = WINDOW_TYPE_NORMAL; - if (gFriendAreasMapPtr->monSpritePos.y - gFriendAreasMapPtr->bgPos.y <= 80) { + if (gFriendAreasMapPtr->monSpritePos.y - gFriendAreasMapPtr->bgPos.y <= 80) windows.id[0].pos.y = 17; - } - else { + else windows.id[0].pos.y = 1; - } ShowWindows(&windows, TRUE, TRUE); sub_80073B8(0); @@ -296,7 +297,7 @@ void FriendAreasMap_PrintAvailableSubAreas(void) .pos = {7, 2}, .width = 21, .height = 2, - .unk10 = 2, + .totalHeight = 2, .header = &header, }, [1] = WIN_TEMPLATE_DUMMY, @@ -334,7 +335,7 @@ void FriendAreasMap_PrintAvailableSubAreas(void) menuInput->cursorArrowPos.y = 8; ResetTouchScreenMenuInput(&menuInput->touchScreen); var = CalcEntriesTotalHeight(menuInput->entriesPerPage, 0); - windows.id[0].unk10 = windows.id[0].height = var + 2; + windows.id[0].totalHeight = windows.id[0].height = var + 2; sub_80137B0(menuInput, var * 8); ShowWindows(&windows, TRUE, TRUE); diff --git a/src/friend_list.c b/src/friend_list.c index eb5331c79..4563a9470 100644 --- a/src/friend_list.c +++ b/src/friend_list.c @@ -36,12 +36,12 @@ static EWRAM_INIT u16 gUnknown_203B2AA = 0; static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY; static const WindowTemplate sUnknown_80DC968 = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITH_HEADER, - .pos = {2, 2}, + .pos = { 2, 2 }, .width = 15, .height = 14, - .unk10 = 14, + .totalHeight = 14, .unk12 = 0, .header = NULL }; @@ -86,7 +86,7 @@ bool8 FriendList_Init(u32 r5, u32 windowId, DungeonPos *pos, u32 r10) case 4: sFriendList->unk18 = 1; sFriendList->unk15 = 1; - if (!sub_80023E4(9)) { + if (!CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { sFriendList->unk16 = 1; } break; @@ -365,7 +365,7 @@ bool8 sub_8024108(s32 param_1) } else if (param_1 == 4) { if (pokeStruct->isTeamLeader) continue; - if (!sub_80023E4(9)) { + if (!CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { if (!IsMonPartner(pokeStruct)) return FALSE; if (PokemonIsOnTeam(pokeStruct)) continue; } diff --git a/src/friend_list_menu.c b/src/friend_list_menu.c index e7a47c7d3..9672c5f7a 100644 --- a/src/friend_list_menu.c +++ b/src/friend_list_menu.c @@ -705,7 +705,7 @@ static bool8 FriendListMenu_isOnTeam(Pokemon *pokeStruct) if (pokeStruct->isTeamLeader) return FALSE; - if (IsMonPartner(pokeStruct) && !sub_80023E4(8)) + if (IsMonPartner(pokeStruct) && !CheckQuest(QUEST_CAN_CHANGE_LEADER)) return FALSE; return TRUE; diff --git a/src/friend_rescue.c b/src/friend_rescue.c index 25d703b92..e670e7277 100644 --- a/src/friend_rescue.c +++ b/src/friend_rescue.c @@ -1489,7 +1489,7 @@ void sub_8032828(void) CreateMenuDialogueBoxAndPortrait(&gUnknown_80E2D7C[0], 0, 6, gUnknown_80E2290, NULL, 4, 0, NULL, 0x101); break; case 0x59: - StrncpyCustom(buffer, GetPlayerPokemonStruct()->name, POKEMON_NAME_LENGTH); + StrncpyCustom(buffer, GetLeaderMon1()->name, POKEMON_NAME_LENGTH); sprintfStatic(gUnknown_203B33C->unk424, gUnknown_80E32C4, buffer); CreateDialogueBoxAndPortrait(gUnknown_203B33C->unk424, 0, 0, 0x101); break; diff --git a/src/game_options.c b/src/game_options.c index de390e08d..4d138409b 100644 --- a/src/game_options.c +++ b/src/game_options.c @@ -185,11 +185,11 @@ void ReadGameOptionsBits(DataSerializer *param_1) void SetWindowBGColor(void) { - struct RGB winColors[] = { - {0x20, 0x48, 0x68}, // Blue - {0x80, 0x38, 0x20}, // Red - {0x28, 0x80, 0x48}, // Green - {0x28, 0x80, 0x48} // Green + struct RGB_Struct winColors[4] = { + { .r = 0x20, .g = 0x48, .b = 0x68, .unk4 = 0x00}, // Blue + { .r = 0x80, .g = 0x38, .b = 0x20, .unk4 = 0x00}, // Red + { .r = 0x28, .g = 0x80, .b = 0x48, .unk4 = 0x00}, // Green + { .r = 0x28, .g = 0x80, .b = 0x48, .unk4 = 0x00} // Green }; SetFontsBaseColor(winColors[gGameOptionsRef->windowColor & NUM_WINDOW_COLORS]); diff --git a/src/graphics_memory.c b/src/graphics_memory.c index ca79ce728..b8ec22716 100644 --- a/src/graphics_memory.c +++ b/src/graphics_memory.c @@ -24,7 +24,7 @@ struct MemCopyData #define MAX_MEM_COPIES 8 -EWRAM_DATA RGB gFontPalette[128] = {0}; +EWRAM_DATA RGB_Struct gFontPalette[128] = {0}; static EWRAM_DATA bool8 sTilemapCopyScheduled[4] = {FALSE}; static EWRAM_DATA s32 sNumMemCopies = 0; static EWRAM_DATA struct MemCopyData sMemCopies[MAX_MEM_COPIES] = {0}; @@ -40,7 +40,7 @@ void InitGraphics(void) s32 i; OpenedFile *file; u32 *dest; - const RGB *rgbColors; + const RGB_Struct *rgbColors; struct FontData *font; #ifdef NONMATCHING const FileArchive *sysFileArchieve; @@ -81,7 +81,7 @@ void InitGraphics(void) InitFontPalette(); file = OpenFileAndGetFileDataPtr("fontsppa", sysFileArchieve); - rgbColors = (RGB *)file->data; + rgbColors = (RGB_Struct *)file->data; for (i = 0; i < 16; rgbColors++, i++) { SetBGPaletteBufferColorArray(0x1F0 + i, rgbColors); @@ -95,7 +95,7 @@ void InitFontPalette(void) { OpenedFile *fontpalFile; s32 i; - RGB *ptr; + RGB_Struct *ptr; fontpalFile = OpenFileAndGetFileDataPtr("fontpal", &gSystemFileArchive); CpuCopy(gFontPalette, fontpalFile->data, sizeof(gFontPalette)); @@ -212,7 +212,7 @@ void CopyBgTilemaps0And1(void) CpuCopy(BG_SCREEN_ADDR(13), gBgTilemaps[1], BG_SCREEN_SIZE); } -void SetFontsBaseColor(RGB a0) +void SetFontsBaseColor(RGB_Struct a0) { s32 i; diff --git a/src/ground_effect.c b/src/ground_effect.c index 33879b064..6956f8c0d 100644 --- a/src/ground_effect.c +++ b/src/ground_effect.c @@ -329,7 +329,7 @@ s32 GroundEffect_Add(s32 _id, const GroundEffectData *effectData, s32 _group, s3 script = effectData->script; if (script == NULL) { if (puVar4->type == 1) { - script = gFunctionScriptTable[58].script; + script = gFunctionScriptTable[NORMAL_CAMERA].script; } if (script == NULL) return id; diff --git a/src/ground_lives.c b/src/ground_lives.c index 5e80ad4dd..2643e0e57 100644 --- a/src/ground_lives.c +++ b/src/ground_lives.c @@ -99,7 +99,7 @@ IWRAM_INIT struct GroundLives *gGroundLives = NULL; struct GroundLiveTypeData { s16 unk0; - s16 unk2; + s16 unk2; // Some species const char *unk4; u8 unk8; u8 unk9; @@ -251,7 +251,7 @@ void FreeGroundLives(void) gGroundLivesMeta = NULL; } -void GroundLives_Select(s32 scriptID, s32 group, s32 sector) +void GroundLives_Select(s32 mapID, s32 group, s32 sector) { const struct GroundScriptHeader *scriptPtr; const struct GroundScriptSector *sectorPtr; @@ -262,13 +262,13 @@ void GroundLives_Select(s32 scriptID, s32 group, s32 sector) const GroundLivesData *livesData; s32 sector_s32; s32 group_s32; - s32 scriptID_s32; + s32 mapID_s32; - scriptID_s32 = (s16)scriptID; + mapID_s32 = (s16)mapID; group_s32 = (s16)group; sector_s32 = (s8)sector; - scriptPtr = GetGroundScript(scriptID_s32, DEBUG_LOC_PTR("../ground/ground_lives.c", 542, "GroundLives_Select")); - Log('\0',"GroundLives Select %3d %3d %3d", scriptID_s32, group_s32, sector_s32); + scriptPtr = GetGroundScript(mapID_s32, DEBUG_LOC_PTR("../ground/ground_lives.c", 542, "GroundLives_Select")); + Log('\0',"GroundLives Select %3d %3d %3d", mapID_s32, group_s32, sector_s32); groupPtr = &scriptPtr->groups[group_s32]; sectorPtr = &groupPtr->sectors[sector_s32]; @@ -276,9 +276,7 @@ void GroundLives_Select(s32 scriptID, s32 group, s32 sector) size = sectorPtr->nLives; for (i = 0; i < size; i++, livesData++) - { - GroundLives_Add(-1,livesData,group_s32,sector_s32); - } + GroundLives_Add(-1, livesData, group_s32, sector_s32); } void GroundLives_Cancel(s32 scriptID, s32 sector) @@ -390,11 +388,11 @@ static s32 sub_80A7B94(s16 *a0) *a0 = 2; break; case 2: { - Pokemon *playerMonStruct = GetPlayerPokemonStruct(); - if (sub_808D3BC() == playerMonStruct) { + Pokemon *playerMonStruct = GetLeaderMon1(); + if (GetLeaderMon2() == playerMonStruct) { *a0 = 1; } - else if (sub_808D3F8() == playerMonStruct) { + else if (GetPartnerMon2() == playerMonStruct) { *a0 = 2; } else { @@ -436,11 +434,11 @@ static s32 sub_80A7B94(s16 *a0) *a0 = 7; break; case 3: { - Pokemon *playerMonStruct = GetPlayerPokemonStruct(); - if (sub_808D3BC() == playerMonStruct) { + Pokemon *playerMonStruct = GetLeaderMon1(); + if (GetLeaderMon2() == playerMonStruct) { *a0 = 6; } - else if (sub_808D3F8() == playerMonStruct) { + else if (GetPartnerMon2() == playerMonStruct) { *a0 = 7; } else { @@ -457,13 +455,13 @@ static s32 sub_80A7B94(s16 *a0) switch (*a0) { case 6: ret = 2; - if (GetPlayerPokemonStruct() == sub_808D3BC()) { + if (GetLeaderMon1() == GetLeaderMon2()) { *a0 = 6; } break; case 7: ret = 1; - if (GetPlayerPokemonStruct() == sub_808D3F8()) { + if (GetLeaderMon1() == GetPartnerMon2()) { *a0 = 6; } break; @@ -485,7 +483,7 @@ static s32 sub_80A7B94(s16 *a0) return -1; } - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { val = sub_808D6A4(sp); } else { @@ -505,7 +503,7 @@ static s32 sub_80A7B94(s16 *a0) GetFriendAreaCapacity2(map, &fAreaCapacity, FALSE, FALSE); if (id < fAreaCapacity.maxPokemon) { Pokemon *monStrPtr = &gRecruitedPokemonRef->pokemon[fAreaCapacity.unk8 + id]; - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { if (PokemonExists(monStrPtr) && !monStrPtr->isTeamLeader) { return -1; } @@ -522,11 +520,11 @@ static s32 sub_80A7B94(s16 *a0) return -1; } else if (id == 0x23) { - Pokemon *playerMonStruct = GetPlayerPokemonStruct(); - if (sub_808D3BC() == playerMonStruct) { + Pokemon *playerMonStruct = GetLeaderMon1(); + if (GetLeaderMon2() == playerMonStruct) { *a0 = 0x21; } - else if (sub_808D3F8() == playerMonStruct) { + else if (GetPartnerMon2() == playerMonStruct) { *a0 = 0x22; } } @@ -561,7 +559,7 @@ s32 sub_80A7DDC(s16 *a0, s16 *speciesDst) return -1; } - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { val = sub_808D6A4(sp); } else { @@ -583,7 +581,7 @@ s32 sub_80A7DDC(s16 *a0, s16 *speciesDst) GetFriendAreaCapacity2(map, &fAreaCapacity, FALSE, FALSE); if (id < fAreaCapacity.maxPokemon) { Pokemon *monStrPtr = &gRecruitedPokemonRef->pokemon[fAreaCapacity.unk8 + id]; - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { if (PokemonExists(monStrPtr) && !monStrPtr->isTeamLeader) { *speciesDst = monStrPtr->speciesNum; return -1; @@ -607,17 +605,17 @@ s32 sub_80A7DDC(s16 *a0, s16 *speciesDst) case 1: case 6: case 33: - *speciesDst = sub_808D3BC()->speciesNum; + *speciesDst = GetLeaderMon2()->speciesNum; break; case 2: case 7: case 34: - *speciesDst = sub_808D3F8()->speciesNum; + *speciesDst = GetPartnerMon2()->speciesNum; break; case 3: case 8: case 35: - *speciesDst = GetPlayerPokemonStruct()->speciesNum; + *speciesDst = GetLeaderMon1()->speciesNum; break; case 36: { // Identical to sStarterMons table @@ -837,33 +835,35 @@ static s32 GroundLives_Add(s32 id_, const GroundLivesData *ptr, s32 group_, s32 if (!var24) { if (sub_809D684(&livesPtr->action, &gGroundLivesMeta->unk32C)) { - s32 r10; - s32 r9; + s32 bakUnk24; + s32 bakStoredDir; // Note: these ptr variables are unfortunately a fakematch, but I was not able to match the function without them... - u16 *ptr1; - s8 *ptr2; + u16 *ptrToUnk24; + s8 *ptrToStoredDir; if (livesPtr->action.scriptData2.savedState != 0) { - r10 = livesPtr->action.scriptData2.unk24; - r9 = livesPtr->action.scriptData2.unk26; + bakUnk24 = livesPtr->action.scriptData2.unk24; + bakStoredDir = livesPtr->action.scriptData2.storedDir; - ptr1 = &livesPtr->action.scriptData.unk24; - ptr2 = &livesPtr->action.scriptData.unk26; + ptrToUnk24 = &livesPtr->action.scriptData.unk24; + ptrToStoredDir = &livesPtr->action.scriptData.storedDir; } else { - r10 = livesPtr->action.scriptData.unk24; - r9 = livesPtr->action.scriptData.unk26; + bakUnk24 = livesPtr->action.scriptData.unk24; + bakStoredDir = livesPtr->action.scriptData.storedDir; - ptr1 = &livesPtr->action.scriptData.unk24; - ptr2 = &livesPtr->action.scriptData.unk26; + ptrToUnk24 = &livesPtr->action.scriptData.unk24; + ptrToStoredDir = &livesPtr->action.scriptData.storedDir; } InitAction2(&livesPtr->action); InitActionWithParams(&livesPtr->action, &gGroundLivesCallbacks, livesPtr, group, sector); GroundScript_ExecutePP(&livesPtr->action, NULL, &gGroundLivesMeta->unk32C, DEBUG_LOC_PTR("../ground/ground_lives.c", 1417, "GroundLives_Add")); - ASM_MATCH_TRICK(ptr2); - *ptr1 = r10; - *ptr2 = r9; + + ASM_MATCH_TRICK(ptrToStoredDir); + + *ptrToUnk24 = bakUnk24; + *ptrToStoredDir = bakStoredDir; r8 = TRUE; } else { @@ -877,19 +877,19 @@ static s32 GroundLives_Add(s32 id_, const GroundLivesData *ptr, s32 group_, s32 scrCommand = ptr->scripts[1]; if (scrCommand == NULL) { - scrCommand = gFunctionScriptTable[19].script; + scrCommand = gFunctionScriptTable[LIVES_MOVE_NORMAL].script; } SetPredefinedScript(&livesPtr->action, 1, scrCommand); scrCommand = ptr->scripts[2]; if (scrCommand == NULL) { - scrCommand = gFunctionScriptTable[4].script; + scrCommand = gFunctionScriptTable[INCOMPLETE_TALK].script; } SetPredefinedScript(&livesPtr->action, 2, scrCommand); scrCommand = ptr->scripts[3]; if (scrCommand == NULL) { - scrCommand = gFunctionScriptTable[6].script; + scrCommand = gFunctionScriptTable[LIVES_REPLY_NORMAL].script; } SetPredefinedScript(&livesPtr->action, 3, scrCommand); @@ -898,13 +898,13 @@ static s32 GroundLives_Add(s32 id_, const GroundLivesData *ptr, s32 group_, s32 if (!var24 && !r8 && !(livesPtr->flags & 0x1800)) { GroundScript_ExecutePP(&livesPtr->action, NULL, &gGroundLivesMeta->unk32C, DEBUG_LOC_PTR("../ground/ground_lives.c", 1460, "GroundLives_Add")); livesPtr->action.scriptData.unk24 = livesPtr->unk160 | livesPtr->unk15E; - livesPtr->action.scriptData.unk26 = livesPtr->direction1; + livesPtr->action.scriptData.storedDir = livesPtr->direction1; } ExecutePredefinedScript(&livesPtr->action, NULL, 0, DEBUG_LOC_PTR("../ground/ground_lives.c", 1466, "GroundLives_Add")); } else if (r8) { livesPtr->directionRelated = TRUE; - livesPtr->direction1 = livesPtr->action.scriptData.unk26; + livesPtr->direction1 = livesPtr->action.scriptData.storedDir; sub_80A9750(livesPtr, livesPtr->action.scriptData.unk24); } @@ -984,7 +984,7 @@ bool8 sub_80A87E0(s32 id_, Pokemon *a1) s32 id = (s16) id_; struct GroundLive *livesPtr = &gGroundLives->array[id]; - if (livesPtr->unk2 != -1 && sub_809B1C0(7, 0, a1)) { + if (livesPtr->unk2 != -1 && ScriptSpecialTextHandler2(SPECIAL_TEXT_FRIEND_MENU, 0, MON_TO_MONORSTRPTR(a1))) { sub_809CD8C(&livesPtr->unk120, 5); return TRUE; } @@ -1266,13 +1266,13 @@ Pokemon *sub_80A8D54(s32 a0) sub_80A7B94(&sp); if (sp == 1 || sp == 6 || sp == 33) { - return sub_808D3BC(); + return GetLeaderMon2(); } if (sp == 2 || sp == 7 || sp == 34) { - return sub_808D3F8(); + return GetPartnerMon2(); } if (sp == 3 || sp == 8 || sp == 35) { - return GetPlayerPokemonStruct(); + return GetLeaderMon1(); } if (sp >= 10 && sp <= 13) { @@ -1283,7 +1283,7 @@ Pokemon *sub_80A8D54(s32 a0) if (sub_8098F88()) return NULL; - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { val = sub_808D6A4(spArray); } else { @@ -1310,7 +1310,7 @@ Pokemon *sub_80A8D54(s32 a0) return NULL; monPtr = &gRecruitedPokemonRef->pokemon[fAreaCapacity.unk8 + id]; - if (sub_80023E4(9)) { + if (CheckQuest(QUEST_CAN_DEPOSIT_PARTNER)) { if (PokemonExists(monPtr) && !monPtr->isTeamLeader) { return monPtr; } @@ -1527,10 +1527,10 @@ UNUSED static bool8 sub_80A91A0(s32 id1_, s32 id2_) } if (livesPtr2->unk2 <= 37) { - livesPtr2->direction1 = sub_8002984(dir1, 5); + livesPtr2->direction1 = TransformDirection1(dir1, DIR_TRANS_FLIP); } else { - livesPtr2->direction1 = sub_8002984(dir2, 5); + livesPtr2->direction1 = TransformDirection1(dir2, DIR_TRANS_FLIP); } return TRUE; @@ -1650,7 +1650,7 @@ static s32 sub_80A95AC(struct GroundLive *livesPtr, PixelPos *posArg1, PixelPos if (ptr2->flags & 0x40) { if (ptr2->flags & 0x200) { - ptr2->direction1 = sub_8002984(livesPtr->direction1, 5); + ptr2->direction1 = TransformDirection1(livesPtr->direction1, DIR_TRANS_FLIP); } if (GroundLives_ExecutePlayerScriptActionLives(livesPtr->id, id2_)) return 2; @@ -1993,7 +1993,7 @@ static s32 sub_80AA2BC(struct GroundLive *livesPtr, u32 flags, PixelPos *pixelPo if (id2 >= 0) { struct GroundLive *ptr2 = &gGroundLives->array[id2]; if (ptr2->flags & 0x200) { - ptr2->direction1 = sub_8002984(livesPtr->direction1, 5); + ptr2->direction1 = TransformDirection1(livesPtr->direction1, DIR_TRANS_FLIP); } if (GroundLives_ExecutePlayerScriptActionLives(livesPtr->id, id2)) return 3; @@ -2168,7 +2168,7 @@ static s32 sub_80AA7B0(struct GroundLive *livesPtr, s16 *a1, u32 flags, PixelPos s16 var = (s16) sub_80A8BBC(id2); if (var >= 14 && var < 30 && sub_80A8E9C(id2) != NULL) { *a1 = id2; - sub_80A9090(id2, (s8) sub_8002984(livesPtr->direction1, 5)); + sub_80A9090(id2, (s8)TransformDirection1(livesPtr->direction1, DIR_TRANS_FLIP)); return 5; } } @@ -2436,10 +2436,10 @@ static void sub_80AAAE8(struct GroundLive *livesPtr, u32 a1, s32 dir_, s32 unuse GetFunctionScript(NULL, &scriptInfo, 6); GroundLives_ExecuteScript(sp, (void *) &livesPtr->action.unk8, &scriptInfo); _ExecutePlayerScript(livesPtr, NULL, NULL); - sub_809B1C0(7, 0, sub_80A8E9C(sp)); + ScriptSpecialTextHandler2(SPECIAL_TEXT_FRIEND_MENU, 0, MON_TO_MONORSTRPTR(sub_80A8E9C(sp))); } else { - sub_809B1C0(7, 0, NULL); + ScriptSpecialTextHandler2(SPECIAL_TEXT_FRIEND_MENU, 0, NULL_MONORSTRPTR); } sub_809CD8C(&livesPtr->unk120, 5); break; diff --git a/src/ground_lives_helper.c b/src/ground_lives_helper.c index b7f62c7c7..14ad0a465 100644 --- a/src/ground_lives_helper.c +++ b/src/ground_lives_helper.c @@ -160,7 +160,7 @@ u32 sub_809CDC8(struct GroundLives_Sub120 *strPtr, u32 *r6, s8 *direction, s32 * return 4; case 4: strPtr->unk0 = 4; - GroundMap_ExecuteEvent(0x45, 0); + GroundMap_ExecuteEvent(FORMATION_HERO, FALSE); *r6 = 1; *direction = -1; return strPtr->unk0; diff --git a/src/ground_main.c b/src/ground_main.c index 093c5c70f..d43358151 100644 --- a/src/ground_main.c +++ b/src/ground_main.c @@ -46,7 +46,7 @@ UNUSED EWRAM_DATA static u8 gUnknown_20398BB = {0}; EWRAM_DATA u16 gUnknown_20398BC = {0}; EWRAM_DATA s16 gUnknown_20398BE = {0}; EWRAM_DATA u32 gUnknown_20398C0 = {0}; -EWRAM_DATA s16 gUnknown_20398C4 = {0}; +EWRAM_DATA s16 gUnknown_20398C4 = {0}; // See enum "ScriptDungeonId" EWRAM_DATA struct DungeonSetupInfo gUnknown_20398C8 = {0}; EWRAM_DATA u8 gUnknown_2039950 = 0; @@ -61,9 +61,7 @@ extern void sub_80A73EC(); extern void sub_8095494(DungeonMailSeed *param_1, u8 index); // TODO: Move these externs to headers -extern s16 sub_80A2654(s16 r0); extern bool8 sub_80048BC(void); -extern u8 sub_80023E4(u32); extern bool8 sub_8099B94(void); extern void sub_8099768(void); extern void sub_809975C(void); @@ -74,7 +72,6 @@ extern void nullsub_16(void); extern void sub_80060EC(void); extern void sub_809977C(void); extern void UpdateFadeInTile(s32); -extern void sub_8001D88(void); static s16 sub_8098FCC(u32 unused); @@ -88,7 +85,7 @@ UNUSED static const u8 sUnusedConstData[] = { u32 xxx_script_related_8098468(s32 param_1) { - s32 r7; + s32 scriptID; s32 varE; gUnknown_20398B4 = param_1; @@ -114,7 +111,7 @@ u32 xxx_script_related_8098468(s32 param_1) s32 local_1c; u32 auStack24; - GetScriptVarScenario(3,&local_1c,&auStack24); + GetScriptVarScenario(SCENARIO_MAIN,&local_1c,&auStack24); gUnknown_20398B8 = local_1c == 0; gUnknown_20398B9 = 1; break; @@ -127,7 +124,7 @@ u32 xxx_script_related_8098468(s32 param_1) break; } ResetSoundEffectCounters(); - if (gUnknown_20398B9 == 0 && !sub_80023E4(0xd)) { + if (gUnknown_20398B9 == 0 && !CheckQuest(QUEST_IN_WORLD_CALAMITY)) { FadeOutAllMusic(0x10); } gUnknown_2026E4E = 0x808; @@ -153,11 +150,11 @@ u32 xxx_script_related_8098468(s32 param_1) gUnknown_20398A8 = 1; gUnknown_20398AC = 0; gUnknown_20398B0 = -1; - gUnknown_20398BE = GetScriptVarValue(0,GROUND_ENTER); - varE = GetScriptVarValue(0,GROUND_ENTER_LINK); + gUnknown_20398BE = GetScriptVarValue(NULL,GROUND_ENTER); + varE = GetScriptVarValue(NULL,GROUND_ENTER_LINK); gUnknown_20398C0 = varE; gUnknown_20398C4 = -1; - r7 = -1; + scriptID = -1; while (gUnknown_20398A8 - 1 <= 1) { SetAutoPressTextboxFrames(-1); ScriptClearTextbox(); @@ -172,31 +169,31 @@ u32 xxx_script_related_8098468(s32 param_1) sub_8001D88(); break; case 5: - r7 = 0x70; + scriptID = EVENT_RESCUE; break; case 9: case 10: - case 0xb: - case 0xc: { + case 11: + case 12: { s32 scriptVar13; - SetScriptVarValue(0,DUNGEON_RESULT,gUnknown_20398B4); - SetScriptVarValue(0,WARP_LOCK,0); + SetScriptVarValue(NULL,DUNGEON_RESULT,gUnknown_20398B4); + SetScriptVarValue(NULL,WARP_LOCK,0); sub_8098C58(); UpdateScriptVarWithImmediate(0,DUNGEON_ENTER_FREQUENCY,1,2); - scriptVar13 = (s16)GetScriptVarValue(0,DUNGEON_ENTER); + scriptVar13 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER); if (scriptVar13 != -1) { s32 var; const DungeonInfo *dungInfo; - if (scriptVar13 == 0x51) { - dungInfo = GetDungeonInfo_80A2608((s16)GetScriptVarValue(0,DUNGEON_ENTER_INDEX)); + if (scriptVar13 == 81) { + dungInfo = GetScriptDungeonInfo((s16)GetScriptVarValue(NULL,DUNGEON_ENTER_INDEX)); } else { - dungInfo = GetDungeonInfo_80A2608(scriptVar13); + dungInfo = GetScriptDungeonInfo(scriptVar13); } - r7 = dungInfo->unkA; + scriptID = dungInfo->scriptID3; if (gUnknown_20398B4 == 9) { - SetScriptVarArrayValue(0,DUNGEON_CLEAR_LIST,(u16) scriptVar13,1); + SetScriptVarArrayValue(NULL,DUNGEON_CLEAR_LIST,(u16) scriptVar13,1); } var = sub_8098FCC(gUnknown_20398B4); if (var != -1) { @@ -206,41 +203,41 @@ u32 xxx_script_related_8098468(s32 param_1) } break; } - case 0xd: + case 13: sub_8098C58(); gUnknown_20398B4 = 1; - SetScriptVarValue(0,START_MODE,1); - SetScriptVarValue(0,GROUND_GETOUT,0); - SetScriptVarValue(0,GROUND_ENTER,0); - SetScriptVarValue(0,GROUND_ENTER_LINK,0); - r7 = 0x71; + SetScriptVarValue(NULL,START_MODE,1); + SetScriptVarValue(NULL,GROUND_GETOUT,0); + SetScriptVarValue(NULL,GROUND_ENTER,0); + SetScriptVarValue(NULL,GROUND_ENTER_LINK,0); + scriptID = DEBUG_SCRIPT; break; - case 0xe: - r7 = 0x73; + case 14: + scriptID = DEMO_01; break; - case 0xf: - r7 = 0x74; + case 15: + scriptID = DEMO_02; break; - case 0x10: - r7 = 0x75; + case 16: + scriptID = DEMO_03; break; - case 0x11: - r7 = 0x76; + case 17: + scriptID = DEMO_04; break; } if (gUnknown_20398B9 == 0) { - s32 var = GetScriptVarValue(0,GROUND_ENTER); - SetScriptVarValue(0,START_MODE,gUnknown_20398B4); + s32 var = GetScriptVarValue(NULL,GROUND_ENTER); + SetScriptVarValue(NULL,START_MODE,gUnknown_20398B4); if (gUnknown_20398B4 != 1) { if (gUnknown_20398B4 == 3) { - SetScriptVarValue(0,GROUND_GETOUT,gUnknown_20398BE); + SetScriptVarValue(NULL,GROUND_GETOUT,gUnknown_20398BE); } else { - SetScriptVarValue(0,GROUND_GETOUT,var); + SetScriptVarValue(NULL,GROUND_GETOUT,var); } } - SetScriptVarValue(0,GROUND_ENTER,gUnknown_20398BE); - SetScriptVarValue(0,GROUND_ENTER_LINK,gUnknown_20398C0); + SetScriptVarValue(NULL,GROUND_ENTER,gUnknown_20398BE); + SetScriptVarValue(NULL,GROUND_ENTER_LINK,gUnknown_20398C0); } gUnknown_20398B4 = 2; gUnknown_20398A8 = 0; @@ -262,11 +259,11 @@ u32 xxx_script_related_8098468(s32 param_1) sub_809C658(); nullsub_16(); UpdateAdventureAchievements(); - if (r7 != -1) { - GroundMap_ExecuteEvent(r7,0); + if (scriptID != -1) { + GroundMap_ExecuteEvent(scriptID, FALSE); } else { - GroundMap_ExecuteEvent(0x66,0); + GroundMap_ExecuteEvent(EVENT_DIVIDE, FALSE); } GroundMap_Action(); sub_8005838(NULL,0); @@ -290,9 +287,9 @@ u32 xxx_script_related_8098468(s32 param_1) else if (gUnknown_20398B9 != 0 && gUnknown_20398B8 == 0 && !sub_809AFAC()) { u16 pressed = gRealInputs.pressed; if ((pressed & (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON | R_BUTTON | L_BUTTON)) || sub_80048BC()) { - GroundMap_ExecuteEvent(0x72,0); - GroundMainGameCancelRequest(0x1e); - FadeOutAllMusic(0x1e); + GroundMap_ExecuteEvent(DEMO_CANCEL, FALSE); + GroundMainGameCancelRequest(30); + FadeOutAllMusic(30); } } GroundMap_Action(); @@ -324,7 +321,7 @@ u32 xxx_script_related_8098468(s32 param_1) } GroundMap_Reset(); - r7 = -1; + scriptID = -1; } FreeGroundMapAction(); @@ -345,69 +342,69 @@ u32 xxx_script_related_8098468(s32 param_1) nullsub_16(); if (gUnknown_20398B9 != 0) { if (gUnknown_20398A8 == 9) { - FadeOutAllMusic(0x1e); - return 0xf; + FadeOutAllMusic(30); + return 15; } else if (gUnknown_20398A8 == 10) { - return 0x10; + return 16; } else { - FadeOutAllMusic(0x1e); - return 0xf; + FadeOutAllMusic(30); + return 15; } } else { switch (gUnknown_20398A8) { case 3: - SetScriptVarValue(0,DUNGEON_ENTER,-1); - SetScriptVarValue(0,DUNGEON_ENTER_INDEX,-1); - SetScriptVarValue(0,START_MODE,4); - SetScriptVarValue(0,DUNGEON_RESULT,4); - SetScriptVarValue(0,GROUND_GETOUT,GetScriptVarValue(0,GROUND_ENTER)); + SetScriptVarValue(NULL,DUNGEON_ENTER,-1); + SetScriptVarValue(NULL,DUNGEON_ENTER_INDEX,-1); + SetScriptVarValue(NULL,START_MODE,4); + SetScriptVarValue(NULL,DUNGEON_RESULT,4); + SetScriptVarValue(NULL,GROUND_GETOUT,GetScriptVarValue(NULL,GROUND_ENTER)); return 5; case 4: - SetScriptVarValue(0,DUNGEON_ENTER,0); - SetScriptVarValue(0,START_MODE,5); - SetScriptVarValue(0,DUNGEON_RESULT,5); - SetScriptVarValue(0,DUNGEON_ENTER,-1); + SetScriptVarValue(NULL,DUNGEON_ENTER,0); + SetScriptVarValue(NULL,START_MODE,5); + SetScriptVarValue(NULL,DUNGEON_RESULT,5); + SetScriptVarValue(NULL,DUNGEON_ENTER,-1); return 6; case 5: { - s32 sVar2 = sub_80A2654(gUnknown_20398C4); - SetScriptVarValue(0,DUNGEON_ENTER,gUnknown_20398C4); - SetScriptVarValue(0,DUNGEON_ENTER_INDEX,sVar2); - SetScriptVarArrayValue(0,DUNGEON_ENTER_LIST,(u16) gUnknown_20398C4,1); - SetScriptVarValue(0,START_MODE,7); - SetScriptVarValue(0,DUNGEON_RESULT,7); - if ((s16)GetScriptVarValue(0,GROUND_PLACE) == 10) { - SetScriptVarValue(0,GROUND_PLACE,0); + s32 rescueDungeonID = ScriptDungeonIDToRescueDungeonID(gUnknown_20398C4); + SetScriptVarValue(NULL,DUNGEON_ENTER,gUnknown_20398C4); + SetScriptVarValue(NULL, DUNGEON_ENTER_INDEX, rescueDungeonID); + SetScriptVarArrayValue(NULL,DUNGEON_ENTER_LIST,(u16) gUnknown_20398C4,1); + SetScriptVarValue(NULL,START_MODE,7); + SetScriptVarValue(NULL,DUNGEON_RESULT,7); + if ((s16)GetScriptVarValue(NULL,GROUND_PLACE) == 10) { + SetScriptVarValue(NULL,GROUND_PLACE,0); } return 7; } case 6: - SetScriptVarValue(0,DUNGEON_ENTER,0x51); - SetScriptVarValue(0,DUNGEON_ENTER_INDEX,gUnknown_20398C4); - SetScriptVarValue(0,START_MODE,7); - SetScriptVarValue(0,DUNGEON_RESULT,7); - if ((s16)GetScriptVarValue(0,GROUND_PLACE) == 10) { - SetScriptVarValue(0,GROUND_PLACE,0); + SetScriptVarValue(NULL,DUNGEON_ENTER,81); + SetScriptVarValue(NULL,DUNGEON_ENTER_INDEX,gUnknown_20398C4); + SetScriptVarValue(NULL,START_MODE,7); + SetScriptVarValue(NULL,DUNGEON_RESULT,7); + if ((s16)GetScriptVarValue(NULL,GROUND_PLACE) == 10) { + SetScriptVarValue(NULL,GROUND_PLACE,0); } return 8; case 7: - SetScriptVarValue(0,DUNGEON_ENTER,0x50); - SetScriptVarValue(0,DUNGEON_ENTER_INDEX,gUnknown_2039950); - SetScriptVarValue(0,START_MODE,7); - SetScriptVarValue(0,DUNGEON_RESULT,7); + SetScriptVarValue(NULL,DUNGEON_ENTER,80); + SetScriptVarValue(NULL,DUNGEON_ENTER_INDEX,gUnknown_2039950); + SetScriptVarValue(NULL,START_MODE,7); + SetScriptVarValue(NULL,DUNGEON_RESULT,7); return 9; case 8: - SetScriptVarValue(0,DUNGEON_ENTER,0x52); - SetScriptVarValue(0,DUNGEON_ENTER_INDEX,gUnknown_20398C4); - SetScriptVarValue(0,START_MODE,7); - SetScriptVarValue(0,DUNGEON_RESULT,7); + SetScriptVarValue(NULL,DUNGEON_ENTER,82); + SetScriptVarValue(NULL,DUNGEON_ENTER_INDEX,gUnknown_20398C4); + SetScriptVarValue(NULL,START_MODE,7); + SetScriptVarValue(NULL,DUNGEON_RESULT,7); return 10; default: - SetScriptVarValue(0,START_MODE,1); - FadeOutAllMusic(0x10); - return 0xe; + SetScriptVarValue(NULL,START_MODE,1); + FadeOutAllMusic(16); + return 14; } } } @@ -521,7 +518,7 @@ bool8 sub_8098D80(u32 speed) gUnknown_20398AC = 1; gUnknown_20398B0 = speed; sub_809C730(); - if(!sub_80023E4(0xD)) + if(!CheckQuest(QUEST_IN_WORLD_CALAMITY)) { FadeOutAllMusic(speed); } @@ -538,7 +535,7 @@ bool8 sub_8098DCC(u32 speed) gUnknown_20398AC = 1; gUnknown_20398B0 = speed; sub_809C730(); - if(!sub_80023E4(0xD)) + if(!CheckQuest(QUEST_IN_WORLD_CALAMITY)) { FadeOutAllMusic(speed); } @@ -636,45 +633,52 @@ const char *GetCurrentGroundPlaceName(void) return GetGroundPlaceName(GetScriptVarValue(NULL, GROUND_PLACE)); } +// Returns an enum GroundMapID static s16 sub_8098FCC(u32 unused) { - s32 iVar4; - s32 iVar5; - s32 iVar6; - const DungeonInfo *iVar3; + s32 scriptDungeon; + s32 scriptDungeon__; + s32 scriptDungeon_; + const DungeonInfo *di; - iVar5 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER); - iVar6 = iVar5; - if (iVar5 == -1) return 0xC; + scriptDungeon__ = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER); + scriptDungeon_ = scriptDungeon__; + if (scriptDungeon__ == -1) + return MAP_TEAM_BASE_INSIDE; - if (iVar5 == 0x51) - iVar4 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER_INDEX); - else - iVar4 = iVar6; + if (scriptDungeon__ == SCRIPT_DUNGEON_81) + scriptDungeon = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX); + else + scriptDungeon = scriptDungeon_; - iVar3 = GetDungeonInfo_80A2608(iVar4); - if (gUnknown_20398B4 == 9) { - return iVar3->unk2; - } - switch((s16)(iVar3->unk4 - 0xb2)) { - case 0: - if (ScriptVarScenarioAfter(SCENARIO_MAIN,2,-1) != 0) return 0xc; - break; - case 0xf: - case 0x11: - case 0x14: - case 0x17: - if (!sub_80023E4(5)) return 0xC; - break; - default: - break; - } - return iVar3->unk4; + di = GetScriptDungeonInfo(scriptDungeon); + if (gUnknown_20398B4 == 9) + return di->mapID2; + + switch (di->mapID3) { + case MAP_TINY_WOODS_ENTRY: { + if (ScriptVarScenarioAfter(SCENARIO_MAIN, 2, -1)) + return MAP_TEAM_BASE_INSIDE; + break; + } + case MAP_LAPIS_CAVE_ENTRY: + case MAP_MT_BLAZE_ENTRY: + case MAP_FROSTY_FOREST_ENTRY: + case MAP_MT_FREEZE_ENTRY: { + if (!CheckQuest(QUEST_UNK5)) + return MAP_TEAM_BASE_INSIDE; + break; + } + default: + break; + } + + return di->mapID3; } UNUSED static const char *sub_80990B8(void) { - s16 index = sub_8098FCC(0xB); + s16 index = sub_8098FCC(11); if (index != -1) { return GetGroundPlaceName(gGroundMapConversionTable[index].groundPlaceId); } @@ -686,9 +690,9 @@ UNUSED static const char *sub_80990B8(void) static inline bool8 sub_80990EC_sub(struct DungeonSetupInfo *iVar1, u32 iVar2) { bool8 flag = FALSE; - iVar1->sub0.unkB = 0; + iVar1->sub0.missionKind = DUNGEON_MISSION_UNK0; - if ((u16)(iVar2 - 0x25) < 3) + if ((u16)(iVar2 - 37) < 3) flag = TRUE; else flag = FALSE; @@ -703,8 +707,8 @@ u8 sub_80990EC(struct DungeonSetupInfo *param_1, s32 param_2) u8 dungeonIndex; s32 param2 = (s16) param_2; - iVar1 = GetDungeonInfo_80A2608(param2); - dungeonIndex = iVar1->dungeonIndex; + iVar1 = GetScriptDungeonInfo(param2); + dungeonIndex = iVar1->dungeonID; param_1->sub0.unk0.id = dungeonIndex; param_1->sub0.unk0.floor = 1; @@ -714,7 +718,7 @@ u8 sub_80990EC(struct DungeonSetupInfo *param_1, s32 param_2) case 1: if (sub_80990EC_sub(param_1, param2)) { param_1->sub0.unkC = 1; - sub_80A8EC0(auStack_98, 0x5b); + sub_80A8EC0(auStack_98, 91); BoundedCopyStringtoBuffer(nameBuffer, auStack_98, POKEMON_NAME_LENGTH); { struct StoryMonData gengarData = @@ -737,10 +741,10 @@ u8 sub_80990EC(struct DungeonSetupInfo *param_1, s32 param_2) } break; case 4: - param_1->sub0.unkB = 0; + param_1->sub0.missionKind = DUNGEON_MISSION_UNK0; break; case 2: - param_1->sub0.unkB = 2; + param_1->sub0.missionKind = DUNGEON_MISSION_ACCEPTEDJOB_RELATED; break; } param_1->sub0.unk4 = 0; @@ -780,30 +784,30 @@ void sub_809927C(u8 param_1) { gUnknown_203B49C = 1; gUnknown_203B49D = 1; - gUnknown_20398C4 = 0x50; + gUnknown_20398C4 = 80; gUnknown_2039950 = param_1; - SetScriptVarValue(0x0,DUNGEON_ENTER,0x50); - SetScriptVarValue(0x0,DUNGEON_ENTER_INDEX,gUnknown_2039950); + SetScriptVarValue(NULL,DUNGEON_ENTER,80); + SetScriptVarValue(NULL,DUNGEON_ENTER_INDEX,gUnknown_2039950); sub_8095494(&gUnknown_20398C8.dungeonSeed,param_1); - gUnknown_20398C8.sub0.unkB = 1; + gUnknown_20398C8.sub0.missionKind = DUNGEON_MISSION_OUTONRESCUE; gUnknown_20398C8.sub0.unkC = 0; gUnknown_20398C8.sub0.unk4 = 0; gUnknown_20398C8.sub0.unkD = 0; } -bool8 sub_80992E0(s16 *param_1, s16 *param_2) +bool8 sub_80992E0(s16 *param_1, s16 *rescueDungeonId) { s32 sVar2; - sVar2 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER); - if ((((sVar2 != -1) && (sVar2 != 0x50)) && (sVar2 != 0x51)) && (sVar2 != 0x52)) { + sVar2 = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER); + if (sVar2 != -1 && sVar2 != 80 && sVar2 != 81 && sVar2 != 82) { *param_1 = sVar2; - *param_2 = GetScriptVarValue(NULL,DUNGEON_ENTER_INDEX); + *rescueDungeonId = GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX); return TRUE; } else { *param_1 = -1; - *param_2 = -1; + *rescueDungeonId = RESCUE_DUNGEON_INVALID; return FALSE; } } @@ -814,11 +818,11 @@ bool8 sub_8099328(u8 *dungeonId) const DungeonInfo* dungeonInfo; script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER); - if (script_disc == 0x51) { + if (script_disc == 81) { script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX); - dungeonInfo = GetDungeonInfo_80A2608(script_disc); - if (dungeonInfo->dungeonIndex < 0x3f) { - *dungeonId = dungeonInfo->dungeonIndex; + dungeonInfo = GetScriptDungeonInfo(script_disc); + if (dungeonInfo->dungeonID < DUNGEON_OUT_ON_RESCUE) { + *dungeonId = dungeonInfo->dungeonID; return TRUE; } } @@ -831,10 +835,10 @@ bool8 sub_8099360(u8 *dungeonId) const DungeonInfo* dungeonInfo; script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER); - if (script_disc == 0x52) { + if (script_disc == 82) { script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX); - dungeonInfo = GetDungeonInfo_80A2608(script_disc); - *dungeonId = dungeonInfo->dungeonIndex; + dungeonInfo = GetScriptDungeonInfo(script_disc); + *dungeonId = dungeonInfo->dungeonID; return TRUE; } return FALSE; @@ -843,7 +847,7 @@ bool8 sub_8099360(u8 *dungeonId) bool8 sub_8099394(u8 *param) { s16 script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER); - if (script_disc == 0x50) { + if (script_disc == 80) { script_disc = GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX); *param = script_disc; return TRUE; diff --git a/src/ground_map.c b/src/ground_map.c index 0de14f94b..ea68be8ca 100644 --- a/src/ground_map.c +++ b/src/ground_map.c @@ -290,21 +290,21 @@ static void GroundMap_GetFirstStationScript(ScriptInfoSmall *script, s16 r1) } // overlay_0000.bin::02155DD0 -void GroundMap_ExecuteEvent(s16 scriptIndex, u32 param_2) +void GroundMap_ExecuteEvent(s16 scriptID, bool32 a1) { ScriptInfoSmall script; - s32 index_s32; - u8 iVar2; + s32 scriptID_; + bool8 a1_; - index_s32 = scriptIndex; - iVar2 = param_2; + scriptID_ = scriptID; + a1_ = a1; - Log(0, "GroundMap ExecuteEvent %3d %d ==================", index_s32, iVar2); - GetFunctionScript(NULL, &script, index_s32); - if (iVar2 != 0) + Log(0, "GroundMap ExecuteEvent %3d %d ==================", scriptID_, a1_); + GetFunctionScript(NULL, &script, scriptID_); + if (a1_) script.state = 5; - GroundScript_ExecutePP(&gGroundMapAction->action, 0, &script, DEBUG_LOC_PTR("../ground/ground_map.c", 0x17D, "GroundMap_ExecuteEvent")); + GroundScript_ExecutePP(&gGroundMapAction->action, 0, &script, DEBUG_LOC_PTR("../ground/ground_map.c", 381, "GroundMap_ExecuteEvent")); } void GroundMap_ExecuteStation(s32 _map, s32 _group, s32 _sector, bool32 _setScriptState) @@ -372,7 +372,7 @@ s16 GetAdjustedGroundMap(s32 mapId) retMapId = (s16)(retMapId + ((GetScriptVarValue(NULL, BASE_KIND) * TEAM_BASE_MAPS_PER_SPECIES) + GetScriptVarValue(NULL, BASE_LEVEL))); break; case MAP_WHISCASH_POND: - if (sub_80023E4(6)) { + if (CheckQuest(QUEST_REACHED_POSTGAME)) { retMapId = MAP_WHISCASH_POND_OPEN; } break; diff --git a/src/ground_object.c b/src/ground_object.c index da6db81b3..e4c3c4f4f 100644 --- a/src/ground_object.c +++ b/src/ground_object.c @@ -422,9 +422,9 @@ s32 GroundObject_Add(s32 id_, const GroundObjectData *objectData, s32 group_, s3 SetPredefinedScript(&parent->action,1, (objectData->scripts[1] != NULL) ? objectData->scripts[1] : (SpriteHasPokemonSize_80A66A4(&parent->unk144)) ? gUnknown_8118350 : gUnknown_81182F4); SetPredefinedScript(&parent->action,2,(objectData->scripts[2] != NULL) ? objectData->scripts[2] - : gFunctionScriptTable[4].script); + : gFunctionScriptTable[INCOMPLETE_TALK].script); SetPredefinedScript(&parent->action,3,(objectData->scripts[3] != NULL) ? objectData->scripts[3] - : gFunctionScriptTable[8].script); + : gFunctionScriptTable[OBJECT_REPLY_NORMAL].script); if (objectData->scripts[0] != NULL) { SetPredefinedScript(&parent->action,0,objectData->scripts[0]); diff --git a/src/ground_script.c b/src/ground_script.c index 738a1a0a0..a196a1fd0 100644 --- a/src/ground_script.c +++ b/src/ground_script.c @@ -72,8 +72,8 @@ u8 sub_80964E4(); #define SCRIPT_LOCKS_ARR_COUNT 129 static EWRAM_DATA s16 gCurrentMap = 0; -static EWRAM_DATA s16 gUnknown_2039A32 = 0; -static EWRAM_DATA s16 gUnknown_2039A34 = 0; +static EWRAM_DATA s16 gUnknown_2039A32 = 0; // See enum "GroundMapID" +static EWRAM_DATA s16 gUnknown_2039A34 = 0; // See enum "GroundMapID" static EWRAM_DATA u8 gAnyScriptLocked = 0; // Hard to say why the arrays are larger than SCRIPT_LOCKS_ARR_COUNT. Could be unused EWRAM variables or special case indexes. static ALIGNED(4) EWRAM_DATA u8 gScriptLocks[SCRIPT_LOCKS_ARR_COUNT + 7] = {0}; @@ -120,7 +120,7 @@ static const ScriptCommand gUnknown_81164E4[] = { static s32 ExecuteScriptCommand(Action *action); static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3); -static const ScriptCommand *FindLabel(Action *action, s32 r1); +static const ScriptCommand *FindLabel(Action *action, s32 labelNum); static const ScriptCommand *ResolveJump(Action *action, s32 r1); static void sub_80A2500(s32 param_1, ActionUnkIds *param_2); static void sub_80A252C(s32 param_1, ActionUnkIds *param_2); @@ -182,15 +182,16 @@ static void InitScriptData(ScriptData *a0) a0->script.ptr = 0; a0->savedScript.ptr2 = 0; a0->savedScript.ptr = 0; - a0->curScriptOp = 0; + a0->curScriptOp = CMD_BYTE_00; a0->curPtr = 0; a0->unk22 = -1; a0->unk24 = 0; - a0->unk26 = 0xFF; + a0->storedDir = -1; a0->branchDiscriminant = 0; a0->unk2A = 0; a0->unk2C = 0; a0->unk30 = 0; + for (i = 0; i < 4; i++) { a0->localVars.val[i] = 0; } @@ -301,9 +302,9 @@ bool8 GetPredefinedScript(Action *param_1, ScriptInfoSmall *script, s32 _index) return scriptPtr != NULL; } -void GetFunctionScript(Action *param_1, ScriptInfoSmall *script, s16 index) +void GetFunctionScript(Action *param_1, ScriptInfoSmall *script, s16 scriptID) { - s32 index_s32 = index; + s32 index_s32 = scriptID; script->ptr = gFunctionScriptTable[index_s32].script; script->state = 2; if (param_1 != NULL) { @@ -387,7 +388,7 @@ bool8 GroundScript_ExecutePP(Action *action, ActionUnkIds *param_2, ScriptInfoSm action->scriptData.savedScript.ptr2 = NULL; if (action->callbacks->getDirection != 0) { - action->callbacks->getDirection(action->parentObject, &action->scriptData.unk26); + action->callbacks->getDirection(action->parentObject, &action->scriptData.storedDir); } return TRUE; } @@ -400,7 +401,7 @@ bool8 ExecutePredefinedScript(Action *param_1, ActionUnkIds *param_2, s16 index, return GroundScript_ExecutePP(param_1, param_2, &auStack28, debug); } -static u8 GroundScriptCheckLockCondition(Action *param_1, s16 param_2) +static bool8 GroundScriptCheckLockCondition(Action *param_1, s16 param_2) { s32 param_2_s32; @@ -408,13 +409,13 @@ static u8 GroundScriptCheckLockCondition(Action *param_1, s16 param_2) if ((param_2 == 0) && (IsTextboxOpen_809A750() == 0)) { param_1->scriptData.script.ptr = ResolveJump(param_1, 0); - return 0; + return FALSE; } else { param_1->scriptData.unk22 = param_2_s32; param_1->scriptData.savedState = 2; gAnyScriptLocked = 1; - return 1; + return TRUE; } } @@ -503,14 +504,28 @@ s16 HandleAction(Action *action, const DebugLocation *debug) case 2: { switch (action->scriptData.curScriptOp) { // handled cases (all hex) - // 3, 4, 5, 6, 7, 22..28, 2c, 30..38, 39, 3a, 3b, 3c, 3d, 3e, 3f, + // 03, 04, 05, 06, 07, 22..28, 2c, 30..38, 39, 3a, 3b, 3c, 3d, 3e, 3f, // 58..5b, 5d, 5e, 60, 61..67, 68, 69..6f, 70, 71..76, 77..7c, 7d..82, 83..88, // 89, 8a, 8b..90, 91..95, 98, 99, 9b..a3, cf, d2..d8, da, db, dc, dd, de, df, // e0, e1, e2, e3, e5 // other cases up to 0xf1 immediately break (which breaks again and loops for ExScrCmd) - case 0x58 ... 0x5b: case 0x5d: case 0x5e: case 0x60: - case 0x8b ... 0x90: case 0x98: case 0x99: - case 0xdb: case 0xdc: { + case CMD_BYTE_58: + case CMD_BYTE_59: + case CMD_BYTE_5A: + case CMD_BYTE_5B: + case CMD_BYTE_5D: + case CMD_BYTE_5E: + case CMD_BYTE_60: + case CMD_BYTE_8B: // SET_DIR_WAIT + case CMD_BYTE_8C: + case CMD_BYTE_8D: + case CMD_BYTE_8E: + case CMD_BYTE_8F: + case CMD_BYTE_90: + case CMD_BYTE_98: + case CMD_BYTE_99: + case CMD_BYTE_DB: + case CMD_BYTE_DC: { if (action->scriptData.unk2A > 0) { action->scriptData.unk2A--; loopContinue = FALSE; @@ -520,78 +535,87 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0xdd: { - if (action->callbacks->func4C_spriteRelatedCheck(action->parentObject)) { + case CMD_BYTE_DD: { + if (action->callbacks->func4C_spriteRelatedCheck(action->parentObject)) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } + break; } - case 0xde: { - if (action->callbacks->func50_spriteRelated(action->parentObject)) { + case CMD_BYTE_DE: { + if (action->callbacks->func50_spriteRelated(action->parentObject)) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } + break; } - case 0x22 ... 0x28: - case 0xdf: { - if (sub_8099B94()) { + case CMD_BYTE_22: + case CMD_BYTE_23: + case CMD_BYTE_24: + case CMD_BYTE_25: + case CMD_BYTE_26: + case CMD_BYTE_27: + case CMD_BYTE_28: + case CMD_BYTE_DF: { + if (sub_8099B94()) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } + break; } - case 0xe0: { + case CMD_BYTE_E0: { cmd = *action->scriptData.curPtr; if (IsEqualtoBGTrack(cmd.argShort)) { - if (action->scriptData.unk2C++ < 10800) { + if (action->scriptData.unk2C++ < 180 * 60) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } } else { action->scriptData.savedState = 3; } break; } - case 0xe1: case 0xe2: { + case CMD_BYTE_E1: // WAIT_FANFARE1 + case CMD_BYTE_E2: { // WAIT_FANFARE2 cmd = *action->scriptData.curPtr; if (IsSoundPlaying(cmd.argShort)) { - if (action->scriptData.unk2C++ < 3600) { + if (action->scriptData.unk2C++ < 60 * 60) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } } else { action->scriptData.savedState = 3; } break; } - case 0x61 ... 0x67: { + case CMD_BYTE_61: + case CMD_BYTE_62: + case CMD_BYTE_63: + case CMD_BYTE_64: + case CMD_BYTE_65: + case CMD_BYTE_66: + case CMD_BYTE_67: { PixelPos pos, pos2; action->callbacks->getHitboxCenter(action->parentObject, &pos); pos2.x = action->scriptData.pos2.x - pos.x; pos2.y = action->scriptData.pos2.y - pos.y; ClampPixelPos(&pos2, action->scriptData.unk30); + if (pos2.x == 0 && pos2.y == 0) { action->scriptData.savedState = 3; break; } + if (action->callbacks->moveRelative(action->parentObject, &pos2) & 9) { action->scriptData.savedState = 3; break; } + action->callbacks->setEventIndex(action->parentObject, 0x1000); if (action->scriptData.unk2A >= 0) { @@ -608,7 +632,13 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x69 ... 0x6f: { + case CMD_BYTE_69: + case CMD_BYTE_6A: + case CMD_BYTE_6B: + case CMD_BYTE_6C: + case CMD_BYTE_6D: + case CMD_BYTE_6E: + case CMD_BYTE_6F: { PixelPos pos, pos2; s32 res; s32 dir; @@ -624,9 +654,9 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } res = action->callbacks->moveRelative(action->parentObject, &pos2); dir = (s8) VecDirection8Radial(&pos2); - dirBefore = action->scriptData.unk26; + dirBefore = action->scriptData.storedDir; dirS8 = dir; - action->scriptData.unk26 = dirS8; + action->scriptData.storedDir = dirS8; action->callbacks->setDirection(action->parentObject, dir); if (res & 9) { action->scriptData.savedState = 3; @@ -648,8 +678,18 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x71 ... 0x76: - case 0x7d ... 0x82: { + case CMD_BYTE_71: + case CMD_BYTE_72: + case CMD_BYTE_73: + case CMD_BYTE_74: + case CMD_BYTE_75: + case CMD_BYTE_76: + case CMD_BYTE_7D: + case CMD_BYTE_7E: + case CMD_BYTE_7F: + case CMD_BYTE_80: + case CMD_BYTE_81: + case CMD_BYTE_82: { if (action->scriptData.unk2A > 0) { PixelPos pos; InterpolatePixelPos(&pos, &action->scriptData.pos1, &action->scriptData.pos2, action->scriptData.unk2A, action->scriptData.unk2C); @@ -664,8 +704,18 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x77 ... 0x7c: - case 0x83 ... 0x88: { + case CMD_BYTE_77: + case CMD_BYTE_78: + case CMD_BYTE_79: + case CMD_BYTE_7A: + case CMD_BYTE_7B: + case CMD_BYTE_7C: + case CMD_BYTE_83: + case CMD_BYTE_84: + case CMD_BYTE_85: + case CMD_BYTE_86: + case CMD_BYTE_87: + case CMD_BYTE_88: { if (action->scriptData.unk2A > 0) { PixelPos pos1, pos2, pos3; s32 dir; @@ -677,9 +727,9 @@ s16 HandleAction(Action *action, const DebugLocation *debug) pos3.x = pos2.x - pos1.x; pos3.y = pos2.y - pos1.y; dir = (s8) VecDirection8Radial(&pos3); - dirBefore = action->scriptData.unk26; + dirBefore = action->scriptData.storedDir; dirS8 = dir; - action->scriptData.unk26 = dirS8; + action->scriptData.storedDir = dirS8; action->callbacks->setDirection(action->parentObject, dir); action->callbacks->moveReal(action->parentObject, &pos2); action->callbacks->setEventIndex(action->parentObject, 0x1000); @@ -692,7 +742,8 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x68: case 0x70: { + case CMD_BYTE_68: + case CMD_BYTE_70: { s32 height, unk; s32 delta; action->callbacks->getPosHeightAndUnk(action->parentObject, &height, &unk); @@ -708,7 +759,8 @@ s16 HandleAction(Action *action, const DebugLocation *debug) loopContinue = FALSE; break; } - case 0x89: case 0x8a: { + case CMD_BYTE_89: + case CMD_BYTE_8A: { PixelPos pos; s8 dir; action->callbacks->getDirection(action->parentObject, &dir); @@ -729,7 +781,11 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x91 ... 0x95: { + case CMD_BYTE_91: // ROTATE_TO + case CMD_BYTE_92: // CMD_UNK_92 + case CMD_BYTE_93: // CMD_UNK_93 + case CMD_BYTE_94: // CMD_UNK_94 + case CMD_BYTE_95: { // CMD_UNK_95 if (action->scriptData.unk2A > 0) { action->scriptData.unk2A--; loopContinue = FALSE; @@ -747,11 +803,12 @@ s16 HandleAction(Action *action, const DebugLocation *debug) action->callbacks->getDirection(action->parentObject, &dir); // arg1h synthetic switch (cmd.op) { - case 0x91: case 0x92: { + case CMD_BYTE_91: // ROTATE_TO + case CMD_BYTE_92: { // CMD_UNK_92 tmp2 = (s8) action->scriptData.unk4D; break; } - case 0x93: { + case CMD_BYTE_93: { // CMD_UNK_93 s16 res; res = sub_80A7AE8((s16)cmd.arg1); if (res >= 0) { @@ -761,7 +818,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x94: { + case CMD_BYTE_94: { // CMD_UNK_94 s32 res; res = (s16)sub_80A7AE8((s16)cmd.arg1); if (res >= 0) { @@ -771,7 +828,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x95: { + case CMD_BYTE_95: { // CMD_UNK_95 flag = TRUE; action->callbacks->getHitboxCenter(action->parentObject, &pos1); action->callbacks->getSize(action->parentObject, &pos2); @@ -793,22 +850,30 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } ASM_MATCH_TRICK(dir); - action->scriptData.unk26 = sub_8002A70(dir, tmp2, (u8)cmd.argShort); - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->scriptData.storedDir = TransformDirection2(dir, tmp2, (u8)cmd.argShort); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); action->scriptData.unk2A = cmd.argByte; } break; } - case 0x9b ... 0xa3: { - if (sub_809D234()) { + case CMD_BYTE_9B: + case CMD_BYTE_9C: + case CMD_BYTE_9D: + case CMD_BYTE_9E: + case CMD_BYTE_9F: + case CMD_BYTE_A0: + case CMD_BYTE_A1: + case CMD_BYTE_A2: + case CMD_BYTE_A3: { + if (sub_809D234()) loopContinue = FALSE; - } - else { + else action->scriptData.savedState = 3; - } + break; } - case 0xe3: case 0xe5: { + case CMD_BYTE_E3: + case CMD_BYTE_E5: { // CMD_UNK_E5 if (action->scriptData.unk22 != -1) { loopContinue = FALSE; } @@ -818,7 +883,16 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x2c: case 0x30 ... 0x38: { + case CMD_BYTE_2C: + case CMD_BYTE_30: + case CMD_BYTE_31: + case CMD_BYTE_32: + case CMD_BYTE_33: // MSG_QUIET + case CMD_BYTE_34: + case CMD_BYTE_35: + case CMD_BYTE_36: + case CMD_BYTE_37: + case CMD_BYTE_38: { if (action->scriptData.unk22 != -1) { loopContinue = FALSE; } @@ -828,7 +902,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x39: { + case CMD_BYTE_39: { if (action->scriptData.unk22 != -1) { loopContinue = FALSE; } @@ -841,7 +915,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x3b: { + case CMD_BYTE_3B: { s32 tmp; cmd = *action->scriptData.curPtr; tmp = sub_80A14E8(action, cmd.argByte, cmd.argShort, cmd.arg1); @@ -854,7 +928,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x3c: { + case CMD_BYTE_3C: { s32 val; if (!sub_809B260(&val)) { loopContinue = FALSE; @@ -866,7 +940,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x03: { + case CMD_BYTE_03: { s32 val; if (!sub_809B260(&val)) { loopContinue = FALSE; @@ -881,7 +955,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) sub_80A87AC(0, 0); break; } - case 0x04: { + case CMD_BYTE_04: { if (action->scriptData.branchDiscriminant == 0) { s32 val; if (!sub_809B260(&val)) { @@ -914,7 +988,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } // fallthrough } - case 0x06: { + case CMD_BYTE_06: { if (action->scriptData.branchDiscriminant == 0) { s32 val; s16 disc; @@ -923,7 +997,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) break; } if (val >= 0) { - SetScriptVarValue(NULL, 19, action->scriptData.curScriptOp == 4 ? RescueDungeonToScriptDungeonId(val) : (s16)val); + SetScriptVarValue(NULL, 19, action->scriptData.curScriptOp == CMD_BYTE_04 ? RescueDungeonToScriptDungeonId(val) : (s16)val); disc = 1; } else { disc = -1; @@ -934,7 +1008,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } // fallthrough } - case 0x07: { + case CMD_BYTE_07: { if (action->scriptData.branchDiscriminant == 1) { s32 dungeonEnter; u32 res; @@ -943,13 +1017,13 @@ s16 HandleAction(Action *action, const DebugLocation *debug) if (sub_80990EC(&unkStruct, dungeonEnter)) { s32 val; sub_8099220(&unkStruct, dungeonEnter); - val = sub_80023E4(6); + val = CheckQuest(QUEST_REACHED_POSTGAME); res = BufferDungeonRequirementsText(unkStruct.sub0.unk0.id, 0, gUnknown_203B4B0, val, FALSE); gUnknown_2039DA4 = res; switch (res) { case 2: { action->scriptData.branchDiscriminant = 2; - sub_809B1C0(9, 1, gUnknown_203B4B0); + ScriptSpecialTextHandler2(SPECIAL_TEXT_YES_NO_WITH_LARGE_BOX, 1, STR_TO_MONORSTRPTR(gUnknown_203B4B0)); if (GroundScriptCheckLockCondition(action, 1)) { sub_80A87AC(0, 11); } @@ -961,7 +1035,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } case 1: { action->scriptData.branchDiscriminant = 4; - sub_809B1C0(10, 1, gUnknown_203B4B0); + ScriptSpecialTextHandler2(SPECIAL_TEXT_LARGE_TEXT_BOX, 1, STR_TO_MONORSTRPTR(gUnknown_203B4B0)); if (GroundScriptCheckLockCondition(action, 1)) { sub_80A87AC(0, 11); } @@ -979,19 +1053,19 @@ s16 HandleAction(Action *action, const DebugLocation *debug) break; } } - case 0x05: + case CMD_BYTE_05: if (action->scriptData.branchDiscriminant == 1) { unkStruct_203B480 *ret; s32 val; u32 res; ret = GetMailatIndex(GetScriptVarValue(NULL, 20)); - val = sub_80023E4(6); + val = CheckQuest(QUEST_REACHED_POSTGAME); res = BufferDungeonRequirementsText(ret->dungeonSeed.location.id, 0, gUnknown_203B4B0, val, TRUE); gUnknown_2039DA4 = res; switch (res) { case 2: { action->scriptData.branchDiscriminant = 2; - sub_809B1C0(9, 1, gUnknown_203B4B0); + ScriptSpecialTextHandler2(SPECIAL_TEXT_YES_NO_WITH_LARGE_BOX, 1, STR_TO_MONORSTRPTR(gUnknown_203B4B0)); if (GroundScriptCheckLockCondition(action, 1)) { sub_80A87AC(0, 11); } @@ -1003,7 +1077,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } case 1: { action->scriptData.branchDiscriminant = 4; - sub_809B1C0(10, 1, gUnknown_203B4B0); + ScriptSpecialTextHandler2(SPECIAL_TEXT_LARGE_TEXT_BOX, 1, STR_TO_MONORSTRPTR(gUnknown_203B4B0)); if (GroundScriptCheckLockCondition(action, 1)) { sub_80A87AC(0, 11); } @@ -1040,7 +1114,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) cmd = *action->scriptData.curPtr; action->scriptData.savedState = 3; sub_80999FC(cmd.argShort); - GroundMap_ExecuteEvent(0x70, 0); + GroundMap_ExecuteEvent(EVENT_RESCUE, FALSE); if (action->unk8.unk0 == 0) continue; action->scriptData.script.ptr = ResolveJump(action, 1); break; @@ -1063,7 +1137,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) action->scriptData.savedState = 3; break; } - case 0x3d: { + case CMD_BYTE_3D: { s32 val; cmd = *action->scriptData.curPtr; if (!sub_809B260(&val)) { @@ -1085,7 +1159,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) sub_80A87AC(0, 0); break; } - case 0x3e: { + case CMD_BYTE_3E: { s32 val; if (!sub_809B260(&val)) { loopContinue = FALSE; @@ -1099,7 +1173,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) sub_80A87AC(0, 0); break; } - case 0x3f: { + case CMD_BYTE_3F: { s32 val; const u8 *ptr; cmd = *action->scriptData.curPtr; @@ -1131,7 +1205,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0x3a: { + case CMD_BYTE_3A: { if (action->scriptData.unk2C == 0) { if (action->scriptData.unk22 != -1) { loopContinue = FALSE; @@ -1156,18 +1230,18 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0xcf: { + case CMD_BYTE_CF: { cmd = *action->scriptData.curPtr; if (action->scriptData.unk2C == 0) { bool8 flag = FALSE; if (action->scriptData.branchDiscriminant < 0) { - if (action->scriptData.script.ptr->op != 0xd1) { + if (action->scriptData.script.ptr->op != CMD_BYTE_D1) { action->scriptData.savedState = 3; break; } } else { - while (action->scriptData.script.ptr->op == 0xd0) { + while (action->scriptData.script.ptr->op == CMD_BYTE_D0) { if (action->scriptData.script.ptr->argShort == action->scriptData.branchDiscriminant) { flag = TRUE; break; @@ -1175,15 +1249,15 @@ s16 HandleAction(Action *action, const DebugLocation *debug) action->scriptData.script.ptr++; } if (!flag) { - while (action->scriptData.script.ptr->op == 0xd1) { + while (action->scriptData.script.ptr->op == CMD_BYTE_D1) { action->scriptData.script.ptr++; } action->scriptData.savedState = 3; break; } } - if (ScriptPrintText(cmd.argByte, (s16) cmd.arg1, action->scriptData.script.ptr->argPtr)) { - sub_80A87AC(0,10); + if (ScriptPrintText(cmd.argByte, (s16)cmd.arg1, action->scriptData.script.ptr->argPtr)) { + sub_80A87AC(0, 10); if (GroundScriptCheckLockCondition(action, 0)) { action->scriptData.unk2C = 1; } @@ -1201,7 +1275,13 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0xd2 ... 0xd8: { + case CMD_BYTE_D2: + case CMD_BYTE_D3: + case CMD_BYTE_D4: + case CMD_BYTE_D5: + case CMD_BYTE_D6: + case CMD_BYTE_D7: + case CMD_BYTE_D8: { s32 tmp; if (action->scriptData.unk2C == 0) { if (action->scriptData.unk22 != -1) { @@ -1224,7 +1304,7 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0xda: { + case CMD_BYTE_DA: { if (action->scriptData.unk22 != -1) { loopContinue = FALSE; } @@ -1235,8 +1315,125 @@ s16 HandleAction(Action *action, const DebugLocation *debug) break; } default: - case 0x08 ... 0x21: case 0x29 ... 0x2b: case 0x2d ... 0x2f: case 0x40 ... 0x57: case 0x5c: case 0x5f: - case 0x96: case 0x97: case 0x9a: case 0xa4 ... 0xce: case 0xd0: case 0xd1: case 0xd9: case 0xe4: case 0xe6 ... 0xf0: { + case CMD_BYTE_08: + case CMD_BYTE_09: + case CMD_BYTE_0A: + case CMD_BYTE_0B: + case CMD_BYTE_0C: + case CMD_BYTE_0D: + case CMD_BYTE_0E: + case CMD_BYTE_0F: + case CMD_BYTE_10: + case CMD_BYTE_11: + case CMD_BYTE_12: + case CMD_BYTE_13: + case CMD_BYTE_14: + case CMD_BYTE_15: + case CMD_BYTE_16: + case CMD_BYTE_17: + case CMD_BYTE_18: + case CMD_BYTE_19: + case CMD_BYTE_1A: + case CMD_BYTE_1B: + case CMD_BYTE_1C: + case CMD_BYTE_1D: + case CMD_BYTE_1E: + case CMD_BYTE_1F: + case CMD_BYTE_20: + case CMD_BYTE_21: + case CMD_BYTE_29: + case CMD_BYTE_2A: + case CMD_BYTE_2B: + case CMD_BYTE_2D: + case CMD_BYTE_2E: + case CMD_BYTE_2F: + case CMD_BYTE_40: + case CMD_BYTE_41: + case CMD_BYTE_42: + case CMD_BYTE_43: + case CMD_BYTE_44: + case CMD_BYTE_45: + case CMD_BYTE_46: + case CMD_BYTE_47: + case CMD_BYTE_48: + case CMD_BYTE_49: + case CMD_BYTE_4A: + case CMD_BYTE_4B: + case CMD_BYTE_4C: + case CMD_BYTE_4D: + case CMD_BYTE_4E: + case CMD_BYTE_4F: + case CMD_BYTE_50: + case CMD_BYTE_51: + case CMD_BYTE_52: + case CMD_BYTE_53: + case CMD_BYTE_54: + case CMD_BYTE_55: + case CMD_BYTE_56: + case CMD_BYTE_57: + case CMD_BYTE_5C: + case CMD_BYTE_5F: + case CMD_BYTE_96: + case CMD_BYTE_97: + case CMD_BYTE_9A: + case CMD_BYTE_A4: + case CMD_BYTE_A5: + case CMD_BYTE_A6: + case CMD_BYTE_A7: + case CMD_BYTE_A8: + case CMD_BYTE_A9: + case CMD_BYTE_AA: + case CMD_BYTE_AB: + case CMD_BYTE_AC: + case CMD_BYTE_AD: + case CMD_BYTE_AE: + case CMD_BYTE_AF: + case CMD_BYTE_B0: + case CMD_BYTE_B1: + case CMD_BYTE_B2: + case CMD_BYTE_B3: + case CMD_BYTE_B4: + case CMD_BYTE_B5: + case CMD_BYTE_B6: + case CMD_BYTE_B7: + case CMD_BYTE_B8: + case CMD_BYTE_B9: + case CMD_BYTE_BA: + case CMD_BYTE_BB: + case CMD_BYTE_BC: + case CMD_BYTE_BD: + case CMD_BYTE_BE: + case CMD_BYTE_BF: + case CMD_BYTE_C0: + case CMD_BYTE_C1: + case CMD_BYTE_C2: + case CMD_BYTE_C3: + case CMD_BYTE_C4: + case CMD_BYTE_C5: + case CMD_BYTE_C6: + case CMD_BYTE_C7: + case CMD_BYTE_C8: + case CMD_BYTE_C9: + case CMD_BYTE_CA: + case CMD_BYTE_CB: + case CMD_BYTE_CC: + case CMD_BYTE_CD: + case CMD_BYTE_CE: + case CMD_BYTE_D0: + case CMD_BYTE_D1: + case CMD_BYTE_D9: + case CMD_BYTE_E4: + case CMD_BYTE_E6: + case CMD_BYTE_E7: + case CMD_BYTE_E8: + case CMD_BYTE_E9: + case CMD_BYTE_EA: + case CMD_BYTE_EB: + case CMD_BYTE_EC: + case CMD_BYTE_ED: + case CMD_BYTE_EE: + case CMD_BYTE_EF: + case CMD_BYTE_F0: { loopContinue = FALSE; break; } @@ -1250,11 +1447,11 @@ s16 HandleAction(Action *action, const DebugLocation *debug) case 0: { if (action->scriptData2.savedState) { action->scriptData = action->scriptData2; - if (action->callbacks->setDirection && action->scriptData.unk26 != -1) { + if (action->callbacks->setDirection && action->scriptData.storedDir != -1) { u32 tmp; action->callbacks->getFlags(action->parentObject, &tmp); if (tmp & 0x400) { - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); } } if (action->callbacks->setEventIndex) { @@ -1277,16 +1474,35 @@ s16 HandleAction(Action *action, const DebugLocation *debug) } break; } - case 0: case 1: case 4: { + case 0: + case 1: + case 4: { return action->scriptData.savedState; } } } return 3; } - else { - return 0; - } + + return 0; +} + +#define MapValueOrDefault(curCmd, defaultVal, dst) \ +{ \ + s32 tmp = (curCmd)->arg1 != -1 ? (s16)(curCmd)->arg1 : (defaultVal); \ + *(dst) = tmp; \ +} + +#define SectorValueOrDefault(curCmd, defaultVal, dst) \ +{ \ + s32 tmp = (s8)(curCmd)->argByte < 0 ? (defaultVal) : (s8)(curCmd)->argByte; \ + *(dst) = tmp; \ +} + +#define GroupValueOrDefault(curCmd, defaultVal, dst) \ +{ \ + s32 tmp = (curCmd)->argShort < 0 ? (defaultVal) : (curCmd)->argShort; \ + *(dst) = tmp; \ } // overlay_0000.bin::021497FC @@ -1308,11 +1524,11 @@ static s32 ExecuteScriptCommand(Action *action) ScriptCommand curCmd; ScriptData *scriptData = &action->scriptData; - while (1) { + while (TRUE) { scriptData->curPtr = scriptData->script.ptr; curCmd = *scriptData->script.ptr++; switch (scriptData->curScriptOp = curCmd.op) { - case 0x01: { + case CMD_BYTE_01: { u32 arg = (s16)curCmd.arg1; u32 argCopy = arg; u32 byte = (u8)curCmd.argByte; @@ -1322,7 +1538,7 @@ static s32 ExecuteScriptCommand(Action *action) GroundMainGroundRequest(argCopy, byte, curCmd.argShort); break; } - case 0x02: { + case CMD_BYTE_02: { s32 dungeonId = (s16)curCmd.arg1; if (dungeonId == -1) dungeonId = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER); if (ScriptLoggingEnabled(TRUE)) { @@ -1336,7 +1552,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x03: { + case CMD_BYTE_03: { if (sub_8021700(curCmd.arg1)) { action->scriptData.script.ptr = ResolveJump(action, -1); } else { @@ -1345,9 +1561,9 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x04: { + case CMD_BYTE_04: { if (curCmd.arg1 == -1) { - if (!HasZeroAvailableDungeons() && sub_809B1C0(12,0,NULL)) { + if (!HasZeroAvailableDungeons() && ScriptSpecialTextHandler2(SPECIAL_TEXT_DUNGEON_LIST, 0, NULL_MONORSTRPTR)) { sub_80A87AC(0, 11); action->scriptData.branchDiscriminant = 0; } else { @@ -1361,9 +1577,9 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x06: { + case CMD_BYTE_06: { if (curCmd.arg1 == -1) { - if (sub_809B1C0(36, 0, NULL)) { + if (ScriptSpecialTextHandler2(SPECIAL_TEXT_DOJO_ENTER, 0, NULL_MONORSTRPTR)) { sub_80A87AC(0, 11); action->scriptData.branchDiscriminant = 0; return 2; @@ -1377,11 +1593,11 @@ static s32 ExecuteScriptCommand(Action *action) return 2; } } - case 0x05: { + case CMD_BYTE_05: { action->scriptData.branchDiscriminant = 1; return 2; } - case 0x07: { + case CMD_BYTE_07: { s32 tmp = (s16)curCmd.arg1; if (tmp == -1) { tmp = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER); @@ -1399,23 +1615,23 @@ static s32 ExecuteScriptCommand(Action *action) return 2; } } - case 0x08: case 0x09: { - if (curCmd.op == 0x08) { + case CMD_BYTE_08: // SELECT_MAP + case CMD_BYTE_09: { // SELECT_GROUND + if (curCmd.op == CMD_BYTE_08) { // SELECT_MAP gCurrentMap = curCmd.arg1; gUnknown_2039A32 = GetAdjustedGroundMap((s16)curCmd.arg1); gUnknown_2039A34 = gUnknown_2039A32; - if (ScriptLoggingEnabled(TRUE)) { - Log(1," map select %3d %3d[%s]",gCurrentMap,gUnknown_2039A32, - gGroundMapConversionTable[gCurrentMap].text); - } - } else { + + if (ScriptLoggingEnabled(TRUE)) + Log(1," map select %3d %3d[%s]", gCurrentMap, gUnknown_2039A32, gGroundMapConversionTable[gCurrentMap].text); + } else { // SELECT_GROUND gUnknown_2039A32 = gCurrentMap = curCmd.arg1; gUnknown_2039A34 = curCmd.arg1; - if (ScriptLoggingEnabled(TRUE)) { - Log(1," ground select %3d %3d[%s]",gCurrentMap,gUnknown_2039A32, - gGroundMapConversionTable[gCurrentMap].text); - } + + if (ScriptLoggingEnabled(TRUE)) + Log(1," ground select %3d %3d[%s]", gCurrentMap, gUnknown_2039A32, gGroundMapConversionTable[gCurrentMap].text); } + SetScriptVarValue(NULL,GROUND_MAP,gCurrentMap); SetScriptVarValue(NULL,GROUND_PLACE,gGroundMapConversionTable[gCurrentMap].groundPlaceId); GroundSprite_Reset(gUnknown_2039A32); @@ -1431,10 +1647,10 @@ static s32 ExecuteScriptCommand(Action *action) GroundObject_Select(gUnknown_2039A32,0,0); break; } - case 0x0a: { + case CMD_BYTE_0A: { const DungeonInfo *tmp; DungeonLocation loc; - tmp = GetDungeonInfo_80A2608((s16)curCmd.arg1); + tmp = GetScriptDungeonInfo((s16)curCmd.arg1); gUnknown_2039A34 = gUnknown_2039A32 = gCurrentMap = (s16)curCmd.arg2; if (ScriptLoggingEnabled(TRUE)) { Log(1, " dungeon select %3d %3d[%s]", gCurrentMap,gUnknown_2039A32, @@ -1446,7 +1662,7 @@ static s32 ExecuteScriptCommand(Action *action) DeleteGroundLives(); DeleteGroundObjects(); DeleteGroundEffects(); - loc.id = tmp->dungeonIndex; + loc.id = tmp->dungeonID; loc.floor = curCmd.argShort; GroundMap_SelectDungeon(gUnknown_2039A32, &loc, curCmd.argByte); GroundLink_Select(gUnknown_2039A32); @@ -1454,84 +1670,89 @@ static s32 ExecuteScriptCommand(Action *action) GroundObject_Select(gUnknown_2039A32,0,0); break; } - case 0x0b: { + case CMD_BYTE_0B: { GroundWeather_Select((s16)curCmd.arg1); break; } - case 0x0c ... 0x15: { + case CMD_BYTE_0C: // SELECT_ENTITIES + case CMD_BYTE_0D: + case CMD_BYTE_0E: + case CMD_BYTE_0F: + case CMD_BYTE_10: + case CMD_BYTE_11: // CANCEL_ENTITIES + case CMD_BYTE_12: + case CMD_BYTE_13: + case CMD_BYTE_14: + case CMD_BYTE_15: { s32 group; s32 sector; - { - s32 tmp = curCmd.argShort < 0 ? scriptData->script.group : curCmd.argShort; - group = tmp; - } - { - s32 tmp = (s8)curCmd.argByte < 0 ? scriptData->script.sector : (s8)curCmd.argByte; - sector = tmp; - } + + GroupValueOrDefault(&curCmd, scriptData->script.group, &group); + SectorValueOrDefault(&curCmd, scriptData->script.sector, §or); + switch (curCmd.op) { - case 0x0c: { + case CMD_BYTE_0C: { // SELECT_ENTITIES GroundLives_Select(gUnknown_2039A32, group, sector); GroundObject_Select(gUnknown_2039A32, group, sector); GroundEffect_Select(gUnknown_2039A32, group, sector); GroundEvent_Select(gUnknown_2039A32, group, sector); break; } - case 0x0d: { + case CMD_BYTE_0D: { GroundLives_Select(gUnknown_2039A32, group, sector); break; } - case 0x0e: { + case CMD_BYTE_0E: { GroundObject_Select(gUnknown_2039A32, group, sector); break; } - case 0x0f: { + case CMD_BYTE_0F: { GroundEffect_Select(gUnknown_2039A32, group, sector); break; } - case 0x10: { + case CMD_BYTE_10: { GroundEvent_Select(gUnknown_2039A32, group, sector); break; } - case 0x11: { + case CMD_BYTE_11: { // CANCEL_ENTITIES GroundLives_Cancel(group, sector); GroundObject_Cancel(group, sector); GroundEffect_Cancel(group, sector); GroundEvent_Cancel(group, sector); break; } - case 0x12: { + case CMD_BYTE_12: { GroundLives_Cancel(group, sector); break; } - case 0x13: { + case CMD_BYTE_13: { GroundObject_Cancel(group, sector); break; } - case 0x14: { + case CMD_BYTE_14: { GroundEffect_Cancel(group, sector); break; } - case 0x15: { + case CMD_BYTE_15: { GroundEvent_Cancel(group, sector); break; } } break; } - case 0x16: { + case CMD_BYTE_16: { GroundLives_CancelBlank_1(); break; } - case 0x17: { + case CMD_BYTE_17: { GroundObject_CancelBlank(); break; } - case 0x18: { + case CMD_BYTE_18: { // CANCEL_OFFSCREEN_EFFECTS GroundEffect_CancelBlank(); break; } - case 0x19: { + case CMD_BYTE_19: { s8 unk[4]; GroundObjectData *obj; PixelPos pos; @@ -1543,7 +1764,7 @@ static s32 ExecuteScriptCommand(Action *action) .unk1 = *unk, .width = 1, .height = 1, - .pos = {}, + .pos = {0, 0, 0, 0}, .kind = curCmd.arg2, .scripts = { [3] = gFunctionScriptTable[curCmd.arg1].script }, }; @@ -1558,7 +1779,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x1a: { + case CMD_BYTE_1A: { s8 unk; GroundEffectData *eff; PixelPos pos; @@ -1570,7 +1791,7 @@ static s32 ExecuteScriptCommand(Action *action) .unk1 = unk, .width = 1, .height = 1, - .pos = {}, + .pos = {0, 0, 0, 0}, .kind = curCmd.arg2, .script = gFunctionScriptTable[curCmd.arg1].script, }; @@ -1585,33 +1806,28 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x1c: { - GroundMap_ExecuteEvent(curCmd.argShort, 1); + case CMD_BYTE_1C: { // EXECUTE_SUBROUTINE + GroundMap_ExecuteEvent(curCmd.argShort, TRUE); break; } - case 0x1b: { - GroundMap_ExecuteEvent(curCmd.argShort, 0); + case CMD_BYTE_1B: { // EXECUTE_FUNCTION + GroundMap_ExecuteEvent(curCmd.argShort, FALSE); break; } - case 0x1d: case 0x1e: { + case CMD_BYTE_1D: // EXECUTE_STATION + case CMD_BYTE_1E: { // EXECUTE_SUBSTATION s32 map; - s32 group, sector; - bool8 res; - { - s32 tmp = curCmd.arg1 != -1 ? (s16)curCmd.arg1 : gCurrentMap; - map = tmp; - } - { - s32 tmp = curCmd.argShort < 0 ? scriptData->script.group : curCmd.argShort; - group = tmp; - } - { - s32 tmp = (s8)curCmd.argByte < 0 ? scriptData->script.sector : (s8)curCmd.argByte; - sector = tmp; - } + s32 group; + s32 sector; + bool8 isSubStation; + + MapValueOrDefault(&curCmd, gCurrentMap, &map); + GroupValueOrDefault(&curCmd, scriptData->script.group, &group); + SectorValueOrDefault(&curCmd, scriptData->script.sector, §or); + map = GetAdjustedGroundMap(map); - res = curCmd.op == 0x1e; - GroundMap_ExecuteStation(map, group, sector, res); + isSubStation = curCmd.op == CMD_BYTE_1E; + GroundMap_ExecuteStation(map, group, sector, isSubStation); if (gUnknown_2039A34 != map) { gUnknown_2039A34 = map; GroundCancelAllEntities(); @@ -1620,20 +1836,20 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x1f: { + case CMD_BYTE_1F: { // RESCUE_SELECT s32 a = (s16)GetScriptVarValue(NULL, DUNGEON_ENTER); - const DungeonInfo *ret1 = GetDungeonInfo_80A2608(a); - s32 thing = GetScriptVarArrayValue(NULL, DUNGEON_ENTER_LIST, (u16) a) == 0 ? ret1->unk6 : ret1->unk8; + const DungeonInfo *ret1 = GetScriptDungeonInfo(a); + s32 scriptIndex = GetScriptVarArrayValue(NULL, DUNGEON_ENTER_LIST, (u16)a) == 0 ? ret1->scriptID1 : ret1->scriptID2; // fakematch: this is almost certainly a range check of the form 0x37 <= a && a < 0x48 - // but that loses the s32 -> u16 cast. Inlines, macros, or other schenanigans are likely involved + // but that loses the s32 -> u16 cast. Inlines, macros, or other shenanigans are likely involved if (!((u16)(a - 0x37) < 0x11) && (s16)sub_80A2750(a) == 1) { - if (thing == -1) { - if (ScriptLoggingEnabled(TRUE)) { + if (scriptIndex == -1) { + if (ScriptLoggingEnabled(TRUE)) Log(1, " dungeon rescue select %3d", a); - } + GroundMainRescueRequest(a, -1); } else { - GroundMap_ExecuteEvent(thing, 0); + GroundMap_ExecuteEvent(scriptIndex, FALSE); break; } } else { @@ -1641,11 +1857,12 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x20: { + case CMD_BYTE_20: { switch (action->unkC.unk0) { - case 0: - GroundMap_ExecuteEvent(curCmd.argShort, 0); + case 0: { + GroundMap_ExecuteEvent(curCmd.argShort, FALSE); break; + } case 1: { ScriptInfoSmall info1; GetFunctionScript(action, &info1, curCmd.argShort); @@ -1667,7 +1884,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x21: { + case CMD_BYTE_21: { s32 ret; u32 unk; PixelPos pos1; @@ -1693,71 +1910,80 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x22: { + case CMD_BYTE_22: { sub_80999E8(curCmd.argShort); - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x23: { + case CMD_BYTE_23: { sub_80999FC(curCmd.argShort); - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x24: { + case CMD_BYTE_24: { sub_8099A10(curCmd.argShort, curCmd.arg1, curCmd.arg2); - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x25: { + case CMD_BYTE_25: { sub_8099A34(curCmd.argShort); - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x26: { + case CMD_BYTE_26: { sub_8099A48(curCmd.argShort); - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x27: case 0x28: { + case CMD_BYTE_27: + case CMD_BYTE_28: { RGB_Array color = { curCmd.arg2 >> 16, curCmd.arg2 >> 8, curCmd.arg2, 0 }; switch (curCmd.op) { - case 0x27: + case CMD_BYTE_27: sub_8099A5C(curCmd.argShort, curCmd.arg1, color); break; - case 0x28: + case CMD_BYTE_28: sub_8099AFC(curCmd.argShort, curCmd.arg1, color); break; } - if (curCmd.argByte) return 2; + if (curCmd.argByte != 0) + return 2; break; } - case 0x29: { + case CMD_BYTE_29: { sub_809A6E4((u16)curCmd.argShort); break; } - case 0x2a: { + case CMD_BYTE_2A: { sub_809A6F8((u16)curCmd.argShort); break; } - case 0x2b: { + case CMD_BYTE_2B: { SetAutoPressTextboxMidEndMsgFrames(curCmd.arg1, curCmd.arg2); break; } - case 0x2c: { - if (!sub_809A768()) break; + case CMD_BYTE_2C: { + if (!sub_809A768()) + break; sub_80A87AC(0, 10); - if (GroundScriptCheckLockCondition(action, 0)) return 2; + if (GroundScriptCheckLockCondition(action, 0)) + return 2; break; } - case 0x30: { + case CMD_BYTE_30: { ScriptClearTextbox(); break; } - case 0x31: { + case CMD_BYTE_31: { ScriptClearTextbox2(); break; } - case 0x2d: { + case CMD_BYTE_2D: { switch ((u8)curCmd.argByte) { case 0: { ResetTextboxPortrait(curCmd.argShort); @@ -1831,42 +2057,71 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x2e: { + case CMD_BYTE_2E: { ScriptSetPortraitInfo(curCmd.argShort, (s8)curCmd.arg1, (u8)curCmd.argByte); break; } - case 0x2f: { + case CMD_BYTE_2F: { PixelPos pos; pos.x = curCmd.arg1; pos.y = curCmd.arg2; ScriptSetPortraitPosDelta(curCmd.argShort, &pos); break; } - case 0x32 ... 0x38: { - s8 ret = 0; + case CMD_BYTE_32: + case CMD_BYTE_33: // MSG_QUIET + case CMD_BYTE_34: + case CMD_BYTE_35: + case CMD_BYTE_36: // MSG_OVERHEARD + case CMD_BYTE_37: + case CMD_BYTE_38: { + s8 ret = FALSE; switch (scriptData->curScriptOp) { - case 0x32: ret = ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, curCmd.argShort, curCmd.argPtr); break; - case 0x33: ret = ScriptPrintText(SCRIPT_TEXT_TYPE_PLAYER, curCmd.argShort, curCmd.argPtr); break; - case 0x34: ret = ScriptPrintText(SCRIPT_TEXT_TYPE_NPC, curCmd.argShort, curCmd.argPtr); break; - case 0x35: ret = ScriptPrintText(SCRIPT_TEXT_TYPE_LETTER, curCmd.argShort, curCmd.argPtr); break; - case 0x36: ret = ScriptPrintText(SCRIPT_TEXT_TYPE_4, curCmd.argShort, curCmd.argPtr); break; - case 0x37: ret = ScriptPrintTextOnBg(curCmd.argPtr); break; - case 0x38: ret = ScriptPrintTextOnBg2(curCmd.argPtr); break; + case CMD_BYTE_32: { + ret = ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, curCmd.argShort, curCmd.argPtr); + break; + } + case CMD_BYTE_33: { // MSG_QUIET + ret = ScriptPrintText(SCRIPT_TEXT_TYPE_QUIET, curCmd.argShort, curCmd.argPtr); + break; + } + case CMD_BYTE_34: { + ret = ScriptPrintText(SCRIPT_TEXT_TYPE_NPC, curCmd.argShort, curCmd.argPtr); + break; + } + case CMD_BYTE_35: { + ret = ScriptPrintText(SCRIPT_TEXT_TYPE_LETTER, curCmd.argShort, curCmd.argPtr); + break; + } + case CMD_BYTE_36: { // MSG_OVERHEARD + ret = ScriptPrintText(SCRIPT_TEXT_TYPE_OVERHEARD, curCmd.argShort, curCmd.argPtr); + break; + } + case CMD_BYTE_37: { + ret = ScriptPrintTextOnBg(curCmd.argPtr); + break; + } + case CMD_BYTE_38: { + ret = ScriptPrintTextOnBg2(curCmd.argPtr); + break; + } } if (ret) { sub_80A87AC(0, 10); - if (GroundScriptCheckLockCondition(action, 0)) return 2; + if (GroundScriptCheckLockCondition(action, 0)) + return 2; } break; } - case 0x39: { + case CMD_BYTE_39: { if ((s8)ScriptPrintTextOnBgAuto(curCmd.argShort, curCmd.argPtr) && curCmd.argShort >= 0) { sub_80A87AC(0, 10); - if (GroundScriptCheckLockCondition(action, 0)) return 2; + if (GroundScriptCheckLockCondition(action, 0)) + return 2; } break; } - case 0x3a: { + case CMD_BYTE_3A: { sub_809AFC8((u8)curCmd.argByte > 0, curCmd.arg1, (s16)curCmd.arg2, curCmd.argPtr); if (GroundScriptCheckLockCondition(action, 1)) { sub_80A87AC(0, 11); @@ -1874,17 +2129,17 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x3c: { - sub_809B1D4(curCmd.argByte, curCmd.arg1, curCmd.arg2, (void *) curCmd.argPtr); + case CMD_BYTE_3C: { // SPECIAL_TEXT + ScriptSpecialTextHandler(curCmd.argByte, curCmd.arg1, curCmd.arg2, STR_TO_MONORSTRPTR((u8*)curCmd.argPtr)); sub_80A87AC(0, 11); return 2; } - case 0x3b: { + case CMD_BYTE_3B: { scriptData->unk2A = 0; return 2; } - case 0x3d: { - int i; + case CMD_BYTE_3D: { + s32 i; if ((s16)curCmd.arg1 != -1) { Pokemon *mon = sub_80A8D54((s16) curCmd.arg1); if (mon != NULL) { @@ -1892,94 +2147,97 @@ static s32 ExecuteScriptCommand(Action *action) sPokeNameBuffer[i] = mon->name[i]; } sPokeNameBuffer[POKEMON_NAME_LENGTH] = 0; - sub_809B1C0(4, 0, sPokeNameBuffer); + ScriptSpecialTextHandler2(SPECIAL_TEXT_PLAYER_NAME_INPUT, 0, STR_TO_MONORSTRPTR(sPokeNameBuffer)); sub_80A87AC(0, 11); return 2; } break; } else { - sub_809B1C0(4, 1, sPokeNameBuffer); + ScriptSpecialTextHandler2(SPECIAL_TEXT_PLAYER_NAME_INPUT, 1, STR_TO_MONORSTRPTR(sPokeNameBuffer)); sub_80A87AC(0, 11); return 2; } } - case 0x3e: { + case CMD_BYTE_3E: { sub_80920B8(sPokeNameBuffer); sPokeNameBuffer[10] = '\0'; - sub_809B1C0(5, 0, sPokeNameBuffer); + ScriptSpecialTextHandler2(SPECIAL_TEXT_TEAM_NAME_INPUT, 0, STR_TO_MONORSTRPTR(sPokeNameBuffer)); sub_80A87AC(0, 11); return 2; } - case 0x3f: { - int i; - for (i = 0; i < ARRAY_COUNT_INT(sPokeNameBuffer); i++) { + case CMD_BYTE_3F: { + s32 i; + for (i = 0; i < ARRAY_COUNT_INT(sPokeNameBuffer); i++) sPokeNameBuffer[i] = '\0'; - } - sub_809B1C0(6, (u8)curCmd.argByte, sPokeNameBuffer); + + ScriptSpecialTextHandler2(SPECIAL_TEXT_PASSWORD_INPUT, (u8)curCmd.argByte, STR_TO_MONORSTRPTR(sPokeNameBuffer)); sub_80A87AC(0, 11); return 2; } - case 0x42: { + case CMD_BYTE_42: { StopAllMusic_1(); break; } - case 0x43: { + case CMD_BYTE_43: { FadeOutAllMusic(curCmd.argShort < 0 ? 30 : curCmd.argShort); break; } - case 0x44: { + case CMD_BYTE_44: { u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1; - if (id != 999) { + if (id != 999) StartNewBGM_(id); - } else { + else StopBGMusic(); - } + break; } - case 0x45: { + case CMD_BYTE_45: { u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1; - if (id != 999) { + if (id != 999) FadeInNewBGM_(id, curCmd.argShort); - } else { + else StopBGMusic(); - } + break; } - case 0x46: { + case CMD_BYTE_46: { u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1; - if (id != 999) { + if (id != 999) QueueBGM_((u16)id); - } + break; } - case 0x47: { + case CMD_BYTE_47: { StopBGMusic(); break; } - case 0x48: { + case CMD_BYTE_48: { FadeOutBGM_(curCmd.argShort < 0 ? 30 : (u16)curCmd.argShort); break; } - case 0x49: case 0x4c: { + case CMD_BYTE_49: + case CMD_BYTE_4C: { PlaySoundWithVolume((u16)curCmd.arg1, 256); break; } - case 0x4a: case 0x4d: { + case CMD_BYTE_4A: + case CMD_BYTE_4D: { StopSound((u16)curCmd.arg1); break; } - case 0x4b: case 0x4e: { + case CMD_BYTE_4B: + case CMD_BYTE_4E: { FadeOutSound((u16)curCmd.arg1, curCmd.argShort < 0 ? 30 : (u16)curCmd.argShort); break; } - case 0x4f: { - if (action->scriptData2.state == 1) { + case CMD_BYTE_4F: { + if (action->scriptData2.state == 1) InitScriptData(&action->scriptData2); - } + action->callbacks->setHitboxPos(action->parentObject, 0); break; } - case 0x50: { + case CMD_BYTE_50: { Action *ptr; PixelPos pos; s8 c; @@ -1987,56 +2245,57 @@ static s32 ExecuteScriptCommand(Action *action) Action *tmp = sub_809D52C(&action->unkC); ptr = tmp; } - if (ptr) { + if (ptr != NULL) { ptr->callbacks->getHitboxCenter(action->parentObject, &pos); ptr->callbacks->getDirection(action->parentObject, &c); action->callbacks->moveReal(action->parentObject, &pos); - action->scriptData.unk26 = c; + action->scriptData.storedDir = c; action->callbacks->setDirection(action->parentObject, c); } break; } - case 0x51: { + case CMD_BYTE_51: { PixelPos posIn; PixelPos posOut1; PixelPos posOut2; + action->callbacks->getHitboxCenter(action->parentObject, &posIn); GroundLink_GetArea(curCmd.argShort, &posOut1, &posOut2, &posIn); action->callbacks->setPositionBounds(action->parentObject, &posOut1, &posOut2); break; } - case 0x52: { + case CMD_BYTE_52: { action->callbacks->setFlags(action->parentObject, curCmd.arg1); break; } - case 0x53: { - if (curCmd.arg1 & 0x400 && action->scriptData2.state == 1) { + case CMD_BYTE_53: { + if (curCmd.arg1 & 0x400 && action->scriptData2.state == 1) InitScriptData(&action->scriptData2); - } + action->callbacks->clearFlags(action->parentObject, curCmd.arg1); break; } - case 0x54: { - action->callbacks->getDirection(action->parentObject, &action->scriptData.unk26); - if (curCmd.argShort) { + case CMD_BYTE_54: { + action->callbacks->getDirection(action->parentObject, &action->scriptData.storedDir); + if (curCmd.argShort != 0) action->scriptData.unk24 = curCmd.argShort; - } + action->callbacks->setEventIndex(action->parentObject, (u16)curCmd.argShort); break; } - case 0x55: { + case CMD_BYTE_55: { action->callbacks->livesOnlyNullsub(action->parentObject, (u16)curCmd.argShort); break; } - case 0x56: { + case CMD_BYTE_56: { action->callbacks->func38(action->parentObject, (s16)curCmd.arg1, curCmd.argShort); break; } - case 0x57: { + case CMD_BYTE_57: { action->callbacks->func44_livesOnlySpriteRelated(action->parentObject, curCmd.argShort); break; } - case 0x58: { + case CMD_BYTE_58: { PixelPos unk; unk.x = curCmd.arg1 << 8; unk.y = curCmd.arg2 << 8; @@ -2044,7 +2303,7 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x59: { + case CMD_BYTE_59: { PixelPos unk; unk.x = curCmd.argShort << 8; unk.y = curCmd.arg1 << 8; @@ -2052,16 +2311,15 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x5a: { - u32 unk[2]; - unk[0] = OtherRandInt(curCmd.argShort) << 8; - unk[1] = OtherRandInt(curCmd.arg1) << 8; - action->callbacks->moveRelative(action->parentObject, - (PixelPos*)unk); + case CMD_BYTE_5A: { + PixelPos unk; + unk.x = OtherRandInt(curCmd.argShort) << 8; + unk.y = OtherRandInt(curCmd.arg1) << 8; + action->callbacks->moveRelative(action->parentObject, &unk); scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x5b: { + case CMD_BYTE_5B: { PixelPos unk; action->callbacks->getHitboxCenter(action->parentObject, &unk); GroundLink_GetPos((s16)curCmd.arg1, &unk); @@ -2069,7 +2327,7 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x5c: { + case CMD_BYTE_5C: { PixelPos pos, pos1, pos2; action->callbacks->getHitboxCenter(action->parentObject, &pos); GroundLink_GetArea((s16)curCmd.arg1, &pos1, &pos2, &pos); @@ -2079,7 +2337,7 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x5d: { + case CMD_BYTE_5D: { PixelPos unk; s16 res = sub_80A7AE8((s16)curCmd.arg1); if (res >= 0) { @@ -2090,7 +2348,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x5e: { + case CMD_BYTE_5E: { PixelPos pos; s32 height; s32 dir; @@ -2100,12 +2358,12 @@ static s32 ExecuteScriptCommand(Action *action) dir = (s8)GetScriptVarArrayValue(NULL, POSITION_DIRECTION, (u16)curCmd.arg1); action->callbacks->moveReal(action->parentObject, &pos); action->callbacks->setPosHeight(action->parentObject, height); - action->scriptData.unk26 = dir; + action->scriptData.storedDir = dir; action->callbacks->setDirection(action->parentObject, dir); scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x5f: { + case CMD_BYTE_5F: { PixelPos pos; u32 height; u32 wat; @@ -2119,19 +2377,21 @@ static s32 ExecuteScriptCommand(Action *action) SetScriptVarArrayValue(NULL, POSITION_DIRECTION, (u16)curCmd.arg1, dir); break; } - case 0x60: { + case CMD_BYTE_60: { action->callbacks->setPosHeight(action->parentObject, curCmd.arg1 << 8); scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x61: case 0x69: { + case CMD_BYTE_61: + case CMD_BYTE_69: { scriptData->pos2.x = curCmd.arg1 << 8; scriptData->pos2.y = curCmd.arg2 << 8; scriptData->unk30 = curCmd.argShort; scriptData->unk2A = -1; return 2; } - case 0x62: case 0x6a: { + case CMD_BYTE_62: + case CMD_BYTE_6A: { PixelPos pos; action->callbacks->getHitboxCenter(action->parentObject, &pos); scriptData->pos2.x = pos.x + (curCmd.arg1 << 8); @@ -2140,28 +2400,34 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->unk2A = -1; return 2; } - case 0x63: case 0x6b: { + case CMD_BYTE_63: + case CMD_BYTE_6B: { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos2); GroundLink_GetPos((s16)curCmd.arg1, &scriptData->pos2); scriptData->unk30 = curCmd.argShort; scriptData->unk2A = -1; return 2; } - case 0x64: case 0x6c: { + case CMD_BYTE_64: + case CMD_BYTE_6C: { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos2); GroundLink_GetPos((s16)curCmd.arg1, &scriptData->pos2); scriptData->unk30 = curCmd.argShort; scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x65: case 0x6d: { + case CMD_BYTE_65: + case CMD_BYTE_6D: { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos2); GroundLink_GetPos((s16)curCmd.arg1, &scriptData->pos2); scriptData->unk30 = curCmd.argShort; scriptData->unk2A = OtherRandInt((u8)curCmd.argByte); return 2; } - case 0x66: case 0x67: case 0x6e: case 0x6f: { + case CMD_BYTE_66: + case CMD_BYTE_67: + case CMD_BYTE_6E: + case CMD_BYTE_6F: { s16 ret = sub_80A7AE8((s16)curCmd.arg1); if (ret >= 0) { sub_80A8FD8(ret, &scriptData->pos2); @@ -2171,32 +2437,45 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x71: case 0x77: case 0x7d: case 0x83: { -#define HYPOT FP24_8_Hypot((s24_8){scriptData->pos2.x - scriptData->pos1.x}, (s24_8){scriptData->pos2.y - scriptData->pos1.y}) / curCmd.argShort + case CMD_BYTE_71: + case CMD_BYTE_77: + case CMD_BYTE_7D: + case CMD_BYTE_83: { + +#define HYPOT (FP24_8_Hypot((s24_8){scriptData->pos2.x - scriptData->pos1.x}, (s24_8){scriptData->pos2.y - scriptData->pos1.y}) / curCmd.argShort) + action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos1); scriptData->pos2.x = curCmd.arg1 << 8; scriptData->pos2.y = curCmd.arg2 << 8; - if (curCmd.op == 0x7d || curCmd.op == 0x83) { + if (curCmd.op == CMD_BYTE_7D || curCmd.op == CMD_BYTE_83) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } return 2; } - case 0x72: case 0x78: case 0x7e: case 0x84: { + case CMD_BYTE_72: + case CMD_BYTE_78: + case CMD_BYTE_7E: + case CMD_BYTE_84: { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos1); scriptData->pos2.x = scriptData->pos1.x + (curCmd.arg1 << 8); scriptData->pos2.y = scriptData->pos1.y + (curCmd.arg2 << 8); - if (curCmd.op == 0x7e || curCmd.op == 0x84) { + if (curCmd.op == CMD_BYTE_7E || curCmd.op == CMD_BYTE_84) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } return 2; } - case 0x73: case 0x79: case 0x7f: case 0x85: { + case CMD_BYTE_73: + case CMD_BYTE_79: + case CMD_BYTE_7F: + case CMD_BYTE_85: { // BUG: (or two): these lines use the wrong script command arguments to calculate the position offset // making the target position nonsense. But even if they were correct, // the way the cap is calculated would make the random offset biased off-center. @@ -2213,48 +2492,61 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->pos2.x = scriptData->pos1.x + ((OtherRandInt(curCmd.arg1 * 2 + 1) - curCmd.arg1) << 8); scriptData->pos2.y = scriptData->pos1.y + ((OtherRandInt(curCmd.arg2 * 2 + 1) - curCmd.arg2) << 8); #endif - if (curCmd.op == 0x7f || curCmd.op == 0x85) { + if (curCmd.op == CMD_BYTE_7F || curCmd.op == CMD_BYTE_85) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } return 2; } - case 0x74: case 0x7a: case 0x80: case 0x86: { + case CMD_BYTE_74: + case CMD_BYTE_7A: + case CMD_BYTE_80: + case CMD_BYTE_86: { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos1); scriptData->pos2 = scriptData->pos1; GroundLink_GetPos((s16)curCmd.arg1, &scriptData->pos2); - if (curCmd.op == 0x80 || curCmd.op == 0x86) { + if (curCmd.op == CMD_BYTE_80 || curCmd.op == CMD_BYTE_86) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } return 2; } - case 0x75: case 0x7b: case 0x81: case 0x87: { + case CMD_BYTE_75: + case CMD_BYTE_7B: + case CMD_BYTE_81: + case CMD_BYTE_87: { s32 cap = curCmd.arg1 * 2 - 1; action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos2); GroundLink_GetPos((s16)curCmd.arg2, &scriptData->pos2); scriptData->pos2.x = scriptData->pos2.x + ((OtherRandInt(cap) - curCmd.argShort) << 8); scriptData->pos2.y = scriptData->pos2.y + ((OtherRandInt(cap) - curCmd.argShort) << 8); - if (curCmd.op == 0x81 || curCmd.op == 0x87) { + if (curCmd.op == CMD_BYTE_81 || curCmd.op == CMD_BYTE_87) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } return 2; } - case 0x76: case 0x7c: case 0x82: case 0x88: { + case CMD_BYTE_76: + case CMD_BYTE_7C: + case CMD_BYTE_82: + case CMD_BYTE_88: { s16 ret = sub_80A7AE8((s16)curCmd.arg1); if (ret >= 0) { action->callbacks->getHitboxCenter(action->parentObject, &scriptData->pos1); sub_80A8FD8(ret, &scriptData->pos2); - if (curCmd.op == 0x82 || curCmd.op == 0x88) { + if (curCmd.op == CMD_BYTE_82 || curCmd.op == CMD_BYTE_88) { scriptData->unk2A = HYPOT; - if (scriptData->unk2A <= 0) scriptData->unk2A = 1; + if (scriptData->unk2A <= 0) + scriptData->unk2A = 1; } else { scriptData->unk2A = curCmd.argShort; } @@ -2262,59 +2554,62 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x68: case 0x70: { + case CMD_BYTE_68: + case CMD_BYTE_70: { scriptData->unk48 = curCmd.arg1 << 8; scriptData->unk30 = curCmd.argShort; scriptData->unk2A = -1; return 2; } - case 0x89: { - action->scriptData.unk26 = curCmd.arg1; + case CMD_BYTE_89: { + action->scriptData.storedDir = curCmd.arg1; action->callbacks->setDirection(action->parentObject, (s8) curCmd.arg1); scriptData->unk30 = curCmd.argShort; scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x8a: { + case CMD_BYTE_8A: { // CMD_UNK_8A s8 dir; action->callbacks->getDirection(action->parentObject, &dir); - action->scriptData.unk26 = sub_8002984(dir, (u8)curCmd.arg1); - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->scriptData.storedDir = TransformDirection1(dir, (u8)curCmd.arg1); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); scriptData->unk30 = curCmd.argShort; scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x8b: { - action->scriptData.unk26 = curCmd.argShort; - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + case CMD_BYTE_8B: { // SET_DIR_WAIT + action->scriptData.storedDir = curCmd.argShort; + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x8c: { - int ret = (s16)sub_80A7AE8((s16)curCmd.arg1); + case CMD_BYTE_8C: { // CMD_UNK_8C + s32 ret = (s16)sub_80A7AE8((s16)curCmd.arg1); s8 dir; if (ret >= 0) { sub_80A9050(ret, &dir); - action->scriptData.unk26 = sub_8002984(dir, (u8)curCmd.argShort); - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->scriptData.storedDir = TransformDirection1(dir, (u8)curCmd.argShort); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); } scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x8d: { + case CMD_BYTE_8D: { // CMD_UNK_8D s8 dir; action->callbacks->getDirection(action->parentObject, &dir); - action->scriptData.unk26 = sub_8002984(dir, (u8)curCmd.argShort); - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->scriptData.storedDir = TransformDirection1(dir, (u8)curCmd.argShort); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x8e: case 0x8f: case 0x90: { + case CMD_BYTE_8E: // CMD_UNK_8E + case CMD_BYTE_8F: // CMD_UNK_8F + case CMD_BYTE_90: { // CMD_UNK_90 bool8 flag = FALSE; s8 dir; PixelPos pos1, pos2, pos3, pos4; switch (curCmd.op) { - case 0x8e: { + case CMD_BYTE_8E: { // CMD_UNK_8E s32 val = (s16)sub_80A7AE8((s16)curCmd.arg1); if (val >= 0) { flag = TRUE; @@ -2323,7 +2618,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x8f: { + case CMD_BYTE_8F: { // CMD_UNK_8F s32 val = (s16)sub_80A7AE8((s16)curCmd.arg1); if (val >= 0) { flag = TRUE; @@ -2332,7 +2627,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x90: { + case CMD_BYTE_90: { // CMD_UNK_90 flag = TRUE; action->callbacks->getHitboxCenter(action->parentObject, &pos1); action->callbacks->getSize(action->parentObject, &pos2); @@ -2342,7 +2637,7 @@ static s32 ExecuteScriptCommand(Action *action) } if (flag) { s8 ret; - int tmp; + s32 tmp; action->callbacks->getHitboxCenter(action->parentObject, &pos3); action->callbacks->getSize(action->parentObject, &pos4); ret = SizedDeltaDirection8(&pos3, &pos4, &pos1, &pos2); // wtf @@ -2355,33 +2650,35 @@ static s32 ExecuteScriptCommand(Action *action) if (dir == tmp) { action->callbacks->getDirection(action->parentObject, &dir); } - action->scriptData.unk26 = sub_8002984(dir, (u8)curCmd.argShort); - action->callbacks->setDirection(action->parentObject, action->scriptData.unk26); + action->scriptData.storedDir = TransformDirection1(dir, (u8)curCmd.argShort); + action->callbacks->setDirection(action->parentObject, action->scriptData.storedDir); } scriptData->unk2A = (u8)curCmd.argByte; return 2; } - case 0x93: case 0x94: case 0x95: { + case CMD_BYTE_93: // CMD_UNK_93 + case CMD_BYTE_94: // CMD_UNK_94 + case CMD_BYTE_95: { // CMD_UNK_95 scriptData->unk2A = 0; return 2; } - case 0x91: { + case CMD_BYTE_91: { // ROTATE_TO action->scriptData.unk4D = (s8)curCmd.arg1; scriptData->unk2A = 0; return 2; } - case 0x92: { + case CMD_BYTE_92: { // CMD_UNK_92 s8 unk; action->callbacks->getDirection(action->parentObject, &unk); - action->scriptData.unk4D = sub_8002984(unk, (u8)curCmd.arg1); + action->scriptData.unk4D = TransformDirection1(unk, (u8)curCmd.arg1); scriptData->unk2A = 0; return 2; } - case 0x97: { + case CMD_BYTE_97: { sub_809D124(curCmd.argShort, curCmd.arg1, curCmd.arg2); break; } - case 0x98: { + case CMD_BYTE_98: { s32 id = action->callbacks->getIndex(action->parentObject); switch (action->unk8.unk0) { case 1: @@ -2396,7 +2693,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x99: { + case CMD_BYTE_99: { s32 id = action->callbacks->getIndex(action->parentObject); PixelPos unk; switch (action->unk8.unk0) { @@ -2415,13 +2712,14 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x9a: { + case CMD_BYTE_9A: { sub_809D170(1, 0); break; } - case 0x9b: { + case CMD_BYTE_9B: { s32 id = action->callbacks->getIndex(action->parentObject); - if (id < 0) break; + if (id < 0) + break; switch (action->unk8.unk0) { case 1: sub_809D1A8(1, id, curCmd.argShort); @@ -2435,7 +2733,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x9c: { + case CMD_BYTE_9C: { s32 id = action->callbacks->getIndex(action->parentObject); PixelPos unk; switch (action->unk8.unk0) { @@ -2454,14 +2752,15 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x9d: { + case CMD_BYTE_9D: { sub_809D1A8(1, 0, curCmd.argShort); return 2; } - case 0x9e: { + case CMD_BYTE_9E: { s32 id = action->callbacks->getIndex(action->parentObject); - if (id < 0) break; - switch(action->unk8.unk0) { + if (id < 0) + break; + switch (action->unk8.unk0) { case 1: sub_809D1E4(1, id, curCmd.argShort); return 2; @@ -2474,10 +2773,10 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0x9f: { + case CMD_BYTE_9F: { s32 id = action->callbacks->getIndex(action->parentObject); PixelPos unk; - switch(action->unk8.unk0) { + switch (action->unk8.unk0) { case 1: sub_80A8FD8(id, &unk); sub_809D1CC(0, &unk, curCmd.argShort); @@ -2493,14 +2792,15 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0xa0: { + case CMD_BYTE_A0: { sub_809D1E4(1, 0, curCmd.argShort); return 2; } - case 0xa1: { + case CMD_BYTE_A1: { s32 id = action->callbacks->getIndex(action->parentObject); - if (id < 0) break; - switch(action->unk8.unk0) { + if (id < 0) + break; + switch (action->unk8.unk0) { case 1: sub_809D220(1, id, curCmd.argShort); return 2; @@ -2513,7 +2813,7 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0xa2: { + case CMD_BYTE_A2: { s32 id = action->callbacks->getIndex(action->parentObject); PixelPos unk; switch (action->unk8.unk0) { @@ -2532,204 +2832,207 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0xa3: { + case CMD_BYTE_A3: { sub_809D220(1, 0, curCmd.argShort); return 2; } - case 0xa4: { + case CMD_BYTE_A4: { ResetScriptVarArray(scriptData->localVars.buf, curCmd.argShort); break; } - case 0xa5: { + case CMD_BYTE_A5: { ClearScriptVarArray(scriptData->localVars.buf, curCmd.argShort); break; } - case 0xa6: { + case CMD_BYTE_A6: { UpdateScriptVarWithImmediate(scriptData->localVars.buf, curCmd.argShort, curCmd.arg1, curCmd.argByte); break; } - case 0xa7: { + case CMD_BYTE_A7: { UpdateScriptVarWithVar(scriptData->localVars.buf, curCmd.argShort, (s16)curCmd.arg1, curCmd.argByte); break; } - case 0xa8: { + case CMD_BYTE_A8: { // SET_ARRAYVAL SetScriptVarArrayValue(scriptData->localVars.buf, curCmd.argShort, (u16)curCmd.arg1, curCmd.arg2); break; } - case 0xa9: { + case CMD_BYTE_A9: { // SCENARIO_CALC ScenarioCalc(curCmd.argShort, curCmd.arg1, curCmd.arg2); break; } - case 0xaa: { + case CMD_BYTE_AA: { // SCENARIO_ADVANCE s32 a, b; GetScriptVarScenario(curCmd.argShort, &a, &b); - ScenarioCalc(curCmd.argShort, a, b+1); + ScenarioCalc(curCmd.argShort, a, b + 1); break; } - case 0xab: { + case CMD_BYTE_AB: { // SET_DUNGEON_RES SetScriptVarValue(NULL, DUNGEON_ENTER, curCmd.arg1); SetScriptVarValue(NULL, DUNGEON_RESULT, curCmd.argShort); break; } - case 0xac: { + case CMD_BYTE_AC: { // SET_PLAYER_KIND SetScriptVarValue(NULL, PLAYER_KIND, curCmd.argShort); break; } - case 0xad: { - sub_80026E8(curCmd.argShort, (u8)curCmd.argByte > 0); + case CMD_BYTE_AD: { // UNLOCK_FRIEND_AREA + ScriptUnlockFriendArea(curCmd.argShort, (u8)curCmd.argByte > 0); break; } - case 0xae: { + case CMD_BYTE_AE: { // CMD_UNK_AE sub_809733C(curCmd.argShort, (u8)curCmd.argByte > 0); break; } - case 0xaf: { + case CMD_BYTE_AF: { // CMD_UNK_AF sub_80973A8(curCmd.argShort, (u8)curCmd.argByte > 0); break; } - case 0xb0: { - sub_8097418(curCmd.argShort, (u8)curCmd.argByte > 0); + case CMD_BYTE_B0: { // SET_RESCUE_CONQUERED + SetRescueScenarioConquered(curCmd.argShort, (u8)curCmd.argByte > 0); break; } - case 0xb1: { + case CMD_BYTE_B1: { sub_80975A8(curCmd.argShort, (u8)curCmd.argByte > 0); break; } - case 0xb2: { + case CMD_BYTE_B2: { SetAdventureAchievement(curCmd.argShort); break; } - case 0xb3: { - if (JudgeVarWithImmediate(NULL, curCmd.argShort, curCmd.arg1, JUDGE_EQ)) { + case CMD_BYTE_B3: { + if (JudgeVarWithImmediate(NULL, curCmd.argShort, curCmd.arg1, JUDGE_EQ)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xb4: { - if (JudgeVarWithImmediate(scriptData->localVars.buf, (s16)curCmd.arg1, curCmd.arg2, (u8)curCmd.argByte)) { + case CMD_BYTE_B4: { + if (JudgeVarWithImmediate(scriptData->localVars.buf, (s16)curCmd.arg1, curCmd.arg2, (u8)curCmd.argByte)) scriptData->script.ptr = FindLabel(action, curCmd.argShort); - } + break; } - case 0xb5: { - if (JudgeVarWithVar(scriptData->localVars.buf, (s16)curCmd.arg1, (s16)curCmd.arg2, (u8)curCmd.argByte)) { + case CMD_BYTE_B5: { + if (JudgeVarWithVar(scriptData->localVars.buf, (s16)curCmd.arg1, (s16)curCmd.arg2, (u8)curCmd.argByte)) scriptData->script.ptr = FindLabel(action, curCmd.argShort); - } + break; } - case 0xb6: { - if (GetScriptVarArrayValue(scriptData->localVars.buf, (s16)curCmd.arg1, (u16)curCmd.arg2)) { + case CMD_BYTE_B6: { + if (GetScriptVarArrayValue(scriptData->localVars.buf, (s16)curCmd.arg1, (u16)curCmd.arg2)) scriptData->script.ptr = FindLabel(action, curCmd.argShort); - } + break; } - case 0xb7: { - if (FlagJudge(GetScriptVarArraySum(scriptData->localVars.buf, (s16)curCmd.arg1), curCmd.arg2, (u8)curCmd.argByte)) { + case CMD_BYTE_B7: { + if (FlagJudge(GetScriptVarArraySum(scriptData->localVars.buf, (s16)curCmd.arg1), curCmd.arg2, (u8)curCmd.argByte)) scriptData->script.ptr = FindLabel(action, curCmd.argShort); - } + break; } - case 0xb8: { - if (ScriptVarScenarioBefore(curCmd.argShort, curCmd.arg1, curCmd.arg2)) { + case CMD_BYTE_B8: { + if (ScriptVarScenarioBefore(curCmd.argShort, curCmd.arg1, curCmd.arg2)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xb9: { - if (ScriptVarScenarioEqual(curCmd.argShort, curCmd.arg1, curCmd.arg2)) { + case CMD_BYTE_B9: { + if (ScriptVarScenarioEqual(curCmd.argShort, curCmd.arg1, curCmd.arg2)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xba: { - if (ScriptVarScenarioAfter(curCmd.argShort, curCmd.arg1, curCmd.arg2)) { + case CMD_BYTE_BA: { // JUMPIF_SCENE_GT + if (ScriptVarScenarioAfter(curCmd.argShort, curCmd.arg1, curCmd.arg2)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xbb: { - if (sub_80023E4(curCmd.argShort)) { + case CMD_BYTE_BB: { // JUMPIF_SCENARIOCHECK + if (CheckQuest(curCmd.argShort)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xbc: { - if (sub_8098100(curCmd.argShort)) { + case CMD_BYTE_BC: { // JUMPIF_CUTSCENE_FLAG + if (GetCutsceneFlag(curCmd.argShort)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xbd: { - if (sub_80026CC(curCmd.arg1)) { + case CMD_BYTE_BD: { + if (sub_80026CC(curCmd.arg1)) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xbf: { - if (HasItemInInventory(curCmd.argShort) > 0) { + case CMD_BYTE_BF: { + if (HasItemInInventory(curCmd.argShort) > 0) scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } + break; } - case 0xbe: { - if (action->unk8.unk0 == 1) { - if (GroundLives_IsStarterMon(action->unk8.unk2)) { - scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); - } - } + case CMD_BYTE_BE: { + if (action->unk8.unk0 == 1 && GroundLives_IsStarterMon(action->unk8.unk2)) + scriptData->script.ptr = FindLabel(action, (u8)curCmd.argByte); + break; } - case 0x41: { - s32 val; - val = FindItemInInventory(curCmd.argShort); - if ( val >= 0) ShiftItemsDownFrom(val); + case CMD_BYTE_41: { + s32 val = FindItemInInventory(curCmd.argShort); + if (val >= 0) + ShiftItemsDownFrom(val); break; } - case 0xc0 ... 0xcb: { + case CMD_BYTE_C0: + case CMD_BYTE_C1: + case CMD_BYTE_C2: + case CMD_BYTE_C3: + case CMD_BYTE_C4: + case CMD_BYTE_C5: + case CMD_BYTE_C6: + case CMD_BYTE_C7: + case CMD_BYTE_C8: + case CMD_BYTE_C9: + case CMD_BYTE_CA: + case CMD_BYTE_CB: { s32 val; PixelPos pos, pos2, pos3; switch (curCmd.op) { - case 0xc0: { + case CMD_BYTE_C0: { val = GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort); break; } - case 0xc1: { - val = FlagCalc( - GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort), - curCmd.arg1, - (u8)curCmd.argByte); + case CMD_BYTE_C1: { + val = FlagCalc(GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort), curCmd.arg1, (u8)curCmd.argByte); break; } - case 0xc2: { - val = FlagCalc( - GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort), - GetScriptVarValue(scriptData->localVars.buf, (s16)curCmd.arg1), - (u8)curCmd.argByte); + case CMD_BYTE_C2: { + val = FlagCalc(GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort), GetScriptVarValue(scriptData->localVars.buf, (s16)curCmd.arg1), (u8)curCmd.argByte); break; } - case 0xc3: { + case CMD_BYTE_C3: { val = OtherRandInt(curCmd.argShort); break; } - case 0xc4: { + case CMD_BYTE_C4: { val = GetScriptVarArrayValue(NULL, curCmd.argShort, 0); break; } - case 0xc5: { + case CMD_BYTE_C5: { val = GetScriptVarArrayValue(NULL, curCmd.argShort, 1); break; } - case 0xc6: { + case CMD_BYTE_C6: { // CJUMP_UNK_C6 val = (s16)sub_80A8C2C((s16)curCmd.arg1); break; } - case 0xc7: { + case CMD_BYTE_C7: { s8 dir; action->callbacks->getDirection(action->parentObject, &dir); val = dir; break; } - case 0xca: { + case CMD_BYTE_CA: { action->callbacks->getHitboxCenter(action->parentObject, &pos); pos2 = pos; GroundLink_GetPos((s16)curCmd.arg1, &pos2); @@ -2738,7 +3041,7 @@ static s32 ExecuteScriptCommand(Action *action) val = (s8) VecDirection8Radial(&pos3); break; } - case 0xc8: { + case CMD_BYTE_C8: { s16 tmp = (s16)sub_80A7AE8((s16)curCmd.arg1); if (tmp >= 0) { PixelPos pos1, pos2, pos3, pos4; @@ -2747,15 +3050,14 @@ static s32 ExecuteScriptCommand(Action *action) sub_80A8FD8(tmp, &pos3); sub_80A8F9C(tmp, &pos4); val = SizedDeltaDirection8(&pos1, &pos2, &pos3, &pos4); - if (val == -1) { + if (val == -1) val = SizedDeltaDirection4(&pos1, &sPixelPosZero, &pos3, &sPixelPosZero); - } } else { val = -1; } break; } - case 0xc9: { + case CMD_BYTE_C9: { s16 tmp = (s16)sub_80A7AE8((s16)curCmd.arg1); if (tmp >= 0) { PixelPos pos1, pos2, pos3; @@ -2763,15 +3065,14 @@ static s32 ExecuteScriptCommand(Action *action) action->callbacks->getSize(action->parentObject, &pos2); sub_80A8FD8(tmp, &pos3); val = SizedDeltaDirection8(&pos1, &pos2, &pos3, &sPixelPosZero); - if (val == -1) { + if (val == -1) val = SizedDeltaDirection4(&pos1, &sPixelPosZero, &pos3, &sPixelPosZero); - } } else { val = -1; } break; } - case 0xcb: { + case CMD_BYTE_CB: { val = CheckScriptItemSpace(curCmd.argShort); break; } @@ -2783,55 +3084,71 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->script.ptr = ResolveJump(action, val); break; } - case 0xcf: { + case CMD_BYTE_CF: { scriptData->branchDiscriminant = GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort); - while (scriptData->script.ptr->op == 0xd0) { + while (scriptData->script.ptr->op == CMD_BYTE_D0) { if (scriptData->script.ptr->argShort == scriptData->branchDiscriminant) return 2; scriptData->script.ptr++; } - if (scriptData->script.ptr->op == 0xd1) { + if (scriptData->script.ptr->op == CMD_BYTE_D1) { scriptData->branchDiscriminant = -1; return 2; } break; } - case 0xd2 ... 0xd8: { + case CMD_BYTE_D2: + case CMD_BYTE_D3: + case CMD_BYTE_D4: + case CMD_BYTE_D5: + case CMD_BYTE_D6: + case CMD_BYTE_D7: + case CMD_BYTE_D8: { // DS: Assert(TRUE, "Script command call error SWITCH MENY") [sic] - const char *out = curCmd.argPtr; + const u8 *out = curCmd.argPtr; sNumChoices = 0; scriptData->branchDiscriminant = 0; - switch(curCmd.op) { - case 0xd6: case 0xd7: case 0xd8: { + + switch (curCmd.op) { + case CMD_BYTE_D6: + case CMD_BYTE_D7: + case CMD_BYTE_D8: { s32 disc = GetScriptVarValue(scriptData->localVars.buf, (s16)curCmd.arg2); - for (; scriptData->script.ptr->op == 0xd0; scriptData->script.ptr++, scriptData->branchDiscriminant++) { + for (; scriptData->script.ptr->op == CMD_BYTE_D0; scriptData->script.ptr++, scriptData->branchDiscriminant++) { if (scriptData->script.ptr->argShort == disc) out = scriptData->script.ptr->argPtr; } - for (; scriptData->script.ptr->op == 0xd1; scriptData->script.ptr++, scriptData->branchDiscriminant++) { - if (!out) out = scriptData->script.ptr->argPtr; + for (; scriptData->script.ptr->op == CMD_BYTE_D1; scriptData->script.ptr++, scriptData->branchDiscriminant++) { + if (out == NULL) + out = scriptData->script.ptr->argPtr; } } } - if (!out) out = ""; - for (; scriptData->script.ptr->op == 0xd9; scriptData->script.ptr++) { + if (out == NULL) + out = ""; + for (; scriptData->script.ptr->op == CMD_BYTE_D9; scriptData->script.ptr++) { gChoices[sNumChoices].text = scriptData->script.ptr->argPtr; gChoices[sNumChoices].menuAction = sNumChoices + 1; sNumChoices++; } - if (sNumChoices <= 0) break; + if (sNumChoices <= 0) + break; gChoices[sNumChoices].text = NULL; gChoices[sNumChoices].menuAction = curCmd.argShort; switch (curCmd.op) { - case 0xd2: case 0xd3: case 0xd6: { + case CMD_BYTE_D2: + case CMD_BYTE_D3: + case CMD_BYTE_D6: { sub_809B028(gChoices, (u8)curCmd.argByte > 0, -1, 0, (s16)curCmd.arg1, out); break; } - case 0xd4: case 0xd7: { + case CMD_BYTE_D4: + case CMD_BYTE_D7: { sub_809B028(gChoices, (u8)curCmd.argByte > 0, -1, 1, (s16)curCmd.arg1, out); break; } - case 0xd5: case 0xd8: { + case CMD_BYTE_D5: + case CMD_BYTE_D8: { sub_809B028(gChoices, (u8)curCmd.argByte > 0, -1, 2, (s16)curCmd.arg1, out); break; } @@ -2842,70 +3159,75 @@ static s32 ExecuteScriptCommand(Action *action) } break; } - case 0xda: { - if (GroundScriptCheckLockCondition(action, 1)) { + case CMD_BYTE_DA: { + if (GroundScriptCheckLockCondition(action, 1)) return 2; - } + break; } - case 0xdb: { + case CMD_BYTE_DB: { // WAIT scriptData->unk2A = curCmd.argShort; return 2; } - case 0xdc: { + case CMD_BYTE_DC: { scriptData->unk2A = curCmd.argShort + OtherRandInt(curCmd.arg1 - curCmd.argShort); return 2; } - case 0xdd ... 0xe2: { - return 2; // do action + case CMD_BYTE_DD: + case CMD_BYTE_DE: + case CMD_BYTE_DF: + case CMD_BYTE_E0: + case CMD_BYTE_E1: // WAIT_FANFARE1 + case CMD_BYTE_E2: { // WAIT_FANFARE2 + return 2; } - case 0xe3: { + case CMD_BYTE_E3: { scriptData->branchDiscriminant = curCmd.argShort; - if (GroundScriptCheckLockCondition(action, curCmd.argShort)) { + + if (GroundScriptCheckLockCondition(action, curCmd.argShort)) return 2; - } + break; } - case 0xe4: { + case CMD_BYTE_E4: { // ALERT_CUE GroundScriptLockJumpZero(curCmd.argShort); break; } - case 0xe5: { + case CMD_BYTE_E5: { // CMD_UNK_E5 scriptData->branchDiscriminant = curCmd.argShort; - if (GroundScriptLockCond(action, curCmd.argShort, curCmd.argByte)) { + + if (GroundScriptLockCond(action, curCmd.argShort, curCmd.argByte)) return 2; - } + break; } - case 0xe6: { + case CMD_BYTE_E6: { // CALL_LABEL scriptData->savedScript = scriptData->script; - } //fallthrough - case 0xe7: { + // Fallthrough + } + case CMD_BYTE_E7: { // JUMP_LABEL scriptData->script.ptr = FindLabel(action, curCmd.argShort); break; } - case 0xe8: { + case CMD_BYTE_E8: { // CALL_SCRIPT scriptData->savedScript = scriptData->script; - } // fallthrough - case 0xe9: { + // Fallthrough + } + case CMD_BYTE_E9: { // JUMP_SCRIPT scriptData->script.ptr2 = scriptData->script.ptr = gFunctionScriptTable[curCmd.argShort].script; break; } - case 0xea: { + case CMD_BYTE_EA: { // CALL_STATION scriptData->savedScript = scriptData->script; - } // fallthrough - case 0xeb: { + // Fallthrough + } + case CMD_BYTE_EB: { // JUMP_STATION ScriptInfoSmall info; u32 group, sector; u32 tmp = gUnknown_2039A34; - { - s32 tmp = curCmd.argShort < 0 ? scriptData->script.group : curCmd.argShort; - group = tmp; - } - { - s32 tmp = (s8)curCmd.argByte < 0 ? scriptData->script.sector : (s8)curCmd.argByte; - sector = tmp; - } + GroupValueOrDefault(&curCmd, scriptData->script.group, &group); + SectorValueOrDefault(&curCmd, scriptData->script.sector, §or); + GroundMap_GetStationScript(&info, tmp, group, sector); scriptData->script.ptr = info.ptr; scriptData->script.ptr2 = info.ptr; @@ -2913,36 +3235,41 @@ static s32 ExecuteScriptCommand(Action *action) scriptData->script.sector = sector; break; } - case 0xec: { + case CMD_BYTE_EC: { // EXECUTE_MAP_VAR gUnknown_2039A34 = GetAdjustedGroundMap((s16)GetScriptVarValue(scriptData->localVars.buf, curCmd.argShort)); GroundCancelAllEntities(); GroundMap_ExecuteEnter(gUnknown_2039A34); break; } - case 0xed: { + case CMD_BYTE_ED: { // RESET_CALLER // DS: if (scriptData->savedScript.ptr == NULL) Assert(FALSE, "Script flash stack error"); scriptData->savedScript.ptr = NULL; scriptData->savedScript.ptr2 = NULL; break; } - case 0xee: { + case CMD_BYTE_EE: { // RET_DIRECT if (scriptData->savedScript.ptr == NULL) { // DS: Assert(FALSE, "Script return stack error"); return 0; } + scriptData->script = scriptData->savedScript; scriptData->savedScript.ptr = NULL; scriptData->savedScript.ptr2 = NULL; break; } - case 0xef: + case CMD_BYTE_EF: // RET // DS: if (scriptData->savedScript.ptr != NULL) Assert(FALSE, "Script end stack error"); return 0; - case 0xf0: + case CMD_BYTE_F0: // HALT return 1; - case 0xf1: + case CMD_BYTE_F1: // END_DELETE return 4; // fatal error? - case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: { + case CMD_BYTE_F2: // CMD_F2 + case CMD_BYTE_F3: // CMD_F3 + case CMD_BYTE_F4: // LABEL + case CMD_BYTE_F5: // CMD_F5 + case CMD_BYTE_F6: { // DEBUGINFO // Debug, not in release ROM break; } @@ -2955,19 +3282,20 @@ UNUSED static u32 sub_80A1440(s32 r0, s32 r1, s32 r2) return sub_80A14E8(NULL, r0, r1, r2); } -UNUSED static bool8 GroundScript_ExecuteTrigger(s16 r0) +UNUSED static bool8 GroundScript_ExecuteTrigger(s16 scriptID) { s32 ret; ScriptInfoSmall scriptInfo; Action action; const ScriptRef *ptr; - ptr = &gFunctionScriptTable[r0]; + ptr = &gFunctionScriptTable[scriptID]; - if(ptr->type != 0xB) + if (ptr->type != 11) return FALSE; + InitActionWithParams(&action, &sNullCallbackData, NULL, 0, 0); - GetFunctionScript(NULL, &scriptInfo, r0); + GetFunctionScript(NULL, &scriptInfo, scriptID); GroundScript_ExecutePP(&action, NULL, &scriptInfo, DEBUG_LOC_PTR("../ground/ground_script.c", 4553, "GroundScript_ExecuteTrigger")); action.scriptData.savedScript = action.scriptData.script; @@ -2975,10 +3303,11 @@ UNUSED static bool8 GroundScript_ExecuteTrigger(s16 r0) action.scriptData.savedScript.ptr2 = gUnknown_81164E4; ret = HandleAction(&action, DEBUG_LOC_PTR("../ground/ground_script.c", 4558, "GroundScript_ExecuteTrigger")); InitAction2(&action); - if(ret == 0) + + if (ret == 0) return TRUE; - else - return FALSE; + + return FALSE; } static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) @@ -3014,7 +3343,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) case 9: { u8 var; - if (sub_80023E4(8) == 0) { + if (CheckQuest(QUEST_CAN_CHANGE_LEADER) == 0) { var = sub_808D4B0(); } else { @@ -3040,14 +3369,14 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) dialogueId = GetFriendAreaDialogueId(action->unkC.unk2); InlineStrcpy(text, gFriendAreaDialogue[dialogueId]); - if (ScriptPrintText(0, 1, text) != 0) + if (ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, 1, text) != 0) return 1; } } } return 0; case 0xB: - return (CountJobsinDungeon(ScriptDungeonIdToDungeonId(GetScriptVarValue(0, DUNGEON_ENTER_INDEX))) > 0); + return (CountJobsinDungeon(ScriptDungeonIdToDungeonId(GetScriptVarValue(NULL, DUNGEON_ENTER_INDEX))) > 0); case 0xC: { u8 sp_104; @@ -3070,7 +3399,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) { if (IsMazeCompleted((s16) index)) { if (!GetScriptVarArrayValue(0, TRAINING_PRESENT_LIST, (u16) index)) { - SetScriptVarArrayValue(0, TRAINING_PRESENT_LIST, (u16) index, 1); + SetScriptVarArrayValue(NULL, TRAINING_PRESENT_LIST, (u16) index, 1); return index - 0x10; } } @@ -3232,7 +3561,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) return 0; } case 0x1E: - sub_80A8F50(sPokeNameBuffer, 0x7C, POKEMON_NAME_LENGTH); + sub_80A8F50(sPokeNameBuffer, 124, POKEMON_NAME_LENGTH); return 0; case 0x1F: @@ -3267,7 +3596,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) } break; case 0x20: - sub_80026E8(0x9E, 0x1); + ScriptUnlockFriendArea(MAP_FRIEND_AREA_LEGENDARY_ISLAND, TRUE); if (GetRecruitedMonBySpecies(MONSTER_ZAPDOS, 0) == NULL) { static const DungeonLocation zapdosLoc = {.id = DUNGEON_MT_THUNDER_PEAK, .floor = 99}; if (TryAddLevel1PokemonToRecruited(MONSTER_ZAPDOS, NULL, ITEM_NOTHING, &zapdosLoc, NULL)) @@ -3290,7 +3619,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) return 0; case 0x22: { - Pokemon *pokemon = GetPlayerPokemonStruct(); + Pokemon *pokemon = GetLeaderMon1(); if (pokemon->speciesNum != MONSTER_ARTICUNO && pokemon->speciesNum != MONSTER_ZAPDOS && pokemon->speciesNum != MONSTER_MOLTRES) return 1; @@ -3299,10 +3628,10 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) case 0x23: { Pokemon *pokemon; - pokemon = GetPlayerPokemonStruct(); + pokemon = GetLeaderMon1(); if (pokemon != NULL && pokemon->speciesNum == MONSTER_HO_OH) return 2; - else if (sub_8098134(MONSTER_HO_OH) != 0) + else if (GetMonSeenFlag(MONSTER_HO_OH)) return 1; } return 0; @@ -3398,7 +3727,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) s32 r7 = 0x1A4; s32 r6 = 0; - while (1) + while (TRUE) { s16 indexS16; index = (s16)(index + 1); @@ -3467,7 +3796,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) } case 0x2A: { - s32 id = (s16) GetScriptVarValue(0, NEW_FRIEND_KIND); + s32 id = (s16) GetScriptVarValue(NULL, NEW_FRIEND_KIND); WriteFriendAreaName(gFormatBuffer_FriendArea,(GetFriendArea(id)), FALSE); if (id == 0) return 0; @@ -3486,7 +3815,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) s32 index; if (r2 != 0) { static const DungeonLocation dungLoc = {.id = DUNGEON_RESCUE_TEAM_BASE_2, .floor = 0}; - s32 id = (s16) GetScriptVarValue(0, NEW_FRIEND_KIND); + s32 id = (s16) GetScriptVarValue(NULL, NEW_FRIEND_KIND); s32 id_ = id; WriteFriendAreaName(gFormatBuffer_FriendArea,(GetFriendArea((s16)id)), FALSE); if (id == 0) @@ -3525,7 +3854,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) rankAfter = GetRescueTeamRank(); InlineStrcpy(gFormatBuffer_Items[0], GetTeamRankString(rankBefore)); InlineStrcpy(gFormatBuffer_Items[1], GetTeamRankString(rankAfter)); - if (ScriptPrintText(0, -1, _("{CENTER_ALIGN}The rescue rank went up from\n{CENTER_ALIGN}{MOVE_ITEM_0} to {MOVE_ITEM_1}!")) != 0) + if (ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, -1, _("{CENTER_ALIGN}The rescue rank went up from\n{CENTER_ALIGN}{MOVE_ITEM_0} to {MOVE_ITEM_1}!")) != 0) return 1; } else { @@ -3536,52 +3865,49 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) case 0x2F: AddToTeamMoney(10000); return 0; - case 0x30: - if (sub_808D278(MONSTER_GARDEVOIR) == 0) + case 0x30: { // Checks if Gardevoir can join the party (if it has space in its friend area) + if (sub_808D278(MONSTER_GARDEVOIR) == NULL) return 1; - else - return 0; - case 0x31: - sub_80A8F50(sPokeNameBuffer, 0x52, POKEMON_NAME_LENGTH); return 0; + } + case 0x31: { // Sets Gardevoir's name + sub_80A8F50(sPokeNameBuffer, 82, POKEMON_NAME_LENGTH); + return 0; + } + case 0x32: { // Tries to recruit Gardevoir + struct StoryMonData gardevoirData = { + .name = sPokeNameBuffer, + .speciesNum = MONSTER_GARDEVOIR, + .itemID = ITEM_NOTHING, + .dungeonLocation = {.id = DUNGEON_RESCUE_TEAM_BASE_2, .floor = 0}, + .moveID = {MOVE_CONFUSION, MOVE_DOUBLE_TEAM, MOVE_TELEPORT, MOVE_GROWL}, + .pokeHP = 53, + .level = 5, + .IQ = 1, + .offenseAtk = {18, 18}, + .offenseDef = {11, 10}, + .currExp = 2800, + }; + Pokemon gardevoirMon; - case 0x32: - { - struct StoryMonData gardevoirData = { - .name = sPokeNameBuffer, - .speciesNum = MONSTER_GARDEVOIR, - .itemID = ITEM_NOTHING, - .dungeonLocation = {.id = DUNGEON_RESCUE_TEAM_BASE_2, .floor = 0}, - .moveID = {MOVE_CONFUSION, MOVE_DOUBLE_TEAM, MOVE_TELEPORT, MOVE_GROWL}, - .pokeHP = 53, - .level = 5, - .IQ = 1, - .offenseAtk = {18, 18}, - .offenseDef = {11, 10}, - .currExp = 2800, - }; - Pokemon gardevoirMon; + ConvertStoryMonToPokemon(&gardevoirMon, &gardevoirData); + if (TryAddPokemonToRecruited(&gardevoirMon) == NULL) + return 1; - ConvertStoryMonToPokemon(&gardevoirMon, &gardevoirData); - if (TryAddPokemonToRecruited(&gardevoirMon) == 0) { - return 1; - } - else { - IncrementAdventureNumJoined(); - return 0; - } - } + IncrementAdventureNumJoined(); + return 0; + } case 0x33: if (ScriptVarScenarioAfter(SCENARIO_MAIN, 0x12, -1) - && GetScriptVarValue(0, GROUND_GETOUT) != 4 + && GetScriptVarValue(NULL, GROUND_GETOUT) != 4 && GetScriptVarArrayValue(0, EVENT_GONBE, 0) <= 0) { if (OtherRandInt(0x100) == 0) { - SetScriptVarArrayValue(0, EVENT_GONBE, 0, 4); + SetScriptVarArrayValue(NULL, EVENT_GONBE, 0, 4); return 1; } else { - SetScriptVarArrayValue(0, EVENT_GONBE, 0, 1); + SetScriptVarArrayValue(NULL, EVENT_GONBE, 0, 1); } } return 0; @@ -3604,11 +3930,11 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) return 0; case 0x35: { - Pokemon *pokemon = GetPlayerPokemonStruct(); + Pokemon *pokemon = GetLeaderMon1(); if(pokemon != NULL && pokemon->speciesNum == MONSTER_CHANSEY) return 2; else - if(sub_8098134(MONSTER_CHANSEY) != 0) + if(GetMonSeenFlag(MONSTER_CHANSEY)) return 1; else return 0; @@ -3676,7 +4002,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) sp_308.width = 1; sp_308.height = 1; sp_308.pos = (CompactPos) {0}; - sp_308.script = gFunctionScriptTable[406].script; // MOVE_DEBUG_CAMERA + sp_308.script = gFunctionScriptTable[MOVE_DEBUG_CAMERA].script; ret = (s16) GroundEffect_Add(-1, &sp_308, (s16) r2, (s8) r3); if(ret < 0) break; r7 = sub_80AD158(ret); @@ -3788,7 +4114,7 @@ static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3) sub_80997F4(r2, r3); return 0; case 0x48: - sub_80997F4(0x1E, r2); + sub_80997F4(30, r2); return 0; case 0x49: GroundSprite_ExtendPaletteAdd(0, r2); @@ -3834,7 +4160,7 @@ void GroundScript_Unlock(void) } } -static const ScriptCommand *FindLabel(Action *action, s32 r1) +static const ScriptCommand *FindLabel(Action *action, s32 labelNum) { ScriptCommand script; const ScriptCommand *scriptPtr2; @@ -3843,20 +4169,22 @@ static const ScriptCommand *FindLabel(Action *action, s32 r1) scriptPtr2 = action->scriptData.script.ptr2; scriptPtr = scriptPtr2 + 1; - while(1) { + while (TRUE) { script = *scriptPtr; scriptPtr++; - if (script.op == 0xF4 && r1 == script.argShort) break; + if (script.op == CMD_BYTE_F4 && labelNum == script.argShort) + break; { UNUSED static const u8 maybeFuncName[] = "_SearchScriptLabel"; UNUSED static const DebugLocation unusedDebugLoc = {"../ground/ground_script.c", 5822, maybeFuncName}; UNUSED static const u8 scrLabelError[] = "Script label search error %d"; } - // DS: Assert(script.op != 0, "script search label error %d", label) - // DS: Assert(script.op != 0xF6, "script search label error %d", label) + // DS: Assert(script.op != CMD_BYTE_00, "script search label error %d", label) + // DS: Assert(script.op != CMD_BYTE_F6, "script search label error %d", label) } + return scriptPtr; } @@ -3868,29 +4196,26 @@ static const ScriptCommand *ResolveJump(Action *action, s32 r1) scriptPtr = action->scriptData.script.ptr; - while(1) { + while (TRUE) { script = *scriptPtr; - if (script.op == 0xCC) - { - if(FlagJudge(r1, script.arg1, JUDGE_EQ)) + if (script.op == CMD_BYTE_CC) { + if (FlagJudge(r1, script.arg1, JUDGE_EQ)) return FindLabel(action, script.argShort); } - else if (script.op == 0xCD) - { - if(FlagJudge(r1, script.arg1, script.argByte)) + else if (script.op == CMD_BYTE_CD) { + if (FlagJudge(r1, script.arg1, script.argByte)) return FindLabel(action, script.argShort); } - else if (script.op == 0xCE) - { + else if (script.op == CMD_BYTE_CE) { temp = GetScriptVarValue(action->scriptData.localVars.buf, (s16)script.arg1); - if(FlagJudge(r1, temp, script.argByte)) + if (FlagJudge(r1, temp, script.argByte)) return FindLabel(action, script.argShort); } - else - { + else { return scriptPtr; } + scriptPtr++; } } @@ -3936,9 +4261,9 @@ static u32 sub_80A25AC(u16 param_1) return param_1; if (param_1 == 50) return 50; - if (!sub_80023E4(12)) + if (!CheckQuest(QUEST_UNK12)) return 999; - if (sub_80023E4(13)) + if (CheckQuest(QUEST_IN_WORLD_CALAMITY)) return 19; if (param_1 != 1) return param_1; diff --git a/src/gulpin_shop_801FB50.c b/src/gulpin_shop_801FB50.c index 1b07997e1..07191bc34 100644 --- a/src/gulpin_shop_801FB50.c +++ b/src/gulpin_shop_801FB50.c @@ -89,7 +89,7 @@ bool8 sub_801FB50(u32 mode) CopyYellowMonsterNametoBuffer(gFormatBuffer_Monsters[7], MONSTER_GULPIN); name = GetMonSpecies(MONSTER_GULPIN); strcpy(gFormatBuffer_Monsters[6], name); - PrintPokeNameToBuffer(gFormatBuffer_Monsters[4], GetPlayerPokemonStruct()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[4], GetLeaderMon1()); if (gUnknown_203B27C->mode == GULPIN_SHOP_MODE_ASLEEP) gUnknown_203B27C->monPortraitPtr = NULL; @@ -197,9 +197,9 @@ static void sub_801FDC0(void) switch (gUnknown_203B27C->state) { case 0x2: - gUnknown_203B27C->unk180.id[0].unk0 = 0x80; - gUnknown_203B27C->unk180.id[1].unk0 = 0x80; - gUnknown_203B27C->unk180.id[2].unk0 = 0x80; + gUnknown_203B27C->unk180.id[0].flags = WINTEMPLATE_FLAG_x80; + gUnknown_203B27C->unk180.id[1].flags = WINTEMPLATE_FLAG_x80; + gUnknown_203B27C->unk180.id[2].flags = WINTEMPLATE_FLAG_x80; gUnknown_203B27C->unk180.id[3] = gUnknown_80DC37C; ResetUnusedInputStruct(); ShowWindows(&gUnknown_203B27C->unk180, TRUE, FALSE); diff --git a/src/hurl_orb.c b/src/hurl_orb.c index 2519d2c89..3b51bca90 100644 --- a/src/hurl_orb.c +++ b/src/hurl_orb.c @@ -65,12 +65,12 @@ void HandleHurlOrb(Entity *target, Entity *attacker) if (AbilityIsActive(attacker, ABILITY_SUCTION_CUPS)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FCB40); // is anchored, cannot be moved + TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FCB40); // is anchored, cannot be moved return; } if (target == attacker) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FCB70); // couldn't be thrown for some reason + TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FCB70); // couldn't be thrown for some reason return; } @@ -135,13 +135,13 @@ void HandleHurlOrb(Entity *target, Entity *attacker) } } if (i == 100) { - TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FE6B4); // But it didn~27t go anywhere. + TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FE6B4); // But it didn~27t go anywhere. return; } } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0); - TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FE690); // m0 was sent flying! + TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FE690); // m0 was sent flying! if (ShouldDisplayEntity(attacker)) { PlaySoundEffect(0x1A3); } @@ -215,18 +215,18 @@ void HandleHurlOrb(Entity *target, Entity *attacker) InitPokemonMove(&move, MOVE_REGULAR_ATTACK); if (!sub_80571F0(tileEntity, &move)) { - sub_806F370(target, tileEntity, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(target, tileEntity, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING, RESIDUAL_DAMAGE_REGULAR, 0, 0); } if (EntityIsValid(tileEntity)) { sub_806CE68(tileEntity, GetEntInfo(tileEntity)->action.direction); } } - sub_806F370(target, attacker, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED, RESIDUAL_DAMAGE_REGULAR, 0, 0); + sub_806F370_Async(target, attacker, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED, RESIDUAL_DAMAGE_REGULAR, 0, 0); if (EntityIsValid(attacker)) { sub_806CE68(attacker, GetEntInfo(attacker)->action.direction); } - sub_803E708(0x1E, 0x3B); + DungeonWaitFrames_Async(0x1E, 0x3B); sub_807F9BC(attacker); } } @@ -242,6 +242,6 @@ static void sub_807F9BC(Entity *entity) sub_807EC28(FALSE); } sub_806A5B8(entity); - TryTriggerMonsterHouseWithMsg(entity, gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(entity, gDungeon->forceMonsterHouse); } } diff --git a/src/items.c b/src/items.c index 49dd1e1aa..a2ebfc316 100644 --- a/src/items.c +++ b/src/items.c @@ -539,7 +539,7 @@ void FillInventoryGaps(void) } slot_checking++; last_filled++; - } while (1); + } while (TRUE); // clear out the rest of the slots for (; last_filled < INVENTORY_SIZE; last_filled++) { diff --git a/src/load_screen.c b/src/load_screen.c index 83236c094..b8e2d1dea 100644 --- a/src/load_screen.c +++ b/src/load_screen.c @@ -18,6 +18,7 @@ #include "menu_input.h" #include "play_time.h" #include "pokemon.h" +#include "rescue_team_info.h" #include "save.h" #include "string_format.h" #include "text_1.h" @@ -25,185 +26,214 @@ #include "text_3.h" #include "text_util.h" -struct LoadScreen +#define LEGEND_ICON_W 16 +#define LEGEND_ICON_H 16 +#define LEGEND_ICON_4BPP_LEN (LEGEND_ICON_W * LEGEND_ICON_H / 8) + +// Size: 0x8 +typedef struct ClmkFileData { - // size: 0x27c - u32 currMenu; - MenuStruct unk4[4]; - WindowTemplates unk144; - /* 0x1A4 */ u8 formattedTeamName[0x24]; - /* 0x1C8 */ u8 formattedPlayerName[0x24]; - /* 0x1EC */ u8 formattedLocation[0x24]; - /* 0x210 */ u8 formattedPlayTime[0x24]; - /* 0x234 */ u8 formattedAdventures[0x24]; - /* 0x258 */ u8 formattedHelperInfo[0x24]; + /* 0x0 */ /*const */u32 (*packedGFX)[LEGEND_ICON_4BPP_LEN]; + /* 0x4 */ /*const */RGB_Struct (*palette)[16 * 4]; // Contains 4 palettes +} ClmkFileData; + +enum +{ + LEGEND_ICON_ZAPDOS, + LEGEND_ICON_MOLTRES, + LEGEND_ICON_ARTICUNO, + LEGEND_ICON_GROUDON, + LEGEND_ICON_RAYQUAZA, + LEGEND_ICON_KYOGRE, + LEGEND_ICON_MEW, + LEGEND_ICON_HO_OH, + LEGEND_ICON_CELEBI, + LEGEND_ICON_LUGIA, + LEGEND_ICON_MEWTWO, + LEGEND_ICON_DEOXYS, + NUM_LEGEND_ICONS }; -EWRAM_INIT struct LoadScreen *gLoadScreen = {NULL}; +// Size: 0x27C +struct LoadScreen +{ + /* 0x000 */ u32 currMenu; + /* 0x004 */ MenuStruct unk4[4]; + /* 0x144 */ WindowTemplates unk144; + /* 0x1A4 */ u8 formattedTeamName[36]; + /* 0x1C8 */ u8 formattedPlayerName[36]; + /* 0x1EC */ u8 formattedLocation[36]; + /* 0x210 */ u8 formattedPlayTime[36]; + /* 0x234 */ u8 formattedAdventures[36]; + /* 0x258 */ u8 formattedHelperInfo[36]; +}; + +EWRAM_INIT struct LoadScreen *gLoadScreen = { NULL }; extern unkStruct_203B484 *gUnknown_203B484; -u8 IsQuickSave(void); -void DrawLoadScreenText(void); -void sub_80397B4(void); - -extern void sub_80920D8(u8 *); - -const WindowTemplate gUnknown_80E75F8 = { - 0, - 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - NULL -}; +const WindowTemplate gUnknown_80E75F8 = WIN_TEMPLATE_DUMMY; const WindowTemplate gUnknown_80E7610 = { - 0, - 0x03, - 0x02, 0x02, - 0x1A, 0x0B, - 0x0B, 0x00, - NULL + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_NORMAL, + .pos = { 2, 2 }, + .width = 26, + .height = 11, + .totalHeight = 11, + .unk12 = 0, + .header = NULL }; -EWRAM_INIT MenuItem gUnknown_203B378[2] = { - [0] = { - .text = " ", - .menuAction = 5, - }, - [1] = { - .text = NULL, - .menuAction = 3, - } +static EWRAM_INIT MenuItem gUnknown_203B378[] = { + { " ", 5 }, + { NULL, 3 }, }; -EWRAM_INIT u32 gUnknown_203B388[12] = {0xC, 0xC, 0xE, 0xE, 0xD, 0xE, 0xC, 0xD, 0xD, 0xB, 0xB, 0xB}; -EWRAM_INIT u32 gUnknown_203B3B8[12] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x1A, 0x18, 0x1B, 0x16, 0x19, 0x17}; +static EWRAM_INIT u32 sLegendaryQuestIconPalNums[NUM_LEGEND_ICONS] = { + [LEGEND_ICON_ZAPDOS] = 12, + [LEGEND_ICON_MOLTRES] = 12, + [LEGEND_ICON_ARTICUNO] = 14, + [LEGEND_ICON_GROUDON] = 14, + [LEGEND_ICON_RAYQUAZA] = 13, + [LEGEND_ICON_KYOGRE] = 14, + [LEGEND_ICON_MEW] = 12, + [LEGEND_ICON_HO_OH] = 13, + [LEGEND_ICON_CELEBI] = 13, + [LEGEND_ICON_LUGIA] = 11, + [LEGEND_ICON_MEWTWO] = 11, + [LEGEND_ICON_DEOXYS] = 11, +}; + +static EWRAM_INIT u32 sLegendaryQuestIDs[NUM_LEGEND_ICONS] = { + [LEGEND_ICON_ZAPDOS] = QUEST_LEGEND_ZAPDOS, + [LEGEND_ICON_MOLTRES] = QUEST_LEGEND_MOLTRES, + [LEGEND_ICON_ARTICUNO] = QUEST_LEGEND_ARTICUNO, + [LEGEND_ICON_GROUDON] = QUEST_LEGEND_GROUDON, + [LEGEND_ICON_RAYQUAZA] = QUEST_LEGEND_RAYQUAZA, + [LEGEND_ICON_KYOGRE] = QUEST_LEGEND_KYOGRE, + [LEGEND_ICON_MEW] = QUEST_LEGEND_MEW, + [LEGEND_ICON_HO_OH] = QUEST_LEGEND_HO_OH, + [LEGEND_ICON_CELEBI] = QUEST_LEGEND_CELEBI, + [LEGEND_ICON_LUGIA] = QUEST_LEGEND_LUGIA, + [LEGEND_ICON_MEWTWO] = QUEST_LEGEND_MEWTWO, + [LEGEND_ICON_DEOXYS] = QUEST_LEGEND_DEOXYS, +}; const WindowTemplate gUnknown_80E762C = { - 0, - 0x03, - 0x02, 0x0F, - 0x13, 0x03, - 0x03, 0x00, - NULL + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_NORMAL, + .pos = { 2, 15 }, + .width = 19, + .height = 3, + .totalHeight = 3, + .unk12 = 0, + .header = NULL }; -const MenuItem gResumeQuicksaveMenuItems[3] = -{ - {"Resuming from quicksave.", 5}, - {"Is that OK?", 5}, - {NULL, 3}, +const MenuItem gResumeQuicksaveMenuItems[] = { + { "Resuming from quicksave.", 5 }, + { "Is that OK?", 5 }, + { NULL, 3 }, }; -const MenuItem gResumeAdventureMenuItems[3] = -{ - {"Resuming saved adventure.", 5}, - {"Is that OK?", 5}, - {NULL, 3}, +const MenuItem gResumeAdventureMenuItems[] = { + { "Resuming saved adventure.", 5 }, + { "Is that OK?", 5 }, + { NULL, 3 }, }; -const MenuItem gQuitWaitingRescueMenuItems[3] = -{ - {"Quit awaiting rescue?", 5}, - {"Is that OK?", 5}, - {NULL, 3}, +const MenuItem gQuitWaitingRescueMenuItems[] = { + { "Quit awaiting rescue?", 5 }, + { "Is that OK?", 5 }, + { NULL, 3 }, }; -const MenuItem gDeleteSavePromptMenuItems[3] = -{ - {"Your saved data will be", 5}, - {"deleted. Is that OK?", 5}, - {NULL, 3}, +const MenuItem gDeleteSavePromptMenuItems[] = { + { "Your saved data will be", 5 }, + { "deleted. Is that OK?", 5 }, + { NULL, 3 }, }; -const MenuItem gDeleteSaveConfirmMenuItems[3] = -{ - {"Are you sure you want to", 5}, - {"delete all of your saved data?", 5}, - {NULL, 3}, +const MenuItem gDeleteSaveConfirmMenuItems[] = { + { "Are you sure you want to", 5 }, + { "delete all of your saved data?", 5 }, + { NULL, 3 }, }; -const WindowTemplate gUnknown_80E7784 = -{ - 0, - 0x03, - 0x17, 0x0F, - 0x05, 0x03, - 0x03, 0x00, - NULL +const WindowTemplate gUnknown_80E7784 = { + .flags = WINTEMPLATE_FLAG_NONE, + .type = WINDOW_TYPE_NORMAL, + .pos = { 23, 15 }, + .width = 5, + .height = 3, + .totalHeight = 3, + .unk12 = 0, + .header = NULL }; -const MenuItem gLoadScreenYesNoMenu[3] = -{ - {"Yes", 1}, - {"No", 2}, - {NULL, 3}, +const MenuItem gLoadScreenYesNoMenu[] = { + { "Yes", 1 }, + { "No", 2 }, + { NULL, 3 }, }; -ALIGNED(4) const char gTeamHeadingText[] = "Team:"; -ALIGNED(4) const char gNameHeadingText[] = "Name:"; -ALIGNED(4) const char gLocationHeadingText[] = "Location:"; -ALIGNED(4) const char gPlayTimeHeadingText[] = "Play time:"; -ALIGNED(4) const char gAdventuresHeadingText[] = "Adventures:"; -ALIGNED(4) const char gHelperHeadingText[] = "Helper:"; -ALIGNED(4) const char gNoTeamNamePlaceholder[] = _("????"); -ALIGNED(4) const char gUnknown_80E7804[] = "%s "; -ALIGNED(4) const char gNoNamePlaceholder[] = "???"; -ALIGNED(4) const char gQuicksaveDataDeletedText[] = "Quicksave data deleted."; -ALIGNED(4) const char gLocationUnknownText[] = "Location unknown."; -ALIGNED(4) const char gPlayTimePlaceholder[] = "%d:%02d:%02d "; -ALIGNED(4) const char gNumAdventurePlaceholder[] = "%d"; -ALIGNED(4) const char gHelperInfoPlaceholder[] = "%s (%s)"; -ALIGNED(4) const char gNoHelperText[] = "-----"; -ALIGNED(4) const char gClmkpatFileName[] = "clmkpat"; // clmkpat +static void DrawLoadScreenText(void); +static void DrawQuestIcons(void); +static u8 IsQuickSave(void); void CreateLoadScreen(u32 currMenu) { - int index; + s32 i; - if (gLoadScreen == NULL) { - gLoadScreen = MemoryAlloc(sizeof(struct LoadScreen), 8); - MemoryFill8(gLoadScreen, 0, sizeof(struct LoadScreen)); - } - gLoadScreen->currMenu = currMenu; - for(index = 0; index < 4; index++){ - gLoadScreen->unk144.id[index] = gUnknown_80E75F8; - } - ResetUnusedInputStruct(); - ShowWindows(&gLoadScreen->unk144, TRUE, TRUE); - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,0,&gUnknown_80E7610,gUnknown_203B378,FALSE,6,FALSE); - switch(gLoadScreen->currMenu){ - case MENU_CONTINUE: - if (IsQuickSave()) - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,1,&gUnknown_80E762C,gResumeQuicksaveMenuItems,FALSE,6,FALSE); - else - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,1,&gUnknown_80E762C,gResumeAdventureMenuItems,FALSE,6,FALSE); - break; - case MENU_AWAITING_RESCUE: - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,1,&gUnknown_80E762C,gQuitWaitingRescueMenuItems,FALSE,6,FALSE); - break; - case MENU_DELETE_SAVE_PROMPT: - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,1,&gUnknown_80E762C,gDeleteSavePromptMenuItems,FALSE,6,FALSE); - break; - case MENU_DELETE_SAVE_CONFIRM: - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,1,&gUnknown_80E762C, gDeleteSaveConfirmMenuItems,FALSE,6,FALSE); - break; - } - SetMenuItems(gLoadScreen->unk4,&gLoadScreen->unk144,2,&gUnknown_80E7784,gLoadScreenYesNoMenu,TRUE,2,FALSE); - sub_8035CF4(gLoadScreen->unk4,0,0); - sub_8035CF4(gLoadScreen->unk4,1,0); - sub_8035CF4(gLoadScreen->unk4,2,1); - DrawLoadScreenText(); + if (gLoadScreen == NULL) { + gLoadScreen = MemoryAlloc(sizeof(struct LoadScreen), 8); + MemoryFill8(gLoadScreen, 0, sizeof(struct LoadScreen)); + } + + gLoadScreen->currMenu = currMenu; + for (i = 0; i < MAX_WINDOWS; i++) + gLoadScreen->unk144.id[i] = gUnknown_80E75F8; + + ResetUnusedInputStruct(); + ShowWindows(&gLoadScreen->unk144, TRUE, TRUE); + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 0, &gUnknown_80E7610, gUnknown_203B378, FALSE, 6, FALSE); + + switch (gLoadScreen->currMenu) { + case MENU_CONTINUE: { + if (IsQuickSave()) + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 1, &gUnknown_80E762C, gResumeQuicksaveMenuItems, FALSE, 6, FALSE); + else + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 1, &gUnknown_80E762C, gResumeAdventureMenuItems, FALSE, 6, FALSE); + break; + } + case MENU_AWAITING_RESCUE: { + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 1, &gUnknown_80E762C, gQuitWaitingRescueMenuItems, FALSE, 6, FALSE); + break; + } + case MENU_DELETE_SAVE_PROMPT: { + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 1, &gUnknown_80E762C, gDeleteSavePromptMenuItems, FALSE, 6, FALSE); + break; + } + case MENU_DELETE_SAVE_CONFIRM: { + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 1, &gUnknown_80E762C, gDeleteSaveConfirmMenuItems, FALSE, 6, FALSE); + break; + } + } + + SetMenuItems(gLoadScreen->unk4, &gLoadScreen->unk144, 2, &gUnknown_80E7784, gLoadScreenYesNoMenu, TRUE, 2, FALSE); + sub_8035CF4(gLoadScreen->unk4, 0, FALSE); + sub_8035CF4(gLoadScreen->unk4, 1, FALSE); + sub_8035CF4(gLoadScreen->unk4, 2, TRUE); + DrawLoadScreenText(); } void CleanLoadScreen(void) { ResetUnusedInputStruct(); ShowWindows(NULL, TRUE, TRUE); - if(gLoadScreen != NULL) - { + + if (gLoadScreen != NULL) { MemoryFree(gLoadScreen); gLoadScreen = NULL; } @@ -211,214 +241,219 @@ void CleanLoadScreen(void) u32 UpdateLoadScreenMenu(void) { - u32 nextMenu; - u32 menuAction; + u32 nextMenu; + u32 menuAction; - nextMenu = MENU_NO_SCREEN_CHANGE; - menuAction = 4; - sub_8012FD8(&gLoadScreen->unk4[1]); - if (sub_8012FD8(&gLoadScreen->unk4[2]) == '\0') { - sub_8013114(&gLoadScreen->unk4[2],&menuAction); - } + nextMenu = MENU_NO_SCREEN_CHANGE; + menuAction = 4; + sub_8012FD8(&gLoadScreen->unk4[1]); - switch(menuAction) - { - case 3: - case 2: - nextMenu = MENU_MAIN_SCREEN; - break; - case 1: - switch(gLoadScreen->currMenu) - { - case MENU_CONTINUE: - nextMenu = 2; // MENU_??? - break; - case MENU_AWAITING_RESCUE: - DeleteMailAtIndex(0); - nextMenu = 4; // MENU_??? - break; - case MENU_DELETE_SAVE_PROMPT: - nextMenu = MENU_DELETE_SAVE_CONFIRM; - break; - case MENU_DELETE_SAVE_CONFIRM: - sub_80122A8(); - nextMenu = MENU_DELETE_SAVE; - break; + if (!sub_8012FD8(&gLoadScreen->unk4[2])) + sub_8013114(&gLoadScreen->unk4[2], &menuAction); + + switch (menuAction) { + case 3: + case 2: { + nextMenu = MENU_MAIN_SCREEN; + break; } - break; - case 5: - default: - break; - } - return nextMenu; -} - -void DrawLoadScreenText(void) -{ - int iVar2; - u32 numAdventures; - u8 auStack356 [100]; - u8 teamNameBuffer [40]; - u8 playerName [80]; - u8 nameHelper [80]; - u8 speciesHelper [20]; - u32 hours; - u32 minutes; - u32 seconds; - Pokemon *playerInfo; - unkStruct_203B484 *temp2; - - iVar2 = sub_8011FA8(); - CallPrepareTextbox_8008C54(0); - sub_80073B8(0); - PrintStringOnWindow(8,0, gTeamHeadingText,0,0); // Team: - PrintStringOnWindow(8,12,gNameHeadingText,0,0); // Name: - PrintStringOnWindow(8,24,gLocationHeadingText,0,0); // Location: - PrintStringOnWindow(8,36,gPlayTimeHeadingText,0,0); // Play time: - PrintStringOnWindow(8,48,gAdventuresHeadingText,0,0); // Adventures: - PrintStringOnWindow(8,60,gHelperHeadingText,0,0); // Helper: - - // Draw Team Name - if (sub_80023E4(0)) { - sub_80920D8(teamNameBuffer); - } - else { - InlineStrcpy(teamNameBuffer,gNoTeamNamePlaceholder); - } - - sprintfStatic(gLoadScreen->formattedTeamName,gUnknown_80E7804,teamNameBuffer); - PrintStringOnWindow(64,0,gLoadScreen->formattedTeamName,0,0); - - // Draw Player Name - playerInfo = GetPlayerPokemonStruct(); - if (playerInfo == NULL) - StrncpyCustom(playerName, gNoNamePlaceholder, POKEMON_NAME_LENGTH); - else - StrncpyCustom(playerName, playerInfo->name, POKEMON_NAME_LENGTH); - sprintfStatic(gLoadScreen->formattedPlayerName,gUnknown_80E7804,playerName); - PrintStringOnWindow(64,12,gLoadScreen->formattedPlayerName,0,0); - - // Draw Location Info - if ((CountMailType(WONDER_MAIL_TYPE_SOS) != 0) || (CountMailType(WONDER_MAIL_TYPE_OKD) != 0)) { - if (iVar2 == 0xf1207) - PrintDungeonLocationtoBuffer(gLoadScreen->formattedLocation,GetDungeonLocationInfo()); - else - sprintfStatic(gLoadScreen->formattedLocation,gQuicksaveDataDeletedText); // Quicksave data deleted - } - else { - switch(sub_8011C1C()) - { - case 1: - switch(GetScriptVarValue(NULL,START_MODE)) - { - default: - sprintfStatic(auStack356,gUnknown_80E7804,GetCurrentGroundPlaceName()); - FormatString(auStack356,gLoadScreen->formattedLocation,gLoadScreen->formattedPlayTime,0); + case 1: { + switch (gLoadScreen->currMenu) { + case MENU_CONTINUE: { + nextMenu = 2; // MENU_??? break; - case 0x7: - case 0xB: - sprintfStatic(gLoadScreen->formattedLocation,gQuicksaveDataDeletedText); // Quicksave data deleted + } + case MENU_AWAITING_RESCUE: { + DeleteMailAtIndex(0); + nextMenu = 4; // MENU_??? break; + } + case MENU_DELETE_SAVE_PROMPT: { + nextMenu = MENU_DELETE_SAVE_CONFIRM; + break; + } + case MENU_DELETE_SAVE_CONFIRM: { + sub_80122A8(); + nextMenu = MENU_DELETE_SAVE; + break; + } } break; - case 2: - if (iVar2 == 0xf1207) - PrintDungeonLocationtoBuffer(gLoadScreen->formattedLocation,GetDungeonLocationInfo()); - else - sprintfStatic(gLoadScreen->formattedLocation,gQuicksaveDataDeletedText); // Quicksave data deleted - break; - default: - sprintfStatic(gLoadScreen->formattedLocation,gLocationUnknownText); // Location unknown + } + case 5: + default: { break; + } } - } - PrintStringOnWindow(64,24,gLoadScreen->formattedLocation,0,0); - // Draw Play Time - DeconstructPlayTime(gPlayTimeRef,&hours,&minutes,&seconds); - sprintfStatic(gLoadScreen->formattedPlayTime,gPlayTimePlaceholder,hours,minutes,seconds); - PrintStringOnWindow(64,36,gLoadScreen->formattedPlayTime,0,0); - - // Draw Adventures Info - numAdventures = GetNumAdventures(); - sprintfStatic(gLoadScreen->formattedAdventures,gNumAdventurePlaceholder,numAdventures); // %d - PrintStringOnWindow(64,48,gLoadScreen->formattedAdventures,0,0); - - // Draw Helper Info - if (iVar2 == 0xf1207){ - // NOTE: very hacky match here but needed var here to match - temp2 = gUnknown_203B484; - if(temp2->unk4.speciesNum != MONSTER_NONE) { - sub_808D930(speciesHelper,temp2->unk4.speciesNum); - StrncpyCustom(nameHelper,temp2->unk4.name,POKEMON_NAME_LENGTH); - sprintfStatic(gLoadScreen->formattedHelperInfo,gHelperInfoPlaceholder,nameHelper,speciesHelper); // %s (%s) - } - else - goto print_helper_placeholder; - } - else { - print_helper_placeholder: - sprintfStatic(gLoadScreen->formattedHelperInfo,gNoHelperText); // ----- - } - PrintStringOnWindow(64,60,gLoadScreen->formattedHelperInfo,0,0); - - sub_80397B4(); // Draw event icons?? - sub_80073E0(0); + return nextMenu; } -// Think structure of clmkFile is like Team Rank Badges except each pic has a diff palette -struct ClmkFileData +static void DrawLoadScreenText(void) { - /* 0x0 */ u32 *pics; - /* 0x4 */ RGB *palette; -}; + s32 iVar2; + u32 numAdventures; + u8 auStack356[100]; + u8 teamNameBuffer[40]; + u8 playerName[80]; + u8 nameHelper[80]; + u8 speciesHelper[20]; + u32 hours; + u32 minutes; + u32 seconds; + Pokemon *playerInfo; + unkStruct_203B484 *temp2; -void sub_80397B4(void) -{ - OpenedFile *clmkFile; - s32 index; - s32 x; - s32 y; + iVar2 = sub_8011FA8(); + CallPrepareTextbox_8008C54(0); + sub_80073B8(0); + PrintStringOnWindow(8, 0, _("Team:"), 0, 0); + PrintStringOnWindow(8, 12, _("Name:"), 0, 0); + PrintStringOnWindow(8, 24, _("Location:"), 0, 0); + PrintStringOnWindow(8, 36, _("Play time:"), 0, 0); + PrintStringOnWindow(8, 48, _("Adventures:"), 0, 0); + PrintStringOnWindow(8, 60, _("Helper:"), 0, 0); - clmkFile = OpenFileAndGetFileDataPtr(gClmkpatFileName,&gTitleMenuFileArchive); // clmkpat + // Draw Team Name + if (CheckQuest(QUEST_SET_TEAM_NAME)) + sub_80920D8(teamNameBuffer); + else + InlineStrcpy(teamNameBuffer, _("????")); - for(index = 0; index < 64; index++) - { - SetBGPaletteBufferColorArray(index + 176, &((struct ClmkFileData *)(clmkFile->data))->palette[index]); - } + sprintfStatic(gLoadScreen->formattedTeamName, "%s ", teamNameBuffer); + PrintStringOnWindow(64, 0, gLoadScreen->formattedTeamName, 0, 0); - x = 8; - y = 0x49; + // Draw Player Name + playerInfo = GetLeaderMon1(); + if (playerInfo == NULL) + StrncpyCustom(playerName, _("???"), POKEMON_NAME_LENGTH); + else + StrncpyCustom(playerName, playerInfo->name, POKEMON_NAME_LENGTH); - // Draw the 12 legendary icons - for(index = 0; index < 12; index++) - { - if (sub_80023E4(gUnknown_203B3B8[index])) { - sub_8007E20(0,x,y,0x10,0x10,(&((struct ClmkFileData *)(clmkFile->data))->pics[index * 32]), gUnknown_203B388[index]); - x += 16; + sprintfStatic(gLoadScreen->formattedPlayerName, "%s ", playerName); + PrintStringOnWindow(64, 12, gLoadScreen->formattedPlayerName, 0, 0); + + // Draw Location Info + if (CountMailType(WONDER_MAIL_TYPE_SOS) != 0 || CountMailType(WONDER_MAIL_TYPE_OKD) != 0) { + if (iVar2 == 0xF1207) + PrintDungeonLocationtoBuffer(gLoadScreen->formattedLocation,GetDungeonLocationInfo()); + else + sprintfStatic(gLoadScreen->formattedLocation, _("Quicksave data deleted.")); } - } - CloseFile(clmkFile); + else { + switch (sub_8011C1C()) { + case 1: { + switch (GetScriptVarValue(NULL, START_MODE)) { + default: { + sprintfStatic(auStack356, "%s ", GetCurrentGroundPlaceName()); + FormatString(auStack356, gLoadScreen->formattedLocation, gLoadScreen->formattedPlayTime, 0); + break; + } + case STARTMODE_CONTINUE_QUICKSAVE: + case STARTMODE_11: { + sprintfStatic(gLoadScreen->formattedLocation, _("Quicksave data deleted.")); + break; + } + } + break; + } + case 2: { + if (iVar2 == 0xF1207) + PrintDungeonLocationtoBuffer(gLoadScreen->formattedLocation, GetDungeonLocationInfo()); + else + sprintfStatic(gLoadScreen->formattedLocation, _("Quicksave data deleted.")); + break; + } + default: { + sprintfStatic(gLoadScreen->formattedLocation, _("Location unknown.")); + break; + } + } + } + + PrintStringOnWindow(64, 24, gLoadScreen->formattedLocation, 0, 0); + + // Draw Play Time + DeconstructPlayTime(gPlayTimeRef, &hours, &minutes, &seconds); + sprintfStatic(gLoadScreen->formattedPlayTime, "%d:%02d:%02d ", hours, minutes, seconds); + PrintStringOnWindow(64, 36, gLoadScreen->formattedPlayTime, 0, 0); + + // Draw Adventures Info + numAdventures = GetNumAdventures(); + sprintfStatic(gLoadScreen->formattedAdventures, "%d", numAdventures); + PrintStringOnWindow(64, 48, gLoadScreen->formattedAdventures, 0, 0); + + // Draw Helper Info + if (iVar2 == 0xF1207) { + // NOTE: very hacky match here but needed var here to match + temp2 = gUnknown_203B484; + if (temp2->unk4.speciesNum != MONSTER_NONE) { + sub_808D930(speciesHelper, temp2->unk4.speciesNum); + StrncpyCustom(nameHelper, temp2->unk4.name, POKEMON_NAME_LENGTH); + sprintfStatic(gLoadScreen->formattedHelperInfo, "%s (%s)", nameHelper, speciesHelper); + } + else + goto print_helper_placeholder; // TODO: Fix + } + else { +print_helper_placeholder: + sprintfStatic(gLoadScreen->formattedHelperInfo, "-----"); + } + + PrintStringOnWindow(64, 60, gLoadScreen->formattedHelperInfo, 0, 0); + + DrawQuestIcons(); + sub_80073E0(0); } -bool8 IsQuickSave(void) +static void DrawQuestIcons(void) { - s32 iVar1; - bool8 isQuicksave; + OpenedFile *clmkFile; + s32 i; + s32 x; + s32 y; - iVar1 = sub_8011FA8(); - isQuicksave = FALSE; - if (CountMailType(WONDER_MAIL_TYPE_SOS) != 0 || CountMailType(WONDER_MAIL_TYPE_OKD) != 0) - { - if (iVar1 == 0xf1207) - isQuicksave = TRUE; - } - else if (sub_8011C1C() == 2 && iVar1 == 0xf1207) - isQuicksave = TRUE; - return isQuicksave; + clmkFile = OpenFileAndGetFileDataPtr("clmkpat", &gTitleMenuFileArchive); +#define CLMKPAT_DATA ((ClmkFileData *)clmkFile->data) + + // Load all 4 palettes + for (i = 0; i < 16 * 4; i++) + SetBGPaletteBufferColorArray(i + 0xB0, &(*CLMKPAT_DATA->palette)[i]); + + x = 8; + y = 73; // Shouldn't this be 72? + + // Draw the legendary icons + for (i = 0; i < NUM_LEGEND_ICONS; i++) { + if (CheckQuest(sLegendaryQuestIDs[i])) { + WriteGFXToBG0Window(0, x, y, LEGEND_ICON_W, LEGEND_ICON_H, CLMKPAT_DATA->packedGFX[i], sLegendaryQuestIconPalNums[i]); + x += 16; + } + } + +#undef CLMKPAT_DATA + CloseFile(clmkFile); +} + +static bool8 IsQuickSave(void) +{ + s32 iVar1; + bool8 isQuicksave; + + iVar1 = sub_8011FA8(); + isQuicksave = FALSE; + + if (CountMailType(WONDER_MAIL_TYPE_SOS) != 0 || CountMailType(WONDER_MAIL_TYPE_OKD) != 0) { + if (iVar1 == 0xF1207) + isQuicksave = TRUE; + } + else if (sub_8011C1C() == 2 && iVar1 == 0xF1207) + isQuicksave = TRUE; + + return isQuicksave; } bool8 sub_8039880(void) { - return (CountMailType(WONDER_MAIL_TYPE_SOS) != 0 || CountMailType(WONDER_MAIL_TYPE_OKD) != 0 || sub_8011C1C() == 2); + return (CountMailType(WONDER_MAIL_TYPE_SOS) != 0 || CountMailType(WONDER_MAIL_TYPE_OKD) != 0 || sub_8011C1C() == 2); } diff --git a/src/luminous_cave.c b/src/luminous_cave.c index ed33f518c..e37097f13 100644 --- a/src/luminous_cave.c +++ b/src/luminous_cave.c @@ -96,7 +96,7 @@ u32 sub_802465C(void) sLuminousCaveWork->menuAction1 = 0; sLuminousCaveWork->menuAction2 = 0; sLuminousCaveWork->menuAction3 = 0; - sLuminousCaveWork->pokeStruct = GetPlayerPokemonStruct(); + sLuminousCaveWork->pokeStruct = GetLeaderMon1(); sLuminousCaveWork->pokeRenamed = IsPokemonRenamed(sLuminousCaveWork->pokeStruct); sLuminousCaveWork->evolutionComplete = FALSE; faceFile = GetDialogueSpriteDataPtr(MONSTER_GULPIN); @@ -315,7 +315,7 @@ static void UpdateLuminousCaveDialogue(void) IncrementNumEvolved(); sub_808F734(sLuminousCaveWork->pokeStruct,sLuminousCaveWork->evolveStatus.targetEvolveSpecies); nullsub_104(); - sLuminousCaveWork->pokeStruct = GetPlayerPokemonStruct(); + sLuminousCaveWork->pokeStruct = GetLeaderMon1(); if (sLuminousCaveWork->evoItem1_InvIndex != INVENTORY_SIZE) { ClearItemSlotAt(sLuminousCaveWork->evoItem1_InvIndex); } diff --git a/src/main.c b/src/main.c index 0be399f8b..f06293a22 100644 --- a/src/main.c +++ b/src/main.c @@ -100,6 +100,6 @@ void AgbMain(void) InitGraphics(); SetInterruptCallback(1, VBlank_CB); REG_DISPCNT = DISPCNT_WIN1_ON | DISPCNT_WIN0_ON | DISPCNT_OBJ_ON | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_1D_MAP; // 32576 - GameLoop(); + GameLoop_Async(); Hang(); } diff --git a/src/main_loops.c b/src/main_loops.c index 7a639d204..8a4149497 100644 --- a/src/main_loops.c +++ b/src/main_loops.c @@ -117,7 +117,7 @@ static const unkTalkTable sTalkKindTable[5] = { }; // arm9.bin::0200E0A8 -void GameLoop(void) +void GameLoop_Async(void) { u32 tmp; u8 tmp3 = 1; @@ -180,7 +180,7 @@ void GameLoop(void) sTitleBrightness++; for (i = 0; i < 240; i++) { - SetBGPaletteBufferColorRGB(i, &((RGB*)sTitlePaletteFile->data)[i], sTitleBrightness, NULL); + SetBGPaletteBufferColorRGB(i, &((RGB_Struct*)sTitlePaletteFile->data)[i], sTitleBrightness, NULL); } MainLoops_RunFrameActions(0); @@ -237,7 +237,7 @@ void GameLoop(void) sTitleBrightness--; for (i = 0; i < 240; i++) { - SetBGPaletteBufferColorRGB(i, &((RGB*)sTitlePaletteFile->data)[i], sTitleBrightness, NULL); + SetBGPaletteBufferColorRGB(i, &((RGB_Struct*)sTitlePaletteFile->data)[i], sTitleBrightness, NULL); } MainLoops_RunFrameActions(0); @@ -275,7 +275,7 @@ void GameLoop(void) // arm9.bin::0200E02C static void MainLoops_RunFrameActions(u32 unused) { - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); sub_8005838(NULL, 0); nullsub_8(gGameOptionsRef->touchScreen); @@ -540,23 +540,6 @@ static void sub_80008C0_Async(u32 errorKind) MainLoops_RunFrameActions(0); } -enum -{ - MODE_NEW_GAME, - MODE_CONTINUE_GAME, - MODE_GROUND, // overworld - MODE_3, - MODE_FRIEND_AREAS, - MODE_DUNGEON_FROM_WORLD_MAP, - MODE_6, - MODE_CONTINUE_QUICKSAVE, - MODE_8, - MODE_DUNGEON_WON, - MODE_10, - MODE_11, - MODE_DUNGEON_LOST, -}; - // arm9.bin::0200D1E0 static u32 RunGameMode_Async(u32 a0) { @@ -565,35 +548,35 @@ static u32 RunGameMode_Async(u32 a0) ResetSoundEffectCounters(); FadeOutAllMusic(0x10); - if (mode == MODE_CONTINUE_QUICKSAVE) { + if (mode == STARTMODE_CONTINUE_QUICKSAVE) { if (a0 == 2) { - mode = MODE_8; + mode = STARTMODE_8; } else if (a0 == 3) { - mode = MODE_11; + mode = STARTMODE_11; SetScriptVarValue(NULL, START_MODE, 11); sub_8096BD0(); QuickSave_Async(3); } } - else if (mode != MODE_NEW_GAME && mode != MODE_11) { - mode = MODE_CONTINUE_GAME; + else if (mode != STARTMODE_NEW_GAME && mode != STARTMODE_11) { + mode = STARTMODE_CONTINUE_GAME; } ClearScriptVarArray(NULL, EVENT_S08E01); - while (1) { + while (TRUE) { s32 r5; struct FriendAreasMapSetupStruct friendAreasSetup; struct WorldMapSetupStruct worldMapSetup; DungeonSetupStruct dungeonSetup; s16 sp552; - if (mode == MODE_FRIEND_AREAS) { + if (mode == STARTMODE_FRIEND_AREAS) { u8 friendAreaId = MapIdToFriendAreaId(GetScriptVarValue(NULL,GROUND_ENTER)); friendAreasSetup.friendAreasMapPtr = MemoryAlloc(sizeof(*friendAreasSetup.friendAreasMapPtr),8); friendAreasSetup.startingFriendAreaId = friendAreaId; - friendAreasSetup.unk5 = sub_80023E4(9); + friendAreasSetup.unk5 = CheckQuest(QUEST_CAN_DEPOSIT_PARTNER); ShowFriendAreasMap_Async(&friendAreasSetup); MemoryFree(friendAreasSetup.friendAreasMapPtr); if (friendAreasSetup.chosenAreaId != NUM_FRIEND_AREAS) { @@ -608,10 +591,10 @@ static u32 RunGameMode_Async(u32 a0) SetScriptVarValue(NULL,GROUND_ENTER,mapId); SetScriptVarValue(NULL,GROUND_ENTER_LINK,0); } - mode = MODE_GROUND; + mode = STARTMODE_GROUND; continue; } - else if (mode == MODE_DUNGEON_FROM_WORLD_MAP) { + else if (mode == STARTMODE_DUNGEON_FROM_WORLD_MAP) { s32 i; s32 scriptDungeonId = (s16) GetScriptVarValue(NULL, DUNGEON_SELECT); @@ -621,13 +604,13 @@ static u32 RunGameMode_Async(u32 a0) } if (dungeonId == DUNGEON_INVALID) { - mode = MODE_GROUND; + mode = STARTMODE_GROUND; continue; } worldMapSetup.info.startLocation.id = DUNGEON_OUT_ON_RESCUE; sub_80011CC(&worldMapSetup.info.unk4, dungeonId); - worldMapSetup.info.unk6C = worldMapSetup.info.unk4.unk5; + worldMapSetup.info.canChangeLeader = worldMapSetup.info.unk4.canChangeLeader; switch ((s16) sub_80A2750(scriptDungeonId)) { case 1: if (sub_80990EC(&dungeonSetup.info, scriptDungeonId)) { @@ -649,7 +632,7 @@ static u32 RunGameMode_Async(u32 a0) ShowWorldMap_Async(&worldMapSetup); MemoryFree(worldMapSetup.worldMap); if (!worldMapSetup.dungeonEntered) { - mode = MODE_GROUND; + mode = STARTMODE_GROUND; continue; } SetScriptVarValue(NULL, DUNGEON_ENTER, scriptDungeonId); @@ -657,17 +640,17 @@ static u32 RunGameMode_Async(u32 a0) sub_800A8F8(4); r5 = xxx_script_related_8001334(5); } - else if (mode == MODE_8) { + else if (mode == STARTMODE_8) { r5 = 0; } - else if (mode == MODE_CONTINUE_QUICKSAVE) { + else if (mode == STARTMODE_CONTINUE_QUICKSAVE) { r5 = 2; } else { - if (mode == MODE_11) { + if (mode == STARTMODE_11) { RemoveAllMoneyAndItems(); } - else if (mode == MODE_DUNGEON_LOST) { + else if (mode == STARTMODE_DUNGEON_LOST) { RemoveMoneyAndRandomItems(); } sUnknown_203B03C = 2; @@ -677,11 +660,11 @@ static u32 RunGameMode_Async(u32 a0) break; } else if (r5 == 5) { - mode = MODE_FRIEND_AREAS; + mode = STARTMODE_FRIEND_AREAS; continue; } else if (r5 == 6) { - mode = MODE_DUNGEON_FROM_WORLD_MAP; + mode = STARTMODE_DUNGEON_FROM_WORLD_MAP; continue; } } @@ -693,13 +676,13 @@ static u32 RunGameMode_Async(u32 a0) if (r5 == 7) { if (!sub_80991E0(&dungeonSetup.info, &sp552)) { r5 = 13; - mode = MODE_DUNGEON_WON; + mode = STARTMODE_DUNGEON_WON; } } else if (r5 == 8) { if (!sub_80991E0(&dungeonSetup.info, &sp552)) { r5 = 13; - mode = MODE_DUNGEON_WON; + mode = STARTMODE_DUNGEON_WON; } else if (sub_8096A08(dungeonSetup.info.sub0.unk0.id, &dungeonSetup.info.mon)) { dungeonSetup.info.sub0.unkC = 1; @@ -708,13 +691,13 @@ static u32 RunGameMode_Async(u32 a0) else if (r5 == 10) { if (!sub_80991E0(&dungeonSetup.info, &sp552)) { r5 = 13; - mode = MODE_DUNGEON_WON; + mode = STARTMODE_DUNGEON_WON; } } else if (r5 == 9) { if (!sub_80991E0(&dungeonSetup.info, &sp552)) { r5 = 11; - mode = MODE_DUNGEON_LOST; + mode = STARTMODE_DUNGEON_LOST; } } else if (r5 == 0) { @@ -722,7 +705,7 @@ static u32 RunGameMode_Async(u32 a0) if (var == 0xF1207) { dungeonSetup.info.sub0.unkD = 1; dungeonSetup.info.sub0.unk4 = 1; - dungeonSetup.info.sub0.unkB = 0; + dungeonSetup.info.sub0.missionKind = DUNGEON_MISSION_UNK0; if (gUnknown_203B484->unk4.speciesNum != 0) { dungeonSetup.info.sub0.unkC = 1; dungeonSetup.info.mon = gUnknown_203B484->unk4; @@ -735,12 +718,12 @@ static u32 RunGameMode_Async(u32 a0) } else if (var == 0xF1208) { r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); } else { r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); } @@ -759,12 +742,12 @@ static u32 RunGameMode_Async(u32 a0) } else if (var == 0xF1208) { r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); } else { r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); } } @@ -775,16 +758,16 @@ static u32 RunGameMode_Async(u32 a0) if (r5 == 3) { u8 r4 = sub_8001170(); r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); if (r4 != 63 && r4 != 99 && IsEnterWithoutGameSave(r4)) { if (sub_8011C1C() == 2) { r5 = 3; - mode = MODE_CONTINUE_QUICKSAVE; + mode = STARTMODE_CONTINUE_QUICKSAVE; } else { r5 = 12; - mode = MODE_10; + mode = STARTMODE_10; } } @@ -794,12 +777,12 @@ static u32 RunGameMode_Async(u32 a0) } else if (r5 == 4) { r5 = 1; - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); sub_80008C0_Async(1); } else if (r5 == 1) { - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); } } @@ -844,22 +827,22 @@ static u32 RunGameMode_Async(u32 a0) switch (dungeonSetup.info.unk7C) { case 1: case 4: - mode = MODE_DUNGEON_WON; + mode = STARTMODE_DUNGEON_WON; SetScriptVarArrayValue(NULL, EVENT_S08E01, 0, (dungeonSetup.info.unk7E != 0) ? 2 : 1); break; case 2: - mode = MODE_10; + mode = STARTMODE_10; break; case -1: - mode = MODE_DUNGEON_LOST; + mode = STARTMODE_DUNGEON_LOST; sub_8096BD0(); break; case 5: - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); break; default: - mode = MODE_11; + mode = STARTMODE_11; sub_8096BD0(); break; } @@ -975,7 +958,7 @@ void sub_8001064(void) u8 buffer2 [20]; u8 buffer1 [20]; - if (GetPlayerPokemonStruct() == NULL) { + if (GetLeaderMon1() == NULL) { if (sTeamBasicInfo_203B040.StarterName[0] == '\0') { CopyMonsterNameToBuffer(buffer1, sTeamBasicInfo_203B040.StarterID); CopyStringtoBuffer(buffer2, buffer1); @@ -985,7 +968,7 @@ void sub_8001064(void) CreateLeaderPartnerData(sTeamBasicInfo_203B040.StarterID, TRUE, sTeamBasicInfo_203B040.StarterName); } - if (GetPartnerPokemonStruct() == NULL) { + if (GetPartnerMon() == NULL) { if (sTeamBasicInfo_203B040.PartnerNick[0] == '\0') { CopyMonsterNameToBuffer(buffer1, sTeamBasicInfo_203B040.PartnerID); CopyStringtoBuffer(buffer2, buffer1); @@ -1016,11 +999,11 @@ void sub_8001064(void) static u8 sub_8001170(void) { s16 local_10; - s16 auStack_e; + s16 rescueDungeonId; u8 auStack_b; u8 dungeonID = NUM_DUNGEONS + 1; - if (sub_80992E0(&local_10, &auStack_e)) + if (sub_80992E0(&local_10, &rescueDungeonId)) dungeonID = ScriptDungeonIdToDungeonId(local_10); else if (!sub_8099328(&dungeonID) && !sub_8099360(&dungeonID) && sub_8099394(&auStack_b)) dungeonID = DUNGEON_OUT_ON_RESCUE; @@ -1036,7 +1019,7 @@ static void sub_80011CC(DungeonSetupSubstruct *info, u8 dungId) sub_80011E8(info); - info->unkB = 0; + info->missionKind = DUNGEON_MISSION_UNK0; info->unk4 = 0; info->unkC = 0; info->unkD = 0; @@ -1045,16 +1028,16 @@ static void sub_80011CC(DungeonSetupSubstruct *info, u8 dungId) // arm9.bin::0200CD1C static void sub_80011E8(DungeonSetupSubstruct *info) { - info->unk5 = sub_80023E4(8); - info->unk6 = sub_80023E4(3); - info->unk8 = sub_80023E4(7); - info->unk9 = sub_80023E4(0); - info->unkA = sub_80023E4(5); + info->canChangeLeader = CheckQuest(QUEST_CAN_CHANGE_LEADER); + info->canRecruit = CheckQuest(QUEST_CAN_RECRUIT); + info->unlockedEvolutions = CheckQuest(QUEST_UNLOCKED_EVOLUTIONS); + info->hasInventory = CheckQuest(QUEST_SET_TEAM_NAME); + info->unkA = CheckQuest(QUEST_UNK5); - if (sub_80023E4(24) && sub_80023E4(25) && sub_80023E4(26)) - info->unk7 = 1; + if (CheckQuest(QUEST_LEGEND_HO_OH) && CheckQuest(QUEST_LEGEND_MEWTWO) && CheckQuest(QUEST_LEGEND_MEW)) + info->canRecruitRescueTeamMazeBosses = TRUE; else - info->unk7 = 0; + info->canRecruitRescueTeamMazeBosses = FALSE; } // arm9.bin::0200CC4C diff --git a/src/makuhita_dojo1.c b/src/makuhita_dojo1.c index 1ec6f9f84..baf2164d9 100644 --- a/src/makuhita_dojo1.c +++ b/src/makuhita_dojo1.c @@ -211,7 +211,7 @@ static void MakuhitaDojo_UpdateDialogue(void) CreateDialogueBoxAndPortrait(gCommonMakuhita[sMakuhitaDojoWork1->dlgMode][MAKUHITA_DLG_7], 0, sMakuhitaDojoWork1->monPortraitPtr, 0x10D); break; case 9: - PrintColoredPokeNameToBuffer(gFormatBuffer_Names[0], GetPlayerPokemonStruct(), COLOR_YELLOW); + PrintColoredPokeNameToBuffer(gFormatBuffer_Names[0], GetLeaderMon1(), COLOR_YELLOW); sMakuhitaDojoWork1->fallbackState = 11; PlaySound(203); CreateDialogueBoxAndPortrait(sReceivedBonslyDoll, 0, 0, 0x101); diff --git a/src/map_script_table.c b/src/map_script_table.c index ba968248a..e14b5444c 100644 --- a/src/map_script_table.c +++ b/src/map_script_table.c @@ -2,235 +2,140 @@ #include "globaldata.h" #include "map_script_table.h" -extern const struct GroundScriptHeader gGroundScript_gs0; -extern const struct GroundScriptHeader gGroundScript_gs1; -extern const struct GroundScriptHeader gGroundScript_gs2; -extern const struct GroundScriptHeader gGroundScript_gs2; -extern const struct GroundScriptHeader gGroundScript_gs4; -extern const struct GroundScriptHeader gGroundScript_gs5; -extern const struct GroundScriptHeader gGroundScript_gs6; -extern const struct GroundScriptHeader gGroundScript_gs7; -extern const struct GroundScriptHeader gGroundScript_gs8; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs9; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs12; -extern const struct GroundScriptHeader gGroundScript_gs105; -extern const struct GroundScriptHeader gGroundScript_gs106; -extern const struct GroundScriptHeader gGroundScript_gs107; -extern const struct GroundScriptHeader gGroundScript_gs108; -extern const struct GroundScriptHeader gGroundScript_gs109; -extern const struct GroundScriptHeader gGroundScript_gs110; -extern const struct GroundScriptHeader gGroundScript_gs111; -extern const struct GroundScriptHeader gGroundScript_gs112; -extern const struct GroundScriptHeader gGroundScript_gs113; -extern const struct GroundScriptHeader gGroundScript_gs114; -extern const struct GroundScriptHeader gGroundScript_gs115; -extern const struct GroundScriptHeader gGroundScript_gs116; -extern const struct GroundScriptHeader gGroundScript_gs117; -extern const struct GroundScriptHeader gGroundScript_gs118; -extern const struct GroundScriptHeader gGroundScript_gs119; -extern const struct GroundScriptHeader gGroundScript_gs120; -extern const struct GroundScriptHeader gGroundScript_gs121; -extern const struct GroundScriptHeader gGroundScript_gs122; -extern const struct GroundScriptHeader gGroundScript_gs123; -extern const struct GroundScriptHeader gGroundScript_gs124; -extern const struct GroundScriptHeader gGroundScript_gs125; -extern const struct GroundScriptHeader gGroundScript_gs126; -extern const struct GroundScriptHeader gGroundScript_gs127; -extern const struct GroundScriptHeader gGroundScript_gs128; -extern const struct GroundScriptHeader gGroundScript_gs129; -extern const struct GroundScriptHeader gGroundScript_gs130; -extern const struct GroundScriptHeader gGroundScript_gs131; -extern const struct GroundScriptHeader gGroundScript_gs132; -extern const struct GroundScriptHeader gGroundScript_gs133; -extern const struct GroundScriptHeader gGroundScript_gs134; -extern const struct GroundScriptHeader gGroundScript_gs135; -extern const struct GroundScriptHeader gGroundScript_gs136; -extern const struct GroundScriptHeader gGroundScript_gs137; -extern const struct GroundScriptHeader gGroundScript_gs138; -extern const struct GroundScriptHeader gGroundScript_gs139; -extern const struct GroundScriptHeader gGroundScript_gs140; -extern const struct GroundScriptHeader gGroundScript_gs141; -extern const struct GroundScriptHeader gGroundScript_gs142; -extern const struct GroundScriptHeader gGroundScript_gs143; -extern const struct GroundScriptHeader gGroundScript_gs144; -extern const struct GroundScriptHeader gGroundScript_gs145; -extern const struct GroundScriptHeader gGroundScript_gs146; -extern const struct GroundScriptHeader gGroundScript_gs147; -extern const struct GroundScriptHeader gGroundScript_gs148; -extern const struct GroundScriptHeader gGroundScript_gs149; -extern const struct GroundScriptHeader gGroundScript_gs150; -extern const struct GroundScriptHeader gGroundScript_gs151; -extern const struct GroundScriptHeader gGroundScript_gs152; -extern const struct GroundScriptHeader gGroundScript_gs153; -extern const struct GroundScriptHeader gGroundScript_gs154; -extern const struct GroundScriptHeader gGroundScript_gs155; -extern const struct GroundScriptHeader gGroundScript_gs156; -extern const struct GroundScriptHeader gGroundScript_gs157; -extern const struct GroundScriptHeader gGroundScript_gs158; -extern const struct GroundScriptHeader gGroundScript_gs159; -extern const struct GroundScriptHeader gGroundScript_gs160; -extern const struct GroundScriptHeader gGroundScript_gs161; -extern const struct GroundScriptHeader gGroundScript_gs162; -extern const struct GroundScriptHeader gGroundScript_gs163; -extern const struct GroundScriptHeader gGroundScript_gs164; -extern const struct GroundScriptHeader gGroundScript_gs165; -extern const struct GroundScriptHeader gGroundScript_gs166; -extern const struct GroundScriptHeader gGroundScript_gs167; -extern const struct GroundScriptHeader gGroundScript_gs168; -extern const struct GroundScriptHeader gGroundScript_gs169; -extern const struct GroundScriptHeader gGroundScript_gs170; -extern const struct GroundScriptHeader gGroundScript_gs171; -extern const struct GroundScriptHeader gGroundScript_gs172; -extern const struct GroundScriptHeader gGroundScript_gs173; -extern const struct GroundScriptHeader gGroundScript_gs174; -extern const struct GroundScriptHeader gGroundScript_gs175; -extern const struct GroundScriptHeader gGroundScript_gs176; -extern const struct GroundScriptHeader gGroundScript_gs177; -extern const struct GroundScriptHeader gGroundScript_gs178; -extern const struct GroundScriptHeader gGroundScript_gs179; -extern const struct GroundScriptHeader gGroundScript_gs180; -extern const struct GroundScriptHeader gGroundScript_gs181; -extern const struct GroundScriptHeader gGroundScript_gs182; -extern const struct GroundScriptHeader gGroundScript_gs183; -extern const struct GroundScriptHeader gGroundScript_gs184; -extern const struct GroundScriptHeader gGroundScript_gs185; -extern const struct GroundScriptHeader gGroundScript_gs186; -extern const struct GroundScriptHeader gGroundScript_gs187; -extern const struct GroundScriptHeader gGroundScript_gs188; -extern const struct GroundScriptHeader gGroundScript_gs189; -extern const struct GroundScriptHeader gGroundScript_gs190; -extern const struct GroundScriptHeader gGroundScript_gs191; -extern const struct GroundScriptHeader gGroundScript_gs192; -extern const struct GroundScriptHeader gGroundScript_gs193; -extern const struct GroundScriptHeader gGroundScript_gs194; -extern const struct GroundScriptHeader gGroundScript_gs195; -extern const struct GroundScriptHeader gGroundScript_gs196; -extern const struct GroundScriptHeader gGroundScript_gs197; -extern const struct GroundScriptHeader gGroundScript_gs198; -extern const struct GroundScriptHeader gGroundScript_gs199; -extern const struct GroundScriptHeader gGroundScript_gs200; -extern const struct GroundScriptHeader gGroundScript_gs201; -extern const struct GroundScriptHeader gGroundScript_gs202; -extern const struct GroundScriptHeader gGroundScript_gs203; -extern const struct GroundScriptHeader gGroundScript_gs204; -extern const struct GroundScriptHeader gGroundScript_gs205; -extern const struct GroundScriptHeader gGroundScript_gs206; -extern const struct GroundScriptHeader gGroundScript_gs207; -extern const struct GroundScriptHeader gGroundScript_gs208; -extern const struct GroundScriptHeader gGroundScript_gs209; -extern const struct GroundScriptHeader gGroundScript_gs210; -extern const struct GroundScriptHeader gGroundScript_gs211; -extern const struct GroundScriptHeader gGroundScript_gs212; -extern const struct GroundScriptHeader gGroundScript_gs213; -extern const struct GroundScriptHeader gGroundScript_gs214; -extern const struct GroundScriptHeader gGroundScript_gs215; -extern const struct GroundScriptHeader gGroundScript_gs216; -extern const struct GroundScriptHeader gGroundScript_gs217; -extern const struct GroundScriptHeader gGroundScript_gs218; -extern const struct GroundScriptHeader gGroundScript_gs219; -extern const struct GroundScriptHeader gGroundScript_gs220; -extern const struct GroundScriptHeader gGroundScript_gs221; -extern const struct GroundScriptHeader gGroundScript_gs222; -extern const struct GroundScriptHeader gGroundScript_gs223; -extern const struct GroundScriptHeader gGroundScript_gs224; -extern const struct GroundScriptHeader gGroundScript_gs225; -extern const struct GroundScriptHeader gGroundScript_gs226; -extern const struct GroundScriptHeader gGroundScript_gs227; -extern const struct GroundScriptHeader gGroundScript_gs228; +extern const GroundScriptHeader gGroundScript_gs0; +extern const GroundScriptHeader gGroundScript_gs1; +extern const GroundScriptHeader gGroundScript_gs2; +extern const GroundScriptHeader gGroundScript_gs4; +extern const GroundScriptHeader gGroundScript_gs5; +extern const GroundScriptHeader gGroundScript_gs6; +extern const GroundScriptHeader gGroundScript_gs7; +extern const GroundScriptHeader gGroundScript_gs8; +extern const GroundScriptHeader gGroundScript_gs9; +extern const GroundScriptHeader gGroundScript_gs12; +extern const GroundScriptHeader gGroundScript_gs105; +extern const GroundScriptHeader gGroundScript_gs106; +extern const GroundScriptHeader gGroundScript_gs107; +extern const GroundScriptHeader gGroundScript_gs108; +extern const GroundScriptHeader gGroundScript_gs109; +extern const GroundScriptHeader gGroundScript_gs110; +extern const GroundScriptHeader gGroundScript_gs111; +extern const GroundScriptHeader gGroundScript_gs112; +extern const GroundScriptHeader gGroundScript_gs113; +extern const GroundScriptHeader gGroundScript_gs114; +extern const GroundScriptHeader gGroundScript_gs115; +extern const GroundScriptHeader gGroundScript_gs116; +extern const GroundScriptHeader gGroundScript_gs117; +extern const GroundScriptHeader gGroundScript_gs118; +extern const GroundScriptHeader gGroundScript_gs119; +extern const GroundScriptHeader gGroundScript_gs120; +extern const GroundScriptHeader gGroundScript_gs121; +extern const GroundScriptHeader gGroundScript_gs122; +extern const GroundScriptHeader gGroundScript_gs123; +extern const GroundScriptHeader gGroundScript_gs124; +extern const GroundScriptHeader gGroundScript_gs125; +extern const GroundScriptHeader gGroundScript_gs126; +extern const GroundScriptHeader gGroundScript_gs127; +extern const GroundScriptHeader gGroundScript_gs128; +extern const GroundScriptHeader gGroundScript_gs129; +extern const GroundScriptHeader gGroundScript_gs130; +extern const GroundScriptHeader gGroundScript_gs131; +extern const GroundScriptHeader gGroundScript_gs132; +extern const GroundScriptHeader gGroundScript_gs133; +extern const GroundScriptHeader gGroundScript_gs134; +extern const GroundScriptHeader gGroundScript_gs135; +extern const GroundScriptHeader gGroundScript_gs136; +extern const GroundScriptHeader gGroundScript_gs137; +extern const GroundScriptHeader gGroundScript_gs138; +extern const GroundScriptHeader gGroundScript_gs139; +extern const GroundScriptHeader gGroundScript_gs140; +extern const GroundScriptHeader gGroundScript_gs141; +extern const GroundScriptHeader gGroundScript_gs142; +extern const GroundScriptHeader gGroundScript_gs143; +extern const GroundScriptHeader gGroundScript_gs144; +extern const GroundScriptHeader gGroundScript_gs145; +extern const GroundScriptHeader gGroundScript_gs146; +extern const GroundScriptHeader gGroundScript_gs147; +extern const GroundScriptHeader gGroundScript_gs148; +extern const GroundScriptHeader gGroundScript_gs149; +extern const GroundScriptHeader gGroundScript_gs150; +extern const GroundScriptHeader gGroundScript_gs151; +extern const GroundScriptHeader gGroundScript_gs152; +extern const GroundScriptHeader gGroundScript_gs153; +extern const GroundScriptHeader gGroundScript_gs154; +extern const GroundScriptHeader gGroundScript_gs155; +extern const GroundScriptHeader gGroundScript_gs156; +extern const GroundScriptHeader gGroundScript_gs157; +extern const GroundScriptHeader gGroundScript_gs158; +extern const GroundScriptHeader gGroundScript_gs159; +extern const GroundScriptHeader gGroundScript_gs160; +extern const GroundScriptHeader gGroundScript_gs161; +extern const GroundScriptHeader gGroundScript_gs162; +extern const GroundScriptHeader gGroundScript_gs163; +extern const GroundScriptHeader gGroundScript_gs164; +extern const GroundScriptHeader gGroundScript_gs165; +extern const GroundScriptHeader gGroundScript_gs166; +extern const GroundScriptHeader gGroundScript_gs167; +extern const GroundScriptHeader gGroundScript_gs168; +extern const GroundScriptHeader gGroundScript_gs169; +extern const GroundScriptHeader gGroundScript_gs170; +extern const GroundScriptHeader gGroundScript_gs171; +extern const GroundScriptHeader gGroundScript_gs172; +extern const GroundScriptHeader gGroundScript_gs173; +extern const GroundScriptHeader gGroundScript_gs174; +extern const GroundScriptHeader gGroundScript_gs175; +extern const GroundScriptHeader gGroundScript_gs176; +extern const GroundScriptHeader gGroundScript_gs177; +extern const GroundScriptHeader gGroundScript_gs178; +extern const GroundScriptHeader gGroundScript_gs179; +extern const GroundScriptHeader gGroundScript_gs180; +extern const GroundScriptHeader gGroundScript_gs181; +extern const GroundScriptHeader gGroundScript_gs182; +extern const GroundScriptHeader gGroundScript_gs183; +extern const GroundScriptHeader gGroundScript_gs184; +extern const GroundScriptHeader gGroundScript_gs185; +extern const GroundScriptHeader gGroundScript_gs186; +extern const GroundScriptHeader gGroundScript_gs187; +extern const GroundScriptHeader gGroundScript_gs188; +extern const GroundScriptHeader gGroundScript_gs189; +extern const GroundScriptHeader gGroundScript_gs190; +extern const GroundScriptHeader gGroundScript_gs191; +extern const GroundScriptHeader gGroundScript_gs192; +extern const GroundScriptHeader gGroundScript_gs193; +extern const GroundScriptHeader gGroundScript_gs194; +extern const GroundScriptHeader gGroundScript_gs195; +extern const GroundScriptHeader gGroundScript_gs196; +extern const GroundScriptHeader gGroundScript_gs197; +extern const GroundScriptHeader gGroundScript_gs198; +extern const GroundScriptHeader gGroundScript_gs199; +extern const GroundScriptHeader gGroundScript_gs200; +extern const GroundScriptHeader gGroundScript_gs201; +extern const GroundScriptHeader gGroundScript_gs202; +extern const GroundScriptHeader gGroundScript_gs203; +extern const GroundScriptHeader gGroundScript_gs204; +extern const GroundScriptHeader gGroundScript_gs205; +extern const GroundScriptHeader gGroundScript_gs206; +extern const GroundScriptHeader gGroundScript_gs207; +extern const GroundScriptHeader gGroundScript_gs208; +extern const GroundScriptHeader gGroundScript_gs209; +extern const GroundScriptHeader gGroundScript_gs210; +extern const GroundScriptHeader gGroundScript_gs211; +extern const GroundScriptHeader gGroundScript_gs212; +extern const GroundScriptHeader gGroundScript_gs213; +extern const GroundScriptHeader gGroundScript_gs214; +extern const GroundScriptHeader gGroundScript_gs215; +extern const GroundScriptHeader gGroundScript_gs216; +extern const GroundScriptHeader gGroundScript_gs217; +extern const GroundScriptHeader gGroundScript_gs218; +extern const GroundScriptHeader gGroundScript_gs219; +extern const GroundScriptHeader gGroundScript_gs220; +extern const GroundScriptHeader gGroundScript_gs221; +extern const GroundScriptHeader gGroundScript_gs222; +extern const GroundScriptHeader gGroundScript_gs223; +extern const GroundScriptHeader gGroundScript_gs224; +extern const GroundScriptHeader gGroundScript_gs225; +extern const GroundScriptHeader gGroundScript_gs226; +extern const GroundScriptHeader gGroundScript_gs227; +extern const GroundScriptHeader gGroundScript_gs228; const struct GroundScriptHeader *const gMapScriptTable[MAP_COUNT] = { [MAP_SQUARE] = &gGroundScript_gs0, diff --git a/src/menu_input.c b/src/menu_input.c index 0953b77c3..67435c3af 100644 --- a/src/menu_input.c +++ b/src/menu_input.c @@ -64,7 +64,7 @@ static s32 GetCurrMenuIndex(MenuInputStruct *menuInput); void sub_8012A18(s32 unused) { UpdateSoundEffectCounters(); - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); nullsub_8(gGameOptionsRef->touchScreen); sub_8005180(); sub_80060EC(); @@ -237,7 +237,7 @@ void sub_8012D08(WindowTemplate *winTemplate, s32 entriesCount) sVar3 = sVar2; winTemplate->height = sVar3; - winTemplate->unk10 = sVar3; + winTemplate->totalHeight = sVar3; } void sub_8012D34(WindowTemplate *winTemplate, s32 entriesCount) @@ -251,7 +251,7 @@ void sub_8012D34(WindowTemplate *winTemplate, s32 entriesCount) sVar3 = sVar2; winTemplate->height = sVar3; - winTemplate->unk10 = sVar3; + winTemplate->totalHeight = sVar3; } // arm9.bin::0201C26C @@ -821,6 +821,7 @@ static inline void CreateMenuOnWindowInternal(MenuInputStruct *menuInput, s32 to SetEntryHeight(menuInput, entryHeight); } +// arm9.bin::0201AF28 void CreateMenuOnWindow(MenuInputStruct *menuInput, s32 totalCount, u32 perPageCount, s32 windowId) { CreateMenuOnWindowInternal(menuInput, totalCount, perPageCount, windowId, DEFAULT_MENU_ENTRY_HEIGHT); diff --git a/src/mission_reward.c b/src/mission_reward.c index 254e268f9..e11c699e8 100644 --- a/src/mission_reward.c +++ b/src/mission_reward.c @@ -121,7 +121,7 @@ u32 sub_802F204(unkStruct_802F204 *r0, bool8 displayClientSprite) // NOTE: dumb var to get correct ordering preload = gUnknown_203B310; strcpy(gSpeakerNameBuffer, preload->unk10->clientName); - PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetPlayerPokemonStruct()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetLeaderMon1()); gUnknown_203B310->monPortrait.faceFile = GetDialogueSpriteDataPtr(gUnknown_203B310->unk10->clientSpecies); gUnknown_203B310->monPortrait.faceData = NULL; diff --git a/src/monster_sbin_palet.c b/src/monster_sbin_palet.c index d29c707db..2380c4a68 100644 --- a/src/monster_sbin_palet.c +++ b/src/monster_sbin_palet.c @@ -2,7 +2,7 @@ #include "structs/rgb.h" // These correspond to the 'overworldPalette' field in the monster data. Only slots 0-12 are actually used, slot 13 seems to be a placeholder. -const RGB gAxMonsPalette[] = { +const RGB_Struct gAxMonsPalette[] = { INCBIN_RGB("graphics/ax/pal/0.pmdpal", "graphics/ax/pal/1.pmdpal", "graphics/ax/pal/2.pmdpal", diff --git a/src/move_orb_actions_1.c b/src/move_orb_actions_1.c index f2e979ae2..133fdd884 100644 --- a/src/move_orb_actions_1.c +++ b/src/move_orb_actions_1.c @@ -112,7 +112,7 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) flag = FALSE; tile = GetTileAtEntitySafe(pokemon); if ((!IsTileGround(tile)) || ((tile->terrainFlags & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) != 1)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD14C); // It can only be used on land! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD14C); // It can only be used on land! } else { if (MoveMatchesBideClassStatus(pokemon,move)) { @@ -144,7 +144,7 @@ bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI gDungeon->weather.unkE267[WEATHER_RAIN] = gMoveWeatherDuration; if (sub_807EAA0(1,0) == 0) { // The weather remains unchanged - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF74); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF74); } return TRUE; } @@ -154,7 +154,7 @@ bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) gDungeon->weather.unkE267[WEATHER_HAIL] = gMoveWeatherDuration; if (sub_807EAA0(1,0) == 0) { // The weather remains unchanged - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF80); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF80); } return TRUE; } @@ -200,13 +200,13 @@ bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI newHP = GetEntInfo(target)->HP / 2; local_24 = FALSE; if (newHP != 0) { - sub_806F370(pokemon,target,newHP,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,newHP,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_24 = local_24 == 0; } else { // The target's HP can't be halved anymore - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD018); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD018); } return local_24; } @@ -230,7 +230,7 @@ bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 item SetExpMultplier(attackerInfo); // $m0 and $m1 shared their HP - TryDisplayDungeonLoggableMessage3(attacker,target,gUnknown_80FC7EC); + TryDisplayDungeonLoggableMessage3_Async(attacker,target,gUnknown_80FC7EC); return TRUE; } @@ -253,7 +253,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) if ((movePtr->moveFlags & MOVE_FLAG_LAST_USED) != 0) { BufferMoveName(gFormatBuffer_Items[0],movePtr,0); // $i0 was tormented - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFBC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFBC); movePtr->moveFlags |= MOVE_FLAG_DISABLED; isTormented = TRUE; } @@ -271,7 +271,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) isTormented = TRUE; BufferMoveName(gFormatBuffer_Items[0],&struggleMove,0); // $i0 was tormented - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFBC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFBC); } } else if ((entityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) { @@ -286,7 +286,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) else { // The target couldn't be tormented - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFE4); } return isTormented; } @@ -318,7 +318,7 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId) } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC734); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC734); } return flag; } @@ -392,10 +392,10 @@ bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (flag) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD350); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD350); } else { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD370); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD370); } return flag; @@ -496,10 +496,10 @@ bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI GetEntInfo(target)->unk152 = 1; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0); if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE00); // Fire moves won't become stronger + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE00); // Fire moves won't become stronger } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FADD8); // $m0 used flash fire to absorb fire + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FADD8); // $m0 used flash fire to absorb fire } } } @@ -523,7 +523,7 @@ bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId) } } - sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_24 = (local_24 == 0); return local_24; } @@ -537,12 +537,12 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 itemId) entityInfo = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0); if (entityInfo->grudge) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD2B4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD2B4); } else { entityInfo->grudge = TRUE; hasGrudge = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD294); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD294); } return hasGrudge; } @@ -665,7 +665,7 @@ bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) if (999 < iVar2) { iVar2 = 999; } - sub_806F370(pokemon,target,iVar2,1,&local_18, GetMoveType(move),DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY,RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,iVar2,1,&local_18, GetMoveType(move),DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY,RESIDUAL_DAMAGE_REGULAR,1,0); local_18 = local_18 == 0; return local_18; @@ -731,7 +731,7 @@ bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId if (diffHP < 0) { diffHP = 0; } - sub_806F370(pokemon,target,diffHP,0,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,diffHP,0,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_24 = local_24 == 0; return local_24; @@ -770,7 +770,7 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 item flag = FALSE; if ((GetEntInfo(target)->reflectClassStatus.status == STATUS_REFLECT) || (GetEntInfo(target)->reflectClassStatus.status == STATUS_LIGHT_SCREEN)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD104); // The barrier was shattered + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD104); // The barrier was shattered EndReflectClassStatus(pokemon,target); flag = TRUE; } @@ -829,7 +829,7 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 it } SetExpMultplier(entityInfo); if (hasLiquidOoze) { - DealDamageToEntity(pokemon, newHP, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); + DealDamageToEntity_Async(pokemon, newHP, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); } else { HealTargetHP(pokemon, pokemon, newHP, 0, TRUE); diff --git a/src/move_orb_actions_2.c b/src/move_orb_actions_2.c index 9332480c6..26174fe1c 100644 --- a/src/move_orb_actions_2.c +++ b/src/move_orb_actions_2.c @@ -136,7 +136,7 @@ bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) if (199 < rand) { rand = 199; } - flag = sub_8055864(pokemon,target,move,rand,itemId) != 0 ? TRUE: FALSE; + flag = sub_8055864_Async(pokemon,target,move,rand,itemId) != 0 ? TRUE: FALSE; return flag; } @@ -217,7 +217,7 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, s32 item iVar4->defensiveMultipliers[index] = iVar3->defensiveMultipliers[index]; } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD58); // It psyched itself up! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD58); // It psyched itself up! SetExpMultplier(iVar4); return TRUE; } @@ -240,7 +240,7 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 itemId) } flag = TRUE; if ((!AbilityIsActive(pokemon, ABILITY_ROCK_HEAD)) && RollSecondaryEffect(pokemon, 0)) { - sub_806F370(pokemon,pokemon,iVar3,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0); + sub_806F370_Async(pokemon,pokemon,iVar3,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0); } } return flag; @@ -355,10 +355,10 @@ bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) uVar5 = FALSE; } if (!uVar5) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB88); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB88); } else { - sub_806F370(pokemon,target,9999,1,&flag,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,1); + sub_806F370_Async(pokemon,target,9999,1,&flag,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,1); flag = flag == 0; } return flag; @@ -406,7 +406,7 @@ bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) SetExpMultplier(entityInfo); if (RollSecondaryEffect(pokemon,0)) { if (hasLiquidOoze) { - DealDamageToEntity(pokemon,iVar4,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); + DealDamageToEntity_Async(pokemon,iVar4,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); } else { HealTargetHP(pokemon,pokemon,iVar4,0,1); @@ -424,7 +424,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI EntityInfo *pokeEntityData = GetEntInfo(pokemon); EntityInfo *targetEntityInfo = GetEntInfo(target); if ((AbilityIsActive(target, ABILITY_WONDER_GUARD)) || (AbilityIsActive(pokemon, ABILITY_WONDER_GUARD))) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC8C0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC8C0); flag = FALSE; } else @@ -436,7 +436,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI pokeEntityData->abilities[0] = ability1; pokeEntityData->abilities[1] = ability2; gDungeon->unkC = 1; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC888); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC888); // Weirdly enough SetExpMultplier inline doesn't work here... if (pokeEntityData->expMultiplier == EXP_HALVED) { pokeEntityData->expMultiplier = EXP_REGULAR; @@ -466,19 +466,19 @@ bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) } if (!moveFound) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE3BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE3BC); return FALSE; } if (moveId == MOVE_NOTHING) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE3BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE3BC); } else { InitPokemonMove(move, moveId); BufferMoveName(gFormatBuffer_Items[0], move, 0); move->moveFlags2 |= MOVE_FLAG2_UNK4; move->moveFlags2 |= MOVE_FLAG_REPLACE; - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE38C); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE38C); ASM_MATCH_TRICK(pokeInfo); SetExpMultplier(pokeInfo); ret = TRUE; @@ -519,7 +519,7 @@ bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item if (HP == 0) { HP = 1; } - sub_806F370(pokemon,pokemon,HP,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0); + sub_806F370_Async(pokemon,pokemon,HP,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0); } } return flag; @@ -530,7 +530,7 @@ bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI gDungeon->weather.unkE267[WEATHER_SANDSTORM] = gMoveWeatherDuration; if(sub_807EAA0(1, 0) == 0) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCF78); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCF78); } return TRUE; } @@ -584,12 +584,12 @@ bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,s32 itemId) local_20 = 0; if (sub_806F4A4(target,GetMoveType(move)) == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB8C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB8C); return FALSE; } else { moveType = GetMoveType(move); - sub_806F370(pokemon,target,9999,1,&local_20,moveType,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,9999,1,&local_20,moveType,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_20 = (local_20 == 0); return local_20; } @@ -622,7 +622,7 @@ bool8 SonicboomMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemI u8 local_20; local_20 = 0; - sub_806F370(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_20 = local_20 == 0; return local_20; } @@ -655,7 +655,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId) flag = FALSE; if (IsTileGround(GetTileAtEntitySafe(pokemon))) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD128); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD128); } else if (MoveMatchesBideClassStatus(pokemon,move)) { flag = HandleDamagingMove(pokemon,target,move,gDiveModifier,itemId) != 0 ? TRUE : FALSE; @@ -748,7 +748,7 @@ bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,s32 itemId) local_20 = 0; level = GetEntInfo(pokemon)->level; - sub_806F370(pokemon,target,level,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,level,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_20 = local_20 == 0; return local_20; } @@ -777,11 +777,11 @@ bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemI local_20 = 0; if (sub_806F4A4(target,GetMoveType(move)) == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB90); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB90); return FALSE; } else { - sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); local_20 = local_20 == 0; return local_20; } @@ -806,7 +806,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item counter = 0; info = GetEntInfo(target); if (AbilityIsActive(target, ABILITY_FORECAST)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsTypeSwitchMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsTypeSwitchMessage); return FALSE; } else @@ -820,7 +820,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item } } if (counter == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE36C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE36C); return FALSE; } else @@ -831,7 +831,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item info->types[1] = TYPE_NONE; info->isColorChanged = TRUE; BufferMoveName(gFormatBuffer_Items[0], moveStack[newIndex], NULL); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE330); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE330); return TRUE; } } @@ -849,7 +849,7 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 ite flag = FALSE; if(pokemon == target) { - TryDisplayDungeonLoggableMessage3(target, target, gUnknown_80FEB60); + TryDisplayDungeonLoggableMessage3_Async(target, target, gUnknown_80FEB60); } else { BoostOffensiveStat(pokemon, target, gStatIndexAtkDef, 1); diff --git a/src/move_orb_actions_3.c b/src/move_orb_actions_3.c index 569d8bc93..70ee38f35 100644 --- a/src/move_orb_actions_3.c +++ b/src/move_orb_actions_3.c @@ -85,12 +85,12 @@ bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId moveCritChance = GetMoveCritChance(move); CalcDamage(pokemon,target,moveType,movePower,moveCritChance,&dmgStruct, IntToF248(1),move->id,0); SetMessageArgument_2(gFormatBuffer_Monsters[0],GetEntInfo(pokemon),0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7C8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7C8); dmgStruct.dmg /= 2; if (dmgStruct.dmg == 0) { dmgStruct.dmg = 1; } - sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0); + sub_806F370_Async(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0); } return flag; } @@ -135,12 +135,12 @@ bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item moveCritChance = GetMoveCritChance(move); CalcDamage(pokemon,target,moveType,movePower,moveCritChance,&dmgStruct,IntToF248(2),move->id,0); SetMessageArgument_2(gFormatBuffer_Monsters[0],GetEntInfo(pokemon),0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7C8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7C8); dmgStruct.dmg /= 2; if (dmgStruct.dmg == 0) { dmgStruct.dmg = 1; } - sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_HI_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0); + sub_806F370_Async(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_HI_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0); } return flag; } @@ -193,11 +193,11 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0); if (AbilityIsActive(target, ABILITY_STICKY_HOLD)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCE4); return FALSE; } else if (HasHeldItem(target, ITEM_ALERT_SPECS)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD578); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD578); return FALSE; } else @@ -212,7 +212,7 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId) if (flag) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7AC); // The item trade failed + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7AC); // The item trade failed return FALSE; } else @@ -223,7 +223,7 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId) sub_806A6E8(pokemon); sub_806A6E8(target); SetExpMultplier(r7); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC790); // Traded items + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC790); // Traded items return TRUE; } } @@ -310,7 +310,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId entityInfo = GetEntInfo(pokemon); targetEntityInfo = GetEntInfo(target); if (AbilityIsActive(target, ABILITY_WONDER_GUARD)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC854); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC854); return FALSE; } else @@ -319,7 +319,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId entityInfo->abilities[1] = targetEntityInfo->abilities[1]; gDungeon->unkC = 1; SetExpMultplier(entityInfo); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC81C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC81C); EndAbilityImmuneStatus(pokemon, pokemon); return TRUE; } @@ -329,7 +329,7 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId { gDungeon->weather.unkE267[WEATHER_SUNNY] = gMoveWeatherDuration; if (sub_807EAA0(1,0) == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF7C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF7C); } return TRUE; } @@ -363,7 +363,7 @@ bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 itemId) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC730); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC730); return FALSE; } @@ -390,7 +390,7 @@ bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC74C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC74C); return FALSE; } @@ -416,7 +416,7 @@ bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) *stockpileStage = 0; } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC770); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC770); } return TRUE; } @@ -477,7 +477,7 @@ bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) *stockpileStage = 0; } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCA3C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCA3C); } return TRUE; } @@ -510,12 +510,12 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0); if (AbilityIsActive(target, ABILITY_STICKY_HOLD)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCE8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCE8); return FALSE; } else if (HasHeldItem(target, ITEM_ALERT_SPECS)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD57C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD57C); return FALSE; } else @@ -523,13 +523,13 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId heldItem = targetEntityInfo->heldItem; if (!ItemExists(&heldItem)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD18C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD18C); return FALSE; } else { ZeroOutItem(&targetEntityInfo->heldItem); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD170); // $m1's item was swatted down! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD170); // $m1's item was swatted down! pos.x = gAdjacentTileOffsets[entityInfo->action.direction].x; pos.y = gAdjacentTileOffsets[entityInfo->action.direction].y; sub_805A7D4(pokemon,target,&heldItem,&pos); @@ -592,7 +592,7 @@ bool8 SplashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId } _0805A8C2: if (counter == 0x28) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEBDC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEBDC); return FALSE; } @@ -612,10 +612,10 @@ _0805A8C2: if (GetEntityType(entity) == ENTITY_MONSTER) { InitPokemonMove(&stackMove,MOVE_REGULAR_ATTACK); if (sub_80571F0(entity,&stackMove) == 0) { - sub_806F370(pokemon,entity,gSplashDmgValue,0,0,TYPE_NONE,GetDungeonExitReasonFromMoveOrItem(move, itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,entity,gSplashDmgValue,0,0,TYPE_NONE,GetDungeonExitReasonFromMoveOrItem(move, itemId),RESIDUAL_DAMAGE_REGULAR,1,0); } if ((IsFloorOver() == 0) && (EntityIsValid(pokemon))) { - sub_806F370(pokemon,pokemon,gSplashDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,pokemon,gSplashDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,RESIDUAL_DAMAGE_REGULAR,0,0); if ((IsFloorOver() == 0) && (EntityIsValid(pokemon))) goto _0805A9FE; } } @@ -653,7 +653,7 @@ _0805AA5E: sub_807EC28(FALSE); } sub_806A5B8(target); - TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse); } } return TRUE; @@ -679,7 +679,7 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 item } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC5CC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC5CC); } return flag; } @@ -799,7 +799,7 @@ bool8 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId } if (!flag) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004EC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004EC); } return flag; } @@ -849,7 +849,7 @@ bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI s32 rand1 = DungeonRandInt(100); s32 rand2 = rand1; if (rand1 < 10) { - flag = (sub_8055864(pokemon,target,move,0x78,itemId) != 0); + flag = (sub_8055864_Async(pokemon,target,move,0x78,itemId) != 0); return flag; } else { @@ -859,11 +859,11 @@ bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI return TRUE; } else if (rand2 >= 60) { - flag = (sub_8055864(pokemon,target,move,0x28,itemId) != 0); + flag = (sub_8055864_Async(pokemon,target,move,0x28,itemId) != 0); return flag; } else { - flag = (sub_8055864(pokemon,target,move,0x50,itemId) != 0); + flag = (sub_8055864_Async(pokemon,target,move,0x50,itemId) != 0); return flag; } } @@ -905,7 +905,7 @@ bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move,s32 itemId) bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) { if (IsFloorwideFixedRoom()) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEFF4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEFF4); return FALSE; } else { @@ -944,7 +944,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 itemI entityInfo = GetEntInfo(target); newType = gDungeonCamouflageTypes[gDungeon->tileset]; if (AbilityIsActive(target, ABILITY_FORECAST)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsTypeSwitchMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsTypeSwitchMessage); return FALSE; } else { @@ -954,7 +954,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 itemI SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0); typeString = GetUnformattedTypeString(newType); strcpy(gFormatBuffer_Items[0], typeString); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB08); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB08); return TRUE; } } @@ -1020,7 +1020,7 @@ bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC5A8); // A trap can't be laid here! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC5A8); // A trap can't be laid here! } UpdateTrapsVisibility(); return trapLaid; @@ -1045,7 +1045,7 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 ite if (entityInfo->bideClassStatus.status == STATUS_DIGGING) { magnitudeDmgVal *= 2; } - r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,itemId) ? TRUE : FALSE; + r6 = sub_8055864_Async(pokemon,target,move,magnitudeDmgVal,itemId) ? TRUE : FALSE; return r6; } diff --git a/src/move_orb_actions_4.c b/src/move_orb_actions_4.c index 7490f8a30..52c808cd4 100644 --- a/src/move_orb_actions_4.c +++ b/src/move_orb_actions_4.c @@ -164,11 +164,11 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); if (moveCounter != 0) { SetExpMultplier(entityInfo); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCE4); mimicSuccess = TRUE; } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDD00); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDD00); } return mimicSuccess; } @@ -187,7 +187,7 @@ bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 i } } - sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_24 = (local_24 == 0); return local_24; } @@ -233,7 +233,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it SetExpMultplier(GetEntInfo(pokemon)); if (RollSecondaryEffect(pokemon,0) != 0) { if (hasLiquidOoze) { - DealDamageToEntity(pokemon,newHP,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); + DealDamageToEntity_Async(pokemon,newHP,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE); } else { HealTargetHP(pokemon,pokemon,newHP,0,TRUE); @@ -243,7 +243,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrSleepingTargetOnlyMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrSleepingTargetOnlyMessage); } return flag; } @@ -279,10 +279,10 @@ bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI } if (isTMRecycled) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDC9C); // The Used TM was recharged! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDC9C); // The Used TM was recharged! } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCA0); // But nothing happened! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCA0); // But nothing happened! } return isTMRecycled; } @@ -298,7 +298,7 @@ bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it u8 local_20; local_20 = 0; - sub_806F370(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_20 = (local_20 == 0); return local_20; } @@ -358,7 +358,7 @@ bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 ite if (newHP < 1) { newHP = 1; } - sub_806F370(pokemon, pokemon, newHP, 0, 0, 0, GetDungeonExitReasonFromMoveOrItem(move, itemId), RESIDUAL_DAMAGE_REGULAR, 1, 0); + sub_806F370_Async(pokemon, pokemon, newHP, 0, 0, 0, GetDungeonExitReasonFromMoveOrItem(move, itemId), RESIDUAL_DAMAGE_REGULAR, 1, 0); } } return flag; @@ -371,14 +371,14 @@ bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI bool8 flag = FALSE; if (sub_8069D18(&pos, target)) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD430); // Can't use that diagonally! + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD430); // Can't use that diagonally! } else { flag = sub_804AD34(&pos); if (flag) - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD3F0); // It dug the wall in front! + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD3F0); // It dug the wall in front! else - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD40C); // Can't use that here! + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD40C); // Can't use that here! } return flag; @@ -414,18 +414,18 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) return TRUE; } else if (HasHeldItem(target, ITEM_ALERT_SPECS)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD574); // $m1 was protected by its Specs! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD574); // $m1 was protected by its Specs! return TRUE; } else { pokeItem = &pokemonInfo1->heldItem; targetItem = &targetInfo1->heldItem; if ((pokeItem->flags & ITEM_FLAG_EXISTS) != 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC654); // $m0 has an item already! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC654); // $m0 has an item already! return TRUE; } else if ((targetItem->flags & ITEM_FLAG_EXISTS) == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC678); // $m1 doesn't have anything + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC678); // $m1 doesn't have anything return TRUE; } else { @@ -434,7 +434,7 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) sub_806A6E8(pokemon); sub_806A6E8(target); SetExpMultplier(pokemonInfo2); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC614); // Got $m1's item! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC614); // Got $m1's item! } } } @@ -491,10 +491,10 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId } if (isItemCleaned) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC8F0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC8F0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC920); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC920); } return isItemCleaned; } @@ -521,12 +521,12 @@ bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI if (targetHP < 0) { targetHP = 0; } - sub_806F370(pokemon,target,targetHP,0,&local_28,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,target,targetHP,0,&local_28,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); pokeHP = entityInfo->HP / 2; if (pokeHP < 0) { pokeHP = 0; } - sub_806F370(pokemon,pokemon,pokeHP,0,&local_27,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); + sub_806F370_Async(pokemon,pokemon,pokeHP,0,&local_27,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0); local_28 = (local_28 == 0); local_27 = (local_27 == 0); @@ -571,7 +571,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId oldID = entityInfo->id; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->monsterBehavior != BEHAVIOR_FIXED_ENEMY) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450); return FALSE; } else @@ -583,11 +583,11 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId } } if ((r6 == 0x1e) || (entityInfo->id == targetID)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450); } else { CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], targetID); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD434); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD434); UpdateEntitySpecies(target, targetID); didTransfer = TRUE; } @@ -595,7 +595,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450); } return didTransfer; } @@ -634,10 +634,10 @@ bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); if (gDungeon->unk644.stoleFromKecleon != 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD4DC); // $m0 can't escape! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD4DC); // $m0 can't escape! } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD4C4); // $m0 escaped! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD4C4); // $m0 escaped! gDungeon->unk4 = 1; gDungeon->unk11 = 1; } @@ -663,7 +663,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId bool8 foundTrap = FALSE; tile = GetTileAtEntitySafe(target); if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD1EC); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD1EC); return FALSE; } else @@ -695,12 +695,12 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId } } if (foundTrap) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD1B0); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD1B0); UpdateMinimap(); UpdateTrapsVisibility(); } else { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD1CC); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD1CC); } } return foundTrap; @@ -732,7 +732,7 @@ bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 itemId } } if (!foundTarget) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004F0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004F0); } return foundTarget; } @@ -748,7 +748,7 @@ bool8 OneShotOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId u8 local_20; local_20 = 0; - sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_20 = (local_20 == 0); return local_20; } @@ -763,13 +763,13 @@ bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI { bool8 flag; - flag = sub_8055864(pokemon, target, move, gVacuumCutDmgValue, itemId) != 0 ? TRUE : FALSE; + flag = sub_8055864_Async(pokemon, target, move, gVacuumCutDmgValue, itemId) != 0 ? TRUE : FALSE; return flag; } bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD454); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD454); return FALSE; } @@ -786,7 +786,7 @@ bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 itemId) local_24 = 0; targetSize = GetSize(GetEntInfo(target)->apparentID); - sub_806F370(pokemon,target,targetSize,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); + sub_806F370_Async(pokemon,target,targetSize,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0); local_24 = local_24 == 0; return local_24; diff --git a/src/move_orb_actions_5.c b/src/move_orb_actions_5.c index dc7b98fdb..d789e679b 100644 --- a/src/move_orb_actions_5.c +++ b/src/move_orb_actions_5.c @@ -31,7 +31,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId) filledInTile = FALSE; targetInfo = GetEntInfo(target); if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD0B8); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD0B8); return FALSE; } else @@ -58,10 +58,10 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId) if (filledInTile) { sub_8042A64(&tileCoords); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD0B4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD0B4); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD0B8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD0B8); } UpdateMinimap(); UpdateTrapsVisibility(); @@ -84,7 +84,7 @@ bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) if(GetEntInfo(target)->monsterBehavior != BEHAVIOR_FIXED_ENEMY) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FF678); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FF678); return FALSE; } else @@ -92,7 +92,7 @@ bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId) target->isVisible = FALSE; CreateItemWithStickyChance(&stack, GetRandomFloorItem(0), 0); SpawnDroppedItemWrapper(pokemon, &posStruct, &stack); - HandleFaint(target, DUNGEON_EXIT_TRANSFORMED_INTO_ITEM, pokemon); + HandleFaint_Async(target, DUNGEON_EXIT_TRANSFORMED_INTO_ITEM, pokemon); return TRUE; } } diff --git a/src/move_orb_effects_1.c b/src/move_orb_effects_1.c index 7cac41669..3ea05c97b 100644 --- a/src/move_orb_effects_1.c +++ b/src/move_orb_effects_1.c @@ -75,11 +75,11 @@ void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayM sleep = GetEntInfo(target)->sleepClassStatus.status; if (sleep == STATUS_SLEEPLESS) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB380); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB380); } else if (sleep == STATUS_NAPPING) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB384); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB384); } else { sub_8041AF4(target); @@ -87,11 +87,11 @@ void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayM sub_806CE68(target,8); if (cVar2 == 1) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB338); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB338); else if (cVar2 == 2) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB35C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB35C); else - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB318); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB318); } } } @@ -105,25 +105,25 @@ bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMe } else if (IqSkillIsEnabled(target, IQ_NONSLEEPER)) { if (displayMessage) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD54); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD54); } return TRUE; } else if (AbilityIsActive(target, ABILITY_INSOMNIA)) { if (displayMessage) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD58); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD58); } return TRUE; } else if (AbilityIsActive(target, ABILITY_VITAL_SPIRIT)) { if (displayMessage) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD88); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD88); } return TRUE; } else if (HasHeldItem(target, ITEM_INSOMNISCOPE)) { if (displayMessage) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD548); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD548); } return TRUE; } @@ -153,15 +153,15 @@ void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns) entityInfo->sleepClassStatus.status = STATUS_NIGHTMARE; sub_806CE68(target,8); if (hasNightmare) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3CC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3CC); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3A4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3A4); } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3D0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3D0); } UpdateStatusIconFlags(target); } @@ -190,15 +190,15 @@ void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns) entityInfo->sleepClassStatus.status = STATUS_NAPPING; sub_806CE68(target, 8); if (isSleeping) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB360); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB360); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB31C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB31C); } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB388); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB388); } UpdateStatusIconFlags(target); } @@ -217,19 +217,19 @@ void YawnedStatusTarget(Entity * pokemon, Entity * target, s32 turns) entityInfo->sleepClassStatus.turns = turns; nullsub_91(target); sub_806CE68(target, 8); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3E0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3E0); } else if (((entityInfo->sleepClassStatus.status == STATUS_SLEEP) || (entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE)) || (entityInfo->sleepClassStatus.status == STATUS_NAPPING)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB418); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB418); } else if (entityInfo->sleepClassStatus.status == STATUS_SLEEPLESS) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3F8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3F8); } else { if (entityInfo->sleepClassStatus.status == STATUS_YAWNING) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB414); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB414); else - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3E0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3E0); } UpdateStatusIconFlags(target); } @@ -259,12 +259,12 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target) sub_8041EE8(target); sub_806CE68(target,8); if(isAsleep) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB41C); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB458); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB41C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB458); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB43C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB43C); } UpdateStatusIconFlags(target); } @@ -286,19 +286,19 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns entityInfo->cringeClassStatus.turns = turns + 1; nullsub_72(target); if (turns == 1) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB480); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB480); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4D4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4D4); } } else { if (turns == 1) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4B0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4B0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4F0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4F0); } } UpdateStatusIconFlags(target); @@ -315,7 +315,7 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa if (AbilityIsActive(target,ABILITY_OBLIVIOUS)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (displayMessage) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCC4C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCC4C); } } else @@ -325,10 +325,10 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa entityInfo->cringeClassStatus.status = STATUS_INFATUATED; entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gInfatuatedTurnRange,TRUE) + 1; sub_8041EF8(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB50C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB50C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB52C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB52C); } UpdateStatusIconFlags(target); } @@ -355,13 +355,13 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (AbilityIsActive(target, ABILITY_WATER_VEIL)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE5C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE5C); } else { if (MonsterIsType(target, TYPE_FIRE)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE84); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE84); } else { @@ -369,7 +369,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis if (((tile_1->terrainFlags & (TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL)) == TERRAIN_TYPE_SECONDARY) && (gDungeonWaterType[gDungeon->tileset] != DUNGEON_WATER_TYPE_LAVA)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEBBC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEBBC); } else { @@ -383,10 +383,10 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis if (param_3 != 0) { sub_8041C34(target); } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB548); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB548); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB564); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB564); } UpdateStatusIconFlags(target); @@ -410,7 +410,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis if (!hasSynchronized) { hasSynchronized = TRUE; SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C); } if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) { // Recurse with the new target @@ -442,19 +442,19 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (HasHeldItem(target, ITEM_PECHA_SCARF)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD524); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD524); } else { if (AbilityIsActive(target, ABILITY_IMMUNITY)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEB0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEB0); } else { if(MonsterIsType(target, TYPE_POISON) || MonsterIsType(target, TYPE_STEEL)){ if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEDC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEDC); } else { @@ -470,17 +470,17 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0; isNotPoisoned = FALSE; sub_8041C6C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB598); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB598); sub_806CE94(target, 8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5D4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5D4); } } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5F8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5F8); } if ((AbilityIsActive(target, ABILITY_SYNCHRONIZE)) && !isNotPoisoned) @@ -497,7 +497,7 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag if (!hasSynchronized) { hasSynchronized = TRUE; SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C); } if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) { // Recurse with the new target @@ -531,19 +531,19 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); if (HasHeldItem(target, ITEM_PECHA_SCARF)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD524); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD524); } else { if (AbilityIsActive(target, ABILITY_IMMUNITY)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEB0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEB0); } else { if(MonsterIsType(target, TYPE_POISON) || MonsterIsType(target, TYPE_STEEL)){ if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEDC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEDC); } else { @@ -557,12 +557,12 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0; isNotBadlyPoisoned = FALSE; sub_8041C7C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5B4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5B4); sub_806CE94(target, 8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5F8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5F8); } if ((AbilityIsActive(target, ABILITY_SYNCHRONIZE)) && !isNotBadlyPoisoned) @@ -579,7 +579,7 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM if (!hasSynchronized) { hasSynchronized = TRUE; SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C); } if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) { // Recurse with the new target @@ -610,13 +610,13 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) if ((entityInfo->frozenClassStatus.status != STATUS_FROZEN) && !SafeguardIsActive(pokemon,target,displayMessage)) { if (AbilityIsActive(target, ABILITY_MAGMA_ARMOR)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCDE0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCDE0); } else { if (MonsterIsType(target, TYPE_ICE)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE00); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE00); } else { @@ -624,7 +624,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) if (((tile->terrainFlags & (TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL)) == TERRAIN_TYPE_SECONDARY) && (gDungeonWaterType[gDungeon->tileset] == DUNGEON_WATER_TYPE_LAVA)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE34); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE34); } else { @@ -635,7 +635,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) entityInfo->frozenClassStatus.status = STATUS_FROZEN; entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gFreezeTurnRange,TRUE) + 1; entityInfo->frozenClassStatus.damageCountdown = 0; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB610); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB610); UpdateStatusIconFlags(target); } } @@ -656,7 +656,7 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s32 param_3, bool32 } else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA844); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA844); } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->frozenClassStatus.status != STATUS_CONSTRICTION) { @@ -665,11 +665,11 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s32 param_3, bool32 entityInfo->frozenClassStatus.damageCountdown = 0; entityInfo->frozenClassStatus.unk4 = param_3_s32; nullsub_71(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB628); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB628); sub_806CE94(target,8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB64C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB64C); } UpdateStatusIconFlags(target); } @@ -686,7 +686,7 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target) } else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA844); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA844); } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->frozenClassStatus.status != STATUS_SHADOW_HOLD) { @@ -694,11 +694,11 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target) entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gShadowHoldTurnRange,TRUE) + 1; entityInfo->frozenClassStatus.damageCountdown = 0; nullsub_70(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB668); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB668); sub_806CE94(target,8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB688); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB688); } UpdateStatusIconFlags(target); } @@ -719,10 +719,10 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target) entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gIngrainTurnRange,TRUE) + 1; entityInfo->frozenClassStatus.damageCountdown = 0; nullsub_90(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6A4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6A4); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6C0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6C0); } UpdateStatusIconFlags(target); } @@ -756,25 +756,25 @@ void WrapTarget(Entity *pokemon, Entity *target) gDungeon->unk37F4++; nullsub_69(pokemon, target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6D8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6D8); sub_806CE94(target,8); } else { if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAP) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6FC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6FC); } if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAP) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6FC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6FC); } if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAPPED) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB718); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB718); } if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAPPED) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB718); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB718); } } @@ -826,11 +826,11 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target) targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gPetrifiedTurnRange,TRUE) + 1; } targetEntityInfo->frozenClassStatus.damageCountdown = 0; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7BC); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7DC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7DC); } if (targetEntityInfo->isNotTeamMember) { for(index = 0; index < MAX_TEAM_MEMBERS; index++) @@ -872,13 +872,13 @@ void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage if (HasHeldItem(target, ITEM_TWIST_BAND)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FD550); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FD550); return; } if (AbilityIsActive(target, ABILITY_HYPER_CUTTER) && stat.id == STAT_INDEX_PHYSICAL) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA60); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA60); return; } } @@ -901,10 +901,10 @@ void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage if (entityInfo->offensiveStages[stat.id] != newStage) { entityInfo->offensiveStages[stat.id] = newStage; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC15C); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC15C); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC274); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC274); } UpdateStatusIconFlags(target); @@ -948,10 +948,10 @@ void LowerDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage if (entityInfo->defensiveStages[stat.id] != newStage) { entityInfo->defensiveStages[stat.id] = newStage; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC158); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC158); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC248); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC248); } UpdateStatusIconFlags(target); @@ -990,10 +990,10 @@ void BoostOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage if (entityInfo->offensiveStages[stat.id] != newStage) { entityInfo->offensiveStages[stat.id] = newStage; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC13C); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC13C); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC270); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC270); } UpdateStatusIconFlags(target); } @@ -1031,10 +1031,10 @@ void BoostDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage if (entityInfo->defensiveStages[stat.id] != newStage) { entityInfo->defensiveStages[stat.id] = newStage; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC138); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC138); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC21C); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC21C); } UpdateStatusIconFlags(target); } @@ -1092,7 +1092,7 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, if (HasHeldItem(target,ITEM_TWIST_BAND) && F248LessThanInt(multiplier, 1)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FD550); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FD550); return; } @@ -1102,7 +1102,7 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, { if (displayMessage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA60); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA60); } return; } @@ -1128,13 +1128,13 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, } if (F248GreaterThan(oldMulti, entityInfo->offensiveMultipliers[stat.id])) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC11C); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC11C); } else if (F248LessThan(oldMulti, entityInfo->offensiveMultipliers[stat.id])) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC118); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC118); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC184); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC184); } UpdateStatusIconFlags(target); } @@ -1179,13 +1179,13 @@ void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat, } if (F248GreaterThan(oldMulti, entityInfo->defensiveMultipliers[stat.id])) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC114); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC114); } else if (F248LessThan(oldMulti, entityInfo->defensiveMultipliers[stat.id])) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC0FC); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC0FC); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC180); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC180); } UpdateStatusIconFlags(target); } @@ -1209,10 +1209,10 @@ void BoostHitChanceStat(Entity *user, Entity *target, StatIndex stat) if (entityInfo->hitChanceStages[stat.id] < MAX_STAT_STAGE) { entityInfo->hitChanceStages[stat.id]++; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1C4); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1C4); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC218); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC218); } UpdateStatusIconFlags(target); } @@ -1237,7 +1237,7 @@ void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 disp if (AbilityIsActive(target, ABILITY_KEEN_EYE) && stat.id == STAT_INDEX_ACCURACY) { if (displayMessage) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA64); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA64); } return; } @@ -1247,10 +1247,10 @@ void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 disp PlayHitChanceDownEffect(target,stat.id); if (entityInfo->hitChanceStages[stat.id] != 0) { entityInfo->hitChanceStages[stat.id]--; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1A4); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1A4); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1F0); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1F0); } UpdateStatusIconFlags(target); } @@ -1268,7 +1268,7 @@ void TryInflictCringeStatus(Entity *user ,Entity *target, bool8 displayMessage) if (AbilityIsActive(target, ABILITY_INNER_FOCUS)){ SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (displayMessage) - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCC18); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCC18); return; } @@ -1278,10 +1278,10 @@ void TryInflictCringeStatus(Entity *user ,Entity *target, bool8 displayMessage) entityInfo->cringeClassStatus.status = STATUS_CRINGE; entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target, gCringeTurnRange, TRUE) + 1; PlayCringeExclamationPointEffect(target); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2E0); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2E0); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB300); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB300); } UpdateStatusIconFlags(target); } @@ -1300,7 +1300,7 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag if (AbilityIsActive(target, ABILITY_LIMBER)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (displayMessage) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCBF8); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCBF8); } return; } @@ -1314,12 +1314,12 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag entityInfo->burnClassStatus.damageCountdown = 0; entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0; alreadyParalyzed = FALSE; - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2AC); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2AC); PlayParalysisEffect(target); CalcSpeedStage(target); } else { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2CC); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2CC); } if (AbilityIsActive(target, ABILITY_SYNCHRONIZE) && !alreadyParalyzed) { @@ -1333,7 +1333,7 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag if (!synchronizePrinted) { synchronizePrinted = TRUE; SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FF01C); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FF01C); } if (GetTreatmentBetweenMonstersIgnoreStatus(target,mapMonster) == TREATMENT_TREAT_AS_ENEMY) { TryInflictParalysisStatus(user, mapMonster, displayMessage); @@ -1364,7 +1364,7 @@ void BoostSpeed(Entity *user, Entity *target, s32 turns, bool8 displayMessage) speedBefore = CalcSpeedStage(target); if (speedBefore == MAX_SPEED_STAGE) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC2B8); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC2B8); } else { for (i = 0; i < NUM_SPEED_COUNTERS; i++) { @@ -1376,11 +1376,11 @@ void BoostSpeed(Entity *user, Entity *target, s32 turns, bool8 displayMessage) speedAfter = CalcSpeedStage(target); if (speedBefore == speedAfter) { - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC298); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC298); } else { PlaySpeedUpEffect(target); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FA124[speedAfter]); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FA124[speedAfter]); entityInfo->speedStageChanged = TRUE; entityInfo->attacking = FALSE; } @@ -1406,7 +1406,7 @@ void LowerSpeed(Entity *user, Entity *target, s32 nStages, bool8 displayMessage) speedBefore = CalcSpeedStage(target); if (speedBefore == 0) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC2D8); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC2D8); } else { s32 counter, i; @@ -1421,11 +1421,11 @@ void LowerSpeed(Entity *user, Entity *target, s32 nStages, bool8 displayMessage) speedAfter = CalcSpeedStage(target); if (speedBefore == speedAfter) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC298); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC298); } else { PlaySpeedDownEffect(target); - TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FA124[speedAfter]); + TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FA124[speedAfter]); } } diff --git a/src/move_orb_effects_2.c b/src/move_orb_effects_2.c index 5ff7d68cd..05109214d 100644 --- a/src/move_orb_effects_2.c +++ b/src/move_orb_effects_2.c @@ -47,13 +47,13 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (HasHeldItem(target,ITEM_PERSIM_BAND)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD500); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD500); } else { if (AbilityIsActive(target, ABILITY_OWN_TEMPO)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCDB4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCDB4); } else { @@ -62,10 +62,10 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage if (entityInfo->cringeClassStatus.status != STATUS_CONFUSED) { entityInfo->cringeClassStatus.status = STATUS_CONFUSED; entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gConfusionTurnRange,TRUE) + 1; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB25C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB25C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB27C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB27C); } UpdateStatusIconFlags(target); } @@ -83,10 +83,10 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) entityInfo->cringeClassStatus.status = STATUS_COWERING; entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gCowerTurnRange,TRUE) + 1; sub_8041BF8(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB940); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB940); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB960); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB960); } UpdateStatusIconFlags(target); } @@ -138,12 +138,12 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if ((HP == 0) && (maxHPStat == 0)) { if (displayMessage_u8) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB204); // $m0's HP remained unchanged + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB204); // $m0's HP remained unchanged } else if ((param_4 == 0) && (HP == 0)) { if (displayMessage_u8) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB21C); // $m0 has full HP + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB21C); // $m0 has full HP } else { @@ -152,7 +152,7 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo if (ShouldDisplayEntity(target)) { r8 = maxHPStat; } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB240); // m0$'s max HP rose by {VALUE_1} + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB240); // m0$'s max HP rose by {VALUE_1} } if (HP != 0) { if (ShouldDisplayEntity(target)) { @@ -160,10 +160,10 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo } if (param_3 != 0) { if (entityInfo->maxHPStat == entityInfo->HP) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1E0); // $m0 was fully healed + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1E0); // $m0 was fully healed } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1C4); // $m0 recovered {VALUE_0} HP + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1C4); // $m0 recovered {VALUE_0} HP } } } @@ -176,14 +176,14 @@ void HandleScannerOrb(Entity* pokemon, Entity* target) { if (EntityIsValid(target)) { if (GetEntInfo(target)->scanning) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEF0); // Item locations are already known + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEF0); // Item locations are already known } else { GetEntInfo(target)->scanning = TRUE; nullsub_75(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEA0); // Item locations became evident + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEA0); // Item locations became evident UpdateCamera(0); UpdateMinimap(); UpdateStatusIconFlags(target); @@ -196,19 +196,19 @@ void HandleStairsOrb(Entity* pokemon, Entity* target) if (EntityIsValid(target)) { if(GetFloorType()) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF3C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF3C); } else { if (GetEntInfo(target)->stairSpotter) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF1C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF1C); } else { GetEntInfo(target)->stairSpotter = TRUE; nullsub_76(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEC8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEC8); UpdateCamera(0); UpdateMinimap(); UpdateStatusIconFlags(target); @@ -221,14 +221,14 @@ void HandleRadarOrb(Entity* pokemon, Entity* target) { if (EntityIsValid(target)) { if (GetEntInfo(target)->powerEars != 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAFD0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAFD0); } else { GetEntInfo(target)->powerEars = TRUE; nullsub_77(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAFAC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAFAC); UpdateCamera(0); UpdateMinimap(); UpdateStatusIconFlags(target); @@ -247,7 +247,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) if (pokemon == target) { pokemon = target; if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrCantLeechSeedSelfMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrCantLeechSeedSelfMessage); } else { if (SafeguardIsActive(pokemon,target,displayMessage)) { @@ -256,14 +256,14 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (MonsterIsType(target, TYPE_GRASS)) { if (displayMessage) - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrCantLeechSeedMonMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrCantLeechSeedMonMessage); } else { switch(entityInfo->leechSeedClassStatus.status) { case STATUS_DESTINY_BOND: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAA8C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAA8C); default: entityInfo->leechSeedClassStatus.status = STATUS_LEECH_SEED; entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target, gLeechSeedTurnRange, TRUE) + 1; @@ -272,7 +272,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) entityInfo->leechSeedClassStatus.unk8 = 0xff; break; case STATUS_LEECH_SEED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE7C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE7C); return; } for(index = 0; index < DUNGEON_MAX_POKEMON; index++) @@ -283,7 +283,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage) entityInfo->leechSeedClassStatus.unk4 = entityInfo2->dungeonSpriteId; } } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE58); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE58); UpdateStatusIconFlags(target); } } @@ -328,7 +328,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->leechSeedClassStatus.status != STATUS_DESTINY_BOND) { if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED) - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA79C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA79C); entityInfo->leechSeedClassStatus.status = STATUS_DESTINY_BOND; entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target,gDestinyBondTurnRange,TRUE) + 1; @@ -338,7 +338,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB78); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB78); return; } for(index = 0; index < DUNGEON_MAX_POKEMON; index++) @@ -349,7 +349,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target) entityInfo->leechSeedClassStatus.unk4 = entityInfo2->dungeonSpriteId; } } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB4C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB4C); UpdateStatusIconFlags(target); } } @@ -365,10 +365,10 @@ void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns) entityInfo->sureShotClassStatus.status = STATUS_SURE_SHOT; entityInfo->sureShotClassStatus.turns = turns + 1; sub_8041CDC(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB73C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB73C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB764); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB764); } UpdateStatusIconFlags(target); } @@ -385,10 +385,10 @@ void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns) entityInfo->sureShotClassStatus.status = STATUS_WHIFFER; entityInfo->sureShotClassStatus.turns = turns + 1; sub_8041CEC(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB780); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB780); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7A0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7A0); } UpdateStatusIconFlags(target); } @@ -405,10 +405,10 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target) entityInfo->sureShotClassStatus.status = STATUS_SET_DAMAGE; entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gSetDamageTurnRange, FALSE) + 1; nullsub_79(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB8BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB8BC); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB8E4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB8E4); } UpdateStatusIconFlags(target); } @@ -425,10 +425,10 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target) entityInfo->sureShotClassStatus.status = STATUS_FOCUS_ENERGY; entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gFocusEnergyTurnRange, FALSE) + 1; nullsub_80(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB900); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB900); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB924); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB924); } UpdateStatusIconFlags(target); } @@ -447,7 +447,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3) targetEntityInfo = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (targetEntityInfo->curseClassStatus.status == STATUS_DECOY) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB994); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB994); } else { for(index = 0; index < DUNGEON_MAX_POKEMON; index++) @@ -471,7 +471,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3) targetEntityInfo->curseClassStatus.damageCountdown = 0; sub_806CCB4(target,sub_806CEBC(target)); gDungeon->decoyIsActive = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB978); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB978); for(index = 0; index < DUNGEON_MAX_POKEMON; index++) { @@ -520,7 +520,7 @@ void CurseStatusTarget(Entity *pokemon, Entity * target) targetEntityInfo->curseClassStatus.damageCountdown = 0; } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB004); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB004); } else { BoostOffensiveStat(pokemon,pokemon,gStatIndexAtkDef,1); @@ -559,7 +559,7 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target) gDungeon->snatchPokemon = target; gDungeon->unk17B3C = targetEntityInfo->dungeonSpriteId; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB01C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB01C); UpdateStatusIconFlags(target); } } @@ -575,10 +575,10 @@ void TauntStatusTarget(Entity * pokemon, Entity * target) entityInfo->cringeClassStatus.status = STATUS_TAUNTED; entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gTauntTurnRange,TRUE) + 1; nullsub_73(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9F0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9F0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA14); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA14); } UpdateStatusIconFlags(target); } @@ -593,13 +593,13 @@ void HandleStockpile(Entity * pokemon, Entity * target) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->stockpileStage < MAX_STOCKPILE_STAGE) { entityInfo->stockpileStage++; - sub_804178C(1); + sub_804178C_Async(1); sub_8041D5C(target); gFormatArgs[0] = entityInfo->stockpileStage; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA38); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA38); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA60); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA60); } UpdateStatusIconFlags(target); } @@ -619,10 +619,10 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target) targetEntityInfo->invisibleClassStatus.status = STATUS_INVISIBLE; targetEntityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gInvisibleTurnRange,FALSE) + 1; sub_8041D84(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA80); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA80); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAA0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAA0); } UpdateStatusIconFlags(target); } @@ -638,10 +638,10 @@ void PerishSongTarget(Entity * pokemon, Entity * target) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->perishSongTurns == 0) { entityInfo->perishSongTurns = CalculateStatusTurns(target,gPerishSongTurnRange,FALSE) + 1; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB04); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB04); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB28); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB28); } UpdateStatusIconFlags(target); } @@ -662,7 +662,7 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target) } if ((index == MAX_MON_MOVES) && ((EntityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBD4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBD4); } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); @@ -670,10 +670,10 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target) EntityInfo->cringeClassStatus.status = STATUS_ENCORE; EntityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gEncoreTurnRange,TRUE) + 1; nullsub_83(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB94); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB94); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBB8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBB8); } UpdateStatusIconFlags(target); } @@ -699,10 +699,10 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4) if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->maxBelly)) { sub_8041D9C(target); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBD9C); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBD9C); } else - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBE3C); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBE3C); } else { FixedPoint sp8 = IntToFixedPoint(param_3); @@ -713,10 +713,10 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4) if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->belly)) { nullsub_84(target); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBD78); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBD78); } else - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBE40); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBE40); } UpdateStatusIconFlags(target); @@ -743,7 +743,7 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel } targetInfo = GetEntInfo(target); if ((!targetInfo->isTeamLeader) && (HasHeldItem(target,0x1b))) { - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBEA0); + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBEA0); return; } bellySizeIncreased = FALSE; @@ -768,16 +768,16 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel *bellyPtr = FixedPoint_Min(sp_0x4,sp_0x8); targetInfo->belly = *bellyPtr; if ((!bellySame) && (displayMessage)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full! } if (FixedPointToInt(sp_0x20) == FixedPointToInt(targetInfo->maxBelly)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBDF0); // $m0's belly won't get any bigger! + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBDF0); // $m0's belly won't get any bigger! } else { sub_8041DB0(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBDC4); // m0's max belly size increased! + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBDC4); // m0's max belly size increased! } } else { @@ -795,15 +795,15 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel nullsub_85(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (FixedPointToInt(oldBelly) == FixedPointToInt(*bellyPtr)) { - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE14); // $m0's belly didn't change! + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE14); // $m0's belly didn't change! } else { if (FixedPointToInt(*bellyPtr) >= FixedPointToInt(*puVar8)) { - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full! + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full! } else { - if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE84); // $m0's belly was filled! + if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE84); // $m0's belly was filled! } } } @@ -821,11 +821,11 @@ void MuzzleTarget(Entity *pokemon, Entity *target) entityInfo->muzzled.muzzled = TRUE; entityInfo->muzzled.turns = CalculateStatusTurns(target,gMuzzledTurnRange, TRUE) + 1; nullsub_86(target); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBF68); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBF68); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF84); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF84); } UpdateStatusIconFlags(target); } @@ -848,13 +848,13 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) entityInfo = GetEntInfo(target); if (entityInfo->invisibleClassStatus.status == STATUS_TRANSFORMED) - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBF04); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBF04); else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); iVar5 = GetAvailableMonsToTransform(auStack544, 0); if (iVar5 == 0) - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEE4); else { sprite = NULL; @@ -871,7 +871,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) } if (index == DUNGEON_MAX_POKEMON || sprite == NULL) - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEE4); else { entityInfo->apparentID = apparentID; target->axObj.spriteFile = sprite; @@ -881,7 +881,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target) nullsub_87(target); sub_806CCB4(target, sub_806CEBC(target)); CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], entityInfo->apparentID); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEC0); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEC0); UpdateStatusIconFlags(target); } } @@ -904,10 +904,10 @@ void MobileStatusTarget(Entity * pokemon, Entity * target) entityInfo->invisibleClassStatus.status = STATUS_MOBILE; entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gMobileTurnRange, FALSE) + 1; nullsub_88(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF28); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF28); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF50); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF50); } UpdateStatusIconFlags(target); } @@ -936,11 +936,11 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3) if(flag) { sub_8041DD8(target,param_3_s16); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC000); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC000); flag2 = TRUE; } if (entityInfo->exposed) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBFB8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBFB8); } else { @@ -948,11 +948,11 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3) sub_8041DD8(target,param_3_s16_2); } if (!MonsterIsType(target, TYPE_GHOST)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBFD8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBFD8); } else { entityInfo->exposed = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF9C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF9C); } UpdateStatusIconFlags(target); } @@ -967,11 +967,11 @@ void IdentityItemHolders(Entity *pokemon, Entity *target) nullsub_89(target); gDungeon->unk644.itemHoldersIdentified = TRUE; UpdateStatusIconFlags(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC028); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC028); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC054); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC054); } } } @@ -987,14 +987,14 @@ void BlindTarget(Entity *pokemon, Entity *target) entityInfo->blinkerClassStatus.status = STATUS_BLINKER; entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gBlinkerTurnRange, TRUE) + 1; sub_8041E0C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7F4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7F4); DungeonRunFrameActions(0x31); UpdateTrapsVisibility(); UpdateMinimap(); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB810); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB810); } UpdateStatusIconFlags(target); } @@ -1012,7 +1012,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->blinkerClassStatus.status != STATUS_CROSS_EYED) { sub_8041E1C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB834); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB834); entityInfo->blinkerClassStatus.status = STATUS_CROSS_EYED; entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gCrossEyedTurnRange, TRUE) + 1; UpdateCamera(0x1); @@ -1021,7 +1021,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target) } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB85C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB85C); } UpdateStatusIconFlags(target); } @@ -1040,14 +1040,14 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target) entityInfo->blinkerClassStatus.status = STATUS_EYEDROPS; entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gEyedropsTurnRange, FALSE) + 1; sub_8041E3C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB880); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB880); DungeonRunFrameActions(0x31); UpdateTrapsVisibility(); UpdateMinimap(); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB89C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB89C); } UpdateStatusIconFlags(target); } @@ -1086,10 +1086,10 @@ void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3) } if (PPChanged) { sub_8041E4C(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBD0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBD0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBF0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBF0); } UpdateStatusIconFlags(target); } @@ -1116,10 +1116,10 @@ void RaiseAtkStatTarget(Entity * pokemon, Entity *target, s32 increment) entityInfo->atk[0] = newStat; if (oldStat1 < (u8)newStat) { sub_8041E60(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC33C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC33C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC360); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC360); } UpdateStatusIconFlags(target); } @@ -1146,10 +1146,10 @@ void RaiseSpAtkStatTarget(Entity * pokemon, Entity *target, s32 increment) entityInfo->atk[1] = newStat; if (oldStat1 < (u8)newStat) { sub_8041E74(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC388); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC388); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3B4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3B4); } UpdateStatusIconFlags(target); } @@ -1176,10 +1176,10 @@ void RaiseDefStatTarget(Entity * pokemon, Entity *target, s32 increment) entityInfo->def[0] = newStat; if (oldStat1 < (u8)newStat) { sub_8041E84(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3D8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3D8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3FC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3FC); } UpdateStatusIconFlags(target); } @@ -1206,10 +1206,10 @@ void RaiseSpDefStatTarget(Entity * pokemon, Entity *target, s32 increment) entityInfo->def[1] = newStat; if (oldStat1 < (u8)newStat) { sub_8041E94(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC428); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC428); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC454); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC454); } UpdateStatusIconFlags(target); } @@ -1224,10 +1224,10 @@ void LongTossStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->longTossClassStatus.status != STATUS_LONG_TOSS) { entityInfo->longTossClassStatus.status = STATUS_LONG_TOSS; sub_8041EA4(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD20C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD20C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD22C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD22C); } UpdateStatusIconFlags(target); } @@ -1241,10 +1241,10 @@ void PierceStatusTarget(Entity * pokemon, Entity * target) if (entityInfo->longTossClassStatus.status != STATUS_PIERCE) { entityInfo->longTossClassStatus.status = STATUS_PIERCE; sub_8041EB4(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD254); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD254); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD27C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD27C); } UpdateStatusIconFlags(target); } diff --git a/src/move_orb_effects_3.c b/src/move_orb_effects_3.c index 88a4fa367..ab096a897 100644 --- a/src/move_orb_effects_3.c +++ b/src/move_orb_effects_3.c @@ -42,7 +42,7 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move * entityInfo = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if ((entityInfo->bideClassStatus.status == newStatus) && (newStatus == STATUS_ENRAGED)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC074); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC074); } else { entityInfo->bideClassStatus.status = newStatus; @@ -74,7 +74,7 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move * entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gEnragedTurnRange, FALSE) + 1; } sub_8041BD0(target,uVar5); - TryDisplayDungeonLoggableMessage3(pokemon,target,message); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,message); UpdateStatusIconFlags(target); // TODO: this could probably be cleaner.. diff --git a/src/move_orb_effects_4.c b/src/move_orb_effects_4.c index 00d47eecd..f9312bff0 100644 --- a/src/move_orb_effects_4.c +++ b/src/move_orb_effects_4.c @@ -36,7 +36,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus) entityInfo = GetEntInfo(target); SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (entityInfo->reflectClassStatus.status == newStatus) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB10C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB10C); } else { nullsub_57(target); @@ -44,7 +44,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus) entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target,gCounterTurnRange, FALSE) + 1; } entityInfo->reflectClassStatus.status = newStatus; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB0E0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB0E0); UpdateStatusIconFlags(target); } } @@ -61,10 +61,10 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_SAFEGUARD; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gSafeguardTurnRange, FALSE) + 1; nullsub_58(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB048); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB048); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB074); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB074); } UpdateStatusIconFlags(target); } @@ -81,10 +81,10 @@ void MistStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_MIST; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMistTurnRange, FALSE) + 1; nullsub_59(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB09C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB09C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB0C4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB0C4); } UpdateStatusIconFlags(target); } @@ -101,10 +101,10 @@ void WishStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_WISH; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gWishTurnRange, FALSE) + 1; sub_8041B34(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE1C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE1C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE3C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE3C); } UpdateStatusIconFlags(target); } @@ -121,10 +121,10 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_MAGIC_COAT; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMagicCoatTurnRange, FALSE) + 1; nullsub_60(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF5C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF5C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF8C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF8C); } UpdateStatusIconFlags(target); } @@ -141,10 +141,10 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_LIGHT_SCREEN; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gLightScreenTurnRange, FALSE) + 1; nullsub_61(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB130); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB130); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB160); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB160); } UpdateStatusIconFlags(target); } @@ -161,10 +161,10 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_REFLECT; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gReflectTurnRange, FALSE) + 1; nullsub_62(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB17C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB17C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1A8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1A8); } UpdateStatusIconFlags(target); } @@ -181,11 +181,11 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_PROTECT; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gProtectTurnRange, FALSE) + 1; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9B0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9B0); } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9D8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9D8); } UpdateStatusIconFlags(target); } @@ -202,10 +202,10 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_MIRROR_COAT; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorCoatTurnRange, FALSE) + 1; nullsub_64(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAC0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAC0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAE4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAE4); } UpdateStatusIconFlags(target); } @@ -222,10 +222,10 @@ void EndureStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_ENDURING; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gEnduringTurnRange, FALSE) + 1; nullsub_65(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBF0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBF0); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC14); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC14); } UpdateStatusIconFlags(target); } @@ -242,10 +242,10 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_MIRROR_MOVE; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorMoveTurnRange, FALSE) + 1; nullsub_66(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC38); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC38); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC5C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC5C); } UpdateStatusIconFlags(target); } @@ -259,7 +259,7 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target) entityInfo = GetEntInfo(target); if(AbilityIsActive(target, ABILITY_FORECAST)) - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsConversion2Message); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsConversion2Message); else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); @@ -267,10 +267,10 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_CONVERSION2; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gConversion2TurnRange, FALSE) + 1; nullsub_67(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC7C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC7C); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCA4); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCA4); } UpdateStatusIconFlags(target); } @@ -288,10 +288,10 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target) entityInfo->reflectClassStatus.status = STATUS_VITAL_THROW; entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gVitalThrowTurnRange, FALSE) + 1; nullsub_68(target); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCC8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCC8); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCF0); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCF0); } UpdateStatusIconFlags(target); } @@ -338,10 +338,10 @@ void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3) } SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (statChanged) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD18); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD18); } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD3C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD3C); } UpdateStatusIconFlags(target); } diff --git a/src/move_orb_effects_5.c b/src/move_orb_effects_5.c index 502498b52..a9df558cc 100644 --- a/src/move_orb_effects_5.c +++ b/src/move_orb_effects_5.c @@ -65,11 +65,11 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4) SendMuzzledEndMessage(pokemon,target); if (entityInfo->perishSongTurns != 0) { entityInfo->perishSongTurns = 0; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_8100594); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_8100594); } if (entityInfo->exposed) { entityInfo->exposed = FALSE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrExposedWoreOffMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrExposedWoreOffMessage); } } @@ -81,7 +81,7 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4) if (moveSpeed != CalcSpeedStage(target)) { bVar8 = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA124[entityInfo->speedStage]); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA124[entityInfo->speedStage]); } for(index = 0; index < MAX_MON_MOVES; index++) @@ -99,11 +99,11 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4) sub_80420C8(target); } if (moveUnsealed) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrSealedMoveReleasedMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrSealedMoveReleasedMessage); } } else if (param_4 == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004E8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004E8); } UpdateStatusIconFlags(target); } @@ -149,21 +149,21 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 break; case STATUS_SLEEP: isAsleep = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA6E8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA6E8); break; case STATUS_SLEEPLESS: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA708); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA708); break; case STATUS_NIGHTMARE: isAsleep = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA70C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA70C); if (param_4) { - DealDamageToEntity(target,gNightmareDmgValue,RESIDUAL_DAMAGE_NIGHTMARE,DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE); + DealDamageToEntity_Async(target,gNightmareDmgValue,RESIDUAL_DAMAGE_NIGHTMARE,DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE); } break; case STATUS_NAPPING: isAsleep = TRUE; - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA710); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA710); HealTargetHP(pokemon,target,gNappingHpHealValue, 0, FALSE); entityInfo->sleepClassStatus.status = 0; sub_8079F20(pokemon,target,1,1); @@ -174,7 +174,7 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8 SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gSleepFromYawnTurnRange, TRUE) + 1, TRUE); return; } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA734); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA734); break; } entityInfo->sleepClassStatus.status = STATUS_NONE; @@ -199,13 +199,13 @@ void EndBurnClassStatus(Entity * pokemon, Entity * target) break; case STATUS_POISONED: case STATUS_BADLY_POISONED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8A8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8A8); break; case STATUS_PARALYSIS: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA868); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA868); break; case STATUS_BURN: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA888); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA888); break; } @@ -229,23 +229,23 @@ void EndFrozenClassStatus(Entity * pokemon, Entity *target) case 8: break; case STATUS_FROZEN: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8BC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8BC); isFrozen = TRUE; break; case STATUS_CONSTRICTION: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA820); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA820); break; case STATUS_SHADOW_HOLD: case STATUS_INGRAIN: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA824); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA824); break; case STATUS_WRAP: case STATUS_WRAPPED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA81C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA81C); sub_8076CB4(entityInfo->unk9C); break; case STATUS_PETRIFIED: - TryDisplayDungeonLoggableMessage3(pokemon,target, gPtrMonNoLongerPetrifiedMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target, gPtrMonNoLongerPetrifiedMessage); break; } entityInfo->frozenClassStatus.status = STATUS_NONE; @@ -269,25 +269,25 @@ void EndCringeClassStatus(Entity * pokemon, Entity *target) case 8: break; case STATUS_CONFUSED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA800); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA800); break; case STATUS_COWERING: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA97C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA97C); break; case STATUS_TAUNTED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA9DC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA9DC); break; case STATUS_PAUSED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAC38); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAC38); break; case STATUS_INFATUATED: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAB90); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAB90); break; case STATUS_ENCORE: - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAAAC); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAAAC); break; case STATUS_CRINGE: - TryDisplayDungeonLoggableMessage3(pokemon,target, gPtrMonNoLongerCringingMessage); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target, gPtrMonNoLongerCringingMessage); break; } entityInfo->cringeClassStatus.status = STATUS_NONE; @@ -309,44 +309,44 @@ void EndReflectClassStatus(Entity * pokemon, Entity *target) case 0xF: break; case STATUS_REFLECT: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA638); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA638); break; case STATUS_SAFEGUARD: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA69C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA69C); break; case STATUS_LIGHT_SCREEN: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA658); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA658); break; case STATUS_COUNTER: case STATUS_MINI_COUNTER: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA67C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA67C); break; case STATUS_MAGIC_COAT: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA6BC); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA6BC); break; case STATUS_WISH: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA6D4); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA6D4); break; case STATUS_PROTECT: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9C0); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9C0); break; case STATUS_MIRROR_COAT: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA68); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA68); break; case STATUS_ENDURING: - LogMessageByIdWithPopupCheckUser(target, gPtrMonStoppedEnduringMessage); + LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonStoppedEnduringMessage); break; case STATUS_MIRROR_MOVE: - LogMessageByIdWithPopupCheckUser(target,gPtrMonMirrorMoveFadedMessage); + LogMessageByIdWithPopupCheckUser_Async(target,gPtrMonMirrorMoveFadedMessage); break; case STATUS_CONVERSION2: - LogMessageByIdWithPopupCheckUser(target, gPtrMonConversion2FailedMessage); + LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonConversion2FailedMessage); break; case STATUS_VITAL_THROW: - LogMessageByIdWithPopupCheckUser(target, gPtrMonGaveUpVitalThrowMessage); + LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonGaveUpVitalThrowMessage); break; case STATUS_MIST: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAB40); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAB40); break; } entityInfo->reflectClassStatus.status = STATUS_NONE; @@ -367,12 +367,12 @@ void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus) break; case STATUS_CURSED: if (curseClassStatus != STATUS_CURSED) { - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA7BC); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA7BC); } break; case STATUS_SNATCH: if (curseClassStatus != STATUS_SNATCH) { - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA7DC); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA7DC); } gDungeon->snatchPokemon = NULL; gDungeon->unk17B3C = 0; @@ -384,7 +384,7 @@ void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus) gDungeon->decoyIsActive = FALSE; if (curseClassStatus != STATUS_DECOY) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9A0); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9A0); } break; } @@ -405,10 +405,10 @@ void EndLeechSeedClassStatus(Entity * pokemon, Entity * target) case STATUS_NONE: break; case STATUS_LEECH_SEED: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA79C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA79C); break; case STATUS_DESTINY_BOND: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA8C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA8C); break; } entityInfo->leechSeedClassStatus.status = STATUS_NONE; @@ -431,16 +431,16 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target) case 5: break; case STATUS_SURE_SHOT: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA8E0); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA8E0); break; case STATUS_WHIFFER: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA90C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA90C); break; case STATUS_SET_DAMAGE: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA934); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA934); break; case STATUS_FOCUS_ENERGY: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA95C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA95C); break; } entityInfo->sureShotClassStatus.status = STATUS_NONE; @@ -465,17 +465,17 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target) break; case STATUS_INVISIBLE: isInvisible = TRUE; - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9F4); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9F4); break; case STATUS_MOBILE: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FABBC); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FABBC); break; case STATUS_TRANSFORMED: entityInfo->apparentID = GetMonsterApparentID(target, entityInfo->id); target->axObj.spriteFile = GetSpriteData(entityInfo->apparentID); uVar3 = sub_806CEBC(target); sub_806CCB4(target,uVar3); - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAB6C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAB6C); break; } entityInfo->invisibleClassStatus.status = STATUS_NONE; @@ -499,13 +499,13 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target) case 4: break; case STATUS_BLINKER: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA0C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA0C); break; case STATUS_CROSS_EYED: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA2C); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA2C); break; case STATUS_EYEDROPS: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA48); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA48); break; } entityInfo->blinkerClassStatus.status = STATUS_NONE; @@ -531,7 +531,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target) case 2: break; case TRUE: - LogMessageByIdWithPopupCheckUser(target,gUnknown_80FABC0); + LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FABC0); break; } entityInfo->muzzled.muzzled = FALSE; @@ -576,7 +576,7 @@ void SendThawedMessage(Entity *pokemon, Entity *target) entityInfo->frozenClassStatus.turns = 0; entityInfo->frozenClassStatus.damageCountdown = 0; SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8BC); // $m0 thawed out! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8BC); // $m0 thawed out! UpdateStatusIconFlags(target); } } diff --git a/src/naming_screen.c b/src/naming_screen.c index 1b0f7c4ed..d890c8818 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -283,34 +283,34 @@ static const u8 *const sSpecialLetters[] = static const WindowTemplate sWindowTemplateDummy = WIN_TEMPLATE_DUMMY; static const WindowTemplate sInputWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITHOUT_BORDER, - .pos = {1, 10}, + .pos = { 1, 10 }, .width = 28, .height = 9, - .unk10 = 9, + .totalHeight = 9, .unk12 = 0, .header = NULL, }; static const WindowTemplate sNameWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITHOUT_BORDER, - .pos = {4, 3}, + .pos = { 4, 3 }, .width = 22, .height = 5, - .unk10 = 5, + .totalHeight = 5, .unk12 = 0, .header = NULL, }; static const WindowTemplate sPasswordNameWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_WITHOUT_BORDER, - .pos = {1, 2}, + .pos = { 1, 2 }, .width = 28, .height = 7, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }; diff --git a/src/one_room_orb.c b/src/one_room_orb.c index 9a62ac0a4..372b620d5 100644 --- a/src/one_room_orb.c +++ b/src/one_room_orb.c @@ -37,17 +37,17 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target) bool8 isMonsterHouse; if (gDungeon->forceMonsterHouse != 0) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3C8); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3C8); return; } if (gDungeon->unk3A0B != 0) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3CC); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3CC); return; } if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3D0); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3D0); return; } isMonsterHouse = FALSE; @@ -130,9 +130,9 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target) DetermineAllMonsterShadow(); UpdateMinimap(); UpdateTrapsVisibility(); - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3A0); - sub_803E708(0x28,0x2b); - TryTriggerMonsterHouseWithMsg(pokemon,1); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3A0); + DungeonWaitFrames_Async(0x28,0x2b); + TryTriggerMonsterHouseWithMsg_Async(pokemon,1); for(index = 0; index < DUNGEON_MAX_POKEMON; index++) { entity = gDungeon->activePokemon[index]; @@ -144,5 +144,5 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target) } } gDungeon->forceMonsterHouse = TRUE; - sub_803E708(0x14,0x2b); + DungeonWaitFrames_Async(0x14,0x2b); } diff --git a/src/other_menus1.c b/src/other_menus1.c index 1aff69ce4..7a6fe17f1 100644 --- a/src/other_menus1.c +++ b/src/other_menus1.c @@ -354,7 +354,7 @@ static void sub_8037748(void) if ((sUnknown_203B35C->unk14 & 8) != 0) AddSprite(&sUnknown_203B35C->unkC, 0x100, NULL, NULL); - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); sUnknown_203B35C->unk14++; } diff --git a/src/other_menus2.c b/src/other_menus2.c index 503b64e87..5eb2ab3ca 100644 --- a/src/other_menus2.c +++ b/src/other_menus2.c @@ -26,7 +26,7 @@ UNUSED EWRAM_DATA static u8 sUnused = 0; EWRAM_DATA static s32 gUnknown_202EC40[2] = {0}; EWRAM_DATA static s32 gUnknown_202EC48 = 0; -extern struct UnkStruct_203B184 *gUnknown_203B184; +extern UnkStruct_203B184 *gUnknown_203B184; #include "data/other_menus2.h" @@ -263,7 +263,7 @@ s32 sub_8037D64(u32 mode, void * param_2, void *param_3) sub_800D494(); sub_8037C44(mode, param_2); - while (1) { + while (TRUE) { sub_80373C4(); iVar2 = sub_800D33C(); sub_800D570(); @@ -578,7 +578,7 @@ s32 sub_80381F4(u32 mode, void *param_2, void *param_3) sub_800D494(); sub_800D59C(&linkStatus, 4); - while (1) { + while (TRUE) { sub_80373C4(); iVar2 = sub_800D33C(); sub_800D570(); diff --git a/src/other_random.c b/src/other_random.c index 922de5d17..f2faabb9d 100644 --- a/src/other_random.c +++ b/src/other_random.c @@ -12,9 +12,9 @@ static s32 OtherRandom16(void) } // arm9.bin::020127DC -s32 OtherRandInt(s32 cap) +s32 OtherRandInt(s32 exclusiveMax) { - return (OtherRandom16() * cap) >> 16; + return (OtherRandom16() * exclusiveMax) >> 16; } // arm9.bin::020127C4 diff --git a/src/party_list_menu.c b/src/party_list_menu.c index 629e8ce1e..531336b28 100644 --- a/src/party_list_menu.c +++ b/src/party_list_menu.c @@ -393,7 +393,7 @@ static void PartyListMenu_CreateMenu1(void) } loopMax += 1; - if(sub_80023E4(8) && !pokeStruct->isTeamLeader) + if(CheckQuest(QUEST_CAN_CHANGE_LEADER) && !pokeStruct->isTeamLeader) { sUnknown_203B2B8->unk16C[loopMax].text = sPartyMenuMakeLeader; sUnknown_203B2B8->unk16C[loopMax].menuAction = PARTY_LIST_MENU_MAKE_LEADER; @@ -552,7 +552,7 @@ static void PartyListMenu_HandleMenu1(void) break; case PARTY_LIST_MENU_MAKE_LEADER: newLeader = &gRecruitedPokemonRef->pokemon[sUnknown_203B2B8->pokeSpecies]; - playerPokemon = GetPlayerPokemonStruct(); + playerPokemon = GetLeaderMon1(); if (!newLeader->isTeamLeader) { playerPokemon->isTeamLeader = FALSE; @@ -860,7 +860,7 @@ static bool8 sub_8026E88(Pokemon *r0) { flag = (r0->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER); if(flag) - if(!sub_80023E4(0x8)) + if(!CheckQuest(QUEST_CAN_CHANGE_LEADER)) return FALSE; } else @@ -871,14 +871,14 @@ static bool8 sub_8026E88(Pokemon *r0) static bool8 sub_8026EB8(Pokemon *r0) { bool8 flag; - if(sub_808D3BC() != r0) - if(sub_808D3F8() != r0) + if(GetLeaderMon2() != r0) + if(GetPartnerMon2() != r0) if(!r0->isTeamLeader) { flag = (r0->dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER); if(flag) { - if(sub_80023E4(0x8)) + if(CheckQuest(QUEST_CAN_CHANGE_LEADER)) goto check; } else diff --git a/src/personality_test2.c b/src/personality_test2.c index 12183e53e..8186fbf3b 100644 --- a/src/personality_test2.c +++ b/src/personality_test2.c @@ -143,22 +143,30 @@ static void PersonalityTest_DisplayPartnerSprite(void) { s32 partnerID; struct OpenedFile *faceFile; - s32 paletteIndex; const u8 *gfx; s32 emotionId; + s32 i; partnerID = gUnknown_203B404->PartnerArray[gUnknown_203B404->s18.m.input.menuIndex]; + CallPrepareTextbox_8008C54(1); sub_80073B8(1); + faceFile = GetDialogueSpriteDataPtr(partnerID); - gfx = ((PortraitGfx *)(faceFile->data))->sprites[EMOTION_NORMAL].gfx; +#define FACE_DATA ((PortraitGfx *)faceFile->data) + + gfx = FACE_DATA->sprites[EMOTION_NORMAL].gfx; emotionId = EMOTION_NORMAL; - for (paletteIndex = 0; paletteIndex < 0x10; paletteIndex++) { - SetBGPaletteBufferColorArray(paletteIndex + 0xE0, &((PortraitGfx *)(faceFile->data))->sprites[emotionId].pal[paletteIndex]); + + for (i = 0; i < 16; i++) { + SetBGPaletteBufferColorArray(i + 0xE0, &FACE_DATA->sprites[emotionId].pal[i]); } DisplayMonPortraitSpriteFlipped(1, gfx, 14); + +#undef FACE_DATA CloseFile(faceFile); + sub_80073E0(1); gUnknown_203B404->unk16 = 1; } diff --git a/src/pokemon.c b/src/pokemon.c index 58440da1e..60a99479d 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -121,7 +121,7 @@ void CreateLeaderPartnerData(s16 _species, bool32 _isLeader, u8* name) if (speciesFriendArea == friendArea) { gRecruitedPokemonRef->pokemon[i] = pokemon; gFriendAreas[speciesFriendArea] = TRUE; - sub_80980B4(species); + SetMonSeenFlag(species); break; } } @@ -245,7 +245,7 @@ Pokemon *TryAddPokemonToRecruited(Pokemon *pokemon) if (speciesFriendArea == friendArea) { gRecruitedPokemonRef->pokemon[i] = *pokemon; gRecruitedPokemonRef->pokemon[i].flags &= ~(POKEMON_FLAG_x4000); - sub_80980B4(pokemon->speciesNum); + SetMonSeenFlag(pokemon->speciesNum); return &gRecruitedPokemonRef->pokemon[i]; } } @@ -283,63 +283,67 @@ Pokemon *TryAddLevel1PokemonToRecruited(s32 species, u8 *name, u32 _itemID, cons void TryResetPokemonFlags(Pokemon *pokemon) { - if ((!IsMonTeamLeader(pokemon)) && !IsMonPartner(pokemon)) - pokemon->flags = 0; + if (!IsMonTeamLeader(pokemon) && !IsMonPartner(pokemon)) + pokemon->flags = 0; } -Pokemon * GetPlayerPokemonStruct(void) +Pokemon *GetLeaderMon1(void) { - s32 index; + s32 i; - for(index = 0; index < NUM_MONSTERS; index++) - { - if(((PokemonExists(&gRecruitedPokemonRef->pokemon[index])))){ - if(IsMonTeamLeader(&gRecruitedPokemonRef->pokemon[index])) { - return &gRecruitedPokemonRef->pokemon[index]; + for (i = 0; i < NUM_MONSTERS; i++) { + if (PokemonExists(&gRecruitedPokemonRef->pokemon[i])){ + if (IsMonTeamLeader(&gRecruitedPokemonRef->pokemon[i])) { + return &gRecruitedPokemonRef->pokemon[i]; } } } + return NULL; } -Pokemon * GetPartnerPokemonStruct(void) +Pokemon *GetPartnerMon(void) { - s32 index; + s32 i; - for(index = 0; index < NUM_MONSTERS; index++) - { - if(((PokemonExists(&gRecruitedPokemonRef->pokemon[index])))){ - if(IsMonPartner(&gRecruitedPokemonRef->pokemon[index])) { - return &gRecruitedPokemonRef->pokemon[index]; + for (i = 0; i < NUM_MONSTERS; i++) { + if (PokemonExists(&gRecruitedPokemonRef->pokemon[i])){ + if (IsMonPartner(&gRecruitedPokemonRef->pokemon[i])) { + return &gRecruitedPokemonRef->pokemon[i]; } } } + return NULL; } -Pokemon * sub_808D3BC(void) +Pokemon *GetLeaderMon2(void) { - s32 index; - for (index = 0; index < NUM_MONSTERS; index++) { - if (PokemonExists(&gRecruitedPokemonRef->pokemon[index]) - && (gRecruitedPokemonRef->pokemon[index].dungeonLocation.id == DUNGEON_JOIN_LOCATION_LEADER)) + s32 i; + + for (i = 0; i < NUM_MONSTERS; i++) { + if (PokemonExists(&gRecruitedPokemonRef->pokemon[i]) + && (gRecruitedPokemonRef->pokemon[i].dungeonLocation.id == DUNGEON_JOIN_LOCATION_LEADER)) { - return &gRecruitedPokemonRef->pokemon[index]; + return &gRecruitedPokemonRef->pokemon[i]; } } + return NULL; } -Pokemon * sub_808D3F8(void) +Pokemon *GetPartnerMon2(void) { - s32 index; - for (index = 0; index < NUM_MONSTERS; index++) { - if (PokemonExists(&gRecruitedPokemonRef->pokemon[index]) - && (gRecruitedPokemonRef->pokemon[index].dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)) + s32 i; + + for (i = 0; i < NUM_MONSTERS; i++) { + if (PokemonExists(&gRecruitedPokemonRef->pokemon[i]) + && (gRecruitedPokemonRef->pokemon[i].dungeonLocation.id == DUNGEON_JOIN_LOCATION_PARTNER)) { - return &gRecruitedPokemonRef->pokemon[index]; + return &gRecruitedPokemonRef->pokemon[i]; } } + return NULL; } diff --git a/src/pokemon_mail.c b/src/pokemon_mail.c index 8235eeddb..fd1e9ea59 100644 --- a/src/pokemon_mail.c +++ b/src/pokemon_mail.c @@ -413,10 +413,10 @@ bool8 sub_803C110(s16 index) species_s32 = (s32)index; - if (!sub_8098134(index) || index != GetBaseSpecies(index) || !sub_803C0DC(index)) + if (!GetMonSeenFlag(index) || index != GetBaseSpecies(index) || !sub_803C0DC(index)) return FALSE; - if (!sub_80023E4(6)) { + if (!CheckQuest(QUEST_REACHED_POSTGAME)) { psVar5 = &gUnknown_80E8126[0]; // TODO: Un-ugly this if (*psVar5 != MONSTER_NONE) { psVar6 = &gUnknown_80E8126[0]; @@ -428,10 +428,10 @@ bool8 sub_803C110(s16 index) } while (*psVar5 != MONSTER_NONE); } - pokeStruct = GetPlayerPokemonStruct(); + pokeStruct = GetLeaderMon1(); if (pokeStruct->speciesNum == species_s32) return FALSE; - pokeStruct = GetPartnerPokemonStruct(); + pokeStruct = GetPartnerMon(); if (pokeStruct->speciesNum == species_s32) return FALSE; } diff --git a/src/pokemon_news2.c b/src/pokemon_news2.c index 1c7a5e12a..40061166b 100644 --- a/src/pokemon_news2.c +++ b/src/pokemon_news2.c @@ -143,7 +143,7 @@ static void sub_802BC08(void) void sub_802BC7C(void) { - PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], sub_808D3BC()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetLeaderMon2()); if (gGameOptionsRef->playerGender == FEMALE) strcpy(gFormatBuffer_Monsters[1], sShe); diff --git a/src/pokemon_news3.c b/src/pokemon_news3.c index e18c2be7b..06abe4459 100644 --- a/src/pokemon_news3.c +++ b/src/pokemon_news3.c @@ -141,7 +141,7 @@ void CreateMailMenu(void) if (mail->mailType == MAIL_TYPE_UNK1) { y = GetMenuEntryYCoord(&sUnknown_203B2D8->unk4.m.input, i); sub_803B6B0(10, y, 6, sUnknown_203B2D8->unk4.m.menuWinId); - PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetPlayerPokemonStruct()); + PrintPokeNameToBuffer(gFormatBuffer_Monsters[0], GetLeaderMon1()); sprintfStatic(buffer, GetPokemonMailHeadline(mail->dungeonSeed.location.floor), gFormatBuffer_Monsters[0]); PrintStringOnWindow(21, y, buffer, sUnknown_203B2D8->unk4.m.menuWinId, 0); } diff --git a/src/pokemon_summary_window.c b/src/pokemon_summary_window.c index ddca7da7e..dea9302e0 100644 --- a/src/pokemon_summary_window.c +++ b/src/pokemon_summary_window.c @@ -22,143 +22,160 @@ void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, struct MonSummaryI s32 j; sub_80073B8(windowId); - strncpy(gFormatBuffer_Monsters[0],monInfo->nameBuffer,0x14); - y = 0x20; + strncpy(gFormatBuffer_Monsters[0], monInfo->nameBuffer, 20); + + y = 32; + switch (which) { - case SUB_WINDOW_NONE: + case SUB_WINDOW_NONE: { break; + } case SUB_WINDOW_STATS: { const u8 *str; s32 iVar8; LevelData levelData; - PrintFormattedStringOnWindow(currSubWindowId * 8 + 0x10,0,_("Stats"),windowId,'\0'); + PrintFormattedStringOnWindow((currSubWindowId * 8) + 16, 0, _("Stats"), windowId, '\0'); + gFormatArgs[0] = monInfo->level; gFormatArgs[1] = monInfo->exp; - PrintFormattedStringOnWindow(4,y,gText_LevelUnkMacro,windowId,'\0'); - y += 0xA; - PrintFormattedStringOnWindow(4,y,gText_ExpPtsUnkMacro,windowId,'\0'); - y += 0xA; + PrintFormattedStringOnWindow(4, y, gText_LevelUnkMacro, windowId, '\0'); + + y += 10; + PrintFormattedStringOnWindow(4, y,gText_ExpPtsUnkMacro, windowId, '\0'); + + y += 10; if (monInfo->level < 100) { - GetLvlUpEntry(&levelData,monInfo->species,monInfo->level + 1); + GetLvlUpEntry(&levelData, monInfo->species, monInfo->level + 1); gFormatArgs[0] = levelData.expRequired - monInfo->exp; - PrintFormattedStringOnWindow(4,y,gText_ToNextLevel,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, gText_ToNextLevel, windowId, '\0'); } - y += 0xC; + + y += 12; gFormatArgs[0] = monInfo->HP1; gFormatArgs[1] = monInfo->HP2; - PrintFormattedStringOnWindow(4,y,gUnknown_810DDD0,windowId,'\0'); - y += 0xA; - PrintFormattedStringOnWindow(4,y,gUnknown_810DDE4,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, gUnknown_810DDD0, windowId, '\0'); + + y += 10; + PrintFormattedStringOnWindow(4, y, gUnknown_810DDE4, windowId, '\0'); + str = gUnknown_810DE0C; gFormatArgs[0] = monInfo->offense.att[0]; if (monInfo->atkBoost != 0) { - gFormatArgs[0] = gFormatArgs[0] + monInfo->atkBoost; + gFormatArgs[0] += monInfo->atkBoost; str = gUnknown_810DE20; } - PrintFormattedStringOnWindow(4,y,str,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, str, windowId, '\0'); + if (monInfo->defBoost != 0) { gFormatArgs[0] = monInfo->offense.def[0] + monInfo->defBoost; - PrintFormattedStringOnWindow(4,y,gUnknown_810DE4C,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE4C, windowId, '\0'); } else { gFormatArgs[0] = monInfo->offense.def[0]; - PrintFormattedStringOnWindow(4,y,gUnknown_810DE38,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE38, windowId, '\0'); } - y += 0xA; - PrintFormattedStringOnWindow(4,y,gUnknown_810DDFC,windowId,'\0'); + + y += 10; + PrintFormattedStringOnWindow(4, y, gUnknown_810DDFC, windowId, '\0'); + str = gUnknown_810DE24; gFormatArgs[0] = monInfo->offense.att[1]; if (monInfo->spAtkBoost != 0) { - gFormatArgs[0] = gFormatArgs[0] + monInfo->spAtkBoost; + gFormatArgs[0] += monInfo->spAtkBoost; str = gUnknown_810DE28; } - PrintFormattedStringOnWindow(4,y,str,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, str, windowId, '\0'); + if (monInfo->spDefBoost != 0) { gFormatArgs[0] = monInfo->offense.def[1] + monInfo->spDefBoost; - PrintFormattedStringOnWindow(4,y,gUnknown_810DE54,windowId,'\0'); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE54, windowId, '\0'); } else { gFormatArgs[0] = monInfo->offense.def[1]; - PrintFormattedStringOnWindow(4,y,gUnknown_810DE50,windowId,'\0'); - } - y += 0xA; - if (ItemExists(&monInfo->item)) { - sub_8090E14(gFormatBuffer_Items[0],&monInfo->item,0); - } - else { - strcpy(gFormatBuffer_Items[0],gUnknown_810DE58); - } - PrintFormattedStringOnWindow(4,y,gUnknown_810DE6C,windowId,'\0'); - y += 0xC; - gFormatArgs[0] = monInfo->IQ; - iVar8 = monInfo->IQ / 10; - if (iVar8 < 0) { - iVar8 = 0; - } - if (0x62 < iVar8) { - iVar8 = 99; + PrintFormattedStringOnWindow(4, y, gUnknown_810DE50, windowId, '\0'); } - InlineStrcpy(gFormatBuffer_Monsters[0],gUnknown_8115718[iVar8]); - PrintFormattedStringOnWindow(4,y,gUnknown_810DE80,windowId,'\0'); - y += 0xA; - if (!monInfo->isTeamLeader) - { - CopyTacticsNameToBuffer(gFormatBuffer_Monsters[0],monInfo->tactic); - PrintFormattedStringOnWindow(4,y,gUnknown_810DE98,windowId,'\0'); + y += 10; + if (ItemExists(&monInfo->item)) + sub_8090E14(gFormatBuffer_Items[0], &monInfo->item, NULL); + else + strcpy(gFormatBuffer_Items[0], gUnknown_810DE58); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE6C, windowId, '\0'); + + y += 12; + gFormatArgs[0] = monInfo->IQ; + //iVar8 = clamp(monInfo->IQ / 10, 0, 99); + iVar8 = monInfo->IQ / 10; + if (iVar8 < 0) + iVar8 = 0; + if (iVar8 >= 99) + iVar8 = 99; + InlineStrcpy(gFormatBuffer_Monsters[0], gUnknown_8115718[iVar8]); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE80, windowId, '\0'); + + y += 10; + if (!monInfo->isTeamLeader) { + CopyTacticsNameToBuffer(gFormatBuffer_Monsters[0], monInfo->tactic); + PrintFormattedStringOnWindow(4, y, gUnknown_810DE98, windowId, '\0'); } - y += 0xA; + + y += 10; break; } case SUB_WINDOW_FEATUERS: { - PrintFormattedStringOnWindow(currSubWindowId * 8 + 0x10,0,_("Features"),windowId,'\0'); - PrintFormattedStringOnWindow(4,y,_("Type:"),windowId,'\0'); - PrintFormattedStringOnWindow(0x38,y,GetFormattedTypeString(monInfo->types[0]),windowId,'\0'); - if (monInfo->types[1] != TYPE_NONE) { - PrintFormattedStringOnWindow(0x60,y,GetFormattedTypeString(monInfo->types[1]),windowId,'\0'); - } - y += 0xC; - PrintFormattedStringOnWindow(4,y,_("Special Abilities:"),windowId,'\0'); - y += 0xC; - PrintFormattedStringOnWindow2(4,y,GetAbilityDescription(monInfo->abilities[0]),windowId,'\0',0xb); - y += 0x21; - if (monInfo->abilities[1] != ABILITY_UNKNOWN) { - PrintFormattedStringOnWindow2(4,y,GetAbilityDescription(monInfo->abilities[1]),windowId,'\0',0xb); - } + PrintFormattedStringOnWindow((currSubWindowId * 8) + 16, 0, _("Features"), windowId, '\0'); + + PrintFormattedStringOnWindow(4, y, _("Type:"), windowId, '\0'); + + PrintFormattedStringOnWindow(56, y, GetFormattedTypeString(monInfo->types[0]), windowId, '\0'); + + if (monInfo->types[1] != TYPE_NONE) + PrintFormattedStringOnWindow(96, y, GetFormattedTypeString(monInfo->types[1]), windowId, '\0'); + + y += 12; + PrintFormattedStringOnWindow(4, y, _("Special Abilities:"), windowId, '\0'); + + y += 12; + PrintFormattedStringOnWindow2(4, y, GetAbilityDescription(monInfo->abilities[0]), windowId, '\0', 11); + + y += 33; + if (monInfo->abilities[1] != ABILITY_UNKNOWN) + PrintFormattedStringOnWindow2(4, y, GetAbilityDescription(monInfo->abilities[1]), windowId, '\0', 11); + break; } case SUB_WINDOW_STATUS: { s32 iVar11; bool8 bVar10; - PrintFormattedStringOnWindow(currSubWindowId * 8 + 0x10,0,gUnknown_810DD58,windowId,'\0'); + PrintFormattedStringOnWindow((currSubWindowId * 8) + 16, 0, gUnknown_810DD58, windowId, '\0'); + iVar11 = monInfo->unk56 - 1; - y -= 0xC; + y -= 12; bVar10 = FALSE; - for (i = 0; i < 9; i++) { + for (i = 0; i < 9; i++) param_4->unkC[i] = 0; - } - for (j = 0; j < 10; j++, iVar11++, y += 0xC) { - if (-1 < iVar11) { - if (0xb < iVar11) + for (j = 0; j < 10; j++, iVar11++, y += 12) { + if (iVar11 > -1) { + if (iVar11 >= 12) break; + if (monInfo->unk58[iVar11] != 0) { bVar10 = TRUE; - InlineStrncpy(gFormatBuffer_Items[1],gStatusNames[monInfo->unk58[iVar11]],0x50); - PrintFormattedStringOnWindow(0xc,y,_("{MOVE_ITEM_1}"),windowId,'\0'); - if (0 < j) { + InlineStrncpy(gFormatBuffer_Items[1], gStatusNames[monInfo->unk58[iVar11]], 80); + PrintFormattedStringOnWindow(12, y, _("{MOVE_ITEM_1}"), windowId, '\0'); + if (0 < j) param_4->unkC[j - 1] = monInfo->unk58[iVar11]; - } } } } - if (!bVar10) { - PrintFormattedStringOnWindow(0xc,0x20,gUnknown_810DF78,windowId,'\0'); - } + if (!bVar10) + PrintFormattedStringOnWindow(12, 32, gUnknown_810DF78, windowId, '\0'); + break; } case SUB_WINDOW_IQ: { @@ -234,7 +251,7 @@ void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, struct MonSummaryI sub_80073E0(windowId); } -void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 param_3) +void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 unlockedEvolutions) { s32 index; @@ -284,15 +301,13 @@ void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool dst->unk44[0] = pokemon->unkC[0]; dst->unk44[1] = pokemon->unkC[1]; dst->IQSkills = pokemon->IQSkills; - if (param_3) { - dst->evoStringId = GetMonSummaryScreenEvoStringId(pokemon); - } - else { - dst->evoStringId = EVO_STRING_EMPTY; - } - for(index = 0; index < 0xC; index++) - { + if (unlockedEvolutions) + dst->evoStringId = GetMonSummaryScreenEvoStringId(pokemon); + else + dst->evoStringId = EVO_STRING_EMPTY; + + for (index = 0; index < MON_SUMMARY_UNK58_COUNT; index++) { dst->unk58[index] = 0; } } diff --git a/src/post_office_guide2.c b/src/post_office_guide2.c index 99ad55e6b..d0ec1d39e 100644 --- a/src/post_office_guide2.c +++ b/src/post_office_guide2.c @@ -30,10 +30,10 @@ static void DisplayMissionObjectives(void); static void sub_8031A2C(void); static void sub_8031A84(void); -bool8 sub_80319A4(u8 param_1, u8 dungeon, s32 param_3) +bool8 sub_80319A4(u8 dungeonMissionKind, u8 dungeon, s32 param_3) { sUnknown_203B330 = MemoryAlloc(sizeof(unkStruct_203B330), 8); - sUnknown_203B330->unkC = param_1; + sUnknown_203B330->dungeonMissionKind = dungeonMissionKind; sUnknown_203B330->dungeonIndex = dungeon; ResetTouchScreenMenuInput(&sUnknown_203B330->input); sUnknown_203B330->unk10 = param_3; @@ -80,7 +80,7 @@ static void sub_8031A84(void) RestoreSavedWindows(&sUnknown_203B330->unk18); sUnknown_203B330->unk18.id[sUnknown_203B330->unk10] = sUnknown_80E1F18; - if (sUnknown_203B330->unkC == 2) { + if (sUnknown_203B330->dungeonMissionKind == DUNGEON_MISSION_ACCEPTEDJOB_RELATED) { jobs = CountJobsinDungeon(sUnknown_203B330->dungeonIndex); if (jobs == 0) jobs = 1; @@ -94,23 +94,16 @@ static void sub_8031A84(void) static void DisplayMissionObjectives(void) { - s32 yCoord; - s32 jobSlotIdx; - unkStruct_203B480 *mail; - WonderMail *jobInfo; - u8 buffer[100]; - volatile u8 local_94; - u8 buffer1[100]; - s16 auStack44; - s16 missionIndex; - u8 local_test; - sub_80073B8(sUnknown_203B330->unk10); // Objectives PrintStringOnWindow(10, 0, sObjectives, sUnknown_203B330->unk10, 0); - switch (sUnknown_203B330->unkC) { - case 1: + switch (sUnknown_203B330->dungeonMissionKind) { + case DUNGEON_MISSION_OUTONRESCUE: { + unkStruct_203B480 *mail; + u8 buffer[100]; + volatile u8 local_94; + sub_8099394((u8*)&local_94); mail = GetMailatIndex(local_94); sub_803B6B0(10, 16, 3, sUnknown_203B330->unk10); @@ -121,15 +114,18 @@ static void DisplayMissionObjectives(void) sprintfStatic(buffer,sFmtRescue,GetMonSpecies(mail->clientSpecies)); PrintStringOnWindow(40, 16, buffer, sUnknown_203B330->unk10, 0); break; - case 2: + } + case DUNGEON_MISSION_ACCEPTEDJOB_RELATED: { if (CountJobsinDungeon(sUnknown_203B330->dungeonIndex) == 0) PrintStringOnWindow(10, 16, sJustGo, sUnknown_203B330->unk10, 0); else { - yCoord = 16; + s32 yCoord = 16; + s32 jobSlotIdx; + u8 buffer1[100]; // 8 Job Slots... check each of them for (jobSlotIdx = 0; jobSlotIdx < MAX_ACCEPTED_JOBS; jobSlotIdx++) { - jobInfo = GetJobSlotInfo(jobSlotIdx); + WonderMail *jobInfo = GetJobSlotInfo(jobSlotIdx); if (jobInfo->dungeonSeed.location.id == sUnknown_203B330->dungeonIndex && jobInfo->mailType != 0 @@ -168,16 +164,22 @@ static void DisplayMissionObjectives(void) } } break; - case 3: - case 0: - default: - if (sub_80992E0(&auStack44, &missionIndex)) - PrintStringOnWindow(10, 16, GetCurrentMissionText(missionIndex), sUnknown_203B330->unk10, 0); + } + case DUNGEON_MISSION_UNK3: + case DUNGEON_MISSION_UNK0: + default: { + s16 auStack44; + s16 rescueDungeonId; + u8 local_test; + + if (sub_80992E0(&auStack44, &rescueDungeonId)) + PrintStringOnWindow(10, 16, GetCurrentMissionText(rescueDungeonId), sUnknown_203B330->unk10, 0); else if (sub_8099360(&local_test) != 0) PrintStringOnWindow(10, 16, sub_80975DC(sub_80A2688(local_test)), sUnknown_203B330->unk10, 0); else PrintStringOnWindow(10, 16, sRedQuestionMarks, sUnknown_203B330->unk10, 0); break; + } } sub_80073E0(sUnknown_203B330->unk10); diff --git a/src/pounce_orb.c b/src/pounce_orb.c index 5f94399aa..9deda5b57 100644 --- a/src/pounce_orb.c +++ b/src/pounce_orb.c @@ -38,12 +38,12 @@ void HandlePounceOrb(Entity *pokemon, Entity *target, u8 r2) if(AbilityIsActive(target, ABILITY_SUCTION_CUPS)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0); - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCB98); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCB98); return; } if(IsCurrentFixedRoomBossFight()) { - TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FC9C0); + TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FC9C0); return; } if(direction == NUM_DIRECTIONS) @@ -51,7 +51,7 @@ void HandlePounceOrb(Entity *pokemon, Entity *target, u8 r2) sub_806CDD4(target, 6, direction); - while (1) + while (TRUE) { pos.x = target->pos.x + gAdjacentTileOffsets[direction].x; pos.y = target->pos.y + gAdjacentTileOffsets[direction].y; @@ -83,6 +83,6 @@ void HandlePounceOrb(Entity *pokemon, Entity *target, u8 r2) } sub_806A5B8(target); - TryTriggerMonsterHouseWithMsg(target, gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(target, gDungeon->forceMonsterHouse); } } diff --git a/src/reg_control.c b/src/reg_control.c index 17fdb8f17..38cbfe0ae 100644 --- a/src/reg_control.c +++ b/src/reg_control.c @@ -165,7 +165,7 @@ UNUSED static s32 sub_800B720(s32 a0, IntrCallback a1) asS16 = (s16) a0; sp4 = DisableInterrupts(); - while (1) { + while (TRUE) { bool8 sp10 = FALSE; for (i = 0, strPtr = gUnknown_202D608; i < gUnknown_203B0AA; i++, strPtr++) { if (strPtr->unk0 == gUnknown_203B0A8) { diff --git a/src/rescue_password_menu.c b/src/rescue_password_menu.c index fb57bff21..bb9a9422d 100644 --- a/src/rescue_password_menu.c +++ b/src/rescue_password_menu.c @@ -705,6 +705,6 @@ void sub_80391F8(void) if (gRescuePasswordMenu->unk210 & 8) AddSprite(&gRescuePasswordMenu->unk208, 0x100, NULL, NULL); - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); gRescuePasswordMenu->unk210++; } diff --git a/src/rescue_scenario.c b/src/rescue_scenario.c index 1746637d1..b45418574 100644 --- a/src/rescue_scenario.c +++ b/src/rescue_scenario.c @@ -6,51 +6,48 @@ #include "exclusive_pokemon.h" #include "code_80958E8.h" #include "code_80A26CC.h" -#include "constants/rescue_dungeon_id.h" -// size: 0x8 +// Size: R=0x8 | B=0x6 typedef struct MissionText { /* 0x0 */ const u8 *text; - u8 unk4; - u8 unk5; - u8 unk6; - u8 unk7; + /* 0x4 */ u8 cutsceneFlag1; // See enum "CutsceneFlagID" + /* 0x5 */ u8 cutsceneFlag2; // See enum "CutsceneFlagID" } MissionText; -static const MissionText sStoryMissionText[] = { - { _("Rescue Caterpie."), -1, -1, 0, 0 }, - { _("Rescue Magnemite."), -1, -1, 0, 0 }, - { _("Rescue Diglett."), 0, 1, 0, 0 }, - { _("Rescue Metapod."), 2, 3, 0, 0 }, - { _("Rescue Jumpluff."), -1, -1, 0, 0 }, - { _("Rescue Shiftry."), 4, 5, 0, 0 }, - { _("Meet Xatu."), -1, -1, 0, 0 }, - { _("Fugitive"), -1, -1, 0, 0 }, - { _("Fugitive"), 6, 7, 0, 0 }, - { _("Fugitive"), 8, 9, 0, 0 }, - { _("Meet Ninetales."), -1, 10, 0, 0 }, - { _("Rescue Alakazam."), 11, 12, 0, 0 }, - { _("Seek Rayquaza's help."), 14, 15, 0, 0 }, - { _("{COLOR YELLOW_C}Scenario Progress Dummy{RESET}"), -1, -1, 0, 0 }, - { _("Punish bad Mankey."), 16, 17, 0, 0 }, - { _("Rescue Smeargle."), -1, 33, 0, 0 }, - { _("Explore seafloor."), -1, -1, 0, 0 }, - { _("Meet sea guardian."), -1, -1, 0, 0 }, - { _("Check mystery Pokémon."), -1, -1, 0, 0 }, - { _("Meet Xatu."), -1, -1, 0, 0 }, - { _("Mirage Pokémon 1"), 20, 21, 0, 0 }, - { _("Mirage Pokémon 2"), 22, 23, 0, 0 }, - { _("Mirage Pokémon 3"), 24, 25, 0, 0 }, - { _("Mirage Pokémon 4"), -1, 26, 0, 0 }, - { _("Meet toughest Pokémon."), 18, 19, 0, 0 }, - { _("Catch thief."), 27, 28, 0, 0 }, - { _("Rescue Latias."), -1, -1, 0, 0 }, - { _("Investigate Relic."), -1, -1, 0, 0 }, - { _("Rescue Medicham."), -1, 32, 0, 0 }, - { _("Meet Ninetales."), -1, -1, 0, 0 }, - { _("Break Gardevoir's curse."), -1, -1, 0, 0 }, - { NULL, -1, -1, 0, 0 }, +static const MissionText sStoryMissionText[NUM_STORY_MISSIONS + 1] = { + [RESCUE_DUNGEON_TINY_WOODS] = { _("Rescue Caterpie."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_THUNDERWAVE_CAVE] = { _("Rescue Magnemite."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_MT_STEEL] = { _("Rescue Diglett."), CUTSCENE_FLAG_MT_STEEL_REACHED, CUTSCENE_FLAG_MT_STEEL_COMPLETE }, + [RESCUE_DUNGEON_SINISTER_WOODS] = { _("Rescue Metapod."), CUTSCENE_FLAG_SINISTER_WOODS_REACHED, CUTSCENE_FLAG_SINISTER_WOODS_COMPLETE }, + [RESCUE_DUNGEON_SILENT_CHASM] = { _("Rescue Jumpluff."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_MT_THUNDER] = { _("Rescue Shiftry."), CUTSCENE_FLAG_MT_THUNDER_PEAK_REACHED, CUTSCENE_FLAG_MT_THUNDER_PEAK_COMPLETE }, + [RESCUE_DUNGEON_GREAT_CANYON] = { _("Meet Xatu."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_LAPIS_CAVE] = { _("Fugitive"), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_MT_BLAZE] = { _("Fugitive"), CUTSCENE_FLAG_MT_BLAZE_PEAK_REACHED, CUTSCENE_FLAG_MT_BLAZE_PEAK_COMPLETE }, + [RESCUE_DUNGEON_FROSTY_FOREST] = { _("Fugitive"), CUTSCENE_FLAG_FROSTY_GROTTO_REACHED, CUTSCENE_FLAG_FROSTY_GROTTO_COMPLETE }, + [RESCUE_DUNGEON_MT_FREEZE] = { _("Meet Ninetales."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_MT_FREEZE_PEAK_COMPLETE }, + [RESCUE_DUNGEON_MAGMA_CAVERN] = { _("Rescue Alakazam."), CUTSCENE_FLAG_MAGMA_CAVERN_PIT_REACHED, CUTSCENE_FLAG_MAGMA_CAVERN_PIT_COMPLETE }, + [RESCUE_DUNGEON_SKY_TOWER] = { _("Seek Rayquaza's help."), CUTSCENE_FLAG_SKY_TOWER_SUMMIT_REACHED, CUTSCENE_FLAG_SKY_TOWER_SUMMIT_COMPLETE }, + [RESCUE_DUNGEON_DUMMY] = { _("{COLOR YELLOW_C}Scenario Progress Dummy{RESET}"), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_UPROAR_FOREST] = { _("Punish bad Mankey."), CUTSCENE_FLAG_UPROAR_FOREST_REACHED, CUTSCENE_FLAG_UPROAR_FOREST_COMPLETE }, + [RESCUE_DUNGEON_HOWLING_FOREST] = { _("Rescue Smeargle."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_HOWLING_FOREST_COMPLETE }, + [RESCUE_DUNGEON_STORMY_SEA] = { _("Explore seafloor."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_SILVER_TRENCH] = { _("Meet sea guardian."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_METEOR_CAVE] = { _("Check mystery Pokémon."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_GREAT_CANYON_2] = { _("Meet Xatu."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_FIERY_FIELD] = { _("Mirage Pokémon 1"), CUTSCENE_FLAG_FIERY_FIELD_REACHED, CUTSCENE_FLAG_FIERY_FIELD_COMPLETE }, + [RESCUE_DUNGEON_LIGHTNING_FIELD] = { _("Mirage Pokémon 2"), CUTSCENE_FLAG_LIGHTNING_FIELD_REACHED, CUTSCENE_FLAG_LIGHTNING_FIELD_COMPLETE }, + [RESCUE_DUNGEON_NORTHWIND_FIELD] = { _("Mirage Pokémon 3"), CUTSCENE_FLAG_NORTHWIND_FIELD_REACHED, CUTSCENE_FLAG_NORTHWIND_FIELD_COMPLETE }, + [RESCUE_DUNGEON_MT_FARAWAY] = { _("Mirage Pokémon 4"), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_MT_FARAWAY_COMPLETE }, + [RESCUE_DUNGEON_WESTERN_CAVE] = { _("Meet toughest Pokémon."), CUTSCENE_FLAG_WESTERN_CAVE_REACHED, CUTSCENE_FLAG_WESTERN_CAVE_COMPLETE }, + [RESCUE_DUNGEON_NORTHERN_RANGE] = { _("Catch thief."), CUTSCENE_FLAG_NORTHERN_RANGE_REACHED, CUTSCENE_FLAG_NORTHERN_RANGE_COMPLETE }, + [RESCUE_DUNGEON_PITFALL_VALLEY] = { _("Rescue Latias."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_BURIED_RELIC] = { _("Investigate Relic."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_WISH_CAVE] = { _("Rescue Medicham."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_MEDICHAM_COMPLETE }, + [RESCUE_DUNGEON_MT_FREEZE_2] = { _("Meet Ninetales."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [RESCUE_DUNGEON_MURKY_CAVE] = { _("Break Gardevoir's curse."), CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, + [NUM_STORY_MISSIONS] = { NULL, CUTSCENE_FLAG_INVALID, CUTSCENE_FLAG_INVALID }, }; ALIGNED(4) const u8 gDummyScenarioText[] = _("{COLOR YELLOW_C}Scenario try dummy{RESET}"); @@ -71,101 +68,99 @@ bool8 sub_8097318(s16 param_1) { s32 param_1_s32 = param_1; - if (param_1_s32 == 0xd) + if (param_1_s32 == 13) return FALSE; - return GetScriptVarArrayValue(NULL,RESCUE_SCENARIO_ORDER_LIST, (u16) param_1_s32) != 0; + return GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_ORDER_LIST, (u16)param_1_s32) != 0; } -void sub_809733C(s16 param_1, u32 param_2) +void sub_809733C(s32 _rescueDungId, bool32 param_2) { - s32 uVar2; - u8 param_2_u8; - u16 uVar2_u16; + s32 param_1_s32 = (s16)_rescueDungId; + bool8 param_2_u8 = (bool8)param_2; - uVar2 = param_1; - param_2_u8 = param_2; + if (param_1_s32 != RESCUE_DUNGEON_DUMMY) { - if (uVar2 != 0xd) { - uVar2_u16 = uVar2; - if (GetScriptVarArrayValue(NULL,RESCUE_SCENARIO_JOB_LIST, (u16) uVar2_u16) == 0) { - SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_ORDER_LIST,uVar2_u16,param_2_u8); - if (param_2_u8) { - switch(uVar2) - { - case 0xE: - case 0xF: - case 0x1C: - GeneratePelipperJobs(); - break; + if (GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_JOB_LIST, (u16)param_1_s32) == 0) { + SetScriptVarArrayValue(NULL, RESCUE_SCENARIO_ORDER_LIST, (u16)param_1_s32, param_2_u8); + + if (param_2_u8) { + switch (param_1_s32) { + case RESCUE_DUNGEON_UPROAR_FOREST: + case RESCUE_DUNGEON_HOWLING_FOREST: + case RESCUE_DUNGEON_WISH_CAVE: + GeneratePelipperJobs(); + break; + } + } } - } } - } } -bool8 sub_8097384(s32 param_1) +bool8 sub_8097384(s32 rescueDungeon) { - s32 param1 = (s16) param_1; + s32 param1 = (s16)rescueDungeon; - if (param1 == RESCUE_DUNGEON_DUMMY) { + if (param1 == RESCUE_DUNGEON_DUMMY) return FALSE; - } - else { - return (GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_JOB_LIST, (u16) param1) != FALSE); + + return GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_JOB_LIST, (u16)param1) != FALSE; +} + +void sub_80973A8(s32 _rescueDungId, bool32 param_2) +{ + s32 rescueDungId = (s16)_rescueDungId; + bool8 param_2_u8 = (bool8)param_2; + + if (rescueDungId != RESCUE_DUNGEON_DUMMY) { + if (param_2_u8) { + s32 scriptDungeon = RescueDungeonToScriptDungeonId(_rescueDungId); + SetScriptVarArrayValue(NULL, RESCUE_SCENARIO_ORDER_LIST, (u16)rescueDungId, 0); + if (scriptDungeon != -1) + SetScriptVarValue(NULL, DUNGEON_SELECT, scriptDungeon); + } + + SetScriptVarArrayValue(NULL, RESCUE_SCENARIO_JOB_LIST, (u16)rescueDungId, param_2_u8); } } -void sub_80973A8(s32 param_1, u32 param_2) +bool8 RescueScenarioConquered(s32 rescueDungeonID_) { - s32 sVar1; - s32 param_1_s32 = (s16)param_1; - u8 param_2_u32 = param_2; + s32 rescueDungeonID = (s16) rescueDungeonID_; - if (param_1_s32 != 0xd) { - if (param_2_u32 != 0) { - sVar1 = RescueDungeonToScriptDungeonId(param_1); - SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_ORDER_LIST,(u16)param_1_s32,0); - if (sVar1 != -1) { - SetScriptVarValue(NULL,DUNGEON_SELECT,sVar1); - } - } - SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_JOB_LIST,(u16)param_1_s32,param_2_u32); - } -} - -bool8 RescueScenarioConquered(s32 param_1) -{ - s32 param1 = (s16) param_1; - - if (param1 == RESCUE_DUNGEON_DUMMY) { + if (rescueDungeonID == RESCUE_DUNGEON_DUMMY) return FALSE; - } - else { - return (GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_CONQUEST_LIST, (u16) param1) != FALSE); - } + + return (GetScriptVarArrayValue(NULL, RESCUE_SCENARIO_CONQUEST_LIST, (u16)rescueDungeonID) != FALSE); } -void sub_8097418(s32 index, bool32 param_2) +void SetRescueScenarioConquered(s32 rescueDungeonID_, bool32 conquered) { - int index_s32 = (s16)index; - bool8 param_2_u8 = param_2; - if (index_s32 != 0xd) { - if ((param_2_u8) && (SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_JOB_LIST,(u16)index_s32,0), index_s32 < 0x1f)) { - const MissionText *mt = &sStoryMissionText[index_s32]; - if (mt->unk4 != 0xFF) { - sub_8097FA8(mt->unk4); - } - if (mt->unk5 != 0xFF) { - sub_8097FA8(mt->unk5); - } - if (index_s32 == 9) { - sub_8097FA8(0x1f); - } - sub_8097FF8(); + s32 rescueDungeonID_s32 = (s16)rescueDungeonID_; + bool8 param_2_u8 = (bool8)conquered; + + if (rescueDungeonID_s32 != RESCUE_DUNGEON_DUMMY) { + if (param_2_u8) { + SetScriptVarArrayValue(NULL, RESCUE_SCENARIO_JOB_LIST, (u16)rescueDungeonID_s32, 0); + + if (rescueDungeonID_s32 < NUM_STORY_MISSIONS) { + const MissionText *mt = &sStoryMissionText[rescueDungeonID_s32]; + + if (mt->cutsceneFlag1 != CUTSCENE_FLAG_INVALID) + SetTempCutsceneFlag(mt->cutsceneFlag1); + + if (mt->cutsceneFlag2 != CUTSCENE_FLAG_INVALID) + SetTempCutsceneFlag(mt->cutsceneFlag2); + + if (rescueDungeonID_s32 == RESCUE_DUNGEON_FROSTY_FOREST) + SetTempCutsceneFlag(CUTSCENE_FLAG_FROSTY_FOREST_INTRUDED); + + FlushTempCutsceneFlags(); + } + } + + SetScriptVarArrayValue(NULL, RESCUE_SCENARIO_CONQUEST_LIST, (u16)rescueDungeonID_s32, param_2_u8); } - SetScriptVarArrayValue(NULL,RESCUE_SCENARIO_CONQUEST_LIST,(u16)index_s32,param_2_u8); - } } // These two are literally the same @@ -189,15 +184,12 @@ const u8 *GetRescueDungeonName(s16 rescueDungeonId) } } -const u8 *GetCurrentMissionText(s16 index) +const u8 *GetCurrentMissionText(s16 rescueDungeonId) { - if(index < 0x1F) - { - const MissionText *mt = &sStoryMissionText[index]; + if (rescueDungeonId < NUM_STORY_MISSIONS) { + const MissionText *mt = &sStoryMissionText[rescueDungeonId]; return mt->text; } - else - { - return gBlankMission; - } + + return gBlankMission; } diff --git a/src/rescue_team_info.c b/src/rescue_team_info.c index 25ebc8d81..3f511fa9d 100644 --- a/src/rescue_team_info.c +++ b/src/rescue_team_info.c @@ -127,7 +127,7 @@ u32 SaveRescueTeamInfo(u8 *param_1, u32 size) InitBitWriter(&auStack36, param_1, size); WriteBits(&auStack36, gRescueTeamInfoRef->teamName, 0x58); WriteBits(&auStack36, (u8 *)&gRescueTeamInfoRef->teamRankPts, 0x20); - gRescueTeamInfoRef->isTeamRenamed = sub_80023E4(0); + gRescueTeamInfoRef->isTeamRenamed = CheckQuest(QUEST_SET_TEAM_NAME); if (gRescueTeamInfoRef->isTeamRenamed) { diff --git a/src/run_dungeon.c b/src/run_dungeon.c index e92374441..775e2091f 100644 --- a/src/run_dungeon.c +++ b/src/run_dungeon.c @@ -110,7 +110,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) bool8 r9; bool8 r10; u8 sp; - RGB color; + RGB_Struct color; gUnknown_203B40C = 0; r6 = setupPtr->info.sub0.unk4; @@ -132,7 +132,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) gPlayerDotMapPosition.x = 100; if (!r6) { - gDungeon->unk644.unk34 = setupPtr->info.sub0.unkB; + gDungeon->unk644.missionKind = setupPtr->info.sub0.missionKind; gDungeon->unk644.dungeonSeed = setupPtr->info.dungeonSeed; gDungeon->unk644.windTurns = GetTurnLimit(setupPtr->info.sub0.unk0.id); gDungeon->unk644.windPhase = 0; @@ -140,11 +140,11 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } gDungeon->unk644.unk54 = 0; gDungeon->unk644.unk55 = 0; - gDungeon->unk644.unk18 = setupPtr->info.sub0.unk5; - gDungeon->unk644.unk16 = setupPtr->info.sub0.unk8; - gDungeon->unk644.canRecruit = setupPtr->info.sub0.unk6; - gDungeon->unk644.unk15 = setupPtr->info.sub0.unk7; - gDungeon->unk644.hasInventory = setupPtr->info.sub0.unk9; + gDungeon->unk644.canChangeLeader = setupPtr->info.sub0.canChangeLeader; + gDungeon->unk644.unlockedEvolutions = setupPtr->info.sub0.unlockedEvolutions; + gDungeon->unk644.canRecruit = setupPtr->info.sub0.canRecruit; + gDungeon->unk644.canRecruitRescueTeamMazeBosses = setupPtr->info.sub0.canRecruitRescueTeamMazeBosses; + gDungeon->unk644.hasInventory = setupPtr->info.sub0.hasInventory; gDungeon->unk644.unk19 = setupPtr->info.sub0.unkA; StopDungeonBGM(); sub_803D4AC(); @@ -174,7 +174,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) if (!r6) { gDungeon->unk181e8.allTilesRevealed = 1; gDungeon->unk181e8.unk1820C = 1; - if (gDungeon->unk644.unk34 == 1) { + if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { gDungeon->unk644.dungeonLocation.id = setupPtr->info.dungeonSeed.location.id; gDungeon->unk644.dungeonLocation.floor = 1; } @@ -186,7 +186,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) EnforceMaxItemsAndMoney(); } if (!r6) { - if (gDungeon->unk644.unk34 == 1) { + if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { gDungeon->unk644.unk38 = setupPtr->info.dungeonSeed.seed; } else { @@ -204,10 +204,10 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) if (r9) { gFormatArgs[0] = gDungeon->unk644.unk37; if (gFormatArgs[0] != 0) { - DisplayDungeonMessage(0, gUnknown_80FEC48, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FEC48, 1); } else { - DisplayDungeonMessage(0, gUnknown_80FEC7C, 1); + DisplayDungeonMessage_Async(0, gUnknown_80FEC7C, 1); } } @@ -223,21 +223,21 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } OpenDungeonPaletteFile(); - if (!r6 && gDungeon->unk644.unk34 == 1) { + if (!r6 && gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { if (sub_8099394(&sp)) { unkStruct_203B480 *mailStr = GetMailatIndex(sp); if (mailStr->rescuesAllowed) { gFormatArgs[0] = mailStr->rescuesAllowed; - DisplayDungeonMessage(0, gUnknown_81002B8, 1); + DisplayDungeonMessage_Async(0, gUnknown_81002B8, 1); } else { - DisplayDungeonMessage(0, gPtrFinalChanceMessage, 1); + DisplayDungeonMessage_Async(0, gPtrFinalChanceMessage, 1); } } } while (TRUE) { - sub_8098080(); + ClearTempCutsceneFlags(); nullsub_16(); sub_80521D0(); ResetMessageLog(); @@ -267,10 +267,10 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) SetFloorItemMonsterSpawns(); gDungeon->unk1 = 0; gDungeon->unk10 = 0; - gDungeon->unk2 = 0; + gDungeon->unk2 = DUNGEON_UNK2_0; gDungeon->unk4 = 0; gDungeon->unk11 = 0; - gDungeon->unk8 = 0; + gDungeon->unk8 = FALSE; gDungeon->unk3 = 0; gDungeon->unk6 = 0; gDungeon->noActionInProgress = FALSE; @@ -418,7 +418,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) gDungeon->unk5 = 0; if (!r6) { DisplayPreFightDialogue(); - if (gDungeon->unk4 != 0 || gDungeon->unk2 != 0) { + if (gDungeon->unk4 != 0 || gDungeon->unk2 != DUNGEON_UNK2_0) { gDungeon->unk5 = 1; } else { @@ -444,7 +444,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } else { sub_80427AC(); - TryTriggerMonsterHouseWithMsg(GetLeader(), gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(GetLeader(), gDungeon->forceMonsterHouse); sub_807EAA0(1, 0); } @@ -456,7 +456,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) gDungeon->unk181e8.unk18218 = 0; gDungeon->unk181e8.unk18219 = 1; do { - RunFractionalTurn(param); + RunFractionalTurn_Async(param); param = FALSE; } while (!IsFloorOver()); } @@ -467,7 +467,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } if (gDungeon->unk644.unk10 != 1) { - if (TryForcedLoss(TRUE)) { + if (TryForcedLoss_Async(TRUE)) { gDungeon->unk644.unk10 = 1; } } @@ -494,7 +494,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) DungeonFadeOutBGM(60); } - sub_803E708(4, 0x4F); + DungeonWaitFrames_Async(4, 0x4F); if (gDungeon->unk7 == 0) { sub_803E830(); } @@ -508,7 +508,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) gDungeon->unk181e8.unk18218 = 1; if ((GetForcedLossReason() == 2 || GetForcedLossReason() == 3) && gDungeon->unk6 != 0) { leader = GetLeader(); - DisplayDungeonMessage(0, gPtrClientFaintedMessage, 1); + DisplayDungeonMessage_Async(0, gPtrClientFaintedMessage, 1); gDungeon->unk6 = 0; SetUpDungeonExitData(DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader, leader); } @@ -565,7 +565,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) SetUpDungeonExitData(var, NULL, GetLeader()); check = TRUE; } - else if (gDungeon->unk644.unk34 == 1 && GetFloorType() == FLOOR_TYPE_RESCUE && gDungeon->unk644.unk10 == 2) { + else if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE && GetFloorType() == FLOOR_TYPE_RESCUE && gDungeon->unk644.unk10 == 2) { SetUpDungeonExitData(DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION, NULL, GetLeader()); if (gDungeon->unk644.stoleFromKecleon != 0) { IncrementThievingSuccesses(); @@ -578,13 +578,11 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } if (gDungeon->unk644.dungeonLocation.floor + 1 < gDungeon->unk1CEC8) { gDungeon->unk644.dungeonLocation.floor++; - if (gDungeon->unk644.dungeonLocation.id == DUNGEON_FROSTY_FOREST - && gDungeon->unk644.dungeonLocation.floor == 6 - && !sub_8098100(0x1F)) + if (gDungeon->unk644.dungeonLocation.id == DUNGEON_FROSTY_FOREST && gDungeon->unk644.dungeonLocation.floor == 6 && !GetCutsceneFlag(CUTSCENE_FLAG_FROSTY_FOREST_INTRUDED)) { - sub_8097FA8(0x1F); - sub_8086130(); - sub_8097FF8(); + SetTempCutsceneFlag(CUTSCENE_FLAG_FROSTY_FOREST_INTRUDED); + FrostyForestIntrusionCutscene_Async(); + FlushTempCutsceneFlags(); } // We go back to the loop's start. continue; @@ -608,12 +606,12 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) FAKEMATCH: gUnknown_203B40C = 0; setupPtr->info.unk7E = 0; - sub_8097FF8(); + FlushTempCutsceneFlags(); sub_80095CC(1, 0x14); sub_803E13C(); sub_800CDA8(4); - if (gDungeon->unk6 == 0 && sub_8083C88(gDungeon->unk644.unk34)) { - ShowDungeonClearedWindow(); + if (gDungeon->unk6 == 0 && sub_8083C88(gDungeon->unk644.missionKind)) { + ShowDungeonClearedWindow_Async(); } if (IsUnsuccessfulDungeonExit()) { @@ -630,10 +628,10 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr) } } else if (sub_8083C50()) { - if (gDungeon->unk644.unk34 == 1) { + if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE) { setupPtr->info.unk7C = 4; } - else if (gDungeon->unk644.unk34 == 0) { + else if (gDungeon->unk644.missionKind == DUNGEON_MISSION_UNK0) { setupPtr->info.unk7C = 1; sub_8084424(); } @@ -689,7 +687,7 @@ bool8 sub_8043CE4(s32 dungeonId) u8 GetFloorType(void) { - if (gDungeon->unk644.unk34 == 1 && gDungeon->unk644.dungeonSeed.location.floor == gDungeon->unk644.dungeonLocation.floor) + if (gDungeon->unk644.missionKind == DUNGEON_MISSION_OUTONRESCUE && gDungeon->unk644.dungeonSeed.location.floor == gDungeon->unk644.dungeonLocation.floor) return FLOOR_TYPE_RESCUE; else if (IsFloorwideFixedRoom()) return FLOOR_TYPE_FIXED; @@ -721,7 +719,7 @@ void sub_8043D60(void) unk = FALSE; if (unk) { - HandleFaint(mon, DUNGEON_EXIT_DEBUG_DAMAGE, mon); + HandleFaint_Async(mon, DUNGEON_EXIT_DEBUG_DAMAGE, mon); } } } @@ -765,7 +763,7 @@ void sub_8043D60(void) ClearAllItemsWithFlag(ITEM_FLAG_IN_SHOP); } -bool8 TryForcedLoss(bool8 a0) +bool8 TryForcedLoss_Async(bool8 a0) { bool8 ret = FALSE; @@ -777,10 +775,10 @@ bool8 TryForcedLoss(bool8 a0) if (EntityIsValid(leader)) { if (!a0) { strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); - DisplayDungeonMessage(0, gUnknown_80F89B4, 1); + DisplayDungeonMessage_Async(0, gUnknown_80F89B4, 1); } sub_8042B0C(leader); - HandleFaint(leader, DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER, leader); + HandleFaint_Async(leader, DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER, leader); ret = TRUE; } } @@ -789,10 +787,10 @@ bool8 TryForcedLoss(bool8 a0) if (EntityIsValid(leader)) { if (!a0) { strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); - DisplayDungeonMessage(0, gUnknown_80F89D4, 1); + DisplayDungeonMessage_Async(0, gUnknown_80F89D4, 1); } sub_8042B0C(leader); - HandleFaint(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader); + HandleFaint_Async(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader); ret = TRUE; } } @@ -801,10 +799,10 @@ bool8 TryForcedLoss(bool8 a0) if (EntityIsValid(leader)) { if (!a0) { strcpy(gFormatBuffer_Monsters[0], gDungeon->faintStringBuffer); - DisplayDungeonMessage(0, gUnknown_80F89D8, 1); + DisplayDungeonMessage_Async(0, gUnknown_80F89D8, 1); } sub_8042B0C(leader); - HandleFaint(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader); + HandleFaint_Async(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader); ret = TRUE; } } diff --git a/src/save.c b/src/save.c index b3f541dff..22b3ca4cb 100644 --- a/src/save.c +++ b/src/save.c @@ -33,7 +33,7 @@ EWRAM_DATA s32 gUnknown_202DE28 = {0}; EWRAM_INIT u32 gUnknown_203B17C = {0}; EWRAM_INIT const char *gUnknown_203B180 = {"POKE_DUNGEON__05"}; -EWRAM_INIT struct UnkStruct_203B184 *gUnknown_203B184 = {NULL}; +EWRAM_INIT UnkStruct_203B184 *gUnknown_203B184 = { NULL }; ALIGNED(4) static const char fill_save0[] = _("pksdir0"); ALIGNED(4) static const char fill_save1[] = _("pksdir0"); @@ -473,23 +473,23 @@ UNUSED static void nullsub_200(u32 r0) { } -UNUSED static void sub_8012334(struct UnkStruct_203B184 *r0) +UNUSED static void sub_8012334(UnkStruct_203B184 *data) { - gUnknown_203B184 = r0; - if (r0 != NULL) { - gTeamInventoryRef = r0->MoneyItems; - gRecruitedPokemonRef = r0->recruitedPokemon; - gUnknown_203B480 = r0->unk8; - gUnknown_203B484 = r0->unkC; - gUnknown_203B488 = r0->unk10; - gUnknown_203B48C = r0->unk14; - gUnknown_203B490 = r0->mailInfo; - gRescueTeamInfoRef = r0->RescueTeamInfo; - gUnknown_203B494 = r0->unk20; - gUnknown_203B498 = r0->ExclusivePokemon; - gFriendAreas = r0->BoughtFriendAreas; - gGameOptionsRef = r0->gameOptions; - gPlayTimeRef = r0->playTime; + gUnknown_203B184 = data; + if (data != NULL) { + gTeamInventoryRef = data->MoneyItems; + gRecruitedPokemonRef = data->recruitedPokemon; + gUnknown_203B480 = data->unk8; + gUnknown_203B484 = data->unkC; + gUnknown_203B488 = data->unk10; + gUnknown_203B48C = data->unk14; + gUnknown_203B490 = data->mailInfo; + gRescueTeamInfoRef = data->RescueTeamInfo; + gUnknown_203B494 = data->unk20; + gExclusiveMonPtr = data->exclusivePokemon; + gFriendAreas = data->BoughtFriendAreas; + gGameOptionsRef = data->gameOptions; + gPlayTimeRef = data->playTime; } else { gTeamInventoryRef = GetMoneyItemsInfo(); @@ -501,7 +501,7 @@ UNUSED static void sub_8012334(struct UnkStruct_203B184 *r0) gUnknown_203B490 = GetMailInfo(); gRescueTeamInfoRef = GetRescueTeamInfo(); gUnknown_203B494 = sub_8097680(); - gUnknown_203B498 = GetExclusivePokemon(); + gExclusiveMonPtr = GetExclusivePokemon(); gFriendAreas = GetBoughtFriendAreas(); gGameOptionsRef = GetGameOptions(); gPlayTimeRef = GetPlayTime(); diff --git a/src/script_item.c b/src/script_item.c index 14d6ee4dc..497009b62 100644 --- a/src/script_item.c +++ b/src/script_item.c @@ -9,8 +9,6 @@ #include "code_800D090.h" #include "textbox.h" -extern bool8 ScriptPrintText(s32 a0, s32 a1_, const char *text); - // These are only written to. struct ScriptItemsData { @@ -89,7 +87,7 @@ static bool8 TryAddItemWithText(const struct ItemWithQuantity *itemToAdd, const newMoneyAmount = gTeamInventoryRef->teamMoney + itemToAdd->quantity; if (newMoneyAmount > MAX_TEAM_MONEY) { if (maxMoneyStr != NULL) { - ScriptPrintText(0, -1, maxMoneyStr); + ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, -1, maxMoneyStr); } return FALSE; } @@ -104,7 +102,7 @@ static bool8 TryAddItemWithText(const struct ItemWithQuantity *itemToAdd, const sub_8090E14(buffer,&item,0); if (GetNumberOfFilledInventorySlots() >= INVENTORY_SIZE) { if (noItemSpaceStr != NULL) { - ScriptPrintText(0, -1, noItemSpaceStr); + ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, -1, noItemSpaceStr); } return FALSE; } @@ -115,8 +113,8 @@ static bool8 TryAddItemWithText(const struct ItemWithQuantity *itemToAdd, const if (itemGivenStr != NULL) { strcpy(gFormatBuffer_Items[0], buffer); - ScriptPrintText(0, -1, itemGivenStr); - PlaySoundWithVolume(0xcb,0x100); + ScriptPrintText(SCRIPT_TEXT_TYPE_INSTANT, -1, itemGivenStr); + PlaySoundWithVolume(0xcb, 0x100); } return TRUE; diff --git a/src/sprite.c b/src/sprite.c index 46a298941..812df38d2 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -28,7 +28,7 @@ EWRAM_INIT static unkStruct_20266B0 *sUnknown_203B074 = {0}; static void AxResInitUnoriented(axdata *, EfoFileData *, u32, u32, u32, bool8); static void RegisterSpriteParts_80052BC(const ax_sprite *spritesPtr); -static void sub_800561C(const EfoFileData *, s32 vramIdx, s32 brightness, const RGB *ramp); +static void sub_800561C(const EfoFileData *, s32 vramIdx, s32 brightness, const RGB_Struct *ramp); // arm9.bin::0200265C void InitSprites(void) @@ -603,13 +603,13 @@ void DoAxFrame_800558C(axdata *a0, s32 spriteX, s32 spriteY, u32 a3, u32 palette } // arm9.bin::020019E4 -void sub_8005610(OpenedFile *a0, s32 vramIdx, s32 brightness, const RGB *ramp) +void sub_8005610(OpenedFile *a0, s32 vramIdx, s32 brightness, const RGB_Struct *ramp) { sub_800561C((const EfoFileData *)a0->data, vramIdx, brightness, ramp); } // arm9.bin::02001970 -static void sub_800561C(const EfoFileData *a0, s32 vramIdx, s32 brightness, const RGB *ramp) +static void sub_800561C(const EfoFileData *a0, s32 vramIdx, s32 brightness, const RGB_Struct *ramp) { s32 i; @@ -623,14 +623,14 @@ static void sub_800561C(const EfoFileData *a0, s32 vramIdx, s32 brightness, cons } #if (GAME_VERSION == VERSION_RED) -UNUSED static const RGB *sub_8005668(OpenedFile *a0, s32 vramIdx) +UNUSED static const RGB_Struct *sub_8005668(OpenedFile *a0, s32 vramIdx) { return sub_8005674((const EfoFileData *)a0->data, vramIdx); } #endif // arm9.bin::0200193C -const RGB *sub_8005674(const EfoFileData *a0, s32 vramIdx) +const RGB_Struct *sub_8005674(const EfoFileData *a0, s32 vramIdx) { if (a0->tiles != NULL) CpuCopy(OBJ_VRAM0 + vramIdx * 0x20, a0->tiles, a0->tileCount * 0x20); @@ -696,14 +696,14 @@ void sub_8005700(DungeonPos *dstPos, axdata *axData) } #if (GAME_VERSION == VERSION_RED) -UNUSED static void sub_8005764(s32 a0, OpenedFile *file, s32 a2, const RGB *a3) +UNUSED static void sub_8005764(s32 a0, OpenedFile *file, s32 a2, const RGB_Struct *a3) { - sub_8005770(a0, (const RGB*)file->data, a2, a3); + sub_8005770(a0, (const RGB_Struct*)file->data, a2, a3); } #endif // arm9.bin::02001794 -void sub_8005770(s32 param_1, const RGB *color, s32 brightness, const RGB *ramp) +void sub_8005770(s32 param_1, const RGB_Struct *color, s32 brightness, const RGB_Struct *ramp) { s32 i; diff --git a/src/status_checks.c b/src/status_checks.c index 02e80e170..39035d91c 100644 --- a/src/status_checks.c +++ b/src/status_checks.c @@ -29,13 +29,13 @@ bool8 HasStatusThatPreventsActing(Entity *pokemon) switch (pokemonInfo->frozenClassStatus.status) { case STATUS_FROZEN: - LogMessageByIdWithPopupCheckUser(pokemon, gPtrFrozenMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrFrozenMessage); return TRUE; case STATUS_WRAP: - LogMessageByIdWithPopupCheckUser(pokemon, gPtrWrappedAroundMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrWrappedAroundMessage); return TRUE; case STATUS_WRAPPED: - LogMessageByIdWithPopupCheckUser(pokemon, gPtrWrappedByMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrWrappedByMessage); return TRUE; case STATUS_PETRIFIED: return TRUE; @@ -43,15 +43,15 @@ bool8 HasStatusThatPreventsActing(Entity *pokemon) switch (pokemonInfo->cringeClassStatus.status) { case STATUS_PAUSED: - LogMessageByIdWithPopupCheckUser(pokemon, gPtrPausedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrPausedMessage); return TRUE; case STATUS_INFATUATED: - LogMessageByIdWithPopupCheckUser(pokemon, gPtrInfatuatedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrInfatuatedMessage); return TRUE; } if (pokemonInfo->bideClassStatus.status == STATUS_BIDE) { - LogMessageByIdWithPopupCheckUser(pokemon, gPtrBideMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrBideMessage); return TRUE; } if (pokemonInfo->curseClassStatus.status == STATUS_DECOY) { @@ -106,20 +106,20 @@ bool8 sub_80701A4(Entity *pokemon) case STATUS_SLEEP: case STATUS_NIGHTMARE: case STATUS_NAPPING: - LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80F95EC); + LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80F95EC); return TRUE; } switch(pokemonInfo->frozenClassStatus.status) { case STATUS_FROZEN: - LogMessageByIdWithPopupCheckUser(pokemon,gPtrFrozenMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrFrozenMessage); return TRUE; case STATUS_WRAP: - LogMessageByIdWithPopupCheckUser(pokemon,gPtrWrappedAroundMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrWrappedAroundMessage); return TRUE; case STATUS_WRAPPED: - LogMessageByIdWithPopupCheckUser(pokemon,gPtrWrappedByMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrWrappedByMessage); return TRUE; case STATUS_PETRIFIED: return TRUE; @@ -130,10 +130,10 @@ bool8 sub_80701A4(Entity *pokemon) flag = TRUE; goto CRINGE_STATUS; case STATUS_PAUSED: - LogMessageByIdWithPopupCheckUser(pokemon,gPtrPausedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrPausedMessage); return TRUE; case STATUS_INFATUATED: - LogMessageByIdWithPopupCheckUser(pokemon,gPtrInfatuatedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrInfatuatedMessage); return TRUE; default: case STATUS_NONE: @@ -141,12 +141,12 @@ bool8 sub_80701A4(Entity *pokemon) case 8: CRINGE_STATUS: if (pokemonInfo->bideClassStatus.status == STATUS_BIDE) { - LogMessageByIdWithPopupCheckUser(pokemon,gPtrBideMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrBideMessage); return TRUE; } else if (((pokemonInfo->bideClassStatus.status != STATUS_NONE) && (pokemonInfo->bideClassStatus.status != STATUS_CHARGING)) && (pokemonInfo->bideClassStatus.status != STATUS_ENRAGED)) { if (flag) { - LogMessageByIdWithPopupCheckUser(pokemon,gPtrMoveInterruptedMessage); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gPtrMoveInterruptedMessage); } else { for(index = 0, move = pokemonInfo->moves.moves; index < MAX_MON_MOVES; move++, index++) { diff --git a/src/string_format.c b/src/string_format.c index dec496ada..6dfd2c0a0 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -16,41 +16,39 @@ #include "text_2.h" #include "text_3.h" -static const MenuItem sYesNoMenuItems[] = -{ - {_("*Yes"), 1}, - {_("No"), 0}, - {NULL, -1} +static const MenuItem sYesNoMenuItems[] = { + { _("*Yes"), 1 }, + { _("No"), 0 }, + { NULL, -1 } }; -static const MenuItem sYesNoMenuItems_DefaultNo[] = -{ - {_("Yes"), 1}, - {_("*No"), 0}, - {NULL, -1} +static const MenuItem sYesNoMenuItems_DefaultNo[] = { + { _("Yes"), 1 }, + { _("*No"), 0 }, + { NULL, -1 } }; -static const u32 gUnknown_80D48A0[] = {0x7, 0x2, 0x2}; +static const u32 gUnknown_80D48A0[3] = { 0x7, 0x2, 0x2 }; static const WindowTemplate sWinTemplateDummy = WIN_TEMPLATE_DUMMY; static const WindowTemplate sDialogueBoxWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_0, - .pos = {2, 15}, + .pos = { 2, 15 }, .width = 26, .height = 5, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }; static const WindowTemplate sOnlyTextDialogueBoxWindowTemplate = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_ONLY_TEXT, - .pos = {2, 8}, + .pos = { 2, 8 }, .width = 26, .height = 5, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }; @@ -115,22 +113,22 @@ static EWRAM_DATA TouchScreenMenuInput sDialogueMenuTouchScreenInput = {0}; static EWRAM_INIT WindowTemplates sDialogueBoxWinTemplates = { .id = { [0] = { - .unk0 = 0, + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_0, - .pos = { .x = 2, .y = 15 }, + .pos = { 2, 15 }, .width = 26, .height = 5, - .unk10 = 7, + .totalHeight = 7, .unk12 = 0, .header = NULL, }, [1] = { - .unk0 = 0x40, + .flags = WINTEMPLATE_FLAG_x40, .type = WINDOW_TYPE_7, - .pos = { .x = 0, .y = 0 }, + .pos = { 0, 0 }, .width = 0, .height = 0, - .unk10 = 0, + .totalHeight = 0, .unk12 = 0, .header = NULL, }, @@ -216,8 +214,8 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me sDialogueBoxWinTemplates.id[1].width = 0; sDialogueBoxWinTemplates.id[1].height = 0; - sDialogueBoxWinTemplates.id[1].unk10 = 0; - sDialogueBoxWinTemplates.id[1].unk0 = 0x40; + sDialogueBoxWinTemplates.id[1].totalHeight = 0; + sDialogueBoxWinTemplates.id[1].flags = WINTEMPLATE_FLAG_x40; if (monPortraitPtr != NULL && monPortraitPtr->faceData != NULL && monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].gfx != 0) { s32 i; @@ -226,7 +224,8 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me sDialogueBoxWinTemplates.id[1].pos.y = monPortraitPtr->pos.y; sDialogueBoxWinTemplates.id[1].width = 5; sDialogueBoxWinTemplates.id[1].height = 5; - sDialogueBoxWinTemplates.id[1].unk10 = 5; + sDialogueBoxWinTemplates.id[1].totalHeight = 5; + for (i = 0; i < 16; i++) { SetBGPaletteBufferColorArray(224 + i, &monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].pal[i]); } @@ -245,7 +244,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me ShowWindows(&sDialogueBoxWinTemplates, TRUE, TRUE); sTextPrintStruct.x = 4; sTextPrintStruct.y = 4; - sTextPrintStruct.arrowSpritePosX = 0x70; + sTextPrintStruct.arrowSpritePosX = 112; sTextPrintStruct.arrowSpritePosY = (gWindows[0].y * 8) + TEXTBOX_HEIGHT; sTextPrintStruct.unk10 = 7; sTextPrintStruct.unk1C = 0; @@ -273,10 +272,10 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me sub_80073B8(1); if (!monPortraitPtr->flip) { - DisplayMonPortraitSprite(1, data, 0xE); + DisplayMonPortraitSprite(1, data, 14); } else { - DisplayMonPortraitSpriteFlipped(1, data, 0xE); + DisplayMonPortraitSpriteFlipped(1, data, 14); } sub_80073E0(1); } @@ -297,7 +296,7 @@ s32 sub_80144A4(s32 *a0) } // arm9.bin::0201CEB0 -void DrawDialogueBoxString(void) +void DrawDialogueBoxString_Async(void) { bool8 keepLooping = TRUE; @@ -605,12 +604,12 @@ static void sub_8014A88(void) r1 = r7 / 8; r1 += 2; sDialogueBoxWinTemplates.id[2].width = r1; - sDialogueBoxWinTemplates.id[2].unk10 = r2; + sDialogueBoxWinTemplates.id[2].totalHeight = r2; sDialogueBoxWinTemplates.id[2].height = r2; sDialogueBoxWinTemplates.id[2].pos.x = 28 - r1; sDialogueBoxWinTemplates.id[2].pos.y = 14 - r2; - sDialogueBoxWinTemplates.id[0].unk0 = 0x80; - sDialogueBoxWinTemplates.id[1].unk0 = 0xC0; + sDialogueBoxWinTemplates.id[0].flags = WINTEMPLATE_FLAG_x80; + sDialogueBoxWinTemplates.id[1].flags = WINTEMPLATE_FLAG_x40 | WINTEMPLATE_FLAG_x80; if (sNeverWrittenToUnknownStructPtr != NULL) { sDialogueBoxWinTemplates.id[3] = sNeverWrittenToUnknownStructPtr->unk0; } @@ -647,7 +646,7 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) bool8 r9 = TRUE; dstMax--; - while (1) { + while (TRUE) { u8 currChar = *str; if (currChar == '\0') @@ -697,7 +696,7 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) case 'm': str++; if (*str == 'm') { - Pokemon *monStruct = sub_808D3BC(); + Pokemon *monStruct = GetLeaderMon2(); txtPtr = sFormatBuffer_UnknownMonster; PrintColoredPokeNameToBuffer(sFormatBuffer_UnknownMonster, monStruct, 0); } @@ -713,7 +712,7 @@ const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags) break; case 't': str++; - if (sub_80023E4(0)) { + if (CheckQuest(QUEST_SET_TEAM_NAME)) { sub_80920D8(sFormatBuffer_TeamName); } else { diff --git a/src/switcher_orb.c b/src/switcher_orb.c index 7ac375ef6..c23017c53 100644 --- a/src/switcher_orb.c +++ b/src/switcher_orb.c @@ -34,12 +34,12 @@ void HandleSwitcherOrb(Entity *pokemon, Entity *target, bool8 unused) if (AbilityIsActive(pokemon, ABILITY_SUCTION_CUPS)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCAC0); // $m0 is anchored! It won't switch places + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCAC0); // $m0 is anchored! It won't switch places } else if(AbilityIsActive(target, ABILITY_SUCTION_CUPS)) { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCAC0); // $m0 is anchored! It won't switch places + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCAC0); // $m0 is anchored! It won't switch places } else { @@ -60,7 +60,7 @@ void HandleSwitcherOrb(Entity *pokemon, Entity *target, bool8 unused) sub_807EC28(FALSE); } sub_806A5B8(pokemon); - TryTriggerMonsterHouseWithMsg(pokemon,gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(pokemon,gDungeon->forceMonsterHouse); } if (EntityIsValid(target)) { @@ -69,7 +69,7 @@ void HandleSwitcherOrb(Entity *pokemon, Entity *target, bool8 unused) sub_807EC28(FALSE); } sub_806A5B8(target); - TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse); } } } diff --git a/src/text_1.c b/src/text_1.c index 902857bb9..a15312928 100644 --- a/src/text_1.c +++ b/src/text_1.c @@ -21,7 +21,7 @@ EWRAM_DATA bool8 gUnknown_20274A5 = FALSE; EWRAM_DATA u8 gUnknown_20274A6[6] = {0}; EWRAM_DATA s32 gCurrentCharmap = 0; EWRAM_DATA static vu32 sUnknown_20274B0 = 0; -EWRAM_DATA static u32 sUnknown_20274B4[0xEC0] = {0}; +EWRAM_DATA static u32 sWindowGFXPool[0xEC0] = {0}; EWRAM_DATA static OpenedFile *sCharmapFiles[3] = { NULL }; EWRAM_DATA static WindowTemplates sSavedWindows = {0}; EWRAM_DATA s32 gUnknown_202B020 = 0; // NDS=020EDCEC @@ -116,13 +116,13 @@ static const u32 sFadeInDungeon[8] = {0x88888888, 0x88888888, 0x88888888, 0x8888 static const u32 sUnknown_80B8804[4] = {0, 1, 2, 3}; static const u32 sUnknown_80B8814[4] = {1, 2, 3, 0}; -static void AddWindow(Window *windows, u32 *vram, u32 *, u16 tilemaps[4][32][32], u32 windowId, const WindowTemplate *winTemplate, bool8, s32 firstBlockId, DungeonPos *positionModifier, u8); +static void AddWindow(Window *windows, u32 *vram, u32 *gfxPool, u16 tilemaps[4][32][32], u32 windowId, const WindowTemplate *winTemplate, bool8, s32 firstBlockId, DungeonPos *positionModifier, u8); static void ShowWindowsInternal(const WindowTemplates *winTemplates, bool8, bool8, DungeonPos *positionModifier); -static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], u8 a3); +static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], bool8 a3); static void PutWindowLeftBorderTilemap(Window *window, s32 x, s32 y, s32 a3, u16 tilemaps[4][32][32]); static void PutWindowFillTilemap(Window *window, s32 x, s32 y, s32 a3, u16 tilemaps[4][32][32]); static void PutWindowRightBorderTilemap(Window *window, s32 x, s32 y, s32 a3, u16 tilemaps[4][32][32]); -static void PutWindowBottomBorderTilemap(Window *window, s32, u16 tilemaps[4][32][32], u8); +static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], bool8 a3); static void PutHeaderWindowTopBorderTilemap(Window *window, s32 y, u32 a2, const WindowHeader *winHeader, u16 tilemaps[4][32][32]); // arm9.bin::02005448 @@ -135,15 +135,15 @@ void LoadCharmaps(void) gCurrentCharmap = 0; sCharmapFiles[0] = OpenFileAndGetFileDataPtr(sKanjiA_file_string, &gSystemFileArchive); sCharmapFiles[1] = OpenFileAndGetFileDataPtr(sKanjiB_file_string, &gSystemFileArchive); - gCharmaps[0] = (CharMapStruct *) sCharmapFiles[0]->data; - gCharmaps[1] = (CharMapStruct *) sCharmapFiles[1]->data; + gCharmaps[0] = (CharMapStruct *)sCharmapFiles[0]->data; + gCharmaps[1] = (CharMapStruct *)sCharmapFiles[1]->data; gCharHeight[0] = 11; gCharHeight[1] = 12; - for (k = 0; k < 4; k++) { + for (k = 0; k < MAX_WINDOWS; k++) { gWindows[k].width = 0; - gWindows[k].unk8 = 0; - gWindows[k].unk46 = 0; + gWindows[k].totalHeight = 0; + gWindows[k].unk46 = FALSE; } gCharacterSpacing = 0; @@ -252,7 +252,7 @@ void ShowWindows(const WindowTemplates *winTemplates, bool8 a1, bool8 a2) static void ShowWindowsInternal(const WindowTemplates *winTemplates, bool8 a1, bool8 a2, DungeonPos *positionModifier) { s32 i; - s32 area = 2; + s32 startTileNum = 2; if (winTemplates == NULL) winTemplates = &sDummyWindows; @@ -265,9 +265,10 @@ static void ShowWindowsInternal(const WindowTemplates *winTemplates, bool8 a1, b sSavedWindows.id[i] = winTemplates->id[i]; if (winTemplates->id[i].width != 0) { - AddWindow(gWindows, (u32 *)VRAM, sUnknown_20274B4, gBgTilemaps, sUnknown_80B8804[i], &winTemplates->id[i], a1, area, positionModifier, 0); + AddWindow(gWindows, (u32 *)VRAM, sWindowGFXPool, gBgTilemaps, sUnknown_80B8804[i], &winTemplates->id[i], a1, startTileNum, positionModifier, FALSE); sub_80089AC(&winTemplates->id[i], positionModifier); - area += winTemplates->id[i].width * winTemplates->id[i].unk10; + + startTileNum += winTemplates->id[i].width * winTemplates->id[i].totalHeight; } } @@ -308,10 +309,11 @@ u32 sub_8006544(u32 index) } // arm9.bin::02004D54 -static void AddWindow(Window *windows, u32 *vram, u32 *a2, u16 tilemaps[4][32][32], u32 windowId, const WindowTemplate *winTemplate, bool8 a6, s32 firstBlockId, DungeonPos *positionModifier, u8 a9) +static void AddWindow(Window *windows, u32 *vram, u32 *gfxPool, u16 tilemaps[4][32][32], u32 windowId, const WindowTemplate *winTemplate, bool8 a6, s32 startTileNum, DungeonPos *positionModifier, bool8 a9) { Window *newWindow; - s32 x, y; + s32 x; + s32 y; s32 numI; u32 uVar1; @@ -321,18 +323,18 @@ static void AddWindow(Window *windows, u32 *vram, u32 *a2, u16 tilemaps[4][32][3 newWindow->x = x; newWindow->y = y; newWindow->width = winTemplate->width; - newWindow->unk8 = winTemplate->unk10; + newWindow->totalHeight = winTemplate->totalHeight; newWindow->height = winTemplate->height; newWindow->type = winTemplate->type; - newWindow->unk10 = firstBlockId; + newWindow->unk10 = startTileNum; if (newWindow->type == WINDOW_TYPE_WITH_HEADER) - newWindow->unk14 = firstBlockId; + newWindow->unk14 = startTileNum; else - newWindow->unk14 = firstBlockId + winTemplate->unk12 * newWindow->width; + newWindow->unk14 = startTileNum + (winTemplate->unk12 * newWindow->width); - newWindow->unk18 = &a2[newWindow->unk10 * 8]; - newWindow->unk1C = &a2[newWindow->unk14 * 8]; + newWindow->winGFX = &gfxPool[newWindow->unk10 * 8]; + newWindow->unk1C = &gfxPool[newWindow->unk14 * 8]; newWindow->unk24 = winTemplate->unk12; newWindow->unk28 = &vram[newWindow->unk14 * 8]; @@ -341,16 +343,16 @@ static void AddWindow(Window *windows, u32 *vram, u32 *a2, u16 tilemaps[4][32][3 else newWindow->unk2C = newWindow->width * newWindow->height * 32; - newWindow->unk30 = 0; - newWindow->unk34 = 0; + newWindow->unk30 = NULL; + newWindow->unk34 = NULL; newWindow->unk38 = 0; newWindow->unk20 = (newWindow->width * 8) - 8; - newWindow->unk45 = newWindow->type == WINDOW_TYPE_0; + newWindow->isWinType0 = newWindow->type == WINDOW_TYPE_0; - if (newWindow->unk8 == 0) + if (newWindow->totalHeight == 0) return; - if ((winTemplate->unk0 & 0xA0) != 0x80) { + if ((winTemplate->flags & (WINTEMPLATE_FLAG_x20 | WINTEMPLATE_FLAG_x80)) != WINTEMPLATE_FLAG_x80) { s32 workingY = y - 1; s32 i, j; @@ -359,9 +361,9 @@ static void AddWindow(Window *windows, u32 *vram, u32 *a2, u16 tilemaps[4][32][3 PutHeaderWindowTopBorderTilemap(newWindow, workingY, uVar1, winTemplate->header, tilemaps); - workingY = y + 2; + workingY = y + WINDOW_HEADER_HEIGHT; uVar1 = a6 ? newWindow->unk14 + newWindow->width * (winTemplate->unk12 + 2) : 0; - numI = newWindow->height - 2; + numI = newWindow->height - WINDOW_HEADER_HEIGHT; } else { PutWindowTopBorderTilemap(newWindow, workingY, tilemaps, a9); @@ -390,14 +392,14 @@ static void AddWindow(Window *windows, u32 *vram, u32 *a2, u16 tilemaps[4][32][3 PutWindowBottomBorderTilemap(newWindow, workingY, tilemaps, a9); } - if ((winTemplate->unk0 & 0x80) == 0) + if (!(winTemplate->flags & WINTEMPLATE_FLAG_x80)) PrepareTextbox_8008C6C(windows, windowId); - newWindow->unk46 = 0; + newWindow->unk46 = FALSE; } // arm9.bin::02004B0C -static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], u8 a3) +static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], bool8 a3) { s32 x; s32 i; @@ -413,11 +415,12 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] case WINDOW_TYPE_0: case WINDOW_TYPE_WITHOUT_BORDER: case WINDOW_TYPE_ONLY_TEXT: - case WINDOW_TYPE_WITH_HEADER: + case WINDOW_TYPE_WITH_HEADER: { break; - case WINDOW_TYPE_NORMAL: + } + case WINDOW_TYPE_NORMAL: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2D8) | TILEMAP_PAL(15); - if (a3 != 0) + if (a3) tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15); else tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); @@ -429,12 +432,13 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] } tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2D8) | TILEMAP_PAL(15) | TILEMAP_FLIP_HORIZONTAL(1); - if (a3 != 0) + if (a3) tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_HORIZONTAL(1); else tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); break; - case WINDOW_TYPE_4: + } + case WINDOW_TYPE_4: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2E8) | TILEMAP_PAL(15); tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); x++; @@ -447,7 +451,8 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2E8) | TILEMAP_PAL(15) | TILEMAP_FLIP_HORIZONTAL(1); tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); break; - case WINDOW_TYPE_FILL_TRANSPARENT: + } + case WINDOW_TYPE_FILL_TRANSPARENT: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2DC) | TILEMAP_PAL(15); x++; for (i = 0; i < window->width; i++) { @@ -457,7 +462,8 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2DC) | TILEMAP_PAL(15) | TILEMAP_FLIP_HORIZONTAL(1); break; - case WINDOW_TYPE_7: + } + case WINDOW_TYPE_7: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15); x++; for (i = 0; i < window->width; i++) { @@ -467,6 +473,7 @@ static void PutWindowTopBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32] tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_HORIZONTAL(1); break; + } } } @@ -583,7 +590,7 @@ static void PutWindowRightBorderTilemap(Window *window, s32 x, s32 y, s32 a3, u1 } // arm9.bin::0200456C -static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], u8 a3) +static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][32][32], bool8 a3) { s32 x; s32 i; @@ -598,12 +605,13 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ switch (window->type) { case WINDOW_TYPE_0: case WINDOW_TYPE_WITHOUT_BORDER: - case WINDOW_TYPE_ONLY_TEXT: + case WINDOW_TYPE_ONLY_TEXT: { break; + } case WINDOW_TYPE_NORMAL: - case WINDOW_TYPE_WITH_HEADER: + case WINDOW_TYPE_WITH_HEADER: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2D8) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1); - if (a3 != 0) + if (a3) tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1); else tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); @@ -615,12 +623,13 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ } tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2D8) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1) | TILEMAP_FLIP_HORIZONTAL(1); - if (a3 != 0) + if (a3) tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1) | TILEMAP_FLIP_HORIZONTAL(1); else tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); break; - case WINDOW_TYPE_4: + } + case WINDOW_TYPE_4: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2E8) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1); tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); x++; @@ -633,7 +642,8 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2E8) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1) | TILEMAP_FLIP_HORIZONTAL(1); tilemaps[1][y][x] = TILEMAP_TILE_NUM(0x2DB) | TILEMAP_PAL(15); break; - case WINDOW_TYPE_FILL_TRANSPARENT: + } + case WINDOW_TYPE_FILL_TRANSPARENT: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2DC) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1); x++; for (i = 0; i < window->width; i++) { @@ -643,7 +653,8 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x2DC) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1) | TILEMAP_FLIP_HORIZONTAL(1); break; - case WINDOW_TYPE_7: + } + case WINDOW_TYPE_7: { tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1); x++; for (i = 0; i < window->width; i++) { @@ -653,6 +664,7 @@ static void PutWindowBottomBorderTilemap(Window *window, s32 y, u16 tilemaps[4][ tilemaps[0][y][x] = TILEMAP_TILE_NUM(0x293) | TILEMAP_PAL(15) | TILEMAP_FLIP_VERTICAL(1) | TILEMAP_FLIP_HORIZONTAL(1); break; + } } } @@ -825,9 +837,9 @@ void sub_80073B8(s32 windowId) { Window *window = &gWindows[windowId]; - window->unk3C = &window->unk1C[(u32)window->unk2C >> 2]; + window->unk3C = &window->unk1C[(u32)window->unk2C / 4]; window->unk40 = window->unk1C; - window->unk46 = 1; + window->unk46 = TRUE; } // arm9.bin::02003E9C @@ -841,7 +853,7 @@ void sub_80073E0(s32 windowId) { Window *window = &gWindows[windowId]; - if (window->unk44 == 0) { + if (!window->unk44) { window->unk30 = &window->unk28[window->unk3C - window->unk1C]; window->unk34 = window->unk3C; window->unk38 = (window->unk40 - window->unk3C + 1) * 4; @@ -853,7 +865,7 @@ void sub_80073E0(s32 windowId) window->unk38 = 0; } - window->unk46 = 0; + window->unk46 = FALSE; } // arm9.bin::02003D74 diff --git a/src/text_2.c b/src/text_2.c index d68c8f04f..13c690701 100644 --- a/src/text_2.c +++ b/src/text_2.c @@ -6,15 +6,15 @@ #include "text_2.h" static void AddUnderScoreHighlightInternal(Window *windows, u32 windowId, s32 x, s32 y, s32 width, u32 color); -static void DisplayMonPortrait(Window *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4); -static void DisplayMonPortraitFlipped(Window *windows, s32 windowId, const u8 *compressedData, s32 a3); -static u32 FlipPixelsHorizontally(u32 a0); +static void DisplayMonPortrait(Window *windows, u16 dst[32][32], s32 winID, const u8 *compressedData, u32 palNum); +static void DisplayMonPortraitFlipped(Window *windows, s32 winID, const u8 *compressedData, s32 palNum); +static u32 FlipPixelsHorizontally(u32 gfx); static s32 HexDigitValue(u8 chr); static void nullsub_129(u32 windowId, s32 x, s32 y, s32 width, u32 color); static void sub_8007AA4(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, u32 color); static void sub_8007BA8(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 color); static void sub_8007D00(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 color); -static void sub_8007E64(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); +static void WriteGFXToWindow(Window *windows, u16 dst[32][32], u32 winID, s32 x, s32 y, s32 w, s32 h, u32 *src, u32 palNum); static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); static void sub_8008334(u32 *r7, u32 *r12); static void sub_80084A4(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 a8); @@ -72,13 +72,13 @@ u32 DrawCharOnWindowInternal(Window *windows, s32 x, s32 y, u32 chr, u32 color, } if (sp0->unkA & 1) { - r3 = window->unk18 + ((((y / 8) * window->width) + (x / 8)) * 8); + r3 = window->winGFX + ((((y / 8) * window->width) + (x / 8)) * 8); r3 += y % 8; shiftData = &gCharMasksOffsets[x % 8]; xDiv8 = x / 8; yDiv8 = y / 8; - if (yDiv8 < window->unk8) { + if (yDiv8 < window->totalHeight) { for (i = 0; i < gCharHeight[gCurrentCharmap]; i++) { r2 = (local_44[1] << 0x10) | (local_44[0]); if (r2 != 0) { @@ -123,7 +123,7 @@ u32 DrawCharOnWindowInternal(Window *windows, s32 x, s32 y, u32 chr, u32 color, if (y % 8 == 0) { r3 += window->unk20; yDiv8++; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) break; } } @@ -133,13 +133,13 @@ u32 DrawCharOnWindowInternal(Window *windows, s32 x, s32 y, u32 chr, u32 color, bool8 notFirstIteration = FALSE; u32 r1; - r3 = window->unk18 + ((((y / 8) * window->width) + (x / 8)) * 8); + r3 = window->winGFX + ((((y / 8) * window->width) + (x / 8)) * 8); r3 += y - (y / 8 * 8); shiftData = &gCharMasksOffsets[x - ((x / 8) * 8)]; xDiv8 = x / 8; yDiv8 = y / 8; - if (yDiv8 < window->unk8) { + if (yDiv8 < window->totalHeight) { for (i = 0; i < gCharHeight[gCurrentCharmap]; i++) { r4 = (local_44[1] << 0x10) | (local_44[0]); r2 = (0x11111111 & r4) + (sp18 & r4); @@ -216,7 +216,7 @@ u32 DrawCharOnWindowInternal(Window *windows, s32 x, s32 y, u32 chr, u32 color, if (y % 8 == 0) { r3 += window->unk20; yDiv8++; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) break; } } @@ -263,11 +263,11 @@ static void AddUnderScoreHighlightInternal(Window *windows, u32 windowId, s32 x, r4 = y / 8; - dest = window->unk18 + (((window->width * r4) + (x / 8)) * 8); + dest = window->winGFX + (((window->width * r4) + (x / 8)) * 8); dest += (r4 * -8) + y; r6 = x / 8; - if (y / 8 >= window->unk8) { + if (y / 8 >= window->totalHeight) { return; } else { @@ -324,7 +324,7 @@ static void sub_8007AA4(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, u32 u32 ip = gUnknown_80B853C[color & 0xF] + 0x11111111; const u32 unkBits[] = {0xF, 0xF0, 0xF00, 0xF000, 0xF0000, 0xF00000, 0xF000000, 0xF0000000}; s32 r3 = y / 8; - u32 *dest = window->unk18 + ((window->width * r3 + x / 8) * 8); + u32 *dest = window->winGFX + ((window->width * r3 + x / 8) * 8); s32 r2 = x / 8; dest += r3 * -8 + y; @@ -333,7 +333,7 @@ static void sub_8007AA4(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, u32 if (r2 < window->width) { // This goto looks like a fakematch, but I couldn't get it to work otherwise. goto LOOP_MIDDLE; - while (1) { + while (TRUE) { y++; dest++; if ((y % 8) == 0) @@ -343,7 +343,7 @@ static void sub_8007AA4(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, u32 LOOP_MIDDLE: if (a4 <= 0) return; - if (r3 >= window->unk8) + if (r3 >= window->totalHeight) return; dest[0] |= ip; @@ -374,10 +374,10 @@ static void sub_8007BA8(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 Window *window = &windows[windowId]; yDiv8 = y / 8; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) return; - dst = window->unk18 + (((yDiv8 * window->width) + x / 8) * 8); + dst = window->winGFX + (((yDiv8 * window->width) + x / 8) * 8); dst += y - (yDiv8 * 8); for (i = 0; i < color; i++) { @@ -418,7 +418,7 @@ static void sub_8007BA8(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 if ((y % 8) == 0) { dst += window->unk20; yDiv8++; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) return; } } @@ -443,10 +443,10 @@ static void sub_8007D00(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 Window *window = &windows[windowId]; yDiv8 = y / 8; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) return; - dst = window->unk18 + (((yDiv8 * window->width) + x / 8) * 8); + dst = window->winGFX + (((yDiv8 * window->width) + x / 8) * 8); dst += y - (yDiv8 * 8); for (i = 0; i < color; i++) { @@ -487,87 +487,102 @@ static void sub_8007D00(Window *windows, u32 windowId, s32 x, s32 y, s32 a4, s32 if ((y % 8) == 0) { dst += window->unk20; yDiv8++; - if (yDiv8 >= window->unk8) + if (yDiv8 >= window->totalHeight) return; } } } -void sub_8007E20(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6) +void WriteGFXToBG0Window(u32 winID, u32 x, u32 y, u32 w, u32 h, u32* srcGFX, u32 palNum) { - sub_8007E64(gWindows, gBgTilemaps[0], a0, a1, a2, a3, a4, a5, a6); + WriteGFXToWindow(gWindows, gBgTilemaps[0], winID, x, y, w, h, srcGFX, palNum); } UNUSED static void nullsub_160(void) { } -static void sub_8007E64(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) +// srcGFX: Each u32 is 8 packed pixels, 4 bits per pixel. +static void WriteGFXToWindow(Window *windows, u16 dst[32][32], u32 winID, s32 x, s32 y, s32 w, s32 h, u32* srcGFX, u32 palNum) { - s32 i, j; - Window *window = &a0[a2]; + s32 iterY; + s32 iterX; + s32 baseNum; + u32 *dstGFX; + s32 curX; + u32 *curDstGFX; - a3 /= 8; - a4 /= 8; - a5 /= 8; - a6 /= 8; - a8 *= 4096; - if (a4 < window->unk8) { - s32 id = (window->width * a4) + a3; - u32 *unk18Ptr = &window->unk18[id * 8]; + Window *win = &windows[winID]; - for (i = 0; i < a6; i++) { - s32 xMaybe = a3; - u32 *loopUnk18Ptr = unk18Ptr; - for (j = 0; j < a5; j++) { - if (xMaybe < window->width) { - if (window->unk3C > loopUnk18Ptr) { - window->unk3C = loopUnk18Ptr; - } - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *(a7++); - *(loopUnk18Ptr++) = *a7; - if (window->unk40 < loopUnk18Ptr) { - window->unk40 = loopUnk18Ptr; - } - a7++; - a1[window->y + a4][window->x + xMaybe] &= 0xFFF; - a1[window->y + a4][window->x + xMaybe] |= a8; - } - else { - loopUnk18Ptr += 8; - a7 += 8; - } - xMaybe++; + x /= 8; // pixelX to tileX + y /= 8; // pixelY to tileY + w /= 8; // pixelW to tileW + h /= 8; // pixelH to tileH + palNum <<= 12; // Pal shift + + if (y >= win->totalHeight) + return; + + baseNum = (win->width * y) + x; + dstGFX = &win->winGFX[baseNum * 8]; + + for (iterY = 0; iterY < h; iterY++) { + curX = x; + curDstGFX = dstGFX; + + for (iterX = 0; iterX < w; iterX++) { + if (curX < win->width) { + if (win->unk3C > curDstGFX) + win->unk3C = curDstGFX; + + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *(srcGFX++); + *(curDstGFX++) = *srcGFX; + + if (win->unk40 < curDstGFX) + win->unk40 = curDstGFX; + + srcGFX++; + dst[win->y + y][win->x + curX] &= 0xFFF; + dst[win->y + y][win->x + curX] |= palNum; } - a4++; - unk18Ptr += window->unk20; - unk18Ptr += 8; - if (a4 >= window->unk8) - break; + else { + curDstGFX += 8; + srcGFX += 8; + } + + curX++; } + + y++; + dstGFX += win->unk20; + dstGFX += 8; + + if (y >= win->totalHeight) + break; } } -static u32 FlipPixelsHorizontally(u32 a0) +// Flips all 8 pixels (4bpp) +static u32 FlipPixelsHorizontally(u32 gfx) { - u32 r0; + u32 ret; - r0 = (a0 >> 28) & 0xF; - r0 |= (a0 >> 20) & 0xF0; - r0 |= (a0 >> 12) & 0xF00; - r0 |= (a0 >> 4) & 0xF000; - r0 |= (a0 << 4) & 0xF0000; - r0 |= (a0 << 12) & 0xF00000; - r0 |= (a0 << 20) & 0xF000000; - r0 |= (a0 << 28) & 0xF0000000; + ret = (gfx >> 28) & 0x0000000F; + ret |= (gfx >> 20) & 0x000000F0; + ret |= (gfx >> 12) & 0x00000F00; + ret |= (gfx >> 04) & 0x0000F000; + ret |= (gfx << 04) & 0x000F0000; + ret |= (gfx << 12) & 0x00F00000; + ret |= (gfx << 20) & 0x0F000000; + ret |= (gfx << 28) & 0xF0000000; - return r0; + return ret; } UNUSED static void sub_8007FEC(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6) @@ -579,7 +594,7 @@ UNUSED static void nullsub_161(void) { } -// Similar to sub_8007E64 +// Similar to WriteGFXToWindow static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) { s32 i, j; @@ -589,9 +604,10 @@ static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a4 /= 8; a5 /= 8; a6 /= 8; - a8 *= 4096; - if (a4 < window->unk8) { - u32 *unk18Ptr = &window->unk18[((window->width * a4) + (a3 + a5)) * 8]; + a8 <<= 12; // Pal shift + + if (a4 < window->totalHeight) { + u32 *unk18Ptr = &window->winGFX[((window->width * a4) + (a3 + a5)) * 8]; for (i = 0; i < a6; i++) { s32 xMaybe = a3 + a5; u32 *loopUnk18Ptr = unk18Ptr; @@ -623,13 +639,13 @@ static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a4++; unk18Ptr += window->unk20; unk18Ptr += 8; - if (a4 >= window->unk8) + if (a4 >= window->totalHeight) break; } } } -// Similar to sub_8007E64 +// Similar to WriteGFXToWindow UNUSED static void sub_80081A4(s32 a0, s32 a3, s32 a4, s32 a7Id) { s32 i, j, a5, a6; @@ -640,7 +656,8 @@ UNUSED static void sub_80081A4(s32 a0, s32 a3, s32 a4, s32 a7Id) a4 /= 8; a5 = 2; a6 = 2; - if (a4 < window->unk8) { + + if (a4 < window->totalHeight) { s32 id = (window->width * a4) + a3; u32 *unk18Ptr = &window->unk28[id * 8]; @@ -668,38 +685,43 @@ UNUSED static void sub_80081A4(s32 a0, s32 a3, s32 a4, s32 a7Id) a4++; unk18Ptr += window->unk20; unk18Ptr += 8; - if (a4 >= window->unk8) + + if (a4 >= window->totalHeight) break; } } } -void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2) +void DisplayMonPortraitSprite(s32 winID, const u8 *compressedData, s32 palNum) { - DisplayMonPortrait(gWindows, gBgTilemaps[0], a0, compressedData, a2); + DisplayMonPortrait(gWindows, gBgTilemaps[0], winID, compressedData, palNum); } UNUSED static void nullsub_162(void) { } -static void DisplayMonPortrait(Window *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4) +static void DisplayMonPortrait(Window *windows, u16 dst[32][32], s32 winID, const u8 *compressedData, u32 palNum) { - s32 i, j; - Window *window = &a0[a2]; + s32 iterY; + s32 iterX; + Window *window = &windows[winID]; - a4 *= 4096; - DecompressAT((u8 *)window->unk18, (window->width * 32) * window->unk8, compressedData); - for (i = 0; i < window->unk8; i++) { - for (j = 0; j < window->width; j++) { - a1[window->y + i][window->x + j] &= 0xFFF; - a1[window->y + i][window->x + j] |= a4; + palNum <<= 12; // Pal shift + + DecompressAT((u8 *)window->winGFX, (window->width * 32) * window->totalHeight, compressedData); + + for (iterY = 0; iterY < window->totalHeight; iterY++) { + for (iterX = 0; iterX < window->width; iterX++) { + dst[window->y + iterY][window->x + iterX] &= 0xFFF; + dst[window->y + iterY][window->x + iterX] |= palNum; } } + window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } static void sub_8008334(u32 *r7, u32 *r12) @@ -726,32 +748,37 @@ static void sub_8008334(u32 *r7, u32 *r12) *r12 = r2; } -void DisplayMonPortraitSpriteFlipped(s32 a0, const u8 *compressedData, s32 a1) +void DisplayMonPortraitSpriteFlipped(s32 winID, const u8 *compressedData, s32 palNum) { - DisplayMonPortraitFlipped(gWindows, a0, compressedData, a1); + DisplayMonPortraitFlipped(gWindows, winID, compressedData, palNum); } UNUSED static void nullsub_163(void) { } -static void DisplayMonPortraitFlipped(Window *windows, s32 windowId, const u8 *compressedData, s32 a3) +static void DisplayMonPortraitFlipped(Window *windows, s32 winID, const u8 *compressedData, s32 palNum) { - s32 i, j; - Window *window = &windows[windowId]; + s32 iterY; + s32 iterX; + Window *window = &windows[winID]; - DisplayMonPortraitSprite(windowId, compressedData, a3); - for (i = 0; i < window->unk8; i++) { + DisplayMonPortraitSprite(winID, compressedData, palNum); + + for (iterY = 0; iterY < window->totalHeight; iterY++) { s32 r8 = window->width / 2; + if (window->width & 1) r8++; - for (j = 0; j < r8; j++) { - u32 *r4, *r5; - s32 unk4Mul = window->width * i; - r4 = &window->unk18[(unk4Mul + j) * 8]; - unk4Mul--; - r5 = &window->unk18[(unk4Mul + (window->width - j)) * 8]; + for (iterX = 0; iterX < r8; iterX++) { + u32 *r4; + u32 *r5; + s32 baseVal = window->width * iterY; + + r4 = &window->winGFX[(baseVal + iterX) * 8]; + baseVal--; + r5 = &window->winGFX[(baseVal + (window->width - iterX)) * 8]; sub_8008334(r4++, r5++); sub_8008334(r4++, r5++); @@ -784,8 +811,9 @@ static void sub_80084A4(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a4 /= 8; a5 /= 8; a6 /= 8; - a8 *= 4096; - if (a4 < window->unk8) { + a8 <<= 12; // Pal shift + + if (a4 < window->totalHeight) { for (i = 0; i < a6; i++) { s32 xMaybe = a3; for (j = 0; j < a5; j++) { @@ -796,7 +824,8 @@ static void sub_80084A4(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 xMaybe++; } a4++; - if (a4 >= window->unk8) + + if (a4 >= window->totalHeight) break; } } @@ -923,14 +952,14 @@ UNUSED static void sub_80086C8(Window *windows, s32 windowId, s32 a2, s32 a3, s3 if (a4 + a2 > window->width * 8) { a4 = (window->width * 8) - a2; } - if (a3 + a5 > window->unk8 * 8) { - a5 = (window->unk8 * 8) - a3; + if (a3 + a5 > window->totalHeight * 8) { + a5 = (window->totalHeight * 8) - a3; } r2 = window->width * (a3 / 8); r0 = 8 * (r2 + (a2 / 8)); r1 = a3 - ((a3 / 8) * 8); - r5 = &window->unk18[r0 + r1]; + r5 = &window->winGFX[r0 + r1]; while (a5 > 0) { u32 *loopPtr; s32 r4, r6; @@ -990,7 +1019,7 @@ static void sub_8008818(Window *windows, s32 windowId, s32 a2, s32 a3, s32 a4, s s32 a3Div = a3 / 8; for (i = 0; i < a5; i += 8) { - u32 *ptr = &window->unk18[((window->width * a3Div) + a2Div) * 8]; + u32 *ptr = &window->winGFX[((window->width * a3Div) + a2Div) * 8]; for (j = 0; j < a4; j += 8) { if (window->unk3C > ptr) { window->unk3C = ptr; @@ -1038,13 +1067,13 @@ static bool8 xxx_update_bg_vram(Window *windows) if (r5 == 0) continue; - if (window->unk45) { + if (window->isWinType0) { u32 *r2, *r1; - CpuCopy(window->unk28, window->unk18, 0xD00); - // The reason for void casts is because we want to add 0xD00/r5 directly to pointers. Because pointers are u32, without the casts, it would multiply the value by 4. - r2 = (void *)(window->unk18) + 0xD00; - r1 = (void *)(window->unk28) + 0xD00; + CpuCopy(window->unk28, window->winGFX, 0xD00); + // The reason for the casts is because we want to add 0xD00/r5 directly to pointers. Because pointers are u32, without the casts, it would multiply the value by 4. + r2 = (u32 *)(((u8 *)window->winGFX) + 0xD00); + r1 = (u32 *)(((u8 *)window->unk28) + 0xD00); for (j = 0; j < window->width; j++) { *(r1++) = *(r2++); *(r1++) = *(r2++); @@ -1060,14 +1089,14 @@ static bool8 xxx_update_bg_vram(Window *windows) } else { CpuCopy(window->unk30, window->unk34, r5); - window->unk34 += (r5 / 4); - window->unk30 = (void *)(window->unk30) + r5; + window->unk34 += (r5 / sizeof(u32)); + window->unk30 = (u32 *)(((u8 *)window->unk30) + r5); // Same as `window->unk30 += (r5 / sizeof(u32));` window->unk38 -= r5; } - if (window->unk38 == 0) { - window->unk44 = 0; - } + if (window->unk38 == 0) + window->unk44 = FALSE; + ret = TRUE; } @@ -1087,7 +1116,7 @@ void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str) { u8 *r6; - if (r4->unk0 & 0x40) + if (r4->flags & WINTEMPLATE_FLAG_x40) return; r6 = (u8*) gUnknown_3000E94; @@ -1254,15 +1283,15 @@ void PrepareTextbox_8008C6C(Window *windows, u32 windowId) s32 i; Window *window = &windows[windowId]; - if (!window->unk45) { - s32 count = (window->width * window->unk8) * 32; + if (!window->isWinType0) { + s32 count = (window->width * window->totalHeight) * 32; for (i = 0; i < count; i += 32) { - CpuClear(&window->unk18[i / 4u], 32); + CpuClear(&window->winGFX[i / 4u], 32); } } else { - s32 count = (window->width * (window->unk8 - 1)) * 32; - u32 *ptr = window->unk18; + s32 count = (window->width * (window->totalHeight - 1)) * 32; + u32 *ptr = window->winGFX; for (i = 0; i < window->width; i++) { *(ptr++) = 0xFFFFFFFF; *(ptr++) = 0xEEEEEEEE; @@ -1280,14 +1309,14 @@ void PrepareTextbox_8008C6C(Window *windows, u32 windowId) } if (window->type == WINDOW_TYPE_WITH_HEADER) { - window->unk46 = 1; + window->unk46 = TRUE; AddUnderScoreHighlightInternal(windows, windowId, 0, 10, window->width * 8, 14); AddUnderScoreHighlightInternal(windows, windowId, 0, 11, window->width * 8, 13); - window->unk46 = 0; + window->unk46 = FALSE; } window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } diff --git a/src/text_4.c b/src/text_4.c index e7d88e12e..f20880c50 100644 --- a/src/text_4.c +++ b/src/text_4.c @@ -19,7 +19,7 @@ IWRAM_INIT static void ScrollDownWindowInternal(Window *windows, s32 windowId) { Window *window = &windows[windowId]; - if (window->unk8 > 0) { + if (window->totalHeight > 0) { s32 i, j; u32 *dstPtr; s32 n; @@ -29,12 +29,12 @@ IWRAM_INIT static void ScrollDownWindowInternal(Window *windows, s32 windowId) s32 unk4 = window->width; s32 dstAdd = ((window->unk24 + 2) * 8); dstAdd *= unk4; - dstPtr = window->unk18 + dstAdd; - n = window->unk8 - 2; + dstPtr = window->winGFX + dstAdd; + n = window->totalHeight - WINDOW_HEADER_HEIGHT; } else { - dstPtr = window->unk18; - n = window->unk8; + dstPtr = window->winGFX; + n = window->totalHeight; } id8 = window->unk20 + 8; @@ -69,7 +69,7 @@ IWRAM_INIT static void ScrollDownWindowInternal(Window *windows, s32 windowId) window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } } @@ -82,24 +82,27 @@ IWRAM_INIT static void ScrollUpWindowInternal(Window *windows, s32 windowId) { Window *window = &windows[windowId]; - if (window->unk8 > 0) { - s32 i, j; + if (window->totalHeight > 0) { + s32 i; + s32 j; u32 *dstPtr; s32 n; s32 id8; - s32 unk4, unk8, dstAdd; + s32 unk4; + s32 unk8; + s32 dstAdd; if (window->type == WINDOW_TYPE_WITH_HEADER) { - n = window->unk8 - 2; + n = window->totalHeight - WINDOW_HEADER_HEIGHT; } else { - n = window->unk8; + n = window->totalHeight; } - unk8 = window->unk8 - 1; + unk8 = window->totalHeight - 1; unk4 = window->width; dstAdd = (unk8 * unk4) * 8; - dstPtr = window->unk18 + dstAdd; + dstPtr = window->winGFX + dstAdd; id8 = window->unk20 + 8; for (i = 0; i < window->width; i++) { @@ -148,7 +151,7 @@ IWRAM_INIT static void ScrollUpWindowInternal(Window *windows, s32 windowId) window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } } @@ -161,7 +164,7 @@ IWRAM_INIT static void sub_82729B8(Window *windows, s32 id) { s32 i, j; Window *window = &windows[id]; - u32 *dstPtr = window->unk18; + u32 *dstPtr = window->winGFX; s32 id8 = window->unk20 + 8; s32 id9 = window->unk20 + 9; @@ -203,7 +206,7 @@ IWRAM_INIT static void sub_82729B8(Window *windows, s32 id) window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } IWRAM_INIT void sub_8272A78(s32 id) @@ -215,7 +218,7 @@ IWRAM_INIT static void sub_8272A8C(Window *windows, s32 id) { s32 i, j; Window *window = &windows[id]; - u32 *dstPtr = window->unk18; + u32 *dstPtr = window->winGFX; s32 id8 = window->unk20 + 8; for (i = 0; i < window->width; i++) { @@ -256,7 +259,7 @@ IWRAM_INIT static void sub_8272A8C(Window *windows, s32 id) window->unk30 = window->unk28; window->unk34 = window->unk1C; window->unk38 = window->unk2C; - window->unk44 = 1; + window->unk44 = TRUE; } #ifndef NONMATCHING diff --git a/src/text_util.c b/src/text_util.c index 358931698..cf9b1ce59 100644 --- a/src/text_util.c +++ b/src/text_util.c @@ -24,7 +24,7 @@ UNUSED static void sub_8092290(u8 *buffer, u8 *string) void StrncpyCustom(u8 *buffer, const u8 *string, s32 n) { - while(1) { + while (TRUE) { if (n-- <= 0 || *string == '\0') { break; } diff --git a/src/textbox.c b/src/textbox.c index 433da7dfd..af1ef6390 100644 --- a/src/textbox.c +++ b/src/textbox.c @@ -88,42 +88,39 @@ struct unkStruct_3001B64_unk418 #define MAX_TEXTBOX_PORTRAITS 10 -enum { - TEXTBOX_TYPE_NORMAL = 1, +enum TextboxTypeID +{ + TEXTBOX_TYPE_0, + TEXTBOX_TYPE_NORMAL, TEXTBOX_TYPE_ON_BG_PRESS, // Prints text on a bg without window, waits for the player button press TEXTBOX_TYPE_ON_BG_AUTO, // Prints text on a bg, waits 32 frames and then fades out the text + TEXTBOX_TYPE_4, }; -union MonOrStringPtr -{ - u8 *str; - Pokemon *mon; -}; - +// size: 0x5A8 struct Textbox { - // size: 0x5A8 - u32 type; + u32 type; // See enum "TextboxTypeID" s32 endMsgFrames; s32 midMsgFrames; struct TextboxText text; - u32 unk414; + u32 unk414; // See enum "SpecialTextKind" const struct unkStruct_3001B64_unk418 *unk418; const MenuItem *unk41C; u32 unk420; u32 unk424; u32 unk428; - union MonOrStringPtr unk42C; - s32 unk430; + MonOrStringPtr unk42C; + s32 unk430; // See enum "ScriptID" s32 unk434; u32 fill438; struct TextboxPortrait portraits[MAX_TEXTBOX_PORTRAITS]; - s16 unk5A4; + s16 unk5A4; // See enum "ScriptID" }; static IWRAM_INIT struct Textbox *sTextbox = { NULL }; -void sub_809B028(const MenuItem *, s32 a1_, s32 a2, s32 a3, s32 a4_, const char *text); +void sub_809B028(const MenuItem *, s32 a1_, s32 a2, s32 a3, s32 a4_, const u8 *text); bool8 sub_809B18C(s32 *sp); extern u8 sub_802B2D4(void); extern void sub_802B3B8(void); @@ -150,76 +147,87 @@ extern u32 HelperPelipperCallback(void); extern u32 sub_802E890(void); extern u32 sub_802DFD8(void); -#define TEXTBOX_FLAG_UNUSED_x2 0x2 // Unused, but set for almost all flag sets -#define TEXTBOX_FLAG_INSTANT_TEXT 0x20 +#define TEXTBOX_FLAG_NONE 0x0 +#define TEXTBOX_FLAG_x1 (1 << 0) +// Unused, but set for almost all flag sets +#define TEXTBOX_FLAG_UNUSED_x2 (1 << 1) +#define TEXTBOX_FLAG_x4 (1 << 2) +#define TEXTBOX_FLAG_x8 (1 << 3) +#define TEXTBOX_FLAG_UNUSED_x10 (1 << 4) +#define TEXTBOX_FLAG_INSTANT_TEXT (1 << 5) // Both need to be set to wait for the player's button press. One flag would be sufficient in my opinion, but what can you do? -#define TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 0x40 -#define TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS 0x80 - -#define TEXTBOX_FLAG_SPEAKER 0x100 // Speaker's name + dialogue sound -#define TEXTBOX_FLAG_DIALOGUE_SOUND 0x200 // Only dialogue sound +#define TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 (1 << 6) +#define TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS (1 << 7) +// Speaker's name + dialogue sound +#define TEXTBOX_FLAG_SPEAKER (1 << 8) +// Only dialogue sound +#define TEXTBOX_FLAG_DIALOGUE_SOUND (1 << 9) static const struct PortraitPlacementInfo sPortraitPlacements[PLACEMENT_COUNT] = { - [PLACEMENT_LEFT] = {{2, 8}, FALSE}, - [PLACEMENT_MIDDLE_TOP] = {{12, 5}, FALSE}, - [PLACEMENT_LEFT_] = {{2, 8}, FALSE}, - [PLACEMENT_RIGHT] = {{23, 8}, TRUE}, - [PLACEMENT_MIDDLE_LEFT] = {{7, 8}, FALSE}, - [PLACEMENT_MIDDLE_RIGHT] = {{18, 8}, TRUE}, - [PLACEMENT_MIDDLE_TOP_FLIP] = {{13, 5}, TRUE}, - [PLACEMENT_LEFT_FLIP] = {{2, 8}, TRUE}, - [PLACEMENT_RIGHT_FLIP] = {{23, 8}, FALSE}, - [PLACEMENT_MIDDLE_LEFT_FLIP] = {{7, 8}, TRUE}, - [PLACEMENT_MIDDLE_RIGHT_FLIP] = {{18, 8}, FALSE}, - [PLACEMENT_TOP] = {{12, 1}, FALSE}, - [PLACEMENT_TOP_LEFT] = {{2, 2}, FALSE}, - [PLACEMENT_TOP_RIGHT] = {{23, 2}, TRUE}, - [PLACEMENT_MIDDLE_TOP_LEFT] = {{7, 1}, FALSE}, - [PLACEMENT_MIDDLE_TOP_RIGHT] = {{18, 1}, TRUE}, - [PLACEMENT_TOP_FLIP] = {{13, 1}, TRUE}, - [PLACEMENT_TOP_LEFT_FLIP] = {{2, 2}, TRUE}, - [PLACEMENT_TOP_RIGHT_FLIP] = {{23, 2}, FALSE}, - [PLACEMENT_MIDDLE_TOP_LEFT_FLIP] = {{7, 1}, TRUE}, - [PLACEMENT_MIDDLE_TOP_RIGHT_FLIP] = {{18, 1}, FALSE}, + [PLACEMENT_LEFT] = { { 2, 8}, FALSE }, + [PLACEMENT_MIDDLE_TOP] = { { 12, 5}, FALSE }, + [PLACEMENT_LEFT_] = { { 2, 8}, FALSE }, + [PLACEMENT_RIGHT] = { { 23, 8}, TRUE }, + [PLACEMENT_MIDDLE_LEFT] = { { 7, 8}, FALSE }, + [PLACEMENT_MIDDLE_RIGHT] = { { 18, 8}, TRUE }, + [PLACEMENT_MIDDLE_TOP_FLIP] = { { 13, 5}, TRUE }, + [PLACEMENT_LEFT_FLIP] = { { 2, 8}, TRUE }, + [PLACEMENT_RIGHT_FLIP] = { { 23, 8}, FALSE }, + [PLACEMENT_MIDDLE_LEFT_FLIP] = { { 7, 8}, TRUE }, + [PLACEMENT_MIDDLE_RIGHT_FLIP] = { { 18, 8}, FALSE }, + [PLACEMENT_TOP] = { { 12, 1}, FALSE }, + [PLACEMENT_TOP_LEFT] = { { 2, 2}, FALSE }, + [PLACEMENT_TOP_RIGHT] = { { 23, 2}, TRUE }, + [PLACEMENT_MIDDLE_TOP_LEFT] = { { 7, 1}, FALSE }, + [PLACEMENT_MIDDLE_TOP_RIGHT] = { { 18, 1}, TRUE }, + [PLACEMENT_TOP_FLIP] = { { 13, 1}, TRUE }, + [PLACEMENT_TOP_LEFT_FLIP] = { { 2, 2}, TRUE }, + [PLACEMENT_TOP_RIGHT_FLIP] = { { 23, 2}, FALSE }, + [PLACEMENT_MIDDLE_TOP_LEFT_FLIP] = { { 7, 1}, TRUE }, + [PLACEMENT_MIDDLE_TOP_RIGHT_FLIP] = { { 18, 1}, FALSE }, }; static const MenuItem gUnknown_81160E8[] = { - {"*Yes", 1}, - {"No", 0}, - {NULL, 0}, + { "*Yes", 1 }, + { "No", 0 }, + { NULL, 0 }, }; static const MenuItem gUnknown_811610C[] = { - {"Yes", 1}, - {"*No", 0}, - {NULL, 0}, + { "Yes", 1 }, + { "*No", 0 }, + { NULL, 0 }, }; static const MenuItem sEmptyMenuItems[] = { - {NULL, 0}, + { NULL, 0 }, }; -static const u32 sScriptTextboxTypes[] = +static const u32 sScriptTextboxTypes[5] = { - [SCRIPT_TEXT_TYPE_INSTANT] = TEXTBOX_TYPE_NORMAL, - [SCRIPT_TEXT_TYPE_PLAYER] = TEXTBOX_TYPE_NORMAL, - [SCRIPT_TEXT_TYPE_NPC] = TEXTBOX_TYPE_NORMAL, - [SCRIPT_TEXT_TYPE_LETTER] = TEXTBOX_TYPE_NORMAL, - [SCRIPT_TEXT_TYPE_4] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_INSTANT] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_QUIET] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_NPC] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_LETTER] = TEXTBOX_TYPE_NORMAL, + [SCRIPT_TEXT_TYPE_OVERHEARD] = TEXTBOX_TYPE_NORMAL, }; -static const u16 sScriptFlagSets[] = +static const u16 sScriptFlagSets[10] = { - [SCRIPT_TEXT_TYPE_INSTANT] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_INSTANT_TEXT, - [SCRIPT_TEXT_TYPE_PLAYER] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS, - [SCRIPT_TEXT_TYPE_NPC] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_SPEAKER, - [SCRIPT_TEXT_TYPE_LETTER] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_DIALOGUE_SOUND, - [SCRIPT_TEXT_TYPE_4] = 0x01, - // These are effectively unused - 0x121, 0x101, 0x10D, 0x105, 0 + [SCRIPT_TEXT_TYPE_INSTANT] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_INSTANT_TEXT, + [SCRIPT_TEXT_TYPE_QUIET] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS, + [SCRIPT_TEXT_TYPE_NPC] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_SPEAKER, + [SCRIPT_TEXT_TYPE_LETTER] = TEXTBOX_FLAG_UNUSED_x2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_DIALOGUE_SOUND, + [SCRIPT_TEXT_TYPE_OVERHEARD] = TEXTBOX_FLAG_x1, + // Are these unused? Potentially they can be used. + TEXTBOX_FLAG_x1 | TEXTBOX_FLAG_INSTANT_TEXT | TEXTBOX_FLAG_SPEAKER, + TEXTBOX_FLAG_x1 | TEXTBOX_FLAG_SPEAKER, + TEXTBOX_FLAG_x1 | TEXTBOX_FLAG_x4 | TEXTBOX_FLAG_x8 | TEXTBOX_FLAG_SPEAKER, + TEXTBOX_FLAG_x1 | TEXTBOX_FLAG_x4 | TEXTBOX_FLAG_SPEAKER, + TEXTBOX_FLAG_NONE }; ALIGNED(4) static const u8 sInvalidText[] = _("{COLOR RED_W}invalidity{RESET}"); @@ -233,7 +241,8 @@ EWRAM_DATA u16 gUnknown_20399DE = 0; static void ResetAllTextboxPortraits(void); static bool8 ScriptPrintTextInternal(struct TextboxText *ptr, u32 flags_, s32 a2_, const char *text); -static u32 SetTextboxType(u32 textboxType, bool8 unused); +// textboxType: See enum "TextboxTypeID" +static bool8 SetTextboxType(u32 textboxType, bool8 unused); static void ResetTextbox(void); static bool8 IsTextboxOpen_809B40C(struct TextboxText *a0); static u8 *sub_809B428(u8 *a0, s32 a1, u8 *a2); @@ -292,13 +301,13 @@ void TextboxResetAll(void) ResetTextboxPortrait(index); } sTextbox->unk414 = 0; - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); } -static u32 SetTextboxType(u32 textboxType, bool8 unused) +static bool8 SetTextboxType(u32 textboxType, bool8 unused) { switch (textboxType) { - case 0: + case TEXTBOX_TYPE_0: ResetTextbox(); ShowWindows(0,1,1); break; @@ -311,7 +320,7 @@ static u32 SetTextboxType(u32 textboxType, bool8 unused) case TEXTBOX_TYPE_ON_BG_AUTO: ResetTextbox(); break; - case 4: + case TEXTBOX_TYPE_4: ResetTextbox(); break; default: @@ -320,7 +329,7 @@ static u32 SetTextboxType(u32 textboxType, bool8 unused) break; } sTextbox->type = textboxType; - return 1; + return TRUE; } void sub_809A6E4(u16 r0) @@ -366,17 +375,16 @@ bool8 sub_809A768(void) return FALSE; } -// I think these two functions are functionally equivalent. bool8 ScriptClearTextbox(void) { switch (sTextbox->type) { case TEXTBOX_TYPE_ON_BG_AUTO: - return ScriptPrintTextInternal(&sTextbox->text,4,-1,0); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_x4, -1, 0); case TEXTBOX_TYPE_NORMAL: case TEXTBOX_TYPE_ON_BG_PRESS: - return ScriptPrintTextInternal(&sTextbox->text,TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | 0x4,-1,0); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_x4, -1, 0); default: - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); return FALSE; } } @@ -387,9 +395,9 @@ bool8 ScriptClearTextbox2(void) case TEXTBOX_TYPE_ON_BG_AUTO: case TEXTBOX_TYPE_NORMAL: case TEXTBOX_TYPE_ON_BG_PRESS: - return ScriptPrintTextInternal(&sTextbox->text,4,-1,0); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_x4, -1, 0); default: - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); return FALSE; } } @@ -448,17 +456,17 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) TRY_CLOSE_FILE_AND_SET_NULL(portraitPtr->faceFile); - sub_80A7DDC(&local_28,&speciesId); + sub_80A7DDC(&local_28, &speciesId); if (local_28 >= 10 && local_28 <= 29) { Pokemon *pPVar6 = sub_80A8D54(local_28); if (pPVar6 == NULL) { showPortrait = FALSE; } - else if (pPVar6 == sub_808D3BC()) { - local_28 = 0x21; + else if (pPVar6 == GetLeaderMon2()) { + local_28 = 33; } - else if (pPVar6 == sub_808D3F8()) { - local_28 = 0x22; + else if (pPVar6 == GetPartnerMon2()) { + local_28 = 34; } else if (pPVar6->dungeonLocation.id == DUNGEON_FROSTY_GROTTO_2 || pPVar6->dungeonLocation.id == DUNGEON_HOWLING_FOREST_2 @@ -507,8 +515,8 @@ static bool8 sub_809A8B8(s32 param_1, s32 param_2) case 2: case 6: case 7: - case 0x21: - case 0x22: + case 33: + case 34: if (IsStarterMonster(speciesId)) { byte1 = TRUE; } @@ -733,7 +741,7 @@ static MonPortraitMsg *GetSpeakerPortrait(s32 portraitId_) return NULL; } -bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const char *text) +bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const u8 *text) { s32 speakerId = (s16) speakerId_; @@ -750,46 +758,40 @@ bool8 ScriptPrintText(s32 scriptMsgType, s32 speakerId_, const char *text) } // These 2 functions are identical. -bool8 ScriptPrintTextOnBg(const char *text) +bool8 ScriptPrintTextOnBg(const u8 *text) { - if (text == NULL) { + if (text == NULL) return ScriptClearTextbox(); - } - else if (text[0] == '\0') { + + if (text[0] == '\0') return ScriptClearTextbox(); - } - else { - SetTextboxType(TEXTBOX_TYPE_ON_BG_PRESS, TRUE); - return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); - } + + SetTextboxType(TEXTBOX_TYPE_ON_BG_PRESS, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); } -bool8 ScriptPrintTextOnBg2(const char *text) +bool8 ScriptPrintTextOnBg2(const u8 *text) { - if (text == NULL) { + if (text == NULL) return ScriptClearTextbox(); - } - else if (text[0] == '\0') { + + if (text[0] == '\0') return ScriptClearTextbox(); - } - else { - SetTextboxType(TEXTBOX_TYPE_ON_BG_PRESS, TRUE); - return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); - } + + SetTextboxType(TEXTBOX_TYPE_ON_BG_PRESS, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2 | TEXTBOX_FLAG_UNUSED_x2, -1, text); } -bool8 ScriptPrintTextOnBgAuto(s32 unused, const char *text) +bool8 ScriptPrintTextOnBgAuto(s32 unused, const u8 *text) { - if (text == NULL) { + if (text == NULL) return ScriptClearTextbox(); - } - else if (text[0] == '\0') { + + if (text[0] == '\0') return ScriptClearTextbox(); - } - else { - SetTextboxType(TEXTBOX_TYPE_ON_BG_AUTO, TRUE); - return ScriptPrintTextInternal(&sTextbox->text, 0x65, -1, text); - } + + SetTextboxType(TEXTBOX_TYPE_ON_BG_AUTO, TRUE); + return ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_x1 | TEXTBOX_FLAG_x4 | TEXTBOX_FLAG_INSTANT_TEXT | TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2, -1, text); } bool8 sub_809AFAC(void) @@ -797,7 +799,7 @@ bool8 sub_809AFAC(void) return (sTextbox->type == 4); } -void sub_809AFC8(s32 a0_, s32 a1, s32 a2_, const char *text) +void sub_809AFC8(s32 a0_, s32 a1, s32 a2_, const u8 *text) { s32 a0 = (u8) a0_; s32 a2 = (s16) a2_; @@ -816,7 +818,7 @@ bool8 sub_809AFFC(u8 *a0) return ret; } -void sub_809B028(const MenuItem * menuItems, s32 a1_, s32 a2, s32 a3, s32 a4_, const char *text) +void sub_809B028(const MenuItem * menuItems, s32 a1_, s32 a2, s32 a3, s32 a4_, const u8 *text) { s32 a1 = (u8) a1_; s32 a4 = (s16) a4_; @@ -857,20 +859,20 @@ bool8 sub_809B18C(s32 *sp) return (sTextbox->unk420 == 3); } -bool8 sub_809B1C0(s32 a0, u32 kind, void *a2) +bool8 ScriptSpecialTextHandler2(s32 kind, u32 a1, MonOrStrPtr_Arg monOrStr) { - return sub_809B1D4(a0, kind, 0, a2); + return ScriptSpecialTextHandler(kind, a1, 0, monOrStr); } -bool8 sub_809B1D4(s32 a0, u32 kind, s32 a2, void *a3) +bool8 ScriptSpecialTextHandler(s32 kind, u32 a1, s32 a2, MonOrStrPtr_Arg monOrStr) { - switch (a0) { - case 0xB: - if (sub_8021700(kind)) { + switch (kind) { + case SPECIAL_TEXT_BUY_FRIEND_AREAS: + if (sub_8021700(a1)) { return FALSE; } break; - case 0xC: + case SPECIAL_TEXT_DUNGEON_LIST: sub_8001D88(); if (HasZeroAvailableDungeons()) { return FALSE; @@ -878,14 +880,14 @@ bool8 sub_809B1D4(s32 a0, u32 kind, s32 a2, void *a3) break; } - SetTextboxType(4, FALSE); - sTextbox->unk414 = a0; + SetTextboxType(TEXTBOX_TYPE_4, FALSE); + sTextbox->unk414 = kind; sTextbox->unk418 = NULL; sTextbox->unk41C = NULL; sTextbox->unk420 = 1; - sTextbox->unk424 = kind; + sTextbox->unk424 = a1; sTextbox->unk428 = a2; - sTextbox->unk42C.str = a3; + SET_MONORSTRPTR(sTextbox->unk42C, monOrStr); sTextbox->unk430 = -1; return TRUE; } @@ -903,8 +905,7 @@ bool8 sub_809B260(s32 *a0) static void ResetTextbox(void) { SetCharacterMask(3); - // All this function call does is basically setting textboxText->unk4 = 0; - ScriptPrintTextInternal(&sTextbox->text, 0, -1, NULL); + ScriptPrintTextInternal(&sTextbox->text, TEXTBOX_FLAG_NONE, -1, NULL); } static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_, s32 speakerId_, const char *text) @@ -914,14 +915,14 @@ static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_ textboxText->flags = flags; if (text == NULL) { - if (flags == 0) { + if (flags == TEXTBOX_FLAG_NONE) { textboxText->unk4 = 0; return FALSE; } - if (flags & 4) { + if (flags & TEXTBOX_FLAG_x4) { sub_8014490(); - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); } return TRUE; } @@ -949,7 +950,7 @@ static bool8 ScriptPrintTextInternal(struct TextboxText *textboxText, u32 flags_ | ((flags & TEXTBOX_FLAG_INSTANT_TEXT) ? STR_FORMAT_FLAG_INSTANT_TEXT : 0) | ((flags & TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS_2) ? STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS_2 : 0) | ((flags & TEXTBOX_FLAG_WAIT_FOR_BUTTON_PRESS) ? STR_FORMAT_FLAG_WAIT_FOR_BUTTON_PRESS : 0) - | ((flags & 0x4) ? 0x200 : 0) + | ((flags & TEXTBOX_FLAG_x4) ? STR_FORMAT_FLAG_x200 : 0) | ((sTextbox->endMsgFrames != -1) ? STR_FORMAT_FLAG_TIMED_AUTO_MSG_CLOSE : 0) ); @@ -1006,7 +1007,7 @@ void sub_809B474(void) case 1: if (!sub_809B648()) { sTextbox->unk420 = 3; - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); break; } @@ -1017,7 +1018,7 @@ void sub_809B474(void) if (!unkStructPtr->unk4()) { sTextbox->unk430 = -1; sTextbox->unk420 = 3; - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); break; } } @@ -1041,7 +1042,7 @@ void sub_809B474(void) break; } sTextbox->unk420 = 3; - SetTextboxType(0, TRUE); + SetTextboxType(TEXTBOX_TYPE_0, TRUE); break; } break; @@ -1051,7 +1052,7 @@ void sub_809B474(void) void sub_809B57C(void) { - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); switch (sTextbox->type) { case 1: case 2: @@ -1489,14 +1490,14 @@ static bool8 sub_809B648(void) return 1; case 0xc: if (sTextbox->unk420 == 1) { - s32 var = sub_80A2654(GetScriptVarValue(0,0x12)); + s32 rescueDungeonID = ScriptDungeonIDToRescueDungeonID(GetScriptVarValue(NULL, DUNGEON_SELECT)); ResetTextbox(); if (!DungeonListMenu_Init(3,0,10,TRUE)) { sTextbox->unk430 = -1; return 0; } - if ((var != -1) && (!DungeonListMenu_MoveMenuTo(var))) { - SetScriptVarValue(0,0x12,-1); + if (rescueDungeonID != -1 && !DungeonListMenu_MoveMenuTo(rescueDungeonID)) { + SetScriptVarValue(NULL, DUNGEON_SELECT, -1); } PlayMenuSoundEffect(4); } @@ -1504,7 +1505,7 @@ static bool8 sub_809B648(void) switch (DungeonListMenu_GetInput(1)) { case 3: { s32 rescueDungeonId = DungeonListMenu_GetCurrentRescueDungeonId(); - SetScriptVarValue(0, 0x12, RescueDungeonToScriptDungeonId(rescueDungeonId)); + SetScriptVarValue(NULL, 0x12, RescueDungeonToScriptDungeonId(rescueDungeonId)); sTextbox->unk430 = rescueDungeonId; DungeonListMenu_Free(); return 0; @@ -1543,7 +1544,7 @@ static bool8 sub_809B648(void) if (sTextbox->unk420 == 1) { ResetTextbox(); if (sTextbox->unk414 == 0xe) { - SetScriptVarValue(0,0x18,1); + SetScriptVarValue(NULL,0x18,1); } sub_8011C28(1); PrepareSavePakWrite(0); @@ -1556,7 +1557,7 @@ static bool8 sub_809B648(void) FinishWriteSavePak(); return 0; case 0x10: { - bool8 unkBool = (sub_80023E4(4) != 0); + bool8 unkBool = (CheckQuest(QUEST_SQUARE_ASLEEP) != FALSE); ResetTextbox(); if (CreateKangaskhanStorage(unkBool)) { sTextbox->unk418 = &gUnknown_81161C8; @@ -1569,7 +1570,7 @@ static bool8 sub_809B648(void) sTextbox->unk418 = &gUnknown_81161D8; return 1; case 0x13: { - bool8 unkBool = (sub_80023E4(4) != 0); + bool8 unkBool = (CheckQuest(QUEST_SQUARE_ASLEEP) != FALSE); ResetTextbox(); if (CreateFelicityBank(unkBool)) { sTextbox->unk418 = &gUnknown_81161E8; @@ -1583,7 +1584,7 @@ static bool8 sub_809B648(void) case 0x17: case 0x18: { u8 var; - bool8 unkBool = sub_80023E4(4); + bool8 unkBool = CheckQuest(QUEST_SQUARE_ASLEEP); ResetTextbox(); if (sTextbox->unk414 == 0x17) { var = (unkBool == 0) ? 0 : 1; @@ -1605,7 +1606,7 @@ static bool8 sub_809B648(void) } } case 0x19: { - bool8 unkBool = (sub_80023E4(4) != 0); + bool8 unkBool = (CheckQuest(QUEST_SQUARE_ASLEEP) != FALSE); ResetTextbox(); if (sub_801FB50(unkBool)) { sTextbox->unk418 = &gUnknown_8116208; @@ -1625,9 +1626,9 @@ static bool8 sub_809B648(void) } else { s32 iVar10 = sub_80246F0(); - if (GetScriptVarValue(0,0x39) == 0 && HasEvolutionCompleted()) { - SetScriptVarValue(0,0x39,1); - GroundMap_ExecuteEvent(0x46,0); + if (GetScriptVarValue(NULL, EVENT_LOCAL) == 0 && HasEvolutionCompleted()) { + SetScriptVarValue(NULL, EVENT_LOCAL, 1); + GroundMap_ExecuteEvent(EVOLUTION_HERO, FALSE); } if (iVar10 == 3) { @@ -1646,7 +1647,7 @@ static bool8 sub_809B648(void) } return 0; case 0x1b: { - bool8 unk = (sub_80023E4(4) != 0); + bool8 unk = CheckQuest(QUEST_SQUARE_ASLEEP) != FALSE; ResetTextbox(); if (CreateWigglytuffShop(unk)) { sTextbox->unk418 = &gUnknown_8116218; @@ -1727,11 +1728,11 @@ static bool8 sub_809B648(void) return 0; } else { - s32 iVar14 = GetScriptVarValue(0,0x19); + s32 iVar14 = GetScriptVarValue(NULL,0x19); if (iVar14 < 100) { - SetScriptVarValue(0,0x19,iVar14 + 1); + SetScriptVarValue(NULL,0x19,iVar14 + 1); } - SetScriptVarValue(0,0x39,1); + SetScriptVarValue(NULL,0x39,1); ScenarioCalc(2,local_20,local_1c + 1); sTextbox->unk418 = &gUnknown_8116288; return 1; @@ -1739,7 +1740,7 @@ static bool8 sub_809B648(void) } case 0x24: if (sTextbox->unk420 == 1) { - u32 uVar19 = sub_80023E4(4) == 0 ? 0 : 4; + u32 uVar19 = CheckQuest(QUEST_SQUARE_ASLEEP) == FALSE ? 0 : 4; ResetTextbox(); if (MakuhitaDojo_New(uVar19)) { return 1; @@ -1770,7 +1771,7 @@ static bool8 sub_809B648(void) return 0; case 0x25: { s32 var = 1; - if (sub_80023E4(4)) { + if (CheckQuest(QUEST_SQUARE_ASLEEP)) { var = 5; } ResetTextbox(); @@ -1785,7 +1786,7 @@ static bool8 sub_809B648(void) } case 0x26: { s32 var = 2; - if (sub_80023E4(4)) { + if (CheckQuest(QUEST_SQUARE_ASLEEP)) { var = 6; } ResetTextbox(); @@ -1800,7 +1801,7 @@ static bool8 sub_809B648(void) } case 0x27: { s32 var = 3; - if (sub_80023E4(4)) { + if (CheckQuest(QUEST_SQUARE_ASLEEP)) { var = 7; } ResetTextbox(); @@ -1983,17 +1984,17 @@ static void sub_809C478(void) static void sub_809C4B0(void) { - s16 scriptIndex_s16; - s32 scriptIndex = -1; + s16 scriptID_s16; + s32 scriptID = -1; if (sTextbox->unk430 == 0) { - scriptIndex = sub_803B168(); + scriptID = sub_803B168(); ASM_MATCH_TRICK(sTextbox->unk5A4); - scriptIndex_s16 = scriptIndex; + scriptID_s16 = scriptID; - sTextbox->unk5A4 = scriptIndex_s16; - sTextbox->unk430 = scriptIndex; + sTextbox->unk5A4 = scriptID_s16; + sTextbox->unk430 = scriptID; } else { sTextbox->unk430 = -1; @@ -2001,8 +2002,8 @@ static void sub_809C4B0(void) sub_803B1BC(); - if (scriptIndex != -1) - GroundMap_ExecuteEvent(scriptIndex, 0); + if (scriptID != -1) + GroundMap_ExecuteEvent(scriptID, FALSE); } static void sub_809C504(void) diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c index 9d8d72a20..9313ec08a 100644 --- a/src/thank_you_wonder_mail.c +++ b/src/thank_you_wonder_mail.c @@ -1245,7 +1245,7 @@ void UpdateThankYouMailText(void) switch(sUnknown_203B2C4->state) { case 5: - pokeStruct = GetPlayerPokemonStruct(); + pokeStruct = GetLeaderMon1(); StrncpyCustom(buffer1,pokeStruct->name, POKEMON_NAME_LENGTH); sprintfStatic(sUnknown_203B2C4->formattedString,gUnknown_80DF250,buffer1); CreateDialogueBoxAndPortrait(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->monPortrait,0x10d); @@ -1403,7 +1403,7 @@ void UpdateThankYouMailText(void) CreateMenuDialogueBoxAndPortrait(gUnknown_80DF5E4,0,7,gUnknown_80DEE44,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case THANK_YOU_MAIL_COMMS_CLEANUP: - pokeStruct2 = GetPlayerPokemonStruct(); + pokeStruct2 = GetLeaderMon1(); StrncpyCustom(buffer2, pokeStruct2->name, POKEMON_NAME_LENGTH); sprintfStatic(sUnknown_203B2C4->formattedString,gUnknown_80DF63C,buffer2); CreateDialogueBoxAndPortrait(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->monPortrait,0x10d); diff --git a/src/training_maze.c b/src/training_maze.c index 894265c99..e397028dd 100644 --- a/src/training_maze.c +++ b/src/training_maze.c @@ -23,7 +23,7 @@ UNUSED static void nullsub_208(void) bool8 sub_8097504(s16 mazeIndex) { - s32 uVar3; + s32 questID; s32 mazeIndex_ = Self_s16(mazeIndex); // Needed to match if (mazeIndex < 17) { switch (mazeIndex) { @@ -31,7 +31,7 @@ bool8 sub_8097504(s16 mazeIndex) case 10: case 11: case 12: - uVar3 = 14; + questID = QUEST_MAZE_14; break; case 0: case 1: @@ -39,7 +39,7 @@ bool8 sub_8097504(s16 mazeIndex) case 7: case 9: case 14: - uVar3 = 15; + questID = QUEST_MAZE_15; break; case 3: case 4: @@ -47,7 +47,7 @@ bool8 sub_8097504(s16 mazeIndex) case 8: return TRUE; case 13: - uVar3 = 6; + questID = QUEST_REACHED_POSTGAME; break; default: return TRUE; @@ -57,15 +57,13 @@ bool8 sub_8097504(s16 mazeIndex) if (mazeIndex_ > 22) return FALSE; if (mazeIndex_ == 22) return FALSE; if (mazeIndex_ == 21) return FALSE; - uVar3 = 6; + questID = QUEST_REACHED_POSTGAME; } - if (!sub_80023E4(uVar3)) { + if (!CheckQuest(questID)) return FALSE; - } - else { - return TRUE; - } + + return TRUE; } bool8 IsMazeCompleted(s16 mazeIndex) diff --git a/src/trap.c b/src/trap.c index 3b6e7fcf2..b78eb0e6c 100644 --- a/src/trap.c +++ b/src/trap.c @@ -204,10 +204,10 @@ bool8 sub_807FD84(Entity *entity) gDungeon->unk13570 = 0; flag = LayTrap(&gDungeon->trapPos,gDungeon->trapID,gDungeon->unk13579); if (flag) { - LogMessageByIdWithPopupCheckUserUnknown(entity,&gDungeon->trapPos,gUnknown_80FC5F8); // A trap was laid! + LogMessageByIdWithPopupCheckUserUnknown_Async(entity,&gDungeon->trapPos,gUnknown_80FC5F8); // A trap was laid! } else { - LogMessageByIdWithPopupCheckUserUnknown(entity,&gDungeon->trapPos,gUnknown_80FC5FC); // A trap can't be laid here. + LogMessageByIdWithPopupCheckUserUnknown_Async(entity,&gDungeon->trapPos,gUnknown_80FC5FC); // A trap can't be laid here. } UpdateTrapsVisibility(); } @@ -299,7 +299,7 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) if (sub_803F428(pos)) { UpdateTrapsVisibility(); } - TryDisplayDungeonLoggableMessage3(pokemon,target,text); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,text); if (param_3 == 0) { return; } @@ -310,10 +310,10 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) UpdateTrapsVisibility(); sub_804225C(pokemon,pos,trapData->id); if (gDungeon->unk181e8.blinded) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD7F4); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD7F4); } else { - LogMessageByIdWithPopupCheckUser(pokemon,gSteppedOnTrapStrings[trapData->id]); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gSteppedOnTrapStrings[trapData->id]); } } if (target != NULL) { @@ -377,7 +377,7 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) break; case TRAP_CHESTNUT_TRAP: if (target != NULL) { - DealDamageToEntity(target,gChestnutTrapDmgValue,RESIDUAL_DAMAGE_CHESTNUT_TRAP,DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP); + DealDamageToEntity_Async(target,gChestnutTrapDmgValue,RESIDUAL_DAMAGE_CHESTNUT_TRAP,DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP); } break; case TRAP_WONDER_TILE: @@ -389,7 +389,7 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4) break; case TRAP_SPIKE_TRAP: if (target != NULL) { - DealDamageToEntity(target,gSpikeTrapDmgValue,RESIDUAL_DAMAGE_SPIKES,DUNGEON_EXIT_FAINTED_FROM_SPIKES); + DealDamageToEntity_Async(target,gSpikeTrapDmgValue,RESIDUAL_DAMAGE_SPIKES,DUNGEON_EXIT_FAINTED_FROM_SPIKES); } } if (EntityIsValid(target)) { @@ -433,7 +433,7 @@ void HandleStickyTrap(Entity *pokemon,Entity *target) info = GetEntInfo(target); if (HasHeldItem(target,0xe)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDC7C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDC7C); } else { @@ -455,14 +455,14 @@ void HandleStickyTrap(Entity *pokemon,Entity *target) } if (itemCount == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDC40); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDC40); } else { newIndex = DungeonRandInt(itemCount); sub_8045BF8(gFormatBuffer_Items[0], itemStack[newIndex]); itemStack[newIndex]->flags |= ITEM_FLAG_STICKY; sub_80421C0(target, 0x192); - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDC18); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDC18); } } } @@ -549,14 +549,14 @@ void HandleGrimyTrap(Entity *pokemon, Entity *target) } } if (badFoodCount == 1) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD788); // A food item went bad. + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD788); // A food item went bad. } else if (badFoodCount == 0) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD7D4); // Nothing particularly bad happened. + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD7D4); // Nothing particularly bad happened. } else { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD7AC); // Several food items went bad + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD7AC); // Several food items went bad } } } @@ -569,7 +569,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile) flag = FALSE; if (target != NULL) { if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FED0C); // But nothing happened... + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FED0C); // But nothing happened... } else { @@ -578,29 +578,29 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile) SetTrap(tile, 0x1B); flag = TRUE; sub_80421C0(target,0x193); - sub_803E708(0x1e,0x48); + DungeonWaitFrames_Async(0x1e,0x48); } if (info->isTeamLeader) { if (GetFloorType() != 2) { info->unk15C = 1; info->unk15E = 1; - sub_803E708(0x28,0x4b); - DealDamageToEntity(target,gPitfallTrapDmgValue,RESIDUAL_DAMAGE_PITFALL,DUNGEON_EXIT_FELL_INTO_PITFALL); - gDungeon->unk2 = 2; + DungeonWaitFrames_Async(0x28,0x4b); + DealDamageToEntity_Async(target,gPitfallTrapDmgValue,RESIDUAL_DAMAGE_PITFALL,DUNGEON_EXIT_FELL_INTO_PITFALL); + gDungeon->unk2 = DUNGEON_UNK2_PITFALL_TRAP; return; } - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80F9728); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80F9728); } else { SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (info->isNotTeamMember) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F970C); // $m0 fell into the pitfall! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F970C); // $m0 fell into the pitfall! } else { - DisplayDungeonLoggableMessageTrue(pokemon,gUnknown_80F970C); // $m0 fell into the pitfall! + DisplayDungeonLoggableMessageTrue_Async(pokemon,gUnknown_80F970C); // $m0 fell into the pitfall! } - HandleFaint(target,DUNGEON_EXIT_FELL_INTO_PITFALL,pokemon); + HandleFaint_Async(target,DUNGEON_EXIT_FELL_INTO_PITFALL,pokemon); } if (flag) { SetTrap(tile, TRAP_PITFALL_TRAP); @@ -650,11 +650,11 @@ void HandleSummonTrap(Entity *pokemon,DungeonPos *pos) sub_80421EC(pos,0x194); if (pokemonSummonCount == 0) { _ret: - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FED04); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FED04); } else { - LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FED00); + LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FED00); } } } @@ -691,9 +691,9 @@ void HandlePPZeroTrap(Entity *param_1,Entity *param_2) flag = TRUE; } if(flag) - TryDisplayDungeonLoggableMessage3(param_1,param_2,gUnknown_80FDA80); + TryDisplayDungeonLoggableMessage3_Async(param_1,param_2,gUnknown_80FDA80); else - TryDisplayDungeonLoggableMessage3(param_1,param_2,gUnknown_80FDAA0); + TryDisplayDungeonLoggableMessage3_Async(param_1,param_2,gUnknown_80FDAA0); } } @@ -731,9 +731,9 @@ void HandleSealTrap(Entity *param_1,Entity *param_2) flag = TRUE; } if(flag) - TryDisplayDungeonLoggableMessage3(param_1,param_2,gUnknown_80FDB04); + TryDisplayDungeonLoggableMessage3_Async(param_1,param_2,gUnknown_80FDB04); else - TryDisplayDungeonLoggableMessage3(param_1,param_2,gUnknown_80FDB2C); + TryDisplayDungeonLoggableMessage3_Async(param_1,param_2,gUnknown_80FDB2C); } } @@ -757,7 +757,7 @@ void HandlePokemonTrap(Entity *param_1,DungeonPos *pos) s32 range = gDungeon->unk181e8.visibilityRange; if (IsFloorwideFixedRoom()) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FED08); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FED08); return; } @@ -819,10 +819,10 @@ void HandlePokemonTrap(Entity *param_1,DungeonPos *pos) } if (counter != 0) { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FDACC); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FDACC); } else { - LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FDAE4); + LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FDAE4); } } @@ -835,7 +835,7 @@ void HandleTripTrap(Entity *pokemon, Entity *target) if (target != NULL) { sub_806CDD4(target, 6, NUM_DIRECTIONS); - sub_803E708(0x10, 0x55); + DungeonWaitFrames_Async(0x10, 0x55); sub_806CE68(target, NUM_DIRECTIONS); info = GetEntInfo(target); if ((info->heldItem).flags & ITEM_FLAG_EXISTS) { diff --git a/src/trawl_orb.c b/src/trawl_orb.c index 045372727..e8715efa6 100644 --- a/src/trawl_orb.c +++ b/src/trawl_orb.c @@ -69,7 +69,7 @@ void HandleTrawlOrb(Entity *user, Entity *target) } if (itemsCount == 0) { - LogMessageByIdWithPopupCheckUser(user, gUnknown_80FE034); + LogMessageByIdWithPopupCheckUser_Async(user, gUnknown_80FE034); } else { s32 var; @@ -154,10 +154,10 @@ void HandleTrawlOrb(Entity *user, Entity *target) } if (hasTrawled) { - LogMessageByIdWithPopupCheckUser(user, gUnknown_80FE060); + LogMessageByIdWithPopupCheckUser_Async(user, gUnknown_80FE060); } else { - LogMessageByIdWithPopupCheckUser(user, gUnknown_80FE034); + LogMessageByIdWithPopupCheckUser_Async(user, gUnknown_80FE034); } sub_807EC28(1); } diff --git a/src/warp_target.c b/src/warp_target.c index e25addd36..a70b7653f 100644 --- a/src/warp_target.c +++ b/src/warp_target.c @@ -42,24 +42,24 @@ void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0); if (AbilityIsActive(target,ABILITY_SUCTION_CUPS)) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCAE8); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCAE8); return; } if (IsCurrentFixedRoomBossFight()) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC97C); + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC97C); return; } if (param_3 == 1) { DungeonPos stairsPosition = gDungeon->stairsSpawn; if(stairsPosition.x == target->pos.x && stairsPosition.y == target->pos.y) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC9A0); // It's already on the stairs! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC9A0); // It's already on the stairs! PetrifiedStatusTarget(pokemon,target); return; } } - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC584); // $m0 warped! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC584); // $m0 warped! TrySendImmobilizeSleepEndMsg(target,target); sub_80421AC(pokemon,target); if (ShouldDisplayEntity(target)) { @@ -124,7 +124,7 @@ void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) target->unk1C = IntToF248(0); DungeonRunFrameActions(0x22); if (flag) { - TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCB14); // But it dropped back at the same spot! + TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCB14); // But it dropped back at the same spot! } if (param_3 == 1) { PetrifiedStatusTarget(pokemon,target); @@ -136,5 +136,5 @@ void WarpTarget(Entity *pokemon, Entity *target, u32 param_3, DungeonPos *pos) sub_807EC28(0); } sub_806A5B8(target); - TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse); + TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse); } diff --git a/src/weather.c b/src/weather.c index 53831065e..0ecf0ded7 100644 --- a/src/weather.c +++ b/src/weather.c @@ -86,12 +86,12 @@ static void sub_807E698(bool8 arg0) { s32 i, j; s32 weatherArrId = GetApparentWeather(NULL) * COLOR_RAMP_COUNT; - RGB *fileData = (void *) gUnknown_202ECA0->data; + RGB_Struct *fileData = (void *) gUnknown_202ECA0->data; u8 savedByte; sub_8042818(GetApparentWeather(NULL), arg0); DungeonRunFrameActions(0x25); - sub_804178C(1); + sub_804178C_Async(1); savedByte = gUnknown_203B40D; gUnknown_203B40D = 1; @@ -159,9 +159,9 @@ void sub_807E7FC(bool8 r0) } if (r0) { - if (gDungeon->unk1356C == 0) { + if (!gDungeon->unk1356C) { GetWeatherName(gFormatBuffer_Monsters[0], GetApparentWeather(NULL)); - LogMessageByIdWithPopupCheckUser(cameraTarget, gUnknown_80FC5E0); // Weather: {ARG_POKEMON_0} + LogMessageByIdWithPopupCheckUser_Async(cameraTarget, gUnknown_80FC5E0); // Weather: {ARG_POKEMON_0} } } @@ -177,7 +177,7 @@ void sub_807E88C(void) { s32 i; s32 weatherArrId = GetApparentWeather(0) * COLOR_RAMP_COUNT; - RGB *fileData = (void *) gUnknown_202ECA0->data; + RGB_Struct *fileData = (void *) gUnknown_202ECA0->data; for (i = 0; i < COLOR_RAMP_COUNT; i++) { gDungeon->colorRamp[i].r = fileData[weatherArrId + i].r; @@ -240,11 +240,11 @@ void MudWaterSportEffect(u8 which) { if (which == 0) { gDungeon->weather.mudSportTurns = CalculateStatusTurns(0, gMudWaterSportTurnRange, FALSE); - LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FAD8C); + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FAD8C); } else { gDungeon->weather.waterSportTurns =CalculateStatusTurns(0, gMudWaterSportTurnRange, FALSE); - LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FADB0); + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FADB0); } } @@ -296,13 +296,13 @@ bool8 sub_807EAA0(bool8 arg0, bool8 arg1) if (gDungeon->weather.mudSportTurns != 0) { sub_80838EC(&gDungeon->weather.mudSportTurns); if (gDungeon->weather.mudSportTurns == 0) { - LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FA778); + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FA778); } } if (gDungeon->weather.waterSportTurns != 0) { sub_80838EC(&gDungeon->weather.waterSportTurns); if (gDungeon->weather.waterSportTurns == 0) { - LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FA758); + LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FA758); } } diff --git a/src/wigglytuff_shop1.c b/src/wigglytuff_shop1.c index 548a49e7e..d324fa48e 100644 --- a/src/wigglytuff_shop1.c +++ b/src/wigglytuff_shop1.c @@ -198,7 +198,7 @@ static s32 sub_8021664(void) counter++; break; case UNLOCK_SHOP_POST_GAME: - if (sub_80023E4(6)) { + if (CheckQuest(QUEST_REACHED_POSTGAME)) { sWigglytuffShop1Work->friendAreas[counter] = i; counter++; } @@ -233,7 +233,7 @@ bool8 sub_8021700(u32 kind) case UNLOCK_SHOP_STORY: return FALSE; case UNLOCK_SHOP_POST_GAME: - if (sub_80023E4(6)) + if (CheckQuest(QUEST_REACHED_POSTGAME)) return FALSE; break; } diff --git a/src/wigglytuff_shop2.c b/src/wigglytuff_shop2.c index baa6afc3a..5cc8eb295 100644 --- a/src/wigglytuff_shop2.c +++ b/src/wigglytuff_shop2.c @@ -156,7 +156,7 @@ static void sub_8021A60(void) } for (index = 0; index < MONSTER_MAX; index++) { - if (!sub_8098134(index)) + if (!GetMonSeenFlag(index)) continue; areaIndex = CheckSpeciesinWigglytuffFriendArea(index); diff --git a/src/wigglytuff_shop3.c b/src/wigglytuff_shop3.c index 37ef5acde..0d9863480 100644 --- a/src/wigglytuff_shop3.c +++ b/src/wigglytuff_shop3.c @@ -279,7 +279,7 @@ static void UpdateWigglytuffDialogue(void) else { switch (GetFriendAreaUnlockCondition(sWigglytuffShop3Work->chosenFriendArea)) { case UNLOCK_SHOP_POST_GAME: - if (sub_80023E4(6) != 0) + if (CheckQuest(QUEST_REACHED_POSTGAME)) sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_AGAIN; else sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_POST_GAME; diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c index e9c7e81e8..18cf6a651 100644 --- a/src/wonder_mail_2.c +++ b/src/wonder_mail_2.c @@ -14,6 +14,7 @@ #include "menu_input.h" #include "pokemon.h" #include "pokemon_mail.h" +#include "rescue_team_info.h" #include "save.h" #include "save_write.h" #include "string_format.h" @@ -40,7 +41,6 @@ enum States { static EWRAM_INIT struct unkStruct_203B2C8 *sUnknown_203B2C8 = {NULL}; -extern void sub_80920D8(u8 *buffer); extern void sub_802B548(u32); extern void sub_802B560(void); @@ -145,7 +145,7 @@ void sub_802B3E0(void) switch(sUnknown_203B2C8->currState) { case INIT_STATE: - if (sub_80023E4(0)) { + if (CheckQuest(QUEST_SET_TEAM_NAME)) { // Copy Team Name to buffer sub_80920D8(teamNameBuffer); } diff --git a/src/wonder_mail_802D098.c b/src/wonder_mail_802D098.c index 1aa0f21ad..86ff1d888 100644 --- a/src/wonder_mail_802D098.c +++ b/src/wonder_mail_802D098.c @@ -227,16 +227,16 @@ static void sub_802D2A8(void) switch (sUnknown_203B2F8->mail->wonderMail.dungeonSeed.location.id) { case DUNGEON_ODDITY_CAVE: - sub_8097418(DUNGEON_ODDITY_CAVE - 1, 1); + SetRescueScenarioConquered(RESCUE_DUNGEON_ODDITY_CAVE, TRUE); break; case DUNGEON_REMAINS_ISLAND: - sub_8097418(DUNGEON_REMAINS_ISLAND - 1, 1); + SetRescueScenarioConquered(RESCUE_DUNGEON_REMAINS_ISLAND, TRUE); break; case DUNGEON_MARVELOUS_SEA: - sub_8097418(DUNGEON_MARVELOUS_SEA - 1, 1); + SetRescueScenarioConquered(RESCUE_DUNGEON_MARVELOUS_SEA, TRUE); break; case DUNGEON_FANTASY_STRAIT: - sub_8097418(DUNGEON_FANTASY_STRAIT - 1, 1); + SetRescueScenarioConquered(RESCUE_DUNGEON_FANTASY_STRAIT, TRUE); break; } diff --git a/src/world_map.c b/src/world_map.c index f1af558cd..fc3fbe0aa 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -30,18 +30,24 @@ static EWRAM_INIT struct WorldMap *sWorldMapPtr = NULL; static EWRAM_INIT WindowTemplates sWorldMapWindows = { .id = { [0] = { + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, - .pos = {2, 10}, + .pos = { 2, 10 }, .width = 26, .height = 9, - .unk10 = 9, + .totalHeight = 9, + .unk12 = 0, + .header = NULL, }, [1] = { + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, - .pos = {23, 6}, + .pos = { 23, 6 }, .width = 5, .height = 3, - .unk10 = 3, + .totalHeight = 3, + .unk12 = 0, + .header = NULL, }, [2] = WIN_TEMPLATE_DUMMY, [3] = WIN_TEMPLATE_DUMMY, @@ -98,7 +104,7 @@ void ShowWorldMap_Async(struct WorldMapSetupStruct *setupPtr) speciesId = 0; } - dungeonEnter = BufferDungeonRequirementsText(setupPtr->info.unk4.unk0.id, speciesId, text, setupPtr->info.unk6C, FALSE); + dungeonEnter = BufferDungeonRequirementsText(setupPtr->info.unk4.unk0.id, speciesId, text, setupPtr->info.canChangeLeader, FALSE); if (dungeonEnter == DUNGEON_REQUIREMENTS_PASS) { setupPtr->dungeonEntered = TRUE; } @@ -273,7 +279,7 @@ static void sub_801059C(void) u8 filename[0xC]; s32 i, size; - Pokemon *pokeStruct = GetPlayerPokemonStruct(); + Pokemon *pokeStruct = GetLeaderMon1(); OpenedFile *file = OpenFileAndGetFileDataPtr(gUnknown_80D4014[0], &gTitleMenuFileArchive); OpenedFile *file2 = OpenFileAndGetFileDataPtr(gUnknown_80D4014[1], &gTitleMenuFileArchive); @@ -424,7 +430,7 @@ static bool8 FadeScreen(void) if (sWorldMapPtr->brightness < 31) { s32 i; - RGB *color = (void *) sWorldMapPtr->unk1100[0]->data; + RGB_Struct *color = (void *) sWorldMapPtr->unk1100[0]->data; if (++sWorldMapPtr->brightness >= 31) { sWorldMapPtr->brightness = 31; @@ -478,11 +484,14 @@ static void PrintDungeonName(DungeonLocation *dungLocation) WindowTemplates windows = { .id = { [0] = { + .flags = WINTEMPLATE_FLAG_NONE, .type = WINDOW_TYPE_NORMAL, - .pos = {12, 2}, + .pos = { 12, 2 }, .width = 16, .height = 2, - .unk10 = 2, + .totalHeight = 2, + .unk12 = 0, + .header = NULL, }, [1] = WIN_TEMPLATE_DUMMY, [2] = WIN_TEMPLATE_DUMMY, @@ -511,7 +520,7 @@ static void PrintDialogueMessage_Async(const u8 *text) CreateMenuDialogueBoxAndPortrait(text, NULL, 0, NULL, NULL, 3, 0, NULL, 0x301); do { - DrawDialogueBoxString(); + DrawDialogueBoxString_Async(); WorldMap_RunFrameActions(); } while (sub_80144A4(&a) != 0); @@ -533,7 +542,7 @@ static bool8 PlayerEnterDungeonPrompt_Async(u8 *str) height /= 8; sWorldMapWindows.id[0].pos.y = 19 - height; - sWorldMapWindows.id[0].unk10 = height; + sWorldMapWindows.id[0].totalHeight = height; sWorldMapWindows.id[0].height = height; sWorldMapWindows.id[1].pos.y = 14 - height; ShowWindows(&sWorldMapWindows, TRUE, TRUE); diff --git a/src/world_map_sound.c b/src/world_map_sound.c index 932784d84..e145660a9 100644 --- a/src/world_map_sound.c +++ b/src/world_map_sound.c @@ -9,15 +9,15 @@ void PlayFriendAreasMapBGM(void) { - if (sub_80023E4(13)) + if (CheckQuest(QUEST_IN_WORLD_CALAMITY)) StartNewBGM(MUS_WORLD_CALAMITY); - else if (sub_80023E4(12)) + else if (CheckQuest(QUEST_UNK12)) StartNewBGM(MUS_POKEMON_SQUARE); } void PlayWorldMapBGM(void) { - if (sub_80023E4(13)) + if (CheckQuest(QUEST_IN_WORLD_CALAMITY)) StartNewBGM(MUS_WORLD_CALAMITY); else StartNewBGM(MUS_POKEMON_SQUARE); @@ -25,7 +25,7 @@ void PlayWorldMapBGM(void) void FadeOutFriendAreasMapBGM(void) { - if (!sub_80023E4(13)) + if (!CheckQuest(QUEST_IN_WORLD_CALAMITY)) FadeOutBGM(30); }