blob: ae61d68a6df91b87f0e05cf1d3a1081fb605458c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#include "global.h"
#include "script_pokemon_util.h"
#include "event_data.h"
#include "credits.h"
#include "overworld.h"
#include "hall_of_fame.h"
#include "load_save.h"
#include "constants/heal_locations.h"
bool8 EnterHallOfFame(void)
{
bool8 ribbonState;
bool8 *r7;
int i;
bool8 gaveAtLeastOneRibbon;
HealPlayerParty();
if (FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE)
{
gHasHallOfFameRecords = TRUE;
}
else
{
gHasHallOfFameRecords = FALSE;
FlagSet(FLAG_SYS_GAME_CLEAR);
}
if (GetGameStat(GAME_STAT_FIRST_HOF_PLAY_TIME) == 0)
{
SetGameStat(GAME_STAT_FIRST_HOF_PLAY_TIME, (gSaveBlock2Ptr->playTimeHours << 16) | (gSaveBlock2Ptr->playTimeMinutes << 8) | gSaveBlock2Ptr->playTimeSeconds);
}
SetContinueGameWarpStatus();
SetContinueGameWarpToHealLocation(SPAWN_PALLET_TOWN);
gaveAtLeastOneRibbon = FALSE;
for (i = 0, r7 = &ribbonState; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_SANITY_IS_EGG))
{
if (!GetMonData(&gPlayerParty[i], MON_DATA_CHAMPION_RIBBON))
{
*r7 = TRUE;
SetMonData(&gPlayerParty[i], MON_DATA_CHAMPION_RIBBON, &ribbonState);
gaveAtLeastOneRibbon = TRUE;
}
}
}
if (gaveAtLeastOneRibbon == TRUE)
{
IncrementGameStat(GAME_STAT_RECEIVED_RIBBONS);
FlagSet(FLAG_SYS_RIBBON_GET);
}
SetMainCallback2(CB2_DoHallOfFameScreen);
return FALSE;
}
bool8 SetCB2WhiteOut(void)
{
SetMainCallback2(CB2_WhiteOut);
return FALSE;
}
|