Fixed Rayquaza cutscene flicker.

This commit is contained in:
Ariel A 2022-09-03 19:28:10 -04:00
parent 17758b7d66
commit e322475aee
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -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();