|
@@ -28,25 +28,16 @@ u8 region_text_y_offset[] = {7, 7, 7, 2, 2, 2, 2};
|
28
|
28
|
u8 region_select_x_offset[] = {54, 128, 198, 38, 97, 156, 215};
|
29
|
29
|
u8 region_select_y_offset[] = {40, 40, 40, 115, 115, 115, 115};
|
30
|
30
|
|
31
|
|
-u16 region_icons[] = {PKMN_BISASAM, PKMN_SCHIGGY, PKMN_GLUMANDA, PKMN_ENDIVIE, PKMN_KARNIMANI, PKMN_FEURIGEL,
|
32
|
|
- PKMN_GECKARBOR, PKMN_HYDROPI, PKMN_FLEMMLI, PKMN_CHELAST, PKMN_PLINFA, PKMN_PANFLAM,
|
33
|
|
- PKMN_SERPIFEU, PKMN_OTTARO, PKMN_FLOINK, PKMN_IGAMARO, PKMN_FROXY, PKMN_FYNX,
|
34
|
|
- PKMN_BAUZ, PKMN_ROBBALL, PKMN_FLAMIAU};
|
35
|
|
-
|
36
|
|
-u16 region_icons_x_offset[] = {37, 49, 58, 110, 122, 133, 182, 193, 206,
|
37
|
|
- 22, 33, 43,
|
38
|
|
- 80, 93, 103,
|
39
|
|
- 139, 150, 161,
|
40
|
|
- 196, 207, 219};
|
41
|
|
-
|
42
|
|
-u16 region_icons_y_offset[] = {39, 17, 39,
|
43
|
|
- 39, 19, 39,
|
44
|
|
- 39, 19, 39,
|
45
|
|
- 117, 94, 116,
|
46
|
|
- 116, 95, 115,
|
47
|
|
- 116, 95, 116,
|
48
|
|
- 120, 99, 120
|
49
|
|
-};
|
|
31
|
+u16 region_icons[] = {PKMN_BISASAM, PKMN_SCHIGGY, PKMN_GLUMANDA, PKMN_ENDIVIE, PKMN_KARNIMANI, PKMN_FEURIGEL,
|
|
32
|
+ PKMN_GECKARBOR, PKMN_HYDROPI, PKMN_FLEMMLI, PKMN_CHELAST, PKMN_PLINFA, PKMN_PANFLAM,
|
|
33
|
+ PKMN_SERPIFEU, PKMN_OTTARO, PKMN_FLOINK, PKMN_IGAMARO, PKMN_FROXY, PKMN_FYNX,
|
|
34
|
+ PKMN_BAUZ, PKMN_ROBBALL, PKMN_FLAMIAU};
|
|
35
|
+
|
|
36
|
+u16 region_icons_x_offset[] = {37, 49, 58, 110, 122, 133, 182, 193, 206, 22, 33,
|
|
37
|
+ 43, 80, 93, 103, 139, 150, 161, 196, 207, 219};
|
|
38
|
+
|
|
39
|
+u16 region_icons_y_offset[] = {39, 17, 39, 39, 19, 39, 39, 19, 39, 117, 94,
|
|
40
|
+ 116, 116, 95, 115, 116, 95, 116, 120, 99, 120};
|
50
|
41
|
|
51
|
42
|
bool sm_pdex_init(void) {
|
52
|
43
|
if (pal_fade_control.active)
|
|
@@ -147,9 +138,9 @@ void region_loop(u8 tid) {
|
147
|
138
|
|
148
|
139
|
region_load_border();
|
149
|
140
|
region_load_icon_palettes();
|
150
|
|
- for(u8 i = 0; i < 21; ++i)
|
|
141
|
+ for (u8 i = 0; i < 21; ++i)
|
151
|
142
|
region_load_icon(i);
|
152
|
|
-
|
|
143
|
+
|
153
|
144
|
palette_bg_faded_fill_black();
|
154
|
145
|
pokedex_context->state++;
|
155
|
146
|
break;
|
|
@@ -184,11 +175,37 @@ void region_loop(u8 tid) {
|
184
|
175
|
if ((pokedex_context->region_selected > 2) && (pokedex_context->region_selected < 6))
|
185
|
176
|
pokedex_context->region_selected -= 3;
|
186
|
177
|
break;
|
|
178
|
+ case KEY_A:
|
|
179
|
+ fade_screen(0xFFFFFFFF, PDEX_FADEIN_SPD, 0, 16, 0x0000);
|
|
180
|
+ pokedex_context->state = 10;
|
|
181
|
+ break;
|
|
182
|
+ case KEY_B:
|
|
183
|
+ fade_screen(0xFFFFFFFF, PDEX_FADEIN_SPD, 0, 16, 0x0000);
|
|
184
|
+ pokedex_context->state = 11;
|
187
|
185
|
default:
|
188
|
186
|
break;
|
189
|
187
|
}
|
190
|
188
|
break;
|
|
189
|
+ case 10:
|
|
190
|
+ if (!pal_fade_control.active) {
|
|
191
|
+ task_del(tid);
|
|
192
|
+ if(bgid_get_tilemap(2) != NULL)
|
|
193
|
+ free(bgid_get_tilemap(2));
|
|
194
|
+ set_callback2(pdex_load);
|
|
195
|
+ }
|
|
196
|
+ break;
|
|
197
|
+ case 11:
|
|
198
|
+ if (!pal_fade_control.active) {
|
|
199
|
+ task_del(tid);
|
|
200
|
+ if(pokedex_context->lookup != NULL)
|
|
201
|
+ free(pokedex_context->lookup);
|
|
202
|
+ free(pokedex_context);
|
|
203
|
+ set_callback2(c2_overworld_switch_start_menu);
|
|
204
|
+ set_callback1(c1_overworld);
|
|
205
|
+ }
|
|
206
|
+ break;
|
191
|
207
|
default:
|
|
208
|
+
|
192
|
209
|
break;
|
193
|
210
|
}
|
194
|
211
|
}
|