Interface for displaying ASCII text. Currently a direct replacement for slPrint. It removes any possible dependency on NBG0 system variables and displays 4bpp fonts to reduce required memory. Allows Storing and displaying up to 6 fonts and 8 color pallets.
#include <srl_ascii.hpp>
Static Public Member Functions | |
static void | LoadFont (SRL::Bitmap::IBitmap *bmp, uint16_t fontId=0) |
Copies 4bpp Bitmap ASCII table to VRAM as 4bpp tileset. | |
static void | LoadFontSG (uint8_t *source, uint16_t fontId=0) |
Use to load a 4bpp version of SGLs internal font. | |
static void | Print (char *myString, uint8_t x, uint8_t y) |
Display ASCII string on single line. Does not clamp to screen bounds or handle overflow. | |
static void | SetColor (uint16_t color, uint8_t colorIndex) |
Set color in the specified palette index of the current font pallet. | |
static void | SetFont (uint16_t fontId) |
Set current font to print with (range 0-5) | |
static void | SetPalette (uint16_t paletteId) |
Set current color pallet to print with (range 0-7) | |
|
inlinestatic |
Copies 4bpp Bitmap ASCII table to VRAM as 4bpp tileset.
bmp | pointer to an IBitmap interface to load |
fontId | Index in the font table to load this font to (range 0-5) |
|
inlinestatic |
Use to load a 4bpp version of SGLs internal font.
source | Address storing SGLs 8bpp font |
fontId | Font index to load to (range 0-5) |
|
inlinestatic |
Display ASCII string on single line. Does not clamp to screen bounds or handle overflow.
myString | The string to print |
x | Starting tile X coordinate on screen (0-64) |
y | Starting tile Y coordinate on screen (0-64) |
|
inlinestatic |
Set color in the specified palette index of the current font pallet.
color | RGB555 color to set in current pallet |
colorIndex | index to write the color to in the currently active font pallet (Clamped to 16 color palette) |
|
inlinestatic |
Set current font to print with (range 0-5)
fontId | Index of the desired font in font table |
|
inlinestatic |
Set current color pallet to print with (range 0-7)
paletteId | index of the 16 color pallet in CRAM (limited to the first 8 pallets) |