|
@@ -0,0 +1,397 @@
|
|
1
|
+#include <agb_debug.h>
|
|
2
|
+#include <pokeagb/pokeagb.h>
|
|
3
|
+#include <pokedex/pdexBall.h>
|
|
4
|
+#include <pokedex/pdexBg.h>
|
|
5
|
+#include <pokedex/pdexSelectHalf.h>
|
|
6
|
+
|
|
7
|
+#define PDEX_FADEIN_SPD 1
|
|
8
|
+#define TB_TITLE 0
|
|
9
|
+#define TB_PKMN 1
|
|
10
|
+#define TB_SEEN 2
|
|
11
|
+#define TB_CAUGHT 3
|
|
12
|
+#define TB_MAIN 4
|
|
13
|
+
|
|
14
|
+#define FONT_DEX_STD 1
|
|
15
|
+#define TB_STD_LEN 10
|
|
16
|
+#define TB_STD_LEN_PX (TB_STD_LEN * 8)
|
|
17
|
+#define TB_BOT_LEN 9
|
|
18
|
+#define TB_BOT_LEN_PX (TB_BOT_LEN * 8)
|
|
19
|
+#define TB_STD_CENTER(t) (((TB_STD_LEN_PX - t) >> 1) + 2)
|
|
20
|
+#define TB_STD_RIGHT(t) ((TB_BOT_LEN_PX - t))
|
|
21
|
+
|
|
22
|
+#define OBJID_HIDE(objid) objects[objid].final_oam.affine_mode = 2
|
|
23
|
+#define OBJID_SHOW(objid) objects[objid].final_oam.affine_mode = 0
|
|
24
|
+
|
|
25
|
+#define TB_SEEN_Y (6)
|
|
26
|
+#define TB_CAUGHT_Y 3
|
|
27
|
+
|
|
28
|
+#define DEX_PKMN_TAG 0x1300
|
|
29
|
+#define DEX_BALL_TAG 0x1301
|
|
30
|
+#define DEX_CURSOR_TAG 0x1302
|
|
31
|
+
|
|
32
|
+#define MAX3_COUNT_DIGITS(n) (n >= 100 ? 3 : (n >= 10 ? 2 : 1))
|
|
33
|
+
|
|
34
|
+#define CPUFSCPY 0
|
|
35
|
+#define CPUFSSET 1
|
|
36
|
+#define CPUModeFS(size, mode) ((size >> 2) | (mode << 24))
|
|
37
|
+
|
|
38
|
+void pdex_load(void);
|
|
39
|
+void pdex_vblank_handler(void);
|
|
40
|
+void pdex_loop(u8 tid);
|
|
41
|
+void pdex_cb_handler(void);
|
|
42
|
+
|
|
43
|
+extern const pchar pdex_str_title[];
|
|
44
|
+extern const pchar pdex_str_seen[];
|
|
45
|
+extern const pchar pdex_str_caught[];
|
|
46
|
+extern const pchar pdex_str_empty[];
|
|
47
|
+
|
|
48
|
+static const u8 pdex_y_offset[] = {3, 16 + 2, 2 * 16 + 1, 3 * 16, 4 * 16 - 1,
|
|
49
|
+ 5 * 16 - 2, 6 * 16 - 3, 7 * 16 - 4, 8 * 16 - 5};
|
|
50
|
+
|
|
51
|
+const u16 pdex_text_pal[] = {rgb5(255, 0, 255), rgb5(255, 255, 255), rgb5(0, 0, 0), rgb5(255, 0, 255),
|
|
52
|
+ rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255),
|
|
53
|
+ rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255),
|
|
54
|
+ rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255), rgb5(255, 0, 255)};
|
|
55
|
+
|
|
56
|
+struct TextColor pdex_text_color = {0, 1, 2};
|
|
57
|
+
|
|
58
|
+struct TextboxTemplate pdex_boxes[] = {
|
|
59
|
+ {.bg_id = 0, .x = 11, .y = 0, .width = 10, .height = 2, .pal_id = 15, .charbase = 1},
|
|
60
|
+ {.bg_id = 0, .x = 2, .y = 2, .width = 10, .height = 2, .pal_id = 15, .charbase = 21},
|
|
61
|
+ {.bg_id = 0, .x = 3, .y = 14, .width = 9, .height = 3, .pal_id = 15, .charbase = 41},
|
|
62
|
+ {.bg_id = 0, .x = 3, .y = 17, .width = 9, .height = 2, .pal_id = 15, .charbase = 59},
|
|
63
|
+
|
|
64
|
+ {.bg_id = 0, .x = 16, .y = 2, .width = 11, .height = 17, .pal_id = 15, .charbase = 77},
|
|
65
|
+
|
|
66
|
+ {.bg_id = 0xFF},
|
|
67
|
+};
|
|
68
|
+
|
|
69
|
+const struct BgConfig pdex_bg_config[4] = {
|
|
70
|
+ {
|
|
71
|
+ .padding = 0,
|
|
72
|
+ .b_padding = 0,
|
|
73
|
+ .priority = 0,
|
|
74
|
+ .palette = 0,
|
|
75
|
+ .size = 0,
|
|
76
|
+ .map_base = 29,
|
|
77
|
+ .character_base = 0,
|
|
78
|
+ .bgid = 0,
|
|
79
|
+ },
|
|
80
|
+ {
|
|
81
|
+ .padding = 0,
|
|
82
|
+ .b_padding = 0,
|
|
83
|
+ .priority = 1,
|
|
84
|
+ .palette = 0,
|
|
85
|
+ .size = 0,
|
|
86
|
+ .map_base = 28,
|
|
87
|
+ .character_base = 0,
|
|
88
|
+ .bgid = 1,
|
|
89
|
+ },
|
|
90
|
+ {
|
|
91
|
+ .padding = 0,
|
|
92
|
+ .b_padding = 0,
|
|
93
|
+ .priority = 2,
|
|
94
|
+ .palette = 0,
|
|
95
|
+ .size = 0,
|
|
96
|
+ .map_base = 30,
|
|
97
|
+ .character_base = 3,
|
|
98
|
+ .bgid = 2,
|
|
99
|
+ },
|
|
100
|
+ {
|
|
101
|
+ .padding = 0,
|
|
102
|
+ .b_padding = 0,
|
|
103
|
+ .priority = 3,
|
|
104
|
+ .palette = 0,
|
|
105
|
+ .size = 1,
|
|
106
|
+ .map_base = 31,
|
|
107
|
+ .character_base = 3,
|
|
108
|
+ .bgid = 3,
|
|
109
|
+ },
|
|
110
|
+};
|
|
111
|
+
|
|
112
|
+void pdex_main_box_species_fill(u8 n, u16 species, bool seen, bool caught) {
|
|
113
|
+ rboxid_fill_rectangle(TB_MAIN, 0, 0, pdex_y_offset[n], 11 * 8, 12);
|
|
114
|
+ const pchar *stringToPrint = (seen || caught) ? &pokemon_names[species][0] : &pdex_str_empty[0];
|
|
115
|
+ const pchar stringWhitespace[] = {0x0, 0xFF};
|
|
116
|
+ fmt_int_10(string_buffer, species, 2, 3);
|
|
117
|
+ pstrcat(string_buffer, &stringWhitespace[0]);
|
|
118
|
+ pstrcat(string_buffer, stringToPrint);
|
|
119
|
+ rboxid_print(TB_MAIN, FONT_DEX_STD, 4, pdex_y_offset[n], &pdex_text_color, 0, string_buffer);
|
|
120
|
+ // show the pokéball if necessary
|
|
121
|
+}
|
|
122
|
+
|
|
123
|
+void pdex_init_dex_boxes(void) {
|
|
124
|
+ /* fill with dummy data */
|
|
125
|
+ rboxid_clear_pixels(TB_MAIN, 0);
|
|
126
|
+ for (u8 i = 0; i < 9; ++i) {
|
|
127
|
+ pdex_main_box_species_fill(i, i + 1, false, false);
|
|
128
|
+ }
|
|
129
|
+ // rboxid_fill_rectangle(TB_MAIN, 1, 0,0, 10*8, 18*8);
|
|
130
|
+ rboxid_update_tilemap_and_tileset(TB_MAIN);
|
|
131
|
+}
|
|
132
|
+
|
|
133
|
+void pdex_load_sc(void) {
|
|
134
|
+ rboxid_clear_pixels(TB_SEEN, 0);
|
|
135
|
+ rboxid_clear_pixels(TB_CAUGHT, 0);
|
|
136
|
+ u32 seen = pokedex_count(false) + 10;
|
|
137
|
+ u32 caught = pokedex_count(true);
|
|
138
|
+ pchar seenBuffer[4];
|
|
139
|
+ pchar caughtBuffer[4];
|
|
140
|
+ fmt_int_10(seenBuffer, seen, 0, MAX3_COUNT_DIGITS(seen));
|
|
141
|
+ fmt_int_10(caughtBuffer, caught, 0, MAX3_COUNT_DIGITS(caught));
|
|
142
|
+
|
|
143
|
+ u32 twidthSeen = font_get_width_of_string(FONT_DEX_STD, seenBuffer, 0x0000);
|
|
144
|
+ u32 twidthCaught = font_get_width_of_string(FONT_DEX_STD, caughtBuffer, 0x0000);
|
|
145
|
+
|
|
146
|
+ rboxid_print(TB_SEEN, FONT_DEX_STD, 0, TB_SEEN_Y, &pdex_text_color, 0, &pdex_str_seen[0]);
|
|
147
|
+ rboxid_print(TB_CAUGHT, FONT_DEX_STD, 0, TB_CAUGHT_Y, &pdex_text_color, 0, &pdex_str_caught[0]);
|
|
148
|
+
|
|
149
|
+ rboxid_print(TB_SEEN, FONT_DEX_STD, TB_STD_RIGHT(twidthSeen), TB_SEEN_Y + 1, &pdex_text_color, 0, seenBuffer);
|
|
150
|
+ rboxid_print(TB_CAUGHT, FONT_DEX_STD, TB_STD_RIGHT(twidthCaught), TB_CAUGHT_Y + 1, &pdex_text_color, 0,
|
|
151
|
+ caughtBuffer);
|
|
152
|
+
|
|
153
|
+ rboxid_update_tilemap_and_tileset(TB_SEEN);
|
|
154
|
+ rboxid_update_tilemap_and_tileset(TB_CAUGHT);
|
|
155
|
+}
|
|
156
|
+
|
|
157
|
+const struct OamData pdex_oam_pkmn = {
|
|
158
|
+ .affine_mode = 0,
|
|
159
|
+ .obj_mode = 0,
|
|
160
|
+ .mosaic = false,
|
|
161
|
+ .shape = 0,
|
|
162
|
+ .size = 3,
|
|
163
|
+};
|
|
164
|
+
|
|
165
|
+void pdex_pokemon_load(u16 species) {
|
|
166
|
+ /* this is very temporary */
|
|
167
|
+ rboxid_clear_pixels(TB_PKMN, 0);
|
|
168
|
+ u32 twidth = font_get_width_of_string(FONT_DEX_STD, &pokemon_names[species][0], 0x0000);
|
|
169
|
+ rboxid_print(TB_PKMN, FONT_DEX_STD, TB_STD_CENTER(twidth), 3, &pdex_text_color, 0, &pokemon_names[species][0]);
|
|
170
|
+ if (pokedex_context->pokemon_oam != -1) {
|
|
171
|
+ obj_delete_and_free(&objects[pokedex_context->pokemon_oam]);
|
|
172
|
+ }
|
|
173
|
+ struct SpriteTiles pkmnTiles = {pokemon_graphics_front[species].data, 2048, DEX_PKMN_TAG};
|
|
174
|
+ struct SpritePalette pkmnPal = {pokemon_palette_normal[species].data, DEX_PKMN_TAG};
|
|
175
|
+ const struct Template pkmnTemplate = {
|
|
176
|
+ .tiles_tag = DEX_PKMN_TAG,
|
|
177
|
+ .pal_tag = DEX_PKMN_TAG,
|
|
178
|
+ .oam = &pdex_oam_pkmn,
|
|
179
|
+ .animation = &anim_image_empty,
|
|
180
|
+ .graphics = &pkmnTiles,
|
|
181
|
+ .rotscale = &rotscale_empty,
|
|
182
|
+ .callback = oac_nullsub,
|
|
183
|
+ };
|
|
184
|
+ gpu_tile_obj_decompress_alloc_tag_and_upload(&pkmnTiles);
|
|
185
|
+
|
|
186
|
+ gpu_pal_decompress_alloc_tag_and_upload(&pkmnPal);
|
|
187
|
+ pokedex_context->pokemon_oam = (s8)template_instanciate_forward_search(&pkmnTemplate, 10, 10, 0);
|
|
188
|
+
|
|
189
|
+ objects[pokedex_context->pokemon_oam].pos1.x = 55;
|
|
190
|
+ objects[pokedex_context->pokemon_oam].pos1.y = 80;
|
|
191
|
+
|
|
192
|
+ rboxid_update_tilemap_and_tileset(TB_PKMN);
|
|
193
|
+}
|
|
194
|
+
|
|
195
|
+struct SpriteTiles pdex_ball_tiles = {pdexBallTiles, 128, DEX_BALL_TAG};
|
|
196
|
+struct SpritePalette pdex_ball_pal = {pdexBallPal, DEX_BALL_TAG};
|
|
197
|
+const struct OamData pdex_ball_oam = {
|
|
198
|
+ .affine_mode = 0,
|
|
199
|
+ .obj_mode = 0,
|
|
200
|
+ .mosaic = false,
|
|
201
|
+ .shape = 0,
|
|
202
|
+ .size = 1,
|
|
203
|
+};
|
|
204
|
+
|
|
205
|
+const struct Template pdex_ball_template = {
|
|
206
|
+ .tiles_tag = DEX_BALL_TAG,
|
|
207
|
+ .pal_tag = DEX_BALL_TAG,
|
|
208
|
+ .oam = &pdex_ball_oam,
|
|
209
|
+ .animation = &anim_image_empty,
|
|
210
|
+ .graphics = &pdex_ball_tiles,
|
|
211
|
+ .rotscale = &rotscale_empty,
|
|
212
|
+ .callback = oac_nullsub,
|
|
213
|
+};
|
|
214
|
+
|
|
215
|
+void pdex_pokeballs_init(void) {
|
|
216
|
+ gpu_tile_obj_decompress_alloc_tag_and_upload(&pdex_ball_tiles);
|
|
217
|
+ gpu_pal_obj_alloc_tag_and_apply(&pdex_ball_pal);
|
|
218
|
+ for (u8 i = 0; i < 9; ++i) {
|
|
219
|
+ pokedex_context->ball_oams[i] =
|
|
220
|
+ template_instanciate_forward_search(&pdex_ball_template, 124, 24 + pdex_y_offset[i], 0);
|
|
221
|
+ OBJID_HIDE(pokedex_context->ball_oams[i]);
|
|
222
|
+ }
|
|
223
|
+}
|
|
224
|
+
|
|
225
|
+void pdex_oac_cursor_follow(struct Object *obj) { obj->pos1.y = objects[pokedex_context->cursor_main_oam].pos1.y; }
|
|
226
|
+
|
|
227
|
+void pdex_oac_cursor_main(struct Object *obj) {
|
|
228
|
+ obj->pos1.y = 29 + pdex_y_offset[pokedex_context->cursor_position_internal];
|
|
229
|
+}
|
|
230
|
+
|
|
231
|
+struct SpriteTiles pdex_cursor_tiles = {pdexSelectHalfTiles, 1024, DEX_CURSOR_TAG};
|
|
232
|
+struct SpritePalette pdex_cursor_pal = {pdexSelectHalfPal, DEX_CURSOR_TAG};
|
|
233
|
+const struct OamData pdex_cursor_oam = {
|
|
234
|
+ .affine_mode = 0,
|
|
235
|
+ .obj_mode = 0,
|
|
236
|
+ .mosaic = false,
|
|
237
|
+ .shape = 1,
|
|
238
|
+ .size = 3,
|
|
239
|
+};
|
|
240
|
+
|
|
241
|
+const struct Template pdex_ball_main_template = {
|
|
242
|
+ .tiles_tag = DEX_CURSOR_TAG,
|
|
243
|
+ .pal_tag = DEX_CURSOR_TAG,
|
|
244
|
+ .oam = &pdex_cursor_oam,
|
|
245
|
+ .animation = &anim_image_empty,
|
|
246
|
+ .graphics = &pdex_cursor_tiles,
|
|
247
|
+ .rotscale = &rotscale_empty,
|
|
248
|
+ .callback = pdex_oac_cursor_main,
|
|
249
|
+};
|
|
250
|
+
|
|
251
|
+const struct Template pdex_ball_follow_template = {
|
|
252
|
+ .tiles_tag = DEX_CURSOR_TAG,
|
|
253
|
+ .pal_tag = DEX_CURSOR_TAG,
|
|
254
|
+ .oam = &pdex_cursor_oam,
|
|
255
|
+ .animation = &anim_image_empty,
|
|
256
|
+ .graphics = &pdex_cursor_tiles,
|
|
257
|
+ .rotscale = &rotscale_empty,
|
|
258
|
+ .callback = pdex_oac_cursor_follow,
|
|
259
|
+};
|
|
260
|
+
|
|
261
|
+void pdex_cursor_init(void) {
|
|
262
|
+ gpu_tile_obj_decompress_alloc_tag_and_upload(&pdex_cursor_tiles);
|
|
263
|
+ gpu_pal_obj_alloc_tag_and_apply(&pdex_cursor_pal);
|
|
264
|
+ pokedex_context->cursor_main_oam = template_instanciate_forward_search(&pdex_ball_main_template, 144, 32, 0);
|
|
265
|
+ pokedex_context->cursor_follow_oam =
|
|
266
|
+ template_instanciate_forward_search(&pdex_ball_follow_template, 144 + 48, 32, 0);
|
|
267
|
+ objects[pokedex_context->cursor_follow_oam].final_oam.h_flip = true;
|
|
268
|
+}
|
|
269
|
+
|
|
270
|
+void pdex_loop(u8 tid) {
|
|
271
|
+ (void)tid;
|
|
272
|
+ switch (pokedex_context->state) {
|
|
273
|
+ case 0:
|
|
274
|
+ pokedex_context->state++;
|
|
275
|
+ break;
|
|
276
|
+ case 1:
|
|
277
|
+ for (u8 i = 0; i < 4; ++i)
|
|
278
|
+ bgid_send_tilemap(i);
|
|
279
|
+ rboxid_clear_pixels(TB_TITLE, 0);
|
|
280
|
+ rboxid_print(TB_TITLE, FONT_DEX_STD, 0, 0, &pdex_text_color, 0, &pdex_str_title[0]);
|
|
281
|
+ rboxid_update_tilemap_and_tileset(TB_TITLE);
|
|
282
|
+
|
|
283
|
+ pdex_pokemon_load(0);
|
|
284
|
+ pdex_load_sc();
|
|
285
|
+ pdex_init_dex_boxes();
|
|
286
|
+ pdex_pokeballs_init();
|
|
287
|
+ pdex_cursor_init();
|
|
288
|
+ palette_bg_faded_fill_black();
|
|
289
|
+ pokedex_context->state++;
|
|
290
|
+ break;
|
|
291
|
+ case 2:
|
|
292
|
+ gpu_sync_bg_show(0);
|
|
293
|
+ gpu_sync_bg_hide(1);
|
|
294
|
+ gpu_sync_bg_hide(3);
|
|
295
|
+
|
|
296
|
+ gpu_sync_bg_show(2);
|
|
297
|
+ if (pokedex_context->delay_count >= 5) {
|
|
298
|
+ fade_screen(0xFFFFFFFF, PDEX_FADEIN_SPD, 16, 0, 0x0000);
|
|
299
|
+ pokedex_context->state++;
|
|
300
|
+ pokedex_context->delay_count = 0;
|
|
301
|
+ } else {
|
|
302
|
+ pokedex_context->delay_count++;
|
|
303
|
+ }
|
|
304
|
+
|
|
305
|
+ break;
|
|
306
|
+ case 3:
|
|
307
|
+ if ((super.buttons_new & KEY_DOWN)) {
|
|
308
|
+ if (pokedex_context->cursor_position_internal < 8) {
|
|
309
|
+ pokedex_context->cursor_position_internal++;
|
|
310
|
+ }
|
|
311
|
+ } else if ((super.buttons_new & KEY_UP)) {
|
|
312
|
+ if (pokedex_context->cursor_position_internal > 0)
|
|
313
|
+ pokedex_context->cursor_position_internal--;
|
|
314
|
+ }
|
|
315
|
+ break;
|
|
316
|
+ default:
|
|
317
|
+ break;
|
|
318
|
+ }
|
|
319
|
+}
|
|
320
|
+
|
|
321
|
+bool sm_pdex_init(void) {
|
|
322
|
+ if (pal_fade_control.active)
|
|
323
|
+ return false;
|
|
324
|
+ audioDampenMaybe();
|
|
325
|
+ sav1_secure_increment(0x29); // this is something the original dex routine does, probably for statistics
|
|
326
|
+ /* maybe clean up safari stuff here if necessary */
|
|
327
|
+ overworld_free_bgmaps();
|
|
328
|
+ set_callback2(pdex_load);
|
|
329
|
+ return true;
|
|
330
|
+}
|
|
331
|
+
|
|
332
|
+void pdex_vram_setup(void) {
|
|
333
|
+ vblank_handler_set(NULL);
|
|
334
|
+ pal_fade_control_and_dead_struct_reset();
|
|
335
|
+ obj_and_aux_reset_all();
|
|
336
|
+ gpu_tile_obj_tags_reset();
|
|
337
|
+ rboxes_free();
|
|
338
|
+ tasks_init();
|
|
339
|
+ gpu_tile_bg_drop_all_sets(true);
|
|
340
|
+
|
|
341
|
+ bg_vram_setup(0, &pdex_bg_config[0], 4);
|
|
342
|
+
|
|
343
|
+ u8 *bgMap = malloc(0x800);
|
|
344
|
+ u8 *strMap = malloc(0x800);
|
|
345
|
+ bgid_set_tilemap(2, bgMap);
|
|
346
|
+ bgid_set_tilemap(0, strMap);
|
|
347
|
+ bgid_mark_for_sync(0);
|
|
348
|
+
|
|
349
|
+ /*TODO: setup text boxes here */
|
|
350
|
+ rbox_init_from_templates(&pdex_boxes[0]);
|
|
351
|
+ u32 set = 0;
|
|
352
|
+ CpuFastSet((void *)&set, (void *)0x06000000, CPUModeFS(0x10000, CPUFSSET));
|
|
353
|
+
|
|
354
|
+ lz77UnCompVram(pdexBgTiles, (void *)0x0600C000);
|
|
355
|
+ LZ77UnCompWram(pdexBgMap, bgMap);
|
|
356
|
+ gpu_pal_apply_compressed(pdexBgPal, 0, 32);
|
|
357
|
+ gpu_pal_apply(pdex_text_pal, 15 * 16, 32);
|
|
358
|
+
|
|
359
|
+ vblank_handler_set(pdex_vblank_handler);
|
|
360
|
+ interrupts_enable(INTERRUPT_VBLANK);
|
|
361
|
+ bgid_mod_x_offset(0, 0, 0);
|
|
362
|
+ bgid_mod_y_offset(0, 0, 0);
|
|
363
|
+ bgid_mod_x_offset(1, 0, 0);
|
|
364
|
+ bgid_mod_y_offset(1, 0, 0);
|
|
365
|
+ bgid_mod_x_offset(2, 0, 0);
|
|
366
|
+ bgid_mod_y_offset(2, 0, 0);
|
|
367
|
+ bgid_mod_x_offset(3, 0, 0);
|
|
368
|
+ bgid_mod_y_offset(3, 0, 0);
|
|
369
|
+}
|
|
370
|
+
|
|
371
|
+void pdex_load(void) {
|
|
372
|
+ pdex_vram_setup();
|
|
373
|
+ pokedex_context = malloc(sizeof(struct PdexCtx));
|
|
374
|
+ pokedex_context->state = 0;
|
|
375
|
+ pokedex_context->pokemon_oam = -1;
|
|
376
|
+ pokedex_context->delay_count = 0;
|
|
377
|
+ task_add(pdex_loop, 0);
|
|
378
|
+ set_callback2(pdex_cb_handler);
|
|
379
|
+}
|
|
380
|
+
|
|
381
|
+void pdex_vblank_handler(void) {
|
|
382
|
+ gpu_sprites_upload();
|
|
383
|
+ copy_queue_process();
|
|
384
|
+ gpu_pal_upload();
|
|
385
|
+}
|
|
386
|
+
|
|
387
|
+void pdex_cb_handler(void) {
|
|
388
|
+ if (pal_fade_control.active)
|
|
389
|
+ process_palfade();
|
|
390
|
+ else {
|
|
391
|
+ task_exec();
|
|
392
|
+ objc_exec();
|
|
393
|
+ obj_sync_superstate();
|
|
394
|
+ tilemaps_sync();
|
|
395
|
+ remoboxes_upload_tilesets();
|
|
396
|
+ }
|
|
397
|
+}
|