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

Methods for rendering formatted text/icons. More...

Functions

void bfont_draw_str_ex (void *buffer, uint32_t width, uint32_t fg, uint32_t bg, uint8_t bpp, bool opaque, const char *str)
 Draw a full string of any sort to any sort of buffer.
 
void bfont_draw_str_ex_fmt (void *buffer, uint32_t width, uint32_t fg, uint32_t bg, uint8_t bpp, bool opaque, const char *fmt,...) __printflike(7
 Draw a full formatted string of any sort to any sort of buffer.
 
void void bfont_draw_str_ex_vfmt (void *buffer, uint32_t width, uint32_t fg, uint32_t bg, uint8_t bpp, bool opaque, const char *fmt, va_list *var_args)
 Draw formatted string of any sort to buffer (with va_args).
 
void bfont_draw_str (void *buffer, uint32_t width, bool opaque, const char *str)
 Draw a full string to a buffer.
 
void bfont_draw_str_fmt (void *buffer, uint32_t width, bool opaque, const char *fmt,...) __printflike(4
 Draw a full formatted string to a buffer.
 
void void bfont_draw_str_vram_vfmt (uint32_t x, uint32_t y, uint32_t fg, uint32_t bg, bool opaque, const char *fmt, va_list *var_args)
 Draw a full formatted string to video ram (with va_args).
 
void bfont_draw_str_vram_fmt (uint32_t x, uint32_t y, bool opaque, const char *fmt,...) __printflike(4
 Draw a full string to video ram.
 
#define DI_CIRCLECOPYRIGHT   "\\di00"
 brief Macros for Builtin DC Icons
 
#define DI_CIRCLER   "\\di01"
 
#define DI_TRADEMARK   "\\di02"
 
#define DI_UPARROW   "\\di03"
 
#define DI_DOWNARROW   "\\di04"
 
#define DI_LEFTARROW   "\\di05"
 
#define DI_RIGHTARROW   "\\di06"
 
#define DI_UPRIGHTARROW   "\\di07"
 
#define DI_DOWNRIGHTARROW   "\\di08"
 
#define DI_DOWNLEFTARROW   "\\di09"
 
#define DI_UPLEFTARROW   "\\di0A"
 
#define DI_ABUTTON   "\\di0B"
 
#define DI_BBUTTON   "\\di0C"
 
#define DI_CBUTTON   "\\di0D"
 
#define DI_DBUTTON   "\\di0E"
 
#define DI_XBUTTON   "\\di0F"
 
#define DI_YBUTTON   "\\di10"
 
#define DI_ZBUTTON   "\\di11"
 
#define DI_LTRIGGER   "\\di12"
 
#define DI_RTRIGGER   "\\di13"
 
#define DI_STARTBUTTON   "\\di14"
 
#define DI_VMU   "\\di15"
 
#define VI_INVALID_VMU   "\\vi00"
 brief Macros for Builtin VMU Icons
 
#define VI_HOURGLASS_ONE   "\\vi01"
 
#define VI_HOURGLASS_TWO   "\\vi02"
 
#define VI_HOURGLASS_THREE   "\\vi03"
 
#define VI_HOURGLASS_FOUR   "\\vi04"
 
#define VI_VMUICON   "\\vi05"
 
#define VI_EARTH   "\\vi06"
 
#define VI_SATURN   "\\vi07"
 
#define VI_QUARTER_MOON   "\\vi08"
 
#define VI_LAUGHING_FACE   "\\vi09"
 
#define VI_SMILING_FACE   "\\vi0A"
 
#define VI_CASUAL_FACE   "\\vi0B"
 
#define VI_ANGRY_FACE   "\\vi0C"
 
#define VI_COW   "\\vi0D"
 
#define VI_HORSE   "\\vi0E"
 
#define VI_RABBIT   "\\vi0F"
 
#define VI_CAT   "\\vi10"
 
#define VI_CHICK   "\\vi11"
 
#define VI_LION   "\\vi12"
 
#define VI_MONKEY   "\\vi13"
 
#define VI_PANDA   "\\vi14"
 
#define VI_BEAR   "\\vi15"
 
#define VI_PIG   "\\vi16"
 
#define VI_DOG   "\\vi17"
 
#define VI_FISH   "\\vi18"
 
#define VI_OCTOPUS   "\\vi19"
 
#define VI_SQUID   "\\vi1A"
 
#define VI_WHALE   "\\vi1B"
 
#define VI_CRAB   "\\vi1C"
 
#define VI_BUTTERFLY   "\\vi1D"
 
#define VI_LADYBUG   "\\vi1E"
 
#define VI_ANGLER_FISH   "\\vi1F"
 
#define VI_PENGUIN   "\\vi20"
 
#define VI_CHERRIES   "\\vi21"
 
#define VI_TULIP   "\\vi22"
 
#define VI_LEAF   "\\vi23"
 
#define VI_SAKURA   "\\vi24"
 
#define VI_APPLE   "\\vi25"
 
#define VI_ICECREAM   "\\vi26"
 
#define VI_CACTUS   "\\vi27"
 
#define VI_PIANO   "\\vi28"
 
#define VI_GUITAR   "\\vi29"
 
#define VI_EIGHTH_NOTE   "\\vi2A"
 
#define VI_TREBLE_CLEF   "\\vi2B"
 
#define VI_BOAT   "\\vi2C"
 
#define VI_CAR   "\\vi2D"
 
#define VI_HELMET   "\\vi2E"
 
#define VI_MOTORCYCLE   "\\vi2F"
 
#define VI_VAN   "\\vi30"
 
#define VI_TRUCK   "\\vi31"
 
#define VI_CLOCK   "\\vi32"
 
#define VI_TELEPHONE   "\\vi33"
 
#define VI_PENCIL   "\\vi34"
 
#define VI_CUP   "\\vi35"
 
#define VI_SILVERWARE   "\\vi36"
 
#define VI_HOUSE   "\\vi37"
 
#define VI_BELL   "\\vi38"
 
#define VI_CROWN   "\\vi39"
 
#define VI_SOCK   "\\vi3A"
 
#define VI_CAKE   "\\vi3B"
 
#define VI_KEY   "\\vi3C"
 
#define VI_BOOK   "\\vi3D"
 
#define VI_BASEBALL   "\\vi3E"
 
#define VI_SOCCER   "\\vi3F"
 
#define VI_BULB   "\\vi40"
 
#define VI_TEDDY_BEAR   "\\vi41"
 
#define VI_BOW_TIE   "\\vi42"
 
#define VI_BOW_ARROW   "\\vi43"
 
#define VI_SNOWMAN   "\\vi44"
 
#define VI_LIGHTNING   "\\vi45"
 
#define VI_SUN   "\\vi46"
 
#define VI_CLOUD   "\\vi47"
 
#define VI_UMBRELLA   "\\vi48"
 
#define VI_ONE_STAR   "\\vi49"
 
#define VI_TWO_STARS   "\\vi4A"
 
#define VI_THREE_STARS   "\\vi4B"
 
#define VI_FOUR_STARS   "\\vi4C"
 
#define VI_HEART   "\\vi4D"
 
#define VI_DIAMOND   "\\vi4E"
 
#define VI_SPADE   "\\vi4F"
 
#define VI_CLUB   "\\vi50"
 
#define VI_JACK   "\\vi51"
 
#define VI_QUEEN   "\\vi52"
 
#define VI_KING   "\\vi53"
 
#define VI_JOKER   "\\vi54"
 
#define VI_ISLAND   "\\vi55"
 
#define VI_0   "\\vi56"
 
#define VI_1   "\\vi57"
 
#define VI_2   "\\vi58"
 
#define VI_3   "\\vi59"
 
#define VI_4   "\\vi5A"
 
#define VI_5   "\\vi5B"
 
#define VI_6   "\\vi5C"
 
#define VI_7   "\\vi5D"
 
#define VI_8   "\\vi5E"
 
#define VI_9   "\\vi5F"
 
#define VI_A   "\\vi60"
 
#define VI_B   "\\vi61"
 
#define VI_C   "\\vi62"
 
#define VI_D   "\\vi63"
 
#define VI_E   "\\vi64"
 
#define VI_F   "\\vi65"
 
#define VI_G   "\\vi66"
 
#define VI_H   "\\vi67"
 
#define VI_I   "\\vi68"
 
#define VI_J   "\\vi69"
 
#define VI_K   "\\vi6A"
 
#define VI_L   "\\vi6B"
 
#define VI_M   "\\vi6C"
 
#define VI_N   "\\vi6D"
 
#define VI_O   "\\vi6E"
 
#define VI_P   "\\vi6F"
 
#define VI_Q   "\\vi70"
 
#define VI_R   "\\vi71"
 
#define VI_S   "\\vi72"
 
#define VI_T   "\\vi73"
 
#define VI_U   "\\vi74"
 
#define VI_V   "\\vi75"
 
#define VI_W   "\\vi76"
 
#define VI_X   "\\vi77"
 
#define VI_Y   "\\vi78"
 
#define VI_Z   "\\vi79"
 
#define VI_CHECKER_BOARD   "\\vi7A"
 
#define VI_GRID   "\\vi7B"
 
#define VI_LIGHT_GRAY   "\\vi7C"
 
#define VI_DIAG_GRID   "\\vi7D"
 
#define VI_PACMAN_GRID   "\\vi7E"
 
#define VI_DARK_GRAY   "\\vi7F"
 
#define VI_EMBROIDERY   "\\vi80"
 

Detailed Description

Methods for rendering formatted text/icons.

Macro Definition Documentation

◆ DI_ABUTTON

#define DI_ABUTTON   "\\di0B"

◆ DI_BBUTTON

#define DI_BBUTTON   "\\di0C"

◆ DI_CBUTTON

#define DI_CBUTTON   "\\di0D"

◆ DI_CIRCLECOPYRIGHT

#define DI_CIRCLECOPYRIGHT   "\\di00"

brief Macros for Builtin DC Icons

These macros are provided for use in string concatenation for printf and other functions requiring inline representation of DC icons.

◆ DI_CIRCLER

#define DI_CIRCLER   "\\di01"

◆ DI_DBUTTON

#define DI_DBUTTON   "\\di0E"

◆ DI_DOWNARROW

#define DI_DOWNARROW   "\\di04"

◆ DI_DOWNLEFTARROW

#define DI_DOWNLEFTARROW   "\\di09"

◆ DI_DOWNRIGHTARROW

#define DI_DOWNRIGHTARROW   "\\di08"

◆ DI_LEFTARROW

#define DI_LEFTARROW   "\\di05"

◆ DI_LTRIGGER

#define DI_LTRIGGER   "\\di12"

◆ DI_RIGHTARROW

#define DI_RIGHTARROW   "\\di06"

◆ DI_RTRIGGER

#define DI_RTRIGGER   "\\di13"

◆ DI_STARTBUTTON

#define DI_STARTBUTTON   "\\di14"

◆ DI_TRADEMARK

#define DI_TRADEMARK   "\\di02"

◆ DI_UPARROW

#define DI_UPARROW   "\\di03"

◆ DI_UPLEFTARROW

#define DI_UPLEFTARROW   "\\di0A"

◆ DI_UPRIGHTARROW

#define DI_UPRIGHTARROW   "\\di07"

◆ DI_VMU

#define DI_VMU   "\\di15"

◆ DI_XBUTTON

#define DI_XBUTTON   "\\di0F"

◆ DI_YBUTTON

#define DI_YBUTTON   "\\di10"

◆ DI_ZBUTTON

#define DI_ZBUTTON   "\\di11"

◆ VI_0

#define VI_0   "\\vi56"

◆ VI_1

#define VI_1   "\\vi57"

◆ VI_2

#define VI_2   "\\vi58"

◆ VI_3

#define VI_3   "\\vi59"

◆ VI_4

#define VI_4   "\\vi5A"

◆ VI_5

#define VI_5   "\\vi5B"

◆ VI_6

#define VI_6   "\\vi5C"

◆ VI_7

#define VI_7   "\\vi5D"

◆ VI_8

#define VI_8   "\\vi5E"

◆ VI_9

#define VI_9   "\\vi5F"

◆ VI_A

#define VI_A   "\\vi60"

◆ VI_ANGLER_FISH

#define VI_ANGLER_FISH   "\\vi1F"

◆ VI_ANGRY_FACE

#define VI_ANGRY_FACE   "\\vi0C"

◆ VI_APPLE

#define VI_APPLE   "\\vi25"

◆ VI_B

#define VI_B   "\\vi61"

◆ VI_BASEBALL

#define VI_BASEBALL   "\\vi3E"

◆ VI_BEAR

#define VI_BEAR   "\\vi15"

◆ VI_BELL

#define VI_BELL   "\\vi38"

◆ VI_BOAT

#define VI_BOAT   "\\vi2C"

◆ VI_BOOK

#define VI_BOOK   "\\vi3D"

◆ VI_BOW_ARROW

#define VI_BOW_ARROW   "\\vi43"

◆ VI_BOW_TIE

#define VI_BOW_TIE   "\\vi42"

◆ VI_BULB

#define VI_BULB   "\\vi40"

◆ VI_BUTTERFLY

#define VI_BUTTERFLY   "\\vi1D"

◆ VI_C

#define VI_C   "\\vi62"

◆ VI_CACTUS

#define VI_CACTUS   "\\vi27"

◆ VI_CAKE

#define VI_CAKE   "\\vi3B"

◆ VI_CAR

#define VI_CAR   "\\vi2D"

◆ VI_CASUAL_FACE

#define VI_CASUAL_FACE   "\\vi0B"

◆ VI_CAT

#define VI_CAT   "\\vi10"

◆ VI_CHECKER_BOARD

#define VI_CHECKER_BOARD   "\\vi7A"

◆ VI_CHERRIES

#define VI_CHERRIES   "\\vi21"

◆ VI_CHICK

#define VI_CHICK   "\\vi11"

◆ VI_CLOCK

#define VI_CLOCK   "\\vi32"

◆ VI_CLOUD

#define VI_CLOUD   "\\vi47"

◆ VI_CLUB

#define VI_CLUB   "\\vi50"

◆ VI_COW

#define VI_COW   "\\vi0D"

◆ VI_CRAB

#define VI_CRAB   "\\vi1C"

◆ VI_CROWN

#define VI_CROWN   "\\vi39"

◆ VI_CUP

#define VI_CUP   "\\vi35"

◆ VI_D

#define VI_D   "\\vi63"

◆ VI_DARK_GRAY

#define VI_DARK_GRAY   "\\vi7F"

◆ VI_DIAG_GRID

#define VI_DIAG_GRID   "\\vi7D"

◆ VI_DIAMOND

#define VI_DIAMOND   "\\vi4E"

◆ VI_DOG

#define VI_DOG   "\\vi17"

◆ VI_E

#define VI_E   "\\vi64"

◆ VI_EARTH

#define VI_EARTH   "\\vi06"

◆ VI_EIGHTH_NOTE

#define VI_EIGHTH_NOTE   "\\vi2A"

◆ VI_EMBROIDERY

#define VI_EMBROIDERY   "\\vi80"

◆ VI_F

#define VI_F   "\\vi65"

◆ VI_FISH

#define VI_FISH   "\\vi18"

◆ VI_FOUR_STARS

#define VI_FOUR_STARS   "\\vi4C"

◆ VI_G

#define VI_G   "\\vi66"

◆ VI_GRID

#define VI_GRID   "\\vi7B"

◆ VI_GUITAR

#define VI_GUITAR   "\\vi29"

◆ VI_H

#define VI_H   "\\vi67"

◆ VI_HEART

#define VI_HEART   "\\vi4D"

◆ VI_HELMET

#define VI_HELMET   "\\vi2E"

◆ VI_HORSE

#define VI_HORSE   "\\vi0E"

◆ VI_HOURGLASS_FOUR

#define VI_HOURGLASS_FOUR   "\\vi04"

◆ VI_HOURGLASS_ONE

#define VI_HOURGLASS_ONE   "\\vi01"

◆ VI_HOURGLASS_THREE

#define VI_HOURGLASS_THREE   "\\vi03"

◆ VI_HOURGLASS_TWO

#define VI_HOURGLASS_TWO   "\\vi02"

◆ VI_HOUSE

#define VI_HOUSE   "\\vi37"

◆ VI_I

#define VI_I   "\\vi68"

◆ VI_ICECREAM

#define VI_ICECREAM   "\\vi26"

◆ VI_INVALID_VMU

#define VI_INVALID_VMU   "\\vi00"

brief Macros for Builtin VMU Icons

These macros are provided for use in string concatenation for printf and other functions requiring inline representation of VMU icons.

◆ VI_ISLAND

#define VI_ISLAND   "\\vi55"

◆ VI_J

#define VI_J   "\\vi69"

◆ VI_JACK

#define VI_JACK   "\\vi51"

◆ VI_JOKER

#define VI_JOKER   "\\vi54"

◆ VI_K

#define VI_K   "\\vi6A"

◆ VI_KEY

#define VI_KEY   "\\vi3C"

◆ VI_KING

#define VI_KING   "\\vi53"

◆ VI_L

#define VI_L   "\\vi6B"

◆ VI_LADYBUG

#define VI_LADYBUG   "\\vi1E"

◆ VI_LAUGHING_FACE

#define VI_LAUGHING_FACE   "\\vi09"

◆ VI_LEAF

#define VI_LEAF   "\\vi23"

◆ VI_LIGHT_GRAY

#define VI_LIGHT_GRAY   "\\vi7C"

◆ VI_LIGHTNING

#define VI_LIGHTNING   "\\vi45"

◆ VI_LION

#define VI_LION   "\\vi12"

◆ VI_M

#define VI_M   "\\vi6C"

◆ VI_MONKEY

#define VI_MONKEY   "\\vi13"

◆ VI_MOTORCYCLE

#define VI_MOTORCYCLE   "\\vi2F"

◆ VI_N

#define VI_N   "\\vi6D"

◆ VI_O

#define VI_O   "\\vi6E"

◆ VI_OCTOPUS

#define VI_OCTOPUS   "\\vi19"

◆ VI_ONE_STAR

#define VI_ONE_STAR   "\\vi49"

◆ VI_P

#define VI_P   "\\vi6F"

◆ VI_PACMAN_GRID

#define VI_PACMAN_GRID   "\\vi7E"

◆ VI_PANDA

#define VI_PANDA   "\\vi14"

◆ VI_PENCIL

#define VI_PENCIL   "\\vi34"

◆ VI_PENGUIN

#define VI_PENGUIN   "\\vi20"

◆ VI_PIANO

#define VI_PIANO   "\\vi28"

◆ VI_PIG

#define VI_PIG   "\\vi16"

◆ VI_Q

#define VI_Q   "\\vi70"

◆ VI_QUARTER_MOON

#define VI_QUARTER_MOON   "\\vi08"

◆ VI_QUEEN

#define VI_QUEEN   "\\vi52"

◆ VI_R

#define VI_R   "\\vi71"

◆ VI_RABBIT

#define VI_RABBIT   "\\vi0F"

◆ VI_S

#define VI_S   "\\vi72"

◆ VI_SAKURA

#define VI_SAKURA   "\\vi24"

◆ VI_SATURN

#define VI_SATURN   "\\vi07"

◆ VI_SILVERWARE

#define VI_SILVERWARE   "\\vi36"

◆ VI_SMILING_FACE

#define VI_SMILING_FACE   "\\vi0A"

◆ VI_SNOWMAN

#define VI_SNOWMAN   "\\vi44"

◆ VI_SOCCER

#define VI_SOCCER   "\\vi3F"

◆ VI_SOCK

#define VI_SOCK   "\\vi3A"

◆ VI_SPADE

#define VI_SPADE   "\\vi4F"

◆ VI_SQUID

#define VI_SQUID   "\\vi1A"

◆ VI_SUN

#define VI_SUN   "\\vi46"

◆ VI_T

#define VI_T   "\\vi73"

◆ VI_TEDDY_BEAR

#define VI_TEDDY_BEAR   "\\vi41"

◆ VI_TELEPHONE

#define VI_TELEPHONE   "\\vi33"

◆ VI_THREE_STARS

#define VI_THREE_STARS   "\\vi4B"

◆ VI_TREBLE_CLEF

#define VI_TREBLE_CLEF   "\\vi2B"

◆ VI_TRUCK

#define VI_TRUCK   "\\vi31"

◆ VI_TULIP

#define VI_TULIP   "\\vi22"

◆ VI_TWO_STARS

#define VI_TWO_STARS   "\\vi4A"

◆ VI_U

#define VI_U   "\\vi74"

◆ VI_UMBRELLA

#define VI_UMBRELLA   "\\vi48"

◆ VI_V

#define VI_V   "\\vi75"

◆ VI_VAN

#define VI_VAN   "\\vi30"

◆ VI_VMUICON

#define VI_VMUICON   "\\vi05"

◆ VI_W

#define VI_W   "\\vi76"

◆ VI_WHALE

#define VI_WHALE   "\\vi1B"

◆ VI_X

#define VI_X   "\\vi77"

◆ VI_Y

#define VI_Y   "\\vi78"

◆ VI_Z

#define VI_Z   "\\vi79"

Function Documentation

◆ bfont_draw_str()

void bfont_draw_str ( void * buffer,
uint32_t width,
bool opaque,
const char * str )

Draw a full string to a buffer.

This function draws a NUL-terminated string in the set encoding to the given buffer. This will automatically handle mixed half and full-width characters if the encoding is set to one of the Japanese encodings. Draws pre-set 16-bit colors.

Parameters
bufferThe buffer to draw to.
widthThe width of the buffer in pixels.
opaqueIf true, overwrite blank areas with bfont_bgcolor, otherwise do not change them from what they are.
strThe string to draw.

◆ bfont_draw_str_ex()

void bfont_draw_str_ex ( void * buffer,
uint32_t width,
uint32_t fg,
uint32_t bg,
uint8_t bpp,
bool opaque,
const char * str )

Draw a full string of any sort to any sort of buffer.

This function draws a NUL-terminated string in the set encoding to the given buffer. This will automatically handle mixed half and full-width characters if the encoding is set to one of the Japanese encodings. Colors and bitdepth can be set.

Parameters
bufferThe buffer to draw to.
widthThe width of the buffer in pixels.
fgThe foreground color to use.
bgThe background color to use.
bppThe number of bits per pixel in the buffer.
opaqueIf true, overwrite background areas with black, otherwise do not change them from what they are.
strThe string to draw.
See also
bfont_draw_str_ex_fmt(), bfont_draw_str_ex_va()

◆ bfont_draw_str_ex_fmt()

void bfont_draw_str_ex_fmt ( void * buffer,
uint32_t width,
uint32_t fg,
uint32_t bg,
uint8_t bpp,
bool opaque,
const char * fmt,
... )

Draw a full formatted string of any sort to any sort of buffer.

This function is equivalent to bfont_draw_str_ex(), except that the string is formatted as with the printf() function.

Parameters
bufferThe buffer to draw to.
widthThe width of the buffer in pixels.
fgThe foreground color to use.
bgThe background color to use.
bppThe number of bits per pixel in the buffer.
opaqueIf true, overwrite background areas with black, otherwise do not change them from what they are.
fmtThe printf-style format string to draw.
...Additional printf-style variadic arguments
See also
bfont_draw_str_ex_vfmt()

◆ bfont_draw_str_ex_vfmt()

void void bfont_draw_str_ex_vfmt ( void * buffer,
uint32_t width,
uint32_t fg,
uint32_t bg,
uint8_t bpp,
bool opaque,
const char * fmt,
va_list * var_args )

Draw formatted string of any sort to buffer (with va_args).

This function is equivalent to bfont_draw_str_ex_fmt(), except that the variadic argument list is passed via a pointer to a va_list.

Parameters
bufferThe buffer to draw to.
widthThe width of the buffer in pixels.
fgThe foreground color to use.
bgThe background color to use.
bppThe number of bits per pixel in the buffer.
opaqueIf true, overwrite background areas with black, otherwise do not change them from what they are.
fmtThe printf-style format string to draw.
var_argsAdditional printf-style variadic arguments
See also
bfont_draw_str_ex_fmt()

◆ bfont_draw_str_fmt()

void bfont_draw_str_fmt ( void * buffer,
uint32_t width,
bool opaque,
const char * fmt,
... )

Draw a full formatted string to a buffer.

This function is equvalent to bfont_draw_str(), except that the string is formatted as with the printf() function.

Parameters
bufferThe buffer to draw to.
widthThe width of the buffer in pixels.
opaqueIf true, overwrite blank areas with bfont_bgcolor, otherwise do not change them from what they are.
fmtThe printf-style format string to draw.
...Additional printf-style variadic arguments.

◆ bfont_draw_str_vram_fmt()

void bfont_draw_str_vram_fmt ( uint32_t x,
uint32_t y,
bool opaque,
const char * fmt,
... )

Draw a full string to video ram.

This function draws a NUL-terminated string in the set encoding to video ram. This will automatically handle mixed half and full-width characters if the encoding is set to one of the Japanese encodings. Draws pre-set 16-bit colors.

Parameters
xThe x position to start drawing at.
yThe y position to start drawing at.
opaqueIf true, overwrite blank areas with bfont_bgcolor, otherwise do not change them from what they are.
fmtThe printf-style format string to draw.
...Additional printf-style variadic arguments.

◆ bfont_draw_str_vram_vfmt()

void void bfont_draw_str_vram_vfmt ( uint32_t x,
uint32_t y,
uint32_t fg,
uint32_t bg,
bool opaque,
const char * fmt,
va_list * var_args )

Draw a full formatted string to video ram (with va_args).

This function is equivalent to bfont_draw_str_ex_vfmt(), except that the variadic argument list is passed via a pointer to a va_list.

Parameters
xThe x position to start drawing at.
yThe y position to start drawing at.
fgThe foreground color to use.
bgThe background color to use.
opaqueIf true, overwrite background areas with black, otherwise do not change them from what they are.
fmtThe printf-style format string to draw.
var_argsAdditional printf-style variadic arguments
See also
bfont_draw_str_ex()