// copy BG into area void set_bg(u8 bg_id, u8 *gfx, u8 *tile_map, u8 *pal, u8 pal_slot, u8 pal_size) { void *char_base = (void *)0x6000000 + (0x4000 * bg_id); void *map_base = (void *)0x6000000 + (0xF800 - (0x800 * bg_id)); lz77UnCompVram(gfx, char_base); lz77UnCompVram(tile_map, map_base); gpu_pal_apply(pal, pal_slot * 16, pal_size); gpu_sync_bg_show(bg_id); }
void region_select_load_gfx() { rbox_init_from_templates(®ion_select_boxes[0]); lz77UnCompVram(pdexSelectBgTiles, (void *)0x0600C000); LZ77UnCompWram(pdexSelectBgMap, bgid_get_tilemap(2)); gpu_pal_apply_compressed(pdexSelectBgPal, 0, 32); gpu_pal_apply(pdex_text_pal, 15 * 16, 32); bgid_mark_for_sync(0); }