From 0b2f2f690bb86e41ab8eafd5494bb29af4abf91c Mon Sep 17 00:00:00 2001 From: Kuruyia Date: Tue, 28 Apr 2026 01:24:24 +0200 Subject: [PATCH] Add distortion world progress enum This adds an enum for the different values that the Distortion World progress script variable can take. The names for the enum variants are based on the major events that happen while exploring the Distortion World which updates this variable. References to this variable in Distortion World scripts and overlay 9 were updated. Signed-off-by: Kuruyia --- asm/macros/scrcmd.inc | 1 + include/constants/distortion_world.h | 22 +++++ .../scripts/scripts_distortion_world_1f.s | 2 +- .../scripts/scripts_distortion_world_b1f.s | 2 +- .../scripts/scripts_distortion_world_b2f.s | 4 +- .../scripts/scripts_distortion_world_b3f.s | 2 +- .../scripts/scripts_distortion_world_b6f.s | 4 +- .../scripts/scripts_distortion_world_b7f.s | 8 +- .../scripts_distortion_world_giratina_room.s | 2 +- .../scripts_init_distortion_world_1f.s | 2 +- .../scripts_init_distortion_world_b1f.s | 2 +- .../scripts_init_distortion_world_b7f.s | 2 +- src/overlay009/ov9_02249960.c | 83 ++++++++++--------- 13 files changed, 80 insertions(+), 56 deletions(-) create mode 100644 include/constants/distortion_world.h diff --git a/asm/macros/scrcmd.inc b/asm/macros/scrcmd.inc index 1923c07126..1e76185982 100644 --- a/asm/macros/scrcmd.inc +++ b/asm/macros/scrcmd.inc @@ -38,6 +38,7 @@ #include "constants/battle/battle_script.h" #include "constants/boat_cutscene.h" #include "constants/colors.h" +#include "constants/distortion_world.h" #include "constants/elevator_dirs.h" #include "constants/fade_screen.h" #include "constants/forms.h" diff --git a/include/constants/distortion_world.h b/include/constants/distortion_world.h new file mode 100644 index 0000000000..1fb878f239 --- /dev/null +++ b/include/constants/distortion_world.h @@ -0,0 +1,22 @@ +#ifndef POKEPLATINUM_CONSTANTS_DISTORTION_WORLD_H +#define POKEPLATINUM_CONSTANTS_DISTORTION_WORLD_H + +enum DistWorldProgress { + DIST_WORLD_PROGRESS_NONE = 0, + DIST_WORLD_PROGRESS_ENTERED_1F, + DIST_WORLD_PROGRESS_JUMPED_ON_1F_ELEVATOR, + DIST_WORLD_PROGRESS_ENTERED_B1F, + DIST_WORLD_PROGRESS_SAW_B1F_MESPRIT, + DIST_WORLD_PROGRESS_TALKED_TO_B2F_CYNTHIA, + DIST_WORLD_PROGRESS_TALKED_TO_B3F_CYRUS, + DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE, + DIST_WORLD_PROGRESS_ENTERED_B7F, + DIST_WORLD_PROGRESS_LISTENED_TO_CYNTHIA_CYRUS, + DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE, + DIST_WORLD_PROGRESS_GIRATINA_ROOM_FIRST_SHADOW, + DIST_WORLD_PROGRESS_GIRATINA_ROOM_SECOND_SHADOW, + DIST_WORLD_PROGRESS_GIRATINA_ARRIVED, + DIST_WORLD_PROGRESS_BATTLED_GIRATINA +}; + +#endif // POKEPLATINUM_CONSTANTS_DISTORTION_WORLD_H diff --git a/res/field/scripts/scripts_distortion_world_1f.s b/res/field/scripts/scripts_distortion_world_1f.s index 458bcb8fc6..866aadbd88 100644 --- a/res/field/scripts/scripts_distortion_world_1f.s +++ b/res/field/scripts/scripts_distortion_world_1f.s @@ -77,7 +77,7 @@ DistortionWorld1F_OnFrame_FirstEntry: ApplyMovement LOCALID_CYNTHIA, DistortionWorld1F_Movement_CynthiaLeave WaitMovement DeleteDistortionWorldMapObject LOCALID_CYNTHIA - SetVar VAR_DISTORTION_WORLD_PROGRESS, 1 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_ENTERED_1F ReleaseAll End diff --git a/res/field/scripts/scripts_distortion_world_b1f.s b/res/field/scripts/scripts_distortion_world_b1f.s index 2264fa88fe..4405a392c5 100644 --- a/res/field/scripts/scripts_distortion_world_b1f.s +++ b/res/field/scripts/scripts_distortion_world_b1f.s @@ -25,7 +25,7 @@ DistortionWorldB1F_OnFrame_FirstEntry: ApplyMovement LOCALID_PLAYER, DistortionWorldB1F_Movement_PlayerWatchCynthiaLeave WaitMovement DeleteDistortionWorldMapObject LOCALID_CYNTHIA - SetVar VAR_DISTORTION_WORLD_PROGRESS, 3 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_ENTERED_B1F ReleaseAll End diff --git a/res/field/scripts/scripts_distortion_world_b2f.s b/res/field/scripts/scripts_distortion_world_b2f.s index 0896f0e5b6..b94b0b05c3 100644 --- a/res/field/scripts/scripts_distortion_world_b2f.s +++ b/res/field/scripts/scripts_distortion_world_b2f.s @@ -16,7 +16,7 @@ DistortionWorldB2F_OnTransition: DistortionWorldB2F_OnFrame_FirstEntry: PlaySE SEQ_SE_CONFIRM LockAll - GoToIfEq VAR_DISTORTION_WORLD_PROGRESS, 5, DistortionWorldB2F_Cynthia + GoToIfEq VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_TALKED_TO_B2F_CYNTHIA, DistortionWorldB2F_Cynthia GetPlayer3DPos VAR_0x8004, VAR_0x8005, VAR_0x8006 GoToIfEq VAR_0x8005, 232, DistortionWorldB2F_LetsSplitUpY232 ApplyMovement LOCALID_CYNTHIA, DistortionWorldB2F_Movement_CynthiaFaceSouth @@ -36,7 +36,7 @@ DistortionWorldB2F_LetsSplitUpY232: ApplyMovement LOCALID_PLAYER, _011C WaitMovement DistortionWorldB2F_IncreaseProgressVar: - SetVar VAR_DISTORTION_WORLD_PROGRESS, 5 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_TALKED_TO_B2F_CYNTHIA ReleaseAll End diff --git a/res/field/scripts/scripts_distortion_world_b3f.s b/res/field/scripts/scripts_distortion_world_b3f.s index 70690deb5b..40d775ad42 100644 --- a/res/field/scripts/scripts_distortion_world_b3f.s +++ b/res/field/scripts/scripts_distortion_world_b3f.s @@ -32,7 +32,7 @@ DistortionWorldB3F_TwoWorldsMustBalance: ApplyMovement LOCALID_CYRUS, DistortionWorldB3F_Movement_CyrusLeave WaitMovement DeleteDistortionWorldMapObject LOCALID_CYRUS - SetVar VAR_DISTORTION_WORLD_PROGRESS, 6 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_TALKED_TO_B3F_CYRUS ReleaseAll End diff --git a/res/field/scripts/scripts_distortion_world_b6f.s b/res/field/scripts/scripts_distortion_world_b6f.s index dbddcd0c0f..5cf5981477 100644 --- a/res/field/scripts/scripts_distortion_world_b6f.s +++ b/res/field/scripts/scripts_distortion_world_b6f.s @@ -22,7 +22,7 @@ DistortionWorldB6F_OnTransition: End DistortionWorldB6F_Cynthia: - GoToIfEq VAR_DISTORTION_WORLD_PROGRESS, 7, DistortionWorldB6F_WereGettingClose + GoToIfEq VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE, DistortionWorldB6F_WereGettingClose GoToIfSet FLAG_DISTORTION_WORLD_PUZZLE_FINISHED, DistortionWorldB6F_CynthiaPuzzleFinished NPCMessage DistortionWorldB6F_Text_ThisPlaceGiantPuzzle End @@ -38,7 +38,7 @@ DistortionWorldB6F_CynthiaPuzzleFinished: WaitMovement ApplyMovement LOCALID_CYNTHIA, DistortionWorldB6F_Movement_CynthiaJumpOnPlatform WaitMovement - SetVar VAR_DISTORTION_WORLD_PROGRESS, 7 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE ReleaseAll End diff --git a/res/field/scripts/scripts_distortion_world_b7f.s b/res/field/scripts/scripts_distortion_world_b7f.s index b0f9932178..ebea58135f 100644 --- a/res/field/scripts/scripts_distortion_world_b7f.s +++ b/res/field/scripts/scripts_distortion_world_b7f.s @@ -34,7 +34,7 @@ DistortionWorldB7F_OnFrame_FirstEntry: CloseMessage ApplyMovement LOCALID_CYNTHIA, DistortionWorldB7F_Movement_CynthiaWalkNorth WaitMovement - SetVar VAR_DISTORTION_WORLD_PROGRESS, 8 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_ENTERED_B7F End DistortionWorldB7F_CoordEvent_CynthiaCyrus: @@ -60,7 +60,7 @@ DistortionWorldB7F_Cyrus: StartTrainerBattle TRAINER_GALACTIC_BOSS_CYRUS_DISTORTION_WORLD CheckWonBattle VAR_RESULT GoToIfEq VAR_RESULT, FALSE, DistortionWorldB7F_LostBattle - SetVar VAR_DISTORTION_WORLD_PROGRESS, 10 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE Message DistortionWorldB7F_Text_YoullDestroyThisWorld CloseMessage GetPlayerMapPos VAR_0x8004, VAR_0x8005 @@ -122,7 +122,7 @@ DistortionWorldB7F_GiratinaIsEnraged: End DistortionWorldB7F_LostBattle: - SetVar VAR_DISTORTION_WORLD_PROGRESS, 9 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_LISTENED_TO_CYNTHIA_CYRUS BlackOutFromBattle ReleaseAll End @@ -130,7 +130,7 @@ DistortionWorldB7F_LostBattle: DistortionWorldB7F_Cynthia: PlaySE SEQ_SE_CONFIRM LockAll - GoToIfGe VAR_DISTORTION_WORLD_PROGRESS, 10, DistortionWorldB7F_YourBondIsStrong + GoToIfGe VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE, DistortionWorldB7F_YourBondIsStrong Message DistortionWorldB7F_Text_ThatsNoJustice WaitButton CloseMessage diff --git a/res/field/scripts/scripts_distortion_world_giratina_room.s b/res/field/scripts/scripts_distortion_world_giratina_room.s index 69aaa81635..0ec9de17dd 100644 --- a/res/field/scripts/scripts_distortion_world_giratina_room.s +++ b/res/field/scripts/scripts_distortion_world_giratina_room.s @@ -27,7 +27,7 @@ DistortionWorldGiratinaRoom_OnLoad: DistortionWorldGiratinaRoom_RemoveGiratina: ResetDistortionWorldPersistedCameraAngles - SetVar VAR_DISTORTION_WORLD_PROGRESS, 14 + SetVar VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_BATTLED_GIRATINA RemoveObject LOCALID_GIRATINA End diff --git a/res/field/scripts/scripts_init_distortion_world_1f.s b/res/field/scripts/scripts_init_distortion_world_1f.s index 39c40806c4..f6c5ea7563 100644 --- a/res/field/scripts/scripts_init_distortion_world_1f.s +++ b/res/field/scripts/scripts_init_distortion_world_1f.s @@ -6,7 +6,7 @@ InitScriptEntryEnd InitScriptFrameTable: - InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, 0, 3 + InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_NONE, 3 InitScriptFrameTableEnd InitScriptEnd diff --git a/res/field/scripts/scripts_init_distortion_world_b1f.s b/res/field/scripts/scripts_init_distortion_world_b1f.s index 85e58038c0..bb511ec69e 100644 --- a/res/field/scripts/scripts_init_distortion_world_b1f.s +++ b/res/field/scripts/scripts_init_distortion_world_b1f.s @@ -6,7 +6,7 @@ InitScriptEntryEnd InitScriptFrameTable: - InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, 2, 2 + InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_JUMPED_ON_1F_ELEVATOR, 2 InitScriptFrameTableEnd InitScriptEnd diff --git a/res/field/scripts/scripts_init_distortion_world_b7f.s b/res/field/scripts/scripts_init_distortion_world_b7f.s index b3e5965bb0..5f544f0a4e 100644 --- a/res/field/scripts/scripts_init_distortion_world_b7f.s +++ b/res/field/scripts/scripts_init_distortion_world_b7f.s @@ -6,7 +6,7 @@ InitScriptEntryEnd InitScriptFrameTable: - InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, 7, 3 + InitScriptGoToIfEqual VAR_DISTORTION_WORLD_PROGRESS, DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE, 3 InitScriptFrameTableEnd InitScriptEnd diff --git a/src/overlay009/ov9_02249960.c b/src/overlay009/ov9_02249960.c index fdbf78a11e..5247ef8a6d 100644 --- a/src/overlay009/ov9_02249960.c +++ b/src/overlay009/ov9_02249960.c @@ -4,6 +4,7 @@ #include #include "constants/colors.h" +#include "constants/distortion_world.h" #include "constants/field/dynamic_map_features.h" #include "constants/field/map.h" #include "constants/graphics.h" @@ -2607,7 +2608,7 @@ BOOL DistWorld_HandlePlayerMovementEnd(FieldSystem *fieldSystem, enum FaceDirect if (playerDir == FACE_UP) { VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); - if (SystemVars_GetDistortionWorldProgress(varsFlags) >= 10) { + if (SystemVars_GetDistortionWorldProgress(varsFlags) >= DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE) { int playerX; int playerY; int playerZ; @@ -2669,7 +2670,7 @@ BOOL DistWorld_HandlePlayerPositionChanged(FieldSystem *fieldSystem) VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_B7F && playerDir == FACE_UP) { - if (SystemVars_GetDistortionWorldProgress(varsFlags) >= 10) { + if (SystemVars_GetDistortionWorldProgress(varsFlags) >= DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE) { if (playerX == B7F_TELEPORT_TILE_X && playerY == B7F_TELEPORT_TILE_Y && (playerZ == B7F_TELEPORT_TILE_Z - 1 || playerZ == B7F_TELEPORT_TILE_Z)) { ScriptManager_Set(fieldSystem, B7F_TELEPORT_SCRIPT_ID, NULL); return TRUE; @@ -2695,7 +2696,7 @@ BOOL DistWorld_CheckMapTransition(FieldSystem *fieldSystem, enum FaceDirection t if (transitionDir == FACE_UP) { VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); - if (SystemVars_GetDistortionWorldProgress(varsFlags) >= 10) { + if (SystemVars_GetDistortionWorldProgress(varsFlags) >= DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE) { int playerX; int playerY; int playerZ; @@ -3278,10 +3279,10 @@ static void InitSkyCloudAnimators(DistWorldSystem *system, FieldEffectManager *f VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); u32 distWorldProgress = SystemVars_GetDistortionWorldProgress(varsFlags); - if (distWorldProgress >= 10) { - if (distWorldProgress <= 12) { + if (distWorldProgress >= DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE) { + if (distWorldProgress <= DIST_WORLD_PROGRESS_GIRATINA_ROOM_SECOND_SHADOW) { system->skyKind = SKY_GIRATINA_ROOM; - } else if (distWorldProgress <= 13) { + } else if (distWorldProgress <= DIST_WORLD_PROGRESS_GIRATINA_ARRIVED) { system->skyKind = SKY_GIRATINA_ROOM_DARK; } } @@ -5284,10 +5285,10 @@ static int DistWorldElevatorPlatform_BeginMovement(DistWorldSystem *system, Dist VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); u16 distWorldProgress = SystemVars_GetDistortionWorldProgress(varsFlags); - if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_1F && distWorldProgress == 2) { + if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_1F && distWorldProgress == DIST_WORLD_PROGRESS_JUMPED_ON_1F_ELEVATOR) { elevatorPlatform->passengerMapObj = MapObjMan_LocalMapObjByIndex(system->fieldSystem->mapObjMan, MAP_OBJECT_1F_CYNTHIA_ELEVATOR); GF_ASSERT(elevatorPlatform->passengerMapObj != NULL); - } else if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_B6F && distWorldProgress == 7) { + } else if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_B6F && distWorldProgress == DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE) { elevatorPlatform->passengerMapObj = MapObjMan_LocalMapObjByIndex(system->fieldSystem->mapObjMan, MAP_OBJECT_B6F_CYNTHIA_ELEVATOR); GF_ASSERT(elevatorPlatform->passengerMapObj != NULL); } @@ -7985,7 +7986,7 @@ static void InitSkyBackgroundDarkness(DistWorldSystem *system) if (mapHeaderID == MAP_HEADER_DISTORTION_WORLD_GIRATINA_ROOM) { VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); - if (SystemVars_GetDistortionWorldProgress(varsFlags) == 13) { + if (SystemVars_GetDistortionWorldProgress(varsFlags) == DIST_WORLD_PROGRESS_GIRATINA_ARRIVED) { skyBg->darknessCalculationDisabled = TRUE; skyBg->darknessLevel = SKY_BACKGROUND_MAX_DARKNESS; } @@ -9819,7 +9820,7 @@ BOOL DistWorld_IsBlockedByCynthia(FieldSystem *fieldSystem, int tileX, int tileZ VarsFlags *varsFlags = SaveData_GetVarsFlags(system->fieldSystem->saveData); u32 distWorldProgress = SystemVars_GetDistortionWorldProgress(varsFlags); - if (distWorldProgress == 14) { + if (distWorldProgress == DIST_WORLD_PROGRESS_BATTLED_GIRATINA) { return TRUE; } } @@ -11132,7 +11133,7 @@ static const CmdParamsStartScript sMapEventCmdParams1F_CynthiaElevatorText_1 = { }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParams1F_CynthiaElevatorText_2 = { - .progress = 0x2 + .progress = DIST_WORLD_PROGRESS_JUMPED_ON_1F_ELEVATOR }; static const DistWorldEventCmd sMapEvent1F_CynthiaElevatorText[] = { @@ -11153,7 +11154,7 @@ static const DistWorldEvent sMapEvents1F[] = { .tileY = 0x121, .tileZ = 0x34, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x1, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_1F, .cmds = sMapEvent1F_CynthiaElevatorText, }, { 0x0, 0x0, 0x0, FLAG_COND_NONE, 0x0, NULL } @@ -11164,7 +11165,7 @@ static const CmdParamsStartScript sMapEventCmdParamsB1F_Mesprit_1 = { }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsB1F_Mesprit_2 = { - .progress = 0x4 + .progress = DIST_WORLD_PROGRESS_SAW_B1F_MESPRIT }; static const CmdParamsAddMapObjWithLocalID sMapEventCmdParamsB1F_Mesprit_3 = { @@ -11194,7 +11195,7 @@ static const DistWorldEvent sMapEventsB1F[] = { .tileY = 0x101, .tileZ = 0x3A, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x3, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B1F, .cmds = sMapEventB1F_Mesprit, }, { 0x0, 0x0, 0x0, FLAG_COND_NONE, 0x0, NULL } @@ -12397,7 +12398,7 @@ static const CmdParamsStartScript sMapEventCmdParamsB3F_Cyrus_1 = { }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsB3F_Cyrus_2 = { - .progress = 0x6 + .progress = DIST_WORLD_PROGRESS_TALKED_TO_B3F_CYRUS }; static const DistWorldEventCmd sMapEventB3F_Cyrus[] = { @@ -12418,7 +12419,7 @@ static const DistWorldEvent sMapEventsB3F[] = { .tileY = 0xC1, .tileZ = 0x29, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x4, + .flagCondVal = DIST_WORLD_PROGRESS_SAW_B1F_MESPRIT, .cmds = sMapEventB3F_Cyrus, }, { @@ -12426,7 +12427,7 @@ static const DistWorldEvent sMapEventsB3F[] = { .tileY = 0xC1, .tileZ = 0x29, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x5, + .flagCondVal = DIST_WORLD_PROGRESS_TALKED_TO_B2F_CYNTHIA, .cmds = sMapEventB3F_Cyrus, }, { 0x0, 0x0, 0x0, FLAG_COND_NONE, 0x0, NULL } @@ -12645,7 +12646,7 @@ static const CmdParamsStartScript sMapEventCmdParamsB7F_CynthiaCyrus_1 = { }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsB7F_CynthiaCyrus_2 = { - .progress = 0x9 + .progress = DIST_WORLD_PROGRESS_LISTENED_TO_CYNTHIA_CYRUS }; static const DistWorldEventCmd sMapEventB7F_CynthiaCyrus[] = { @@ -12666,7 +12667,7 @@ static const DistWorldEvent sMapEventsB7F[] = { .tileY = 0x41, .tileZ = 0x4C, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x8, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B7F, .cmds = sMapEventB7F_CynthiaCyrus, }, { @@ -12674,7 +12675,7 @@ static const DistWorldEvent sMapEventsB7F[] = { .tileY = 0x41, .tileZ = 0x4C, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x8, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B7F, .cmds = sMapEventB7F_CynthiaCyrus, }, { @@ -12682,7 +12683,7 @@ static const DistWorldEvent sMapEventsB7F[] = { .tileY = 0x41, .tileZ = 0x4C, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x8, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B7F, .cmds = sMapEventB7F_CynthiaCyrus, }, { 0x0, 0x0, 0x0, FLAG_COND_NONE, 0x0, NULL } @@ -12736,7 +12737,7 @@ static const DistWorldGiratinaShadowTemplate sMapEventCmdParamsGiratinaRoom_Firs }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsGiratinaRoom_FirstShadow_3 = { - .progress = 0xB + .progress = DIST_WORLD_PROGRESS_GIRATINA_ROOM_FIRST_SHADOW }; static const DistWorldEventCmd sMapEventGiratinaRoom_FirstShadow[] = { @@ -12767,7 +12768,7 @@ static const DistWorldGiratinaShadowTemplate sMapEventCmdParamsGiratinaRoom_Seco }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsGiratinaRoom_SecondShadow_2 = { - .progress = 0xC + .progress = DIST_WORLD_PROGRESS_GIRATINA_ROOM_SECOND_SHADOW }; static const DistWorldEventCmd sMapEventGiratinaRoom_SecondShadow[] = { @@ -12783,7 +12784,7 @@ static const DistWorldEventCmd sMapEventGiratinaRoom_SecondShadow[] = { }; static const CmdParamsSetDistortionWorldProgress sMapEventCmdParamsGiratinaRoom_Arrival_1 = { - .progress = 0xD + .progress = DIST_WORLD_PROGRESS_GIRATINA_ARRIVED }; static const CmdParamsStartScript sMapEventCmdParamsGiratinaRoom_Arrival_3 = { @@ -12828,7 +12829,7 @@ static const DistWorldEvent sMapEventsGiratinaRoom[] = { .tileY = 0x1, .tileZ = 0x18, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xA, + .flagCondVal = DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE, .cmds = sMapEventGiratinaRoom_FirstShadow, }, { @@ -12836,7 +12837,7 @@ static const DistWorldEvent sMapEventsGiratinaRoom[] = { .tileY = 0x1, .tileZ = 0x11, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xB, + .flagCondVal = DIST_WORLD_PROGRESS_GIRATINA_ROOM_FIRST_SHADOW, .cmds = sMapEventGiratinaRoom_SecondShadow, }, { @@ -12844,7 +12845,7 @@ static const DistWorldEvent sMapEventsGiratinaRoom[] = { .tileY = 0x1, .tileZ = 0xE, .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xC, + .flagCondVal = DIST_WORLD_PROGRESS_GIRATINA_ROOM_SECOND_SHADOW, .cmds = sMapEventGiratinaRoom_Arrival, }, { 0x0, 0x0, 0x0, FLAG_COND_NONE, 0x0, NULL } @@ -12893,7 +12894,7 @@ static const DistWorldSimplePropTemplate sSimplePropsGiratinaRoom[] = { .tileY = 1, .tileZ = 12, .flagCond = FLAG_COND_WORLD_PROGRESS_GEQ, - .flagCondVal = 14, + .flagCondVal = DIST_WORLD_PROGRESS_BATTLED_GIRATINA, }, { 0, PROP_KIND_INVALID, 0, 0, 0, FLAG_COND_NONE, 0 } }; @@ -12942,7 +12943,7 @@ static const DistWorldObjectEvent sMapObjectEvent1F_CynthiaPortal = { static const DistWorldObjectEvent sMapObjectEvent1F_CynthiaElevator = { .flagCond = FLAG_COND_WORLD_PROGRESS_LEQ, - .flagCondVal = 0x2, + .flagCondVal = DIST_WORLD_PROGRESS_JUMPED_ON_1F_ELEVATOR, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -12997,7 +12998,7 @@ static const DistWorldObjectEvent *sMapObjectEventsB1F[] = { static const DistWorldObjectEvent sMapObjectEventB2F_Cynthia1 = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x4, + .flagCondVal = DIST_WORLD_PROGRESS_SAW_B1F_MESPRIT, .rotated = TRUE, .rotationAngle = 0x5A, .objEvent = { @@ -13019,7 +13020,7 @@ static const DistWorldObjectEvent sMapObjectEventB2F_Cynthia1 = { static const DistWorldObjectEvent sMapObjectEventB2F_Cynthia2 = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x5, + .flagCondVal = DIST_WORLD_PROGRESS_TALKED_TO_B2F_CYNTHIA, .rotated = TRUE, .rotationAngle = 0x5A, .objEvent = { @@ -13375,7 +13376,7 @@ static const DistWorldObjectEvent sMapObjectEventB6F_Azelf = { static const DistWorldObjectEvent sMapObjectEventB6F_Cynthia = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x6, + .flagCondVal = DIST_WORLD_PROGRESS_TALKED_TO_B3F_CYRUS, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13397,7 +13398,7 @@ static const DistWorldObjectEvent sMapObjectEventB6F_Cynthia = { static const DistWorldObjectEvent sMapObjectEventB6F_CynthiaElevator = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x7, + .flagCondVal = DIST_WORLD_PROGRESS_FINISHED_BOULDER_PUZZLE, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13707,7 +13708,7 @@ static const DistWorldObjectEvent *sMapObjectEventsB6F[] = { static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaInitial = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x8, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B7F, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13729,7 +13730,7 @@ static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaInitial = { static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaTalking = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x9, + .flagCondVal = DIST_WORLD_PROGRESS_LISTENED_TO_CYNTHIA_CYRUS, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13751,7 +13752,7 @@ static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaTalking = { static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaPostBattle = { .flagCond = FLAG_COND_WORLD_PROGRESS_GEQ, - .flagCondVal = 0xA, + .flagCondVal = DIST_WORLD_PROGRESS_WON_CYRUS_BATTLE, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13773,7 +13774,7 @@ static const DistWorldObjectEvent sMapObjectEventB7F_CynthiaPostBattle = { static const DistWorldObjectEvent sMapObjectEventB7F_CyrusInitial = { .flagCond = FLAG_COND_WORLD_PROGRESS_LEQ, - .flagCondVal = 0x8, + .flagCondVal = DIST_WORLD_PROGRESS_ENTERED_B7F, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13795,7 +13796,7 @@ static const DistWorldObjectEvent sMapObjectEventB7F_CyrusInitial = { static const DistWorldObjectEvent sMapObjectEventB7F_CyrusTalking = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0x9, + .flagCondVal = DIST_WORLD_PROGRESS_LISTENED_TO_CYNTHIA_CYRUS, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13826,7 +13827,7 @@ static const DistWorldObjectEvent *sMapObjectEventsB7F[] = { static const DistWorldObjectEvent sMapObjectEventGiratinaRoom_Giratina = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xD, + .flagCondVal = DIST_WORLD_PROGRESS_GIRATINA_ARRIVED, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13892,7 +13893,7 @@ static const DistWorldObjectEvent sMapObjectEventGiratinaRoom_Cyrus = { static const DistWorldObjectEvent sMapObjectEventGiratinaRoom_Portal = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xE, + .flagCondVal = DIST_WORLD_PROGRESS_BATTLED_GIRATINA, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = { @@ -13914,7 +13915,7 @@ static const DistWorldObjectEvent sMapObjectEventGiratinaRoom_Portal = { static const DistWorldObjectEvent sMapObjectEventGiratinaRoom_CynthiaText = { .flagCond = FLAG_COND_WORLD_PROGRESS_EQ, - .flagCondVal = 0xE, + .flagCondVal = DIST_WORLD_PROGRESS_BATTLED_GIRATINA, .rotated = FALSE, .rotationAngle = 0x0, .objEvent = {