pokeemerald/src/hof_pc.c

41 lines
946 B
C
Raw Normal View History

2018-01-21 20:45:43 +01:00
#include "global.h"
#include "hall_of_fame.h"
#include "main.h"
#include "palette.h"
#include "overworld.h"
#include "script.h"
#include "script_menu.h"
#include "task.h"
2019-04-04 23:05:46 +02:00
#include "constants/rgb.h"
2018-01-21 20:45:43 +01:00
static void ReshowPCMenuAfterHallOfFamePC(void);
static void Task_WaitForPaletteFade(u8);
void AccessHallOfFamePC(void)
{
SetMainCallback2(CB2_DoHallOfFamePC);
ScriptContext2_Enable();
}
void ReturnFromHallOfFamePC(void)
{
2018-02-14 00:58:22 +01:00
SetMainCallback2(CB2_ReturnToField);
2018-01-21 20:45:43 +01:00
gFieldCallback = ReshowPCMenuAfterHallOfFamePC;
}
static void ReshowPCMenuAfterHallOfFamePC(void)
{
ScriptContext2_Enable();
Overworld_PlaySpecialMapMusic();
ScriptMenu_CreatePCMultichoice();
2018-01-21 20:45:43 +01:00
ScriptMenu_DisplayPCStartupPrompt();
2021-02-24 17:01:02 +01:00
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
2018-01-21 20:45:43 +01:00
CreateTask(Task_WaitForPaletteFade, 10);
}
static void Task_WaitForPaletteFade(u8 taskId)
{
if (!gPaletteFade.active)
DestroyTask(taskId);
}