Text_Output_Functions
From ArchaicPixels: HuC and PCEAS Documentation
Contents |
Text Output Functions
All the text output functions have two forms, one where
you directly specify the video memory address, and another
one where you specify x/y coordinates (in character unit).
The second form is a bit slower but more user-friendly.
| void put_digit(char digit, int vaddr); void put_digit(char digit, char x, char y); |
Output a digit character '0'-'9' given its numeric
value. Hex digits ('A'-'F') are also supported,
a value of 10 will output 'A', a value of 11 will
output 'B', and so on...
|
| void put_char(char c, int vaddr); void put_char(char c, char x, char y); |
Output an ASCII character. |
| void put_raw(int bat_val, int vaddr); void put_raw(int bat_val, char x, char y); |
Output a raw bat-value. |
| void put_number(int number, char width, int vaddr); void put_number(int number, char width, char x, char y); |
Output a signed number. The 'width' argument is used
to format the number. As much as 'width' digit(s)
will be displayed. If the number has less than 'width'
digit(s), blank spaces will be added at its left.
If the number is negative, a '-' sign is added.
|
| void put_hex(int number, char width, int vaddr); void put_hex(int number, char width, char x, char y); |
Output a hex (base 16) number. |
| void put_string(char *string, int vaddr); void put_string(char *string, char x, char y); |
Output a null terminated ASCII string. |
