[][src]Struct gba_types::DisplayControlSetting

#[repr(transparent)]pub struct DisplayControlSetting(_);

The Display Control register value.

This sets the video mode, which affects almost all other aspects of the display, and also directly controls what layers are displayed or not.

Implementations

impl DisplayControlSetting[src]

#[must_use]pub fn video_mode(self) -> VideoMode[src]

The PPU's video mode. More details are on the VideoMode type.

#[must_use]pub fn show_frame1(self) -> bool[src]

Determines if Frame 0 or Frame 1 is shown when using video mode 4 or 5. Otherwise this has no effect.

#[must_use]pub fn hblank_oam_free(self) -> bool[src]

This sets the OAM memory to be free for CPU editing during Hblank.

The downside is that this gives the PPU less time for object display calculation, so the number of objects that can be displayed per line goes down slightly (by about 20%).

#[must_use]pub fn obj_vram_is_1d(self) -> bool[src]

Determines if the object tile memory region should be "2d" or "1d" when displaying multi-tile objects.

In 2d mode, the object video memory is considered to be a single 256x256 area, so each row is 32 tiles offset. In 1d mode, the object video memory is considered more like a standard array of tiles.

#[must_use]pub fn forced_blank(self) -> bool[src]

If this bit is active, the ppu is blanked regardless of its actual position.

While force-blank is on, the ppu only draws white pixels.

#[must_use]pub fn display_bg0(self) -> bool[src]

Display background 0. Only effective in video modes 0 and 1.

#[must_use]pub fn display_bg1(self) -> bool[src]

Display background 1. Only effective in video modes 0 and 1.

#[must_use]pub fn display_bg2(self) -> bool[src]

Display background 2. BG2 has some sort of content in all video modes.

#[must_use]pub fn display_bg3(self) -> bool[src]

Display background 3. Only effective in video modes 0 and 2.

#[must_use]pub fn display_obj(self) -> bool[src]

Display the object layer. Available in all video modes.

#[must_use]pub fn display_win0(self) -> bool[src]

Display window 0 content.

#[must_use]pub fn display_win1(self) -> bool[src]

Display window 1 content.

#[must_use]pub fn display_obj_win(self) -> bool[src]

Display object window content.

pub fn set_video_mode(&mut self, video_mode: VideoMode)[src]

pub fn set_show_frame1(&mut self, show_frame1: bool)[src]

pub fn set_hblank_oam_free(&mut self, hblank_oam_free: bool)[src]

pub fn set_obj_vram_is_1d(&mut self, obj_vram_is_1d: bool)[src]

pub fn set_forced_blank(&mut self, forced_blank: bool)[src]

pub fn set_display_bg0(&mut self, display_bg0: bool)[src]

pub fn set_display_bg1(&mut self, display_bg1: bool)[src]

pub fn set_display_bg2(&mut self, display_bg2: bool)[src]

pub fn set_display_bg3(&mut self, display_bg3: bool)[src]

pub fn set_display_obj(&mut self, display_obj: bool)[src]

pub fn set_display_win0(&mut self, display_win0: bool)[src]

pub fn set_display_win1(&mut self, display_win1: bool)[src]

pub fn set_display_obj_win(&mut self, display_obj_win: bool)[src]

Trait Implementations

impl Clone for DisplayControlSetting[src]

impl Copy for DisplayControlSetting[src]

impl Debug for DisplayControlSetting[src]

impl Default for DisplayControlSetting[src]

impl Eq for DisplayControlSetting[src]

impl Hash for DisplayControlSetting[src]

impl Ord for DisplayControlSetting[src]

impl PartialEq<DisplayControlSetting> for DisplayControlSetting[src]

impl PartialOrd<DisplayControlSetting> for DisplayControlSetting[src]

impl StructuralEq for DisplayControlSetting[src]

impl StructuralPartialEq for DisplayControlSetting[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.