libtonc
Character text, column-major

Text on surface composed of 4bpp tiles, mapped in column-major order. More...

Modules

 Character text, row-major
 Text on surface composed of 4bpp tiles, mapped in row-major order.
 

4bpp tiles

void tte_init_chr4c (int bgnr, u16 bgcnt, u16 se0, u32 cattrs, u32 clrs, const TFont *font, fnDrawg proc)
 Initialize text system for 4bpp tiled, column-major surfaces.
 
void chr4c_erase (int left, int top, int right, int bottom)
 Erase part of the 4bpp text canvas.
 
void chr4c_drawg_b1cts (uint gid)
 Render 1bpp fonts to 4bpp tiles.
 
IWRAM_CODE void chr4c_drawg_b1cts_fast (uint gid)
 Initialize text system for 4bpp tiled, column-major surfaces.
 
void chr4c_drawg_b4cts (uint gid)
 Initialize text system for 4bpp tiled, column-major surfaces.
 
IWRAM_CODE void chr4c_drawg_b4cts_fast (uint gid)
 Initialize text system for 4bpp tiled, column-major surfaces.
 
void tte_init_chr4r (int bgnr, u16 bgcnt, u16 se0, u32 cattrs, u32 clrs, const TFont *font, fnDrawg proc)
 Initialize text system for 4bpp tiled, column-major surfaces.
 
void chr4r_erase (int left, int top, int right, int bottom)
 Erase part of the 4bpp text canvas.
 
void chr4r_drawg_b1cts (uint gid)
 Render 1bpp fonts to 4bpp tiles.
 
IWRAM_CODE void chr4r_drawg_b1cts_fast (uint gid)
 Initialize text system for 4bpp tiled, column-major surfaces.
 

Detailed Description

Text on surface composed of 4bpp tiles, mapped in column-major order.

There are actually two chr4 systems. The difference between the two is the ordering of the tiles: column-major versus row-major. Since column-major is 'better', this is considered the primary sub-system for tiled text.

See also
4bpp tiled surfaces, column major

Function Documentation

◆ chr4c_drawg_b1cts_fast()

IWRAM_CODE void chr4c_drawg_b1cts_fast ( uint  gid)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

◆ chr4c_drawg_b4cts()

void chr4c_drawg_b4cts ( uint  gid)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

References chr4c_drawg_b4cts(), TTE_BASE_VARS, and TTE_CHAR_VARS.

Referenced by chr4c_drawg_b4cts().

◆ chr4c_drawg_b4cts_fast()

IWRAM_CODE void chr4c_drawg_b4cts_fast ( uint  gid)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

◆ chr4r_drawg_b1cts_fast()

IWRAM_CODE void chr4r_drawg_b1cts_fast ( uint  gid)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

◆ tte_init_chr4c()

void tte_init_chr4c ( int  bgnr,
u16  bgcnt,
u16  se0,
u32  cattrs,
u32  clrs,
const TFont font,
fnDrawg  proc 
)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

References BFN_GET, TTC::cattr, chr4c_erase(), TTC::ctrl, TTC::dst, pal_bg_bank, pal_bg_mem, REG_BGCNT, schr4c_prep_map(), se_mem, SRF_CHR4C, srf_init(), tile_mem, tte_get_context(), tte_init_base(), and vwf_default.

◆ tte_init_chr4r()

void tte_init_chr4r ( int  bgnr,
u16  bgcnt,
u16  se0,
u32  cattrs,
u32  clrs,
const TFont font,
fnDrawg  proc 
)

Initialize text system for 4bpp tiled, column-major surfaces.

Parameters
bgnrBackground number.
bgcntBackground control flags.
se0Base offset for screen-entries.
cattrsColor attributes; one byte per attr.
clrsink(/shadow) colors.
fontFont to initialize with.
procGlyph renderer

References BFN_GET, TTC::cattr, chr4r_erase(), TTC::ctrl, TTC::dst, pal_bg_bank, pal_bg_mem, REG_BGCNT, schr4r_prep_map(), se_mem, SRF_CHR4R, srf_init(), tile_mem, tte_get_context(), tte_init_base(), and vwf_default.