Struct cdg::Tile [] [src]

pub struct Tile {
    pub pos: (u8, u8),
    pub color: (u8, u8),
    pub content: [u8; 12],
}

A 6x12 tile, to be blitted to the display

Fields

X and Y coordinates, in tiles. 0,0 is the top left corner

The CLUT indices of the background and foreground colors

A 1bpp representation of the tile. Bytes represent rows; byte 0 is the top row. Within each byte/row, bit 5 (0x20) is the leftmost pixel and bit 0 (0x01) is the rightmost.

Methods

impl Tile
[src]

Return the CLUT index of the pixel at x,y

Trait Implementations

impl Debug for Tile
[src]

Formats the value using the given formatter.