chore(ppu): rename Pixel to Pixels

Since the Pixel struct represents 8 pixels in a 2BPP format, I felt like
the name of the type needed to represent this
This commit is contained in:
2021-05-04 22:55:34 -05:00
parent 6b0bba48f9
commit b57df3d2a7
2 changed files with 11 additions and 9 deletions

View File

@@ -303,9 +303,11 @@ impl From<ObjectPalette> for u8 {
}
}
pub struct Pixel(u8, u8);
pub struct Pixels(u8, u8);
impl Pixels {
pub const PIXEL_COUNT: usize = 8;
impl Pixel {
pub fn from_bytes(higher: u8, lower: u8) -> Self {
Self(higher, lower)
}