From e322475aee9c083a948db478f7e33dc147cb81d0 Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Sat, 3 Sep 2022 19:28:10 -0400 Subject: [PATCH] Fixed Rayquaza cutscene flicker. --- data/maps/SootopolisCity/scripts.inc | 1 + src/rayquaza_scene.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 69f74880ec..af6f68555c 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -495,6 +495,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: removeobject LOCALID_GROUDON removeobject LOCALID_KYOGRE addobject LOCALID_RAYQUAZA + hideobjectat LOCALID_RAYQUAZA, MAP_SOOTOPOLIS_CITY setvar VAR_0x8004, TRUE special Script_DoRayquazaScene waitstate diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 5572ef8338..df03bfaebb 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -1,5 +1,6 @@ #include "global.h" #include "rayquaza_scene.h" +#include "event_object_movement.h" #include "sprite.h" #include "task.h" #include "graphics.h" @@ -15,6 +16,7 @@ #include "sound.h" #include "constants/songs.h" #include "constants/rgb.h" +#include "constants/event_objects.h" #include "random.h" /* @@ -1294,9 +1296,13 @@ void DoRayquazaScene(u8 animId, bool8 endEarly, void (*exitCallback)(void)) static void CB2_InitRayquazaScene(void) { + u32 i; SetVBlankHBlankCallbacksToNull(); ClearScheduledBgCopiesToVram(); ScanlineEffect_Stop(); + for (i = 0; i < OBJECT_EVENTS_COUNT; i++) + if (gObjectEvents[i].graphicsId == OBJ_EVENT_GFX_RAYQUAZA) + gObjectEvents[i].invisible = FALSE; FreeAllSpritePalettes(); ResetPaletteFade(); ResetSpriteData();