use std::fmt::Debug;
use std::hash::Hash;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct SgbColor {
pub r: u8,
pub g: u8,
pub b: u8,
}
impl SgbColor {
pub const fn new(r: u8, g: u8, b: u8) -> Self {
Self { r, g, b }
}
}
pub type SgbPaletteEntry = [SgbColor; 4];
pub trait PaletteTrait: Copy + Eq + Hash + Debug + 'static {}
pub trait PaletteProvider<P: PaletteTrait> {
fn bg_palette(&self, palette: P) -> [u8; 4];
fn obj_palette0(&self, palette: P) -> [u8; 4];
fn obj_palette1(&self, palette: P) -> [u8; 4];
fn overworld_palette_for(&self, tileset_id: u8, map_id: u8, last_map: u8) -> P;
fn monster_palette(&self, species_index: u8) -> P;
fn sgb_palette_data(&self, _id: P, _is_red: bool) -> SgbPaletteEntry {
[SgbColor::new(0, 0, 0); 4]
}
fn hp_bar_to_palette_id(&self, hp_bar_color: u8) -> P;
}