1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
use super::*; /// The video modes available on the GBA. /// /// | Mode | Affine | Layers | Res | Tiles | Colors | Features | /// |:-:|:-:|:-:|:-:|:-:|:-:|:-:| /// | 0 | No | 0/1/2/3 | 256^2 to 512^2 | 1024 | 4bpp/8bpp | Scroll, Flip | /// | 1 | Some | 0/1/2 | BG0/1 ^, BG2 V | - | - | - | /// | 2 | Yes | 2/3 | 128^2 to 1024^2 | 256 | 4bpp/8bpp | Scroll | /// | 3 | Yes | 2 | 240x160 | 1? | RGB555 | - | /// | 4 | Yes | 2 | 240x160 | 2? | 4bpp | - | /// | 5 | Yes | 2 | 160x128 | 2? | RGB555 | - | /// /// Mode 0 is "Text" mode with all backgrounds available. /// /// Mode 1 is a mixed mode where BG0 and BG1 work the same as Mode 0 (Text) and /// BG2 works like Mode 2 (Affine). /// /// Mode 2 is "Affine" mode, with only BG2 and BG3 available. /// /// Modes 3, 4, and 5 are "Bitmap" modes. The bitmap is controlled using the BG2 /// controls. #[repr(transparent)] #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct VideoMode(pub(crate) u16); #[allow(missing_docs)] #[allow(non_upper_case_globals)] impl VideoMode { pub const VideoMode0: Self = Self(0); pub const VideoMode1: Self = Self(1); pub const VideoMode2: Self = Self(2); pub const VideoMode3: Self = Self(3); pub const VideoMode4: Self = Self(4); pub const VideoMode5: Self = Self(5); }