Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ScreenWidth is the width of the screen in pixels. ScreenWidth = 160 // ScreenHeight is the height of the screen in pixels. ScreenHeight = 144 )
View Source
const ( ModeHBlank = iota ModeVBlank ModeOAM ModeVRAM )
View Source
const ( Greyscale = iota // default Green // mimics the original green screen )
Variables ¶
View Source
var ColourPalettes = []Palette{
{{0xFF, 0xFF, 0xFF}, {0xAA, 0xAA, 0xAA}, {0x55, 0x55, 0x55}, {0x00, 0x00, 0x00}},
{{0x9B, 0xBC, 0x0F}, {0x8B, 0xAC, 0x0F}, {0x30, 0x62, 0x30}, {0x0F, 0x38, 0x0F}},
}
View Source
var ColourisationPalettes = map[uint16]ColourisationPalette{}
Functions ¶
This section is empty.
Types ¶
type ColourPalette ¶
type ColourPalette [8]Palette
type ColourisationPalette ¶
type ColourisationPalette struct {
BG, OBJ0, OBJ1 Palette
}
type PPU ¶
type PPU struct { Sprites [40]Sprite // 40 sprite attributes from OAM TileData [2][384]Tile // 384 tiles, 8x8 pixels each (double in CGB mode) TileMaps [2][32][32]TileEntry // 32x32 tiles, 8x8 pixels each // palettes used for DMG -> CGB colourisation BGColourisationPalette Palette OBJ0ColourisationPalette Palette OBJ1ColourisationPalette Palette // palettes used by the ppu to display colours ColourPalette ColourPalette ColourSpritePalette ColourPalette PreparedFrame [ScreenHeight][ScreenWidth][3]uint8 // debug Debug struct { SpritesDisabled, BackgroundDisabled, WindowDisabled bool } // contains filtered or unexported fields }
type Sprite ¶
type Sprite struct { TileEntry // contains filtered or unexported fields }
Sprite is used to define the attributes of a sprite in OAM.
Click to show internal directories.
Click to hide internal directories.