Fix screen select bar popping in too early for area screen in HGSS dex (#4094)
* fixing screen select bar popping in too early for area screen in HGSS pokedex * exit early from select bar load function if dex is disabled * remove unnecessary early exit --------- Co-authored-by: ravepossum <ravepossum@example.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
parent
065c0ec588
commit
8b70cea725
2 changed files with 11 additions and 8 deletions
|
@ -107,9 +107,11 @@ static void CreateAreaUnknownSprites(void);
|
|||
static void Task_HandlePokedexAreaScreenInput(u8);
|
||||
static void ResetPokedexAreaMapBg(void);
|
||||
static void DestroyAreaScreenSprites(void);
|
||||
static void LoadHGSSScreenSelectBarSubmenu(void);
|
||||
|
||||
static const u32 sAreaGlow_Pal[] = INCBIN_U32("graphics/pokedex/area_glow.gbapal");
|
||||
static const u32 sAreaGlow_Gfx[] = INCBIN_U32("graphics/pokedex/area_glow.4bpp.lz");
|
||||
static const u32 sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap[] = INCBIN_U32("graphics/pokedex/hgss/SelectBar.bin.lz");
|
||||
|
||||
static const u16 sSpeciesHiddenFromAreaScreen[] = { SPECIES_WYNAUT };
|
||||
|
||||
|
@ -639,6 +641,9 @@ static void Task_ShowPokedexAreaScreen(u8 taskId)
|
|||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
case 10:
|
||||
if (POKEDEX_PLUS_HGSS)
|
||||
LoadHGSSScreenSelectBarSubmenu();
|
||||
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL);
|
||||
StartAreaGlow();
|
||||
ShowBg(2);
|
||||
|
@ -806,3 +811,9 @@ static void CreateAreaUnknownSprites(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadHGSSScreenSelectBarSubmenu(void)
|
||||
{
|
||||
CopyToBgTilemapBuffer(1, sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
|
|
|
@ -528,7 +528,6 @@ static void Task_LoadSizeScreen(u8);
|
|||
static void Task_HandleSizeScreenInput(u8);
|
||||
static void Task_SwitchScreensFromSizeScreen(u8);
|
||||
static void LoadScreenSelectBarMain(u16);
|
||||
static void LoadScreenSelectBarSubmenu(u16);
|
||||
static void HighlightScreenSelectBarItem(u8, u16);
|
||||
static void Task_HandleCaughtMonPageInput(u8);
|
||||
static void Task_ExitCaughtMonPage(u8);
|
||||
|
@ -4031,7 +4030,6 @@ static void Task_LoadAreaScreen(u8 taskId)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
LoadScreenSelectBarSubmenu(0xD);
|
||||
LoadPokedexBgPalette(sPokedexView->isSearchResults);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256);
|
||||
gMain.state++;
|
||||
|
@ -4086,12 +4084,6 @@ static void LoadScreenSelectBarMain(u16 unused)
|
|||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
|
||||
static void LoadScreenSelectBarSubmenu(u16 unused)
|
||||
{
|
||||
CopyToBgTilemapBuffer(1, sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
|
||||
static void UNUSED HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused)
|
||||
{
|
||||
u8 i;
|
||||
|
|
Loading…
Reference in a new issue