Enum cdg::Command [] [src]

pub enum Command {
    MemoryPreset {
        color: u8,
        repeat: u8,
    },
    BorderPreset {
        color: u8,
    },
    TileNormal {
        tile: Tile,
    },
    TileXOR {
        tile: Tile,
    },
    Scroll {
        color: Option<u8>,
        cmd: (ScrollCommand, ScrollCommand),
        offset: (u8, u8),
    },
    SetTransparent {
        color: u8,
    },
    LoadPalette {
        offset: u8,
        clut: [RgbColor; 8],
    },
}

One drawing command

Variants

Clear the scren to color. This command will usually appear multiple times in a row with repeat incrementing each time, starting at 0. If you trust your CDG to be without errors, you can therefore ignore MemoryPreset commands with a nonzero repeat value

Fields

Clear the border region to color. Documents vary as to whether the border region is the outside tile or the outside half-tile.

Fields

Draw a tile normally

Fields

Draw a tile by XORing the color indices in the tile with the colors indices already drawn. Note that this does not operate on RGB values.

Fields

Scroll the screen by the given horizontal and vertical amount, respectively. offset is given as an absolute position within the first tile to begin scanout.

If color is none, the tiles scrolled off one side of the framebuffer should be copied to the other side. Otherwise, they should be filled in with color

Fields

Set one element of the CLUT to transparent, to enable background video/images

Fields

Load one half of the CLUT. offset will be either 0 or 8, depending on whether the bottom or top half of the CLUT is to be loaded.

These changes take effect immediately, so this can be used to implement color cycling.

Fields

Trait Implementations

impl Debug for Command
[src]

Formats the value using the given formatter.