mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-19 04:57:39 +01:00
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
#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"
|
|
|
|
extern void (*gUnknown_0300485C)(void);
|
|
|
|
extern void Overworld_PlaySpecialMapMusic(void);
|
|
extern bool16 Special_CreatePCMenu(void);
|
|
extern void ScriptMenu_DisplayPCStartupPrompt(void);
|
|
|
|
static void ReshowPCMenuAfterHallOfFamePC(void);
|
|
static void Task_WaitForPaletteFade(u8);
|
|
|
|
void AccessHallOfFamePC(void)
|
|
{
|
|
SetMainCallback2(CB2_DoHallOfFamePC);
|
|
ScriptContext2_Enable();
|
|
}
|
|
|
|
void ReturnFromHallOfFamePC(void)
|
|
{
|
|
SetMainCallback2(CB2_ReturnToField);
|
|
gFieldCallback = ReshowPCMenuAfterHallOfFamePC;
|
|
}
|
|
|
|
static void ReshowPCMenuAfterHallOfFamePC(void)
|
|
{
|
|
ScriptContext2_Enable();
|
|
Overworld_PlaySpecialMapMusic();
|
|
Special_CreatePCMenu();
|
|
ScriptMenu_DisplayPCStartupPrompt();
|
|
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
|
|
CreateTask(Task_WaitForPaletteFade, 10);
|
|
}
|
|
|
|
static void Task_WaitForPaletteFade(u8 taskId)
|
|
{
|
|
if (!gPaletteFade.active)
|
|
DestroyTask(taskId);
|
|
}
|