libtonc
|
Text using objects. More...
Functions | |
void | tte_init_obj (OBJ_ATTR *dst, u32 attr0, u32 attr1, u32 attr2, u32 clrs, u32 bupofs, const TFont *font, fnDrawg proc) |
Initialize text system for screen-entry fonts. | |
void | obj_erase (int left, int top, int right, int bottom) |
Unwind the object text-buffer. | |
void | obj_drawg (uint gid) |
Character-plot for objects. | |
Text using objects.
This is similar to tilemaps, in that the glyphs are loaded into object VRAM first and pointed to by the objects. Unlike tilemaps, though, variable-width fonts are possible here. The members of the surface member are used a little differently here, though. the pitch
is used as an index to the current object, and width
is the number of objects allowed to be used for text.
void tte_init_obj | ( | OBJ_ATTR * | obj, |
u32 | attr0, | ||
u32 | attr1, | ||
u32 | attr2, | ||
u32 | clrs, | ||
u32 | bupofs, | ||
const TFont * | font, | ||
fnDrawg | proc | ||
) |
Initialize text system for screen-entry fonts.
obj | Destination object. |
attr0 | Base obj.attr0. |
attr1 | Base obj.attr1. |
attr2 | Base obj.attr2. |
clrs | colors to use for the text. The palette entries used depends on attr2 and bupofs. |
bupofs | Flags for font bit-unpacking. Basically indicates pixel values (and hence palette use). |
font | Font to initialize with. |
proc | Character plotting procedure. |
References BFN_GET, TFont::bpp, TTC::cattr, TFont::cellSize, TFont::charCount, TFont::data, TTC::dst, fwf_default, oam_mem, obj_erase(), pal_obj_bank, SRF_NONE, tile_mem, tte_get_context(), and tte_init_base().