private void set_active_palette() { if (m_sel_quad_ind >= 0 && m_sel_block_id >= 0) { #if DEF_NES palette_group.Instance.active_palette = tiles_data.get_block_flags_palette(m_data.blocks[(m_sel_block_id << 2) + m_sel_quad_ind]); #elif DEF_PALETTE16_PER_CHR update_palette_list_pos(); #endif #if DEF_ZX byte ink_clr = 0xff; byte paper_clr = 0xff; m_data.get_ink_paper_colors(get_selected_quad_CHR_id(), ref ink_clr, ref paper_clr); palette_group plt = palette_group.Instance; if (ink_clr != 0xff) { plt.active_palette = ink_clr >> 2; plt.get_palettes_arr()[plt.active_palette].set_color_slot(ink_clr & 0x03, false); } if (paper_clr != 0xff) { plt.active_palette = paper_clr >> 2; plt.get_palettes_arr()[plt.paper_active_palette].set_color_slot(paper_clr & 0x03, false); } #endif } else { palette_group.Instance.active_palette = -1; } }