diff --git a/agb/src/display/mod.rs b/agb/src/display/mod.rs index 76d9e5a8..c61ef432 100644 --- a/agb/src/display/mod.rs +++ b/agb/src/display/mod.rs @@ -161,8 +161,9 @@ pub fn busy_wait_for_vblank() { } #[bitsize(2)] -#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug)] +#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug, Default)] pub enum Priority { + #[default] P0 = 0, P1 = 1, P2 = 2, diff --git a/agb/src/display/object/unmanaged/attributes.rs b/agb/src/display/object/unmanaged/attributes.rs index ef5f8b17..3437cf16 100644 --- a/agb/src/display/object/unmanaged/attributes.rs +++ b/agb/src/display/object/unmanaged/attributes.rs @@ -135,25 +135,28 @@ impl Attributes { } #[bitsize(2)] -#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] +#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq, Default)] enum ObjectMode { Normal, Affine, + #[default] Disabled, AffineDouble, } #[bitsize(2)] -#[derive(TryFromBits, Clone, Copy, Debug, PartialEq, Eq)] +#[derive(TryFromBits, Clone, Copy, Debug, PartialEq, Eq, Default)] enum GraphicsMode { + #[default] Normal, AlphaBlending, Window, } #[bitsize(1)] -#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] +#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq, Default)] enum ColourMode { + #[default] Four, Eight, }