Font_Functions
From ArchaicPixels: HuC and PCEAS Documentation
Contents |
Font Functions
| void 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
load_default_font().
|
| void set_font_pal(char pal); |
Set the font palette index (0-15). |
| void set_font_addr(int vaddr); |
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.
|
| int get_font_pal(void); |
Return the current font palette index. |
| int get_font_addr(void); |
Return the current font address in video memory. |
| void load_default_font(void); void load_default_font(char num); void 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
be available.
|
| void load_font(char *font, char nb_char); void 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).
|
