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

Extra mini-font provided for Dreamcast and NAOMI More...

Files

file  minifont.h
 Simple font drawing functions.
 

Functions

int minifont_draw (uint16_t *buffer, uint32_t bufwidth, uint32_t c)
 Draw a single character to a buffer.
 
int minifont_draw_str (uint16_t *b, uint32_t bufwidth, const char *str)
 Draw a full string to any sort of buffer.
 
void minifont_set_color (uint8_t r, uint8_t g, uint8_t b)
 Set the color for the mini font.
 

Detailed Description

Extra mini-font provided for Dreamcast and NAOMI

Function Documentation

◆ minifont_draw()

int minifont_draw ( uint16_t * buffer,
uint32_t bufwidth,
uint32_t c )

Draw a single character to a buffer.

This function draws a single character to the given buffer.

Parameters
bufferThe buffer to draw to (at least 8 x 16 pixels)
bufwidthThe width of the buffer in pixels
cThe character to draw
Returns
Amount of width covered in 16-bit increments.

◆ minifont_draw_str()

int minifont_draw_str ( uint16_t * b,
uint32_t bufwidth,
const char * str )

Draw a full string to any sort of buffer.

This function draws a NUL-terminated string to the given buffer. Only standard ASCII encoded strings are supported (no extended ASCII, ANSI, Unicode, JIS, EUC, etc).

Parameters
bThe buffer to draw to.
bufwidthThe width of the buffer in pixels.
strThe string to draw.
Returns
Amount of width covered in 16-bit increments.

Referenced by main().

◆ minifont_set_color()

void minifont_set_color ( uint8_t r,
uint8_t g,
uint8_t b )

Set the color for the mini font.

Parameters
rRed component (0-255)
gGreen component (0-255)
bBlue component (0-255)