[][src]Struct thorium::dmg_render::DMGConfig

pub struct DMGConfig {
    pub viewport_scroll_x: u8,
    pub viewport_scroll_y: u8,
    pub bg_win_use_signed_addressing: bool,
    pub background_uses_high_screenblock: bool,
    pub window_uses_high_screenblock: bool,
    pub objects_are_tall: bool,
    pub objects_enabled: bool,
    pub window_enabled: bool,
    pub bg_win_enabled: bool,
    pub window_y: u8,
    pub window_xp7: u8,
    pub bg_win_palette: [u8; 4],
    pub object_palette: [[u8; 4]; 2],
    pub max_objects_per_scanline: usize,
}

Holds a complete configuration for generating a DMG image (memory is elsewhere).

Fields

viewport_scroll_x: u8

Starting X (within BG space) of the viewport.

viewport_scroll_y: u8

Starting Y (within BG space) of the viewport.

bg_win_use_signed_addressing: bool

Adjusts how the background and window index into the tile memory.

  • false: values are unsigned, starting from block 0, addressing into 0/1.
  • true: values are signed, starting from block 2, addressing into 1/2.
background_uses_high_screenblock: bool

If the background should display according to the low screenblock or the high screenblock

window_uses_high_screenblock: bool

If the window should display according to the low screenblock or the high screenblock

objects_are_tall: bool

If objects should display as 8x16 (tall) instead of 8x8 (square)

objects_enabled: bool

If objects should be displayed at all.

window_enabled: bool

If the window should be displayed at all.

bg_win_enabled: bool

If the background and window should be displayed at all.

If this is false then window_enabled is ignored and only objects are displayed (assuming they're enabled).

window_y: u8

Y position of the upper left corner of the window (viewport relative).

Use 0 to align the window's top with the viewport top.

window_xp7: u8

X position (+7) of the upper left corner of the window (viewport relative).

Use 7 to align the window's left with the viewport left. Values of 0-6 were buggy on real hardware.

bg_win_palette: [u8; 4]

Translates background and window entries into palette index values.

object_palette: [[u8; 4]; 2]

Translates object entries into palette index values (but 0 is always transparent).

Individual objects can use either the low or high palette.

max_objects_per_scanline: usize

The limit of how many objects to show on a given scanline.

The real limit is 10, but it might as well be adjustable.

Trait Implementations

impl Default for DMGConfig[src]

impl Clone for DMGConfig[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for DMGConfig[src]

Auto Trait Implementations

impl Send for DMGConfig

impl Sync for DMGConfig

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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