From cae71ff2499b8e732447abfcfd5edfa9c2b4d146 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sat, 6 Aug 2022 18:40:47 +0100 Subject: [PATCH] add blend to distributor --- agb/src/display/mod.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/agb/src/display/mod.rs b/agb/src/display/mod.rs index 0e8cc37a..a747005a 100644 --- a/agb/src/display/mod.rs +++ b/agb/src/display/mod.rs @@ -4,7 +4,7 @@ use bitflags::bitflags; use modular_bitfield::BitfieldSpecifier; use video::Video; -use self::{object::ObjectController, window::Windows}; +use self::{blend::Blend, object::ObjectController, window::Windows}; /// Graphics mode 3. Bitmap mode that provides a 16-bit colour framebuffer. pub mod bitmap3; @@ -71,6 +71,7 @@ pub struct Display { pub video: Video, pub object: ObjectDistribution, pub window: WindowDist, + pub blend: BlendDist, } #[non_exhaustive] @@ -91,12 +92,19 @@ impl WindowDist { } } +#[non_exhaustive] +pub struct BlendDist; + +impl BlendDist { + pub fn get(&mut self) -> Blend { + Blend::new() + } +} + impl Display { pub(crate) const unsafe fn new() -> Self { Display { - video: Video {}, - object: ObjectDistribution {}, - window: WindowDist {}, + blend: BlendDist, } } }