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
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 | - |
///
/// All modes support Mosaic, Alpha Blending, Brightness, and Priority.
#[repr(transparent)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct VideoMode(pub(crate) u16);

#[allow(missing_docs)]
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);
}