blob: 713912fe5a8da390ad7f3090b5e2d46a10d80016 (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
#include "global.h"
#include "event_data.h"
#include "pokedex.h"
#include "field_message_box.h"
extern const u8 PokedexRating_Text_LessThan10[];
extern const u8 PokedexRating_Text_LessThan20[];
extern const u8 PokedexRating_Text_LessThan30[];
extern const u8 PokedexRating_Text_LessThan40[];
extern const u8 PokedexRating_Text_LessThan50[];
extern const u8 PokedexRating_Text_LessThan60[];
extern const u8 PokedexRating_Text_LessThan70[];
extern const u8 PokedexRating_Text_LessThan80[];
extern const u8 PokedexRating_Text_LessThan90[];
extern const u8 PokedexRating_Text_LessThan100[];
extern const u8 PokedexRating_Text_LessThan110[];
extern const u8 PokedexRating_Text_LessThan120[];
extern const u8 PokedexRating_Text_LessThan130[];
extern const u8 PokedexRating_Text_LessThan140[];
extern const u8 PokedexRating_Text_LessThan150[];
extern const u8 PokedexRating_Text_Complete[];
u16 GetPokedexCount(void)
{
if (gSpecialVar_0x8004 == 0)
{
gSpecialVar_0x8005 = GetKantoPokedexCount(0);
gSpecialVar_0x8006 = GetKantoPokedexCount(1);
}
else
{
gSpecialVar_0x8005 = GetNationalPokedexCount(0);
gSpecialVar_0x8006 = GetNationalPokedexCount(1);
}
return IsNationalPokedexEnabled();
}
static const u8 *GetProfOaksRatingMessageByCount(u16 count)
{
gSpecialVar_Result = FALSE;
if (count < 10)
return PokedexRating_Text_LessThan10;
if (count < 20)
return PokedexRating_Text_LessThan20;
if (count < 30)
return PokedexRating_Text_LessThan30;
if (count < 40)
return PokedexRating_Text_LessThan40;
if (count < 50)
return PokedexRating_Text_LessThan50;
if (count < 60)
return PokedexRating_Text_LessThan60;
if (count < 70)
return PokedexRating_Text_LessThan70;
if (count < 80)
return PokedexRating_Text_LessThan80;
if (count < 90)
return PokedexRating_Text_LessThan90;
if (count < 100)
return PokedexRating_Text_LessThan100;
if (count < 110)
return PokedexRating_Text_LessThan110;
if (count < 120)
return PokedexRating_Text_LessThan120;
if (count < 130)
return PokedexRating_Text_LessThan130;
if (count < 140)
return PokedexRating_Text_LessThan140;
if (count < 150)
return PokedexRating_Text_LessThan150;
if (count == 150)
{
// Mew doesn't count for completing the pokedex
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_MEW), 1))
return PokedexRating_Text_LessThan150;
gSpecialVar_Result = TRUE;
return PokedexRating_Text_Complete;
}
if (count == 151)
{
gSpecialVar_Result = TRUE;
return PokedexRating_Text_Complete;
}
return PokedexRating_Text_LessThan10;
}
void GetProfOaksRatingMessage(void)
{
ShowFieldMessage(GetProfOaksRatingMessageByCount(gSpecialVar_0x8004));
}
|