Functions | |
| void | tte_set_context (TTC *tc) |
| Set the master context pointer. | |
| INLINE TTC * | tte_get_context (void) |
| Get the master text-system. | |
| INLINE uint | tte_get_glyph_id (int ch) |
| Get the glyph index of character ch. | |
| INLINE int | tte_get_glyph_width (uint gid) |
| Get the width of glyph id. | |
| INLINE int | tte_get_glyph_height (uint gid) |
| Get the height of glyph id. | |
| INLINE const void * | tte_get_glyph_data (uint gid) |
| Get the glyph data of glyph id. | |
| void | tte_set_color (eint type, u16 clr) |
| Set color attribute of type to cattr. | |
| void | tte_set_colors (const u16 colors[]) |
| Load important color data. | |
| void | tte_set_color_attr (eint type, u16 cattr) |
| Set color attribute of type to cattr. | |
| void | tte_set_color_attrs (const u16 cattrs[]) |
| Load important color attribute data. | |
| char * | tte_cmd_default (const char *str) |
| Text command handler. | |
| int | tte_putc (int ch) |
| Plot a single character; does wrapping too. | |
| int | tte_write (const char *text) |
| Render a string. | |
| int | tte_write_ex (int x, int y, const char *text, const u16 *clrlut) |
| Extended string writer, with positional and color info. | |
| void | tte_erase_rect (int left, int top, int right, int bottom) |
| Erase a porttion of the screen (ignores margins). | |
| void | tte_erase_screen (void) |
| Erase the screen (within the margins). | |
| void | tte_erase_line (void) |
| Erase the whole line (within the margins). | |
| POINT16 | tte_get_text_size (const char *str) |
| Get the size taken up by a string. | |
| void | tte_init_base (const TFont *font, fnDrawg drawProc, fnErase eraseProc) |
| Base initializer of a TTC. | |
This covers most of the things you can actually use TTE for, like writing the text, getting information about a glyph and setting color attributes.
| char* tte_cmd_default | ( | const char * | str | ) |
Text command handler.
Takes commands formatted as "#{[cmd]:[opt];[[cmd]:[opt];...]} and deals with them.
Command list:
Examples:
| str | Start of command. Assumes the initial "\{" is lobbed off already. |
This function involves heavy (yet necessary) switching. Leave your sanity at the door before viewing.
| void tte_erase_line | ( | void | ) |
Erase the whole line (within the margins).
| void tte_erase_screen | ( | void | ) |
Erase the screen (within the margins).
| POINT16 tte_get_text_size | ( | const char * | str | ) |
Get the size taken up by a string.
| str | String to check. |
| int tte_putc | ( | int | ch | ) |
Plot a single character; does wrapping too.
| ch | Character to plot (not glyph-id). |
| void tte_set_context | ( | TTC * | tc | ) |
Set the master context pointer.
| int tte_write | ( | const char * | text | ) |
Render a string.
| text | String to parse and write. |
1.5.3