KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
BIOS

API for the Dreamcast's built-in BIOS font. More...

Topics

 Byte Sizes
 Byte size definitions for the BIOS fonts.
 
 Character Drawing
 Methods for rendering characters/icons.
 
 Dimensions
 Font size definitions for the BIOS fonts.
 
 String Drawing
 Methods for rendering formatted text/icons.
 
 Structure
 Structure of the Bios Font.
 

Files

file  biosfont.h
 BIOS font drawing functions.
 

Enumerations

enum  bfont_code_t { BFONT_CODE_ISO8859_1 = 0 , BFONT_CODE_EUC = 1 , BFONT_CODE_SJIS = 2 , BFONT_CODE_RAW = 3 }
 

Functions

void bfont_set_encoding (bfont_code_t enc)
 Set the font encoding.
 

Coloring

Methods for modifying the text color.

uint32_t bfont_set_foreground_color (uint32_t c)
 Set the font foreground color.
 
uint32_t bfont_set_background_color (uint32_t c)
 Set the font background color.
 

Character Lookups

Methods for finding various font characters and icons.

const uint8_t * bfont_find_char (uint32_t ch)
 Find an ISO-8859-1 character in the font.
 
uint8_t * bfont_find_char_jp (uint32_t ch)
 Find an full-width Japanese character in the font.
 
uint8_t * bfont_find_char_jp_half (uint32_t ch)
 Find an half-width Japanese character in the font.
 
uint8_t * bfont_find_icon (bfont_vmu_icon_t icon)
 Find a VMU icon.
 
uint8_t * bfont_find_dc_icon (bfont_dc_icon_t icon)
 Find a DC icon.
 

Detailed Description

API for the Dreamcast's built-in BIOS font.

Enumeration Type Documentation

◆ bfont_code_t

Enumerator
BFONT_CODE_ISO8859_1 

ISO-8859-1 (western) charset.

BFONT_CODE_EUC 

EUC-JP charset.

BFONT_CODE_SJIS 

Shift-JIS charset.

BFONT_CODE_RAW 

Raw indexing to the BFONT.

Function Documentation

◆ bfont_find_char()

const uint8_t * bfont_find_char ( uint32_t ch)

Find an ISO-8859-1 character in the font.

This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.

Parameters
chThe character to look up
Returns
A pointer to the raw character data

◆ bfont_find_char_jp()

uint8_t * bfont_find_char_jp ( uint32_t ch)

Find an full-width Japanese character in the font.

This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.

This function deals with full-width kana and kanji.

Parameters
chThe character to look up
Returns
A pointer to the raw character data

◆ bfont_find_char_jp_half()

uint8_t * bfont_find_char_jp_half ( uint32_t ch)

Find an half-width Japanese character in the font.

This function retrieves a pointer to the font data for the specified character in the font, if its available. Generally, you will not have to use this function, use one of the bfont_draw_* functions instead.

This function deals with half-width kana only.

Parameters
chThe character to look up
Returns
A pointer to the raw character data

◆ bfont_find_dc_icon()

uint8_t * bfont_find_dc_icon ( bfont_dc_icon_t icon)

Find a DC icon.

This function retrieves a pointer to the icon data for the specified DC icon in the bios, if its available. Each dc icon has dimensions 24x24 pixels and is 72 bytes long.

Parameters
iconThe DC icon index to look up.
Returns
A pointer to the raw icon data or NULL if icon value is incorrect.

◆ bfont_find_icon()

uint8_t * bfont_find_icon ( bfont_vmu_icon_t icon)

Find a VMU icon.

This function retrieves a pointer to the icon data for the specified VMU icon in the bios, if its available. The icon data is flipped both vertically and horizontally. Each vmu icon has dimensions 32x32 pixels and is 128 bytes long.

Parameters
iconThe VMU icon index to look up.
Returns
A pointer to the raw icon data or NULL if icon value is incorrect.

◆ bfont_set_background_color()

uint32_t bfont_set_background_color ( uint32_t c)

Set the font background color.

This function selects the background color to draw when a pixel is drawn in the font. This color is only used for pixels not covered by the font when you have selected to have the font be opaque.

Parameters
cThe color to use.
Returns
The old background color.
See also
bfont_set_foreground_color()

◆ bfont_set_encoding()

void bfont_set_encoding ( bfont_code_t enc)

Set the font encoding.

This function selects the font encoding that is used for the font. This allows you to select between the various character sets available.

Parameters
encThe character encoding in use

◆ bfont_set_foreground_color()

uint32_t bfont_set_foreground_color ( uint32_t c)

Set the font foreground color.

This function selects the foreground color to draw when a pixel is opaque in the font. The value passed in for the color should be in whatever pixel format that you intend to use for the image produced.

Parameters
cThe color to use.
Returns
The old foreground color.
See also
bfont_set_background_color()