Sprites.Platform.GameBoyColor

The Game Boy Color platform pack: the machine's shared constants under the core, its sprite constants under Sprite, its map constants under Map, and its font constants under Font. Fifteen bit colour with no fixed palette, sprites and tiles built from 8×8 cells of four colours, and no ROM font.

Sprites.Platform.GameBoyColor

Sprite

Map

Font

Sprites.Platform.GameBoyColor.Name String

The machine's display name.

Sprites.Ui.Dom.Text('Name = ', Sprites.Platform.GameBoyColor.Name);
The platform's display name.

Sprites.Platform.GameBoyColor.BitsPerChannel Number

The colour depth, five bits a channel, the console's fifteen bit colour. The colours are free, so there is no fixed palette.

Sprites.Ui.Dom.Text('BitsPerChannel = ', Sprites.Platform.GameBoyColor.BitsPerChannel);
Five bits a channel gives fifteen bit colour.

Sprites.Platform.GameBoyColor.Sprite.Slots Array

The four colours a sprite tile starts on, one palette's worth, as packed 0xRRGGBBAA integers.

Sprites.Reactive.Each(Sprites.Platform.GameBoyColor.Sprite.Slots, (colour) => {
  const css = Sprites.Colour.Css(colour);
  Sprites.Ui.Dom.Tag('span', () => {
    Sprites.Ui.Dom.Style('display', 'inline-block');
    Sprites.Ui.Dom.Style('width', '1.4rem');
    Sprites.Ui.Dom.Style('height', '1.4rem');
    Sprites.Ui.Dom.Style('background', css);
  });
});
The four colours the sprite editor starts on.

Sprites.Platform.GameBoyColor.Sprite.Modes Array

The sprite modes, in the order the Info window lists them. A Sprite mode of four colours at chosen widths and heights, and a size locked Tile mode of four colours at 8×8. Each sets a colour count, a pixel aspect and a size rule.

Sprites.Reactive.Each(Sprites.Platform.GameBoyColor.Sprite.Modes, (mode) => {
  const name = Sprites.Object.Field(mode, 'name');
  const colours = Sprites.Object.Field(mode, 'colours');
  Sprites.Ui.Dom.Tag('div', () => {
    Sprites.Ui.Dom.Text(name, ' — ', colours, ' colours');
  });
});
A Sprite mode and a size locked Tile mode, each of four colours.

Sprites.Platform.GameBoyColor.Sprite.DefaultWidth Number

The sprite width the editor opens on.

Sprites.Ui.Dom.Text('DefaultWidth = ', Sprites.Platform.GameBoyColor.Sprite.DefaultWidth);
The sprite opens eight pixels wide.

Sprites.Platform.GameBoyColor.Sprite.DefaultHeight Number

The sprite height the editor opens on.

Sprites.Ui.Dom.Text('DefaultHeight = ', Sprites.Platform.GameBoyColor.Sprite.DefaultHeight);
The sprite opens eight pixels high.

Sprites.Platform.GameBoyColor.Map.TileWidth Number

The width in pixels of one map tile.

Sprites.Ui.Dom.Text('TileWidth = ', Sprites.Platform.GameBoyColor.Map.TileWidth);
Each tile is eight pixels wide.

Sprites.Platform.GameBoyColor.Map.TileHeight Number

The height in pixels of one map tile.

Sprites.Ui.Dom.Text('TileHeight = ', Sprites.Platform.GameBoyColor.Map.TileHeight);
Each tile is eight pixels high.

Sprites.Platform.GameBoyColor.Map.ScreenWidth Number

The visible width of the screen in tiles, the default map width.

Sprites.Ui.Dom.Text('ScreenWidth = ', Sprites.Platform.GameBoyColor.Map.ScreenWidth);
The screen shows twenty tiles across.

Sprites.Platform.GameBoyColor.Map.ScreenHeight Number

The visible height of the screen in tiles, the default map height.

Sprites.Ui.Dom.Text('ScreenHeight = ', Sprites.Platform.GameBoyColor.Map.ScreenHeight);
The screen shows eighteen tiles down.

Sprites.Platform.GameBoyColor.Map.HardwareWidth Number

The width in tiles of the hardware map, which wraps.

Sprites.Ui.Dom.Text('HardwareWidth = ', Sprites.Platform.GameBoyColor.Map.HardwareWidth);
The hardware map is thirty two tiles wide.

Sprites.Platform.GameBoyColor.Map.HardwareHeight Number

The height in tiles of the hardware map, which wraps.

Sprites.Ui.Dom.Text('HardwareHeight = ', Sprites.Platform.GameBoyColor.Map.HardwareHeight);
The hardware map is thirty two tiles high.

Sprites.Platform.GameBoyColor.Map.MaxWidth Number

The largest map width in tiles, for a world that streams beyond the hardware map.

Sprites.Ui.Dom.Text('MaxWidth = ', Sprites.Platform.GameBoyColor.Map.MaxWidth);
A world may reach 1024 tiles across.

Sprites.Platform.GameBoyColor.Map.MaxHeight Number

The largest map height in tiles, for a world that streams beyond the hardware map.

Sprites.Ui.Dom.Text('MaxHeight = ', Sprites.Platform.GameBoyColor.Map.MaxHeight);
A world may reach 1024 tiles down.

Sprites.Platform.GameBoyColor.Map.Modes Array

The map modes. One Background mode of 512 tiles across two banks, four colours a tile from eight palettes, per tile attributes with flip and priority, and background and Window layers. Its tile is the size locked sprite mode a cell is drawn in, an 8×8 tile of four colours, the palette chosen per cell by the map attribute.

Sprites.Reactive.Each(Sprites.Platform.GameBoyColor.Map.Modes, (mode) => {
  const name = Sprites.Object.Field(mode, 'name');
  const tiles = Sprites.Object.Field(mode, 'tiles');
  const palettes = Sprites.Object.Field(mode, 'palettes');
  Sprites.Ui.Dom.Tag('div', () => {
    Sprites.Ui.Dom.Text(name, ' — ', tiles, ' tiles, ', palettes, ' palettes');
  });
});
One Background mode of 512 tiles from eight palettes.

Sprites.Platform.GameBoyColor.Font.Charsets Array

The machine's built-in character sets. Empty: there is no ROM text font, so on-screen text is drawn from ordinary tiles the game supplies.

const count = Sprites.Array.Length(Sprites.Platform.GameBoyColor.Font.Charsets);
Sprites.Ui.Dom.Text('Charsets = ', count, ' built-in fonts');
No ROM font, so the character set list is empty.

Sprites.Platform.GameBoyColor.Font.DefaultFont Object

The built-in font. Undefined: the Game Boy Color has no ROM text font, so there is no default character set. On-screen text is drawn from ordinary 8×8 tiles the game supplies. See the Game Boy Color font page.

const label = Sprites.Optional.Default(Sprites.Platform.GameBoyColor.Font.DefaultFont, 'none');
Sprites.Ui.Dom.Text('DefaultFont = ', label);
No built-in font, so the default is none.

Sprites.Platform.GameBoyColor.Font.DefaultWidth Number

The glyph cell width in pixels of the default font. Zero: the Game Boy Color has no ROM font.

Sprites.Ui.Dom.Text('DefaultWidth = ', Sprites.Platform.GameBoyColor.Font.DefaultWidth);
Zero, since there is no ROM font.

Sprites.Platform.GameBoyColor.Font.DefaultHeight Number

The glyph cell height in pixels of the default font. Zero: the Game Boy Color has no ROM font.

Sprites.Ui.Dom.Text('DefaultHeight = ', Sprites.Platform.GameBoyColor.Font.DefaultHeight);
Zero, since there is no ROM font.

Sprites.Platform.GameBoyColor.Font.CharStart Number

The character code of the first glyph in the default font. Zero: no default font.

Sprites.Ui.Dom.Text('CharStart = ', Sprites.Platform.GameBoyColor.Font.CharStart);
Zero, since there is no default font.

Sprites.Platform.GameBoyColor.Font.CharCount Number

The number of glyphs in the default font. Zero: no default font.

Sprites.Ui.Dom.Text('CharCount = ', Sprites.Platform.GameBoyColor.Font.CharCount);
Zero, since there is no default font.