Skip to Content
The Alchemy Project

include/graphics/glyph.h

The text font's characters, and the buffers and shared palette through which the icons beside text (commands, items, Psynergy, status) are drawn.

Included by glyph_arm.c, screens.h and window.h.

Structures

NameDescription
structICON_PALETTEA compact palette shared by a selection's command icons: the slot each icon colour was given, or ICON_PALETTE_SLOT_UNSET for none yet, and how many slots are taken.
structGLYPHA character of the text font: its width and its rows of pixels.
structICON_TRANSFERThe buffers an icon (command, item, Psynergy or status) or a portrait is decoded through, held in HEAP_SLOT_ICON_TRANSFER while one icon is drawn: mnIconDecode unpacks encoded into input (via mnTileDecompress4bpp, or syDecompressByteLZ for 256-colour ResourceIdCommandIcons used as is), then expands input into tiles.

Macros

NameDescription
#defineICON_PALETTE_SLOT_UNSET 255ICON_PALETTE.slot of an icon colour given no slot yet.
#defineICON_PALETTE_COLORS 256The colours an icon's 256-colour pixels hold, each with an ICON_PALETTE.slot entry.
#defineICON_TILE_BYTES (16 * 16 / 2)A 16-pixel square icon's tiles at 4 bits a pixel, what VRAM takes of ICON_TRANSFER.tiles for an item, Psynergy or status icon.

Enumerations

NameDescription
enumanonymous enum { FONT_GLYPH_ROWS }
enumanonymous enum { FONT_GLYPH_ROWS }

Variables

NameDescription
extern const GLYPHFontGlyphs []The main font, from character code 32: its glyphs in code order.

Description

The text font's characters, and the buffers and shared palette through which the icons beside text (commands, items, Psynergy, status) are drawn.

Macros in detail

ICON_PALETTE_SLOT_UNSET

#define ICON_PALETTE_SLOT_UNSET 255

ICON_PALETTE.slot of an icon colour given no slot yet.

Referenced by mnBattleCommandRowLoadIconTiles() and mnBattleCommandRowRun().

Definition at line 26 of file glyph.h.

ICON_PALETTE_COLORS

#define ICON_PALETTE_COLORS 256

The colours an icon's 256-colour pixels hold, each with an ICON_PALETTE.slot entry.

Referenced by mnBattleCommandRowRun().

Definition at line 29 of file glyph.h.

ICON_TILE_BYTES

#define ICON_TILE_BYTES (16 * 16 / 2)

A 16-pixel square icon's tiles at 4 bits a pixel, what VRAM takes of ICON_TRANSFER.tiles for an item, Psynergy or status icon.

Referenced by fdItemDisplayShowItem(), fdItemDisplayShowItemInFront(), mnIconCreateHandCursor(), mnIconCreateHandCursorUnusedArgument(), mnLoadDjinnArrows(), scColossoShowItemIcon(), scCottageRoomsBShowMythrilBag(), scFloatNut(), scImilFuchinFallsPlaceDragonsEye(), scInit(), scKalayPrepareTown(), scSanctumRaiseItemIcon(), scShipRoomsPlaceAnchorCharm(), scSolSanctumElementalStarRoomPresentStarFX(), scSolSanctumEruptionPlayWiseOneRescue(), scVaultPlaceItemIcon(), scVenusLighthouseAerieCombineSaturosAndMenardi() and scWorldMapUseBlackOrb().

Definition at line 78 of file glyph.h.

Enumerations in detail

anonymous enum

enum { FONT_GLYPH_ROWS }

EnumeratorValueDescription
FONT_GLYPH_ROWS12

Definition at line 14 of file glyph.h.

anonymous enum

enum { FONT_GLYPH_ROWS }

EnumeratorValueDescription
FONT_GLYPH_ROWS15

Definition at line 19 of file glyph.h.

Variables in detail

FontGlyphs

extern const GLYPH FontGlyphs[]

The main font, from character code 32: its glyphs in code order.

Referenced by mnGlyphDrawArm(), mnMessageType(), mnTextDrawGlyphPair(), mnTextDrawWideStringAtOffset(), mnTextMeasureAllPages() and mnTextMeasureDecoded().

Definition at line 54 of file glyph.h.