Struct DisplayControlValue

Source
pub struct DisplayControlValue(/* private fields */);
Expand description

Top level control for the LCD display.

  • video_mode: Video mode setting, see VideoMode.
  • display_frame1: When using video modes 4 or 5, controls if frame 0 or 1 is displayed.
  • hblank_memory_free: If this is enabled the video memory (VRAM, PALRAM, OAM) will be free to access without wait states during the horizontal-blank period. However, in exchange, there’s less time available for OBJ display computation so not as many of the video objects can be displayed (details).
  • obj_vram_1d: If the video ram should be used as “1d” or “2d” when displaying an OBJ (details).
  • forced_blank: If this is set the screen displays full white instead of anything else. The vertical counter will continue to change as normal while forced blank is in effect.
  • display_bgX: For background each layer, if this layer should be shown. Background availability, and the registers involved, depends on the video mode selected.
  • display_obj: Display the object entries. The obj layer is always available.
  • display_winX: Enable the layers of the Window special effect, also controlled via WIN_CONTROL, WIN_HORIZONTAL, and WIN_VERTICAL.

Implementations§

Source§

impl DisplayControlValue

Source

pub const fn new() -> Self

Source

pub const fn video_mode(self) -> VideoMode

Source

pub const fn with_video_mode(self, t: VideoMode) -> Self

Source

pub fn set_video_mode(&mut self, t: VideoMode)

Source

pub const fn display_frame1(self) -> bool

Source

pub const fn with_display_frame1(self, b: bool) -> Self

Source

pub fn set_display_frame1(&mut self, b: bool)

Source

pub const fn hblank_memory_free(self) -> bool

Source

pub const fn with_hblank_memory_free(self, b: bool) -> Self

Source

pub fn set_hblank_memory_free(&mut self, b: bool)

Source

pub const fn obj_vram_1d(self) -> bool

Source

pub const fn with_obj_vram_1d(self, b: bool) -> Self

Source

pub fn set_obj_vram_1d(&mut self, b: bool)

Source

pub const fn forced_blank(self) -> bool

Source

pub const fn with_forced_blank(self, b: bool) -> Self

Source

pub fn set_forced_blank(&mut self, b: bool)

Source

pub const fn display_bg0(self) -> bool

Source

pub const fn with_display_bg0(self, b: bool) -> Self

Source

pub fn set_display_bg0(&mut self, b: bool)

Source

pub const fn display_bg1(self) -> bool

Source

pub const fn with_display_bg1(self, b: bool) -> Self

Source

pub fn set_display_bg1(&mut self, b: bool)

Source

pub const fn display_bg2(self) -> bool

Source

pub const fn with_display_bg2(self, b: bool) -> Self

Source

pub fn set_display_bg2(&mut self, b: bool)

Source

pub const fn display_bg3(self) -> bool

Source

pub const fn with_display_bg3(self, b: bool) -> Self

Source

pub fn set_display_bg3(&mut self, b: bool)

Source

pub const fn display_obj(self) -> bool

Source

pub const fn with_display_obj(self, b: bool) -> Self

Source

pub fn set_display_obj(&mut self, b: bool)

Source

pub const fn display_win0(self) -> bool

Source

pub const fn with_display_win0(self, b: bool) -> Self

Source

pub fn set_display_win0(&mut self, b: bool)

Source

pub const fn display_win1(self) -> bool

Source

pub const fn with_display_win1(self, b: bool) -> Self

Source

pub fn set_display_win1(&mut self, b: bool)

Source

pub const fn display_win_obj(self) -> bool

Source

pub const fn with_display_win_obj(self, b: bool) -> Self

Source

pub fn set_display_win_obj(&mut self, b: bool)

Trait Implementations§

Source§

impl Clone for DisplayControlValue

Source§

fn clone(&self) -> DisplayControlValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DisplayControlValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DisplayControlValue

Source§

fn default() -> DisplayControlValue

Returns the “default value” for a type. Read more
Source§

impl PartialEq for DisplayControlValue

Source§

fn eq(&self, other: &DisplayControlValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DisplayControlValue

Source§

impl Eq for DisplayControlValue

Source§

impl StructuralPartialEq for DisplayControlValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.