diff options
author | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2025-02-26 13:25:47 +0700 |
---|---|---|
committer | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2025-02-26 13:25:47 +0700 |
commit | 4250ef35134b9a090cd14ca85c560b2c966b553e (patch) | |
tree | e16c698e8e09afd671ca80bb25c79a2df8cf3019 /src/global.rs | |
parent | 29494ca7a8af8589a1f73e813c29365339006810 (diff) |
refactor: files separation
Diffstat (limited to 'src/global.rs')
-rw-r--r-- | src/global.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/global.rs b/src/global.rs new file mode 100644 index 0000000..cb616b1 --- /dev/null +++ b/src/global.rs @@ -0,0 +1,17 @@ +pub const IMG_WIDTH: usize = 256; +pub const IMG_HEIGHT: usize = 256; + +#[derive(Debug, Copy, Clone)] +pub struct Pixel { + pub r: u8, + pub g: u8, + pub b: u8, +} + +impl Default for Pixel { + fn default() -> Self { + Pixel { r:0, g:0, b:0 } + } +} + +pub type DisplayBuffer = [[Pixel; IMG_WIDTH]; IMG_HEIGHT]; |