[][src]Struct rubidium::Mode5

pub struct Mode5;

A ZST for namespacing VideoMode4 stuff into one place.

In Mode 5 the majority of VRAM is occupied with two bitmaps, frame 0 and frame 1, which are each somewhat smaller than the full size of the GBA's physical display.

Each position contains a Color to display at that location.

You can access the address of a location by row and then col or by x and then y. It will give equivalent results.

let p = Mode5.frame(0).row(8).col(5);
let q = Mode5.frame(0).x(5).y(8);
assert_eq!(p, q);

See Also: VideoMode

Methods

impl Mode5[src]

pub const WIDTH: usize[src]

In Mode5 each frame is 160 pixels wide.

pub const HEIGHT: usize[src]

In Mode5 each frame is 128 pixels tall.

#[must_use]pub fn frame(self, frame: usize) -> Mode5Frame[src]

Selects frame 0 or frame 1.

Panics

If the input is greater than 1.

Trait Implementations

impl Clone for Mode5[src]

impl Copy for Mode5[src]

impl Debug for Mode5[src]

Auto Trait Implementations

impl Send for Mode5

impl Sync for Mode5

impl Unpin for Mode5

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.