From 50441cf1f0a463337f64cf36d7305e0b40a04a64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Mon, 17 Apr 2023 23:26:27 +0100
Subject: [PATCH] chore: added new data types

---
 src/ppu.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/ppu.rs b/src/ppu.rs
index d8623576..99f6042c 100644
--- a/src/ppu.rs
+++ b/src/ppu.rs
@@ -14,6 +14,7 @@ pub const HRAM_SIZE: usize = 128;
 pub const OAM_SIZE: usize = 260;
 pub const PALETTE_SIZE: usize = 4;
 pub const RGB_SIZE: usize = 3;
+pub const RGBA_SIZE: usize = 4;
 pub const TILE_WIDTH: usize = 8;
 pub const TILE_HEIGHT: usize = 8;
 pub const TILE_DOUBLE_HEIGHT: usize = 16;
@@ -48,10 +49,18 @@ pub const PALETTE_COLORS: Palette = [[255, 255, 255], [192, 192, 192], [96, 96,
 /// with the size of RGB (3 bytes).
 pub type Pixel = [u8; RGB_SIZE];
 
+/// Defines a transparent Game Boy pixel type as a buffer
+/// with the size of RGBA (4 bytes).
+pub type PixelAlpha = [u8; RGBA_SIZE];
+
 /// Defines a type that represents a color palette
 /// within the Game Boy context.
 pub type Palette = [Pixel; PALETTE_SIZE];
 
+/// Defines a type that represents a color palette
+/// with alpha within the Game Boy context.
+pub type PaletteAlpha = [PixelAlpha; PALETTE_SIZE];
+
 /// Represents a palette with the metadata that is
 /// associated with it.
 #[cfg_attr(feature = "wasm", wasm_bindgen)]
-- 
GitLab