From Archaic Pixels
Revision as of 00:56, 13 September 2010 by Gravis (Created page with "** FONT FUNCTIONS ** -------------------- set_font_color(char fg, char bg); Set the default font foreground and background colors (colors range from 0 to 15...")
- FONT FUNCTIONS **
set_font_color(char fg, char bg);
Set the default font foreground and background colors
(colors range from 0 to 15). Changes won't take effect
immediately, you must re-load the font by calling
Set the font palette index (0-15).
Set the font address in video memory.
Use this function to change the current font;
to use several font on the same screen, or when
you load yourself a font and need to tell the
library where it is.
Return the current font palette index.
Return the current font address in video memory.
load_default_font(char num, int vaddr);
Load a default font in video memory. Without parameters
the first default font is loaded just above the
BAT in video memory; usualy it's address 0x800.
Otherwise you can select the font number, and eventualy
the address in video memory.
In its current implementation the library support only
one default font, but in the future more fonts could
load_font(char *font, char nb_char);
load_font(char *font, char nb_char, int vaddr);
Load a custom font in video memory. Used together
with the #incchr directive it will allow you to load
a font from a PCX file. Note that custom fonts are
colored fonts, so they won't be affected by any
previous call to set_font_color().
The number of character to load range from 0 to 224,
ASCII characters 0 to 31 are never used, and can't
be defined, you must start your font at the space
character, which is ASCII code 32.
If you don't implicitely give a video memory address,
the function will load your font just above
the BAT (usualy it's address 0x800).