Functions | |
bool | isFONT (SatAddr src) |
is object a FONT? | |
int | FONTnibbles (SatAddr src) |
The size of a FONT in nibbles. | |
SatAddr | FONTitem (SatAddr src, int idx) |
Return the Saturn address of a character's FONT entry. | |
int | FONTgetId (SatAddr src) |
Get the font ID. | |
bool | FONTsetId (SatAddr src, int id) |
Set the FONT id. | |
int | FONTgetNameLen (SatAddr src) |
Get the number of characters in the font's name. | |
bool | FONTsetName (SatAddr src, const char *name) |
Change the name of a FONT. Note that new name must be the same length as existing name. | |
bool | FONTdecode (SatAddr src, int *id, char *name, int *height, char *graphics) |
Decode a FONT into it's parts. | |
SatAddr | FONTencode (int id, const char *name, int height, const char *graphics, SatAddr dst) |
Create a new FONT. | |
SatAddr | makeFONT (int nameLen) |
Make a blank font with room for "nameLen" characters in the name. |
bool FONTdecode | ( | SatAddr | src, | |
int * | id, | |||
char * | name, | |||
int * | height, | |||
char * | graphics | |||
) |
Decode a FONT into it's parts.
src | The Saturn Address of a FONT object | |
id | if non-null, then the FONT's id number will be stored here. | |
name | if non-null, then the font name will be copied here as a null-terminated string. Name must point to enough space to hold the name. You can get the number of characters in the name with FONTgetNameLen() ahead of time and pass this value plus 1 (for the terminating NULL byte. ALternatively, since the name can never exceed 255 characters, just pass a 256 character buffer. | |
height | If non-null, the FONT's height in pixels will be stored here. | |
graphics | If non-null, the FONT's graphic data will be copied here. Graphics must point to sufficient space to hold the data, which can be up to 2kb. |
Create a new FONT.
id | The FONT id, which must be between 0 and 255 | |
name | A null-terminated string containing the font's name. Must be less than 255 characters. | |
height | The font's height in pixels. \param graphics. The graphical data. See "Saturn Assembly Language Programming" for details on the format of FONT graphics. | |
dst | Where to store the resulting FONT. If zero then a new FONT will be created in TEMPOB. Otherwise dst must point to the right amount of space to hold the FONT object. |
int FONTgetId | ( | SatAddr | src | ) |
Get the font ID.
src | The Saturn Address of a FONT object |
int FONTgetNameLen | ( | SatAddr | src | ) |
Get the number of characters in the font's name.
src | The Saturn Address of a FONT object |
Return the Saturn address of a character's FONT entry.
This returns the address of the font entry corresponding to ASCII char ch. Once you have the entry, you can read or change it with sat_peek() and sat_poke(). See section 56.17 in "Saturn Assembly Language Programming" for details of a FONT entry.
src | The Saturn address of the FONT | |
ch | The ASCII character |
int FONTnibbles | ( | SatAddr | src | ) |
The size of a FONT in nibbles.
src | Saturn address of the FONT. |
bool FONTsetId | ( | SatAddr | src, | |
int | id | |||
) |
Set the FONT id.
src | The Saturn Address of a FONT object | |
id | The new ID, which must be between 0 and 255. |
bool FONTsetName | ( | SatAddr | src, | |
const char * | name | |||
) |
Change the name of a FONT. Note that new name must be the same length as existing name.
src | The Saturn Address of a FONT object | |
name | a null-terminated string that is the new name. This must be the same length as the old name. In other words strlen(name) must equal FONTgetNameLen(src) |
bool isFONT | ( | SatAddr | src | ) |
is object a FONT?
src | Saturn address of an object |
SatAddr makeFONT | ( | int | nameLen | ) |
Make a blank font with room for "nameLen" characters in the name.
nameLen | The length of the name in characters |