coastline 0.0.4
Loading...
Searching...
No Matches
text.h File Reference

The drawing of text with the game's two bitmap fonts. More...

#include "common/types.h"
Include dependency graph for text.h:

Go to the source code of this file.

Macros

#define FIRST_WEATHER_GLYPH   0x29
 The glyph of the first weather, the sun.
#define GLYPH_CACHE_CHARACTERS   256
 The characters the glyph cache maps, one for each byte value.
#define GLYPH_CACHE_SLOT_SIZE   0x5A0
 The bytes of the texture of a cached glyph.
#define GLYPH_ROM_OFFSETS   209
 The entries of the table of glyph offsets, one more than the glyphs it covers.

Enumerations

enum  TextAlignment { TEXT_ALIGN_LEFT = 0 , TEXT_ALIGN_RIGHT = 1 , TEXT_ALIGN_CENTER = 2 }
 Where DrawText() places text against its position. More...

Functions

void ResetGlyphCache (void)
 Forget the glyph of every character and size the glyph cache to the memory after the BSS.
u8 * GetCachedGlyphTexture (s32 character)
 Give a character a slot of the glyph cache if it has none.
void LoadCachedGlyphTextures (void)
 Read the glyph of each character given a slot into the slot, unless the glyph is already there, and forget the characters of the slots not given out.
void RenderTextToDisplayList (const char *text)
 Draw text at g_nTextDrawX and g_nTextDrawY.
void SetTextStyleBold (void)
 Draw text in the bold colors.
void EnableTextShadow (void)
 Draw glyphs with the shadow gradient.
void DisableTextShadow (void)
 Draw glyphs with the plain gradient.
void SetTextStyleNormal (void)
 Draw text in the normal style.
void SetTextAlignCenter (void)
 Center text on its position.
void SetTextAlignLeft (void)
 Start text at its position.
void SetTextAlignRight (void)
 End text at its position.
void SetTextCustomColors (s32 red, s32 green, s32 blue, s32 red2, s32 green2, s32 blue2)
 Set the colors of the top and the bottom of text.
void SetTextGradientColorsFromBytes (const u8 *color, const u8 *color2)
 Set the colors of the top and the bottom of text from two red, green and blue triplets.
void SetTextSize (s32 size)
 Set the size of the font.
void DrawText (const char *text, s32 x, s32 y)
 Draw text at a position, aligned as the last alignment set.
void DrawHudLabelAtFraction (const char *text, f32 x, f32 y, s32 unused)
 Draw text at a position in fractions of the screen, measured from the bottom left.
s32 MeasureTextWidth (const char *text, s32 size)
 The width in pixels of text drawn at a size.

Variables

u8 g_bTextStyleBold
 Whether text draws in the bold colors.
u8 g_nTextAlignment
 The alignment of DrawText(), one of the TextAlignment values.
u8 g_bTextShadowEnabled
 Whether glyphs draw with the shadow gradient.
s32 g_bTextCustomColorsEnabled
 Whether text draws in the colors of SetTextCustomColors() rather than the style.
s32 g_dwTextCustomColorR
 The red of the top of custom text.
s32 g_dwTextCustomColorG
 The green of the top of custom text.
s32 g_dwTextCustomColorB
 The blue of the top of custom text.
s32 g_dwTextCustomColor2R
 The red of the bottom of custom text.
s32 g_dwTextCustomColor2G
 The green of the bottom of custom text.
s32 g_dwTextCustomColor2B
 The blue of the bottom of custom text.
u8 g_abLargeFontGradient []
 The gradient of large glyphs.
u8 g_abLargeFontShadowGradient []
 The gradient of large glyphs with a shadow.
u8 g_abSmallFontGradient []
 The gradient of small glyphs.
u8 g_abSmallFontShadowGradient []
 The gradient of small glyphs with a shadow.
u8 g_aLargeFontTexture []
 The large font, two rows of glyphs in 8-bit intensity and alpha.
u8 g_aSmallFontTexture []
 The small font, two rows of glyphs in 8-bit intensity and alpha.
u8 g_abHudFontCharToGlyph []
 The glyph of each character from ! on.
s32 g_adwLargeFontGlyphOffsets []
 The first column of each glyph of the large font, and one past the last glyph.
s32 g_adwSmallFontGlyphOffsets []
 The first column of each glyph of the small font, and one past the last glyph.
s32 g_nTextDrawX
 The left of the next text RenderTextToDisplayList() draws.
s32 g_nTextDrawY
 The baseline of the next text RenderTextToDisplayList() draws.
s32 g_nFontSize
 The height of text in pixels of the low-resolution screen.
s32 g_aGlyphRomOffsets [GLYPH_ROM_OFFSETS]
 The offset of each glyph from the start of the glyphs on the cartridge, from the character 0x20, then one past the last.
s32 g_bGlyphOffsetTableLoaded
 Whether g_aGlyphRomOffsets has been read from the cartridge.
u8 g_abGlyphCharToSlot [GLYPH_CACHE_CHARACTERS]
 The slot of the glyph cache of each character used since ResetGlyphCache(), or 0 for none.
u8 g_abGlyphSlotChar []
 The character whose glyph is in each slot of the glyph cache, or 0 for none.
u8 g_abGlyphRleBuffer [GLYPH_CACHE_SLOT_SIZE]
 The compressed glyph LoadCachedGlyphTextures() reads before it expands the glyph into its slot.
s32 g_nGlyphCacheNextSlot
 The next free slot of the glyph cache, from 1.
u8 * g_pGlyphCacheBuffer
 The texture of slot 0 of the glyph cache, a slot before its memory.
u8 * g_pGlyphCacheBufferEnd
 The end of the slots of the glyph cache.
s32 g_nGlyphCacheSlotLimit
 The number of slots that fit in the memory of the glyph cache.
u8 g_abGlyphCacheMemory []
 The memory after the BSS where the glyph cache starts, once aligned to 8 bytes.
void(* g_pfnTextSink )(const char *text, s32 x, s32 y)
 The routine DrawText() hands its text to in place of the display list while it is set, with the size, the alignment, and the colours of the text in the globals of the text.

Detailed Description

The drawing of text with the game's two bitmap fonts.

A glyph is an intensity and alpha cutout of a font texture. The second texture of the combiner is a vertical gradient that blends the environment color at the top of a glyph into the primitive color at its bottom. A string may change both colors with a % code of two letters.

Macro Definition Documentation

◆ FIRST_WEATHER_GLYPH

#define FIRST_WEATHER_GLYPH   0x29

The glyph of the first weather, the sun.

The others follow it in the order of the weathers.

◆ GLYPH_CACHE_CHARACTERS

#define GLYPH_CACHE_CHARACTERS   256

The characters the glyph cache maps, one for each byte value.

◆ GLYPH_CACHE_SLOT_SIZE

#define GLYPH_CACHE_SLOT_SIZE   0x5A0

The bytes of the texture of a cached glyph.

◆ GLYPH_ROM_OFFSETS

#define GLYPH_ROM_OFFSETS   209

The entries of the table of glyph offsets, one more than the glyphs it covers.

Enumeration Type Documentation

◆ TextAlignment

Where DrawText() places text against its position.

Enumerator
TEXT_ALIGN_LEFT 

The text starts at its position.

TEXT_ALIGN_RIGHT 

The text ends at its position.

TEXT_ALIGN_CENTER 

The text is centred on its position.

Function Documentation

◆ ResetGlyphCache()

void ResetGlyphCache ( void )

Forget the glyph of every character and size the glyph cache to the memory after the BSS.

The start of each display list calls it.

Ghidra address:
JPN: 0x8022f1a0

◆ GetCachedGlyphTexture()

u8 * GetCachedGlyphTexture ( s32 character)

Give a character a slot of the glyph cache if it has none.

Parameters
characterThe character.
Returns
The texture of the slot of the character, filled by the next LoadCachedGlyphTextures().
Ghidra address:
JPN: 0x8022f258

◆ LoadCachedGlyphTextures()

void LoadCachedGlyphTextures ( void )

Read the glyph of each character given a slot into the slot, unless the glyph is already there, and forget the characters of the slots not given out.

The table of offsets is read the first time.

Ghidra address:
JPN: 0x8022f2b0

◆ RenderTextToDisplayList()

void RenderTextToDisplayList ( const char * text)

Draw text at g_nTextDrawX and g_nTextDrawY.

Parameters
textThe text to draw.
Ghidra address:
USA: 0x8022e4e0
Ghidra address:
Asia: 0x8022E030
Ghidra address:
EUR: 0x8022f9f0
Ghidra address:
JPN: 0x8022f460
Ghidra address:
BRD3D: 0x10018590
Ghidra address:
BRGlide: 0x10015b10

◆ SetTextStyleBold()

void SetTextStyleBold ( void )

Draw text in the bold colors.

Ghidra address:
USA: 0x8022f4cc
Ghidra address:
Asia: 0x8022F01C
Ghidra address:
EUR: 0x802309dc
Ghidra address:
JPN: 0x802306fc

◆ EnableTextShadow()

void EnableTextShadow ( void )

Draw glyphs with the shadow gradient.

Ghidra address:
USA: 0x8022f4dc
Ghidra address:
Asia: 0x8022F02C
Ghidra address:
EUR: 0x802309ec
Ghidra address:
JPN: 0x8023070c
Ghidra address:
BRD3D: 0x10019240
Ghidra address:
BRGlide: 0x10016800

◆ DisableTextShadow()

void DisableTextShadow ( void )

Draw glyphs with the plain gradient.

Ghidra address:
USA: 0x8022f4ec
Ghidra address:
Asia: 0x8022F03C
Ghidra address:
EUR: 0x802309fc
Ghidra address:
JPN: 0x8023071c
Ghidra address:
BRD3D: 0x10019250
Ghidra address:
BRGlide: 0x10016810

◆ SetTextStyleNormal()

void SetTextStyleNormal ( void )

Draw text in the normal style.

Ghidra address:
USA: 0x8022f4f8
Ghidra address:
Asia: 0x8022F048
Ghidra address:
EUR: 0x80230a08
Ghidra address:
JPN: 0x80230728
Ghidra address:
BRD3D: 0x10019260
Ghidra address:
BRGlide: 0x10016820

◆ SetTextAlignCenter()

void SetTextAlignCenter ( void )

Center text on its position.

Ghidra address:
USA: 0x8022f504
Ghidra address:
Asia: 0x8022F054
Ghidra address:
EUR: 0x80230a14
Ghidra address:
JPN: 0x80230734
Ghidra address:
BRD3D: 0x10019270
Ghidra address:
BRGlide: 0x10016830

◆ SetTextAlignLeft()

void SetTextAlignLeft ( void )

Start text at its position.

Ghidra address:
USA: 0x8022f514
Ghidra address:
Asia: 0x8022F064
Ghidra address:
EUR: 0x80230a24
Ghidra address:
JPN: 0x80230744
Ghidra address:
BRD3D: 0x10019280
Ghidra address:
BRGlide: 0x10016840

◆ SetTextAlignRight()

void SetTextAlignRight ( void )

End text at its position.

Ghidra address:
USA: 0x8022f520
Ghidra address:
Asia: 0x8022F070
Ghidra address:
EUR: 0x80230a30
Ghidra address:
JPN: 0x80230750
Ghidra address:
BRD3D: 0x10019290
Ghidra address:
BRGlide: 0x10016850

◆ SetTextCustomColors()

void SetTextCustomColors ( s32 red,
s32 green,
s32 blue,
s32 red2,
s32 green2,
s32 blue2 )

Set the colors of the top and the bottom of text.

Parameters
redThe red component of the top, from 0 to 255.
greenThe green component of the top, from 0 to 255.
blueThe blue component of the top, from 0 to 255.
red2The red component of the bottom, from 0 to 255.
green2The green component of the bottom, from 0 to 255.
blue2The blue component of the bottom, from 0 to 255.
Ghidra address:
USA: 0x8022f530
Ghidra address:
Asia: 0x8022F080
Ghidra address:
EUR: 0x80230a40
Ghidra address:
JPN: 0x80230760
Ghidra address:
BRD3D: 0x100192a0
Ghidra address:
BRGlide: 0x10016860

◆ SetTextGradientColorsFromBytes()

void SetTextGradientColorsFromBytes ( const u8 * color,
const u8 * color2 )

Set the colors of the top and the bottom of text from two red, green and blue triplets.

Parameters
colorThe red, green, and blue of the top.
color2The red, green, and blue of the bottom.
Ghidra address:
USA: 0x8022f578
Ghidra address:
Asia: 0x8022F0C8
Ghidra address:
EUR: 0x80230a88
Ghidra address:
JPN: 0x802307a8

◆ SetTextSize()

void SetTextSize ( s32 size)

Set the size of the font.

Parameters
sizeThe height of text in pixels of the low-resolution screen.
Ghidra address:
USA: 0x8022f5d0
Ghidra address:
Asia: 0x8022F120
Ghidra address:
EUR: 0x80230ae0
Ghidra address:
JPN: 0x80230800
Ghidra address:
BRD3D: 0x100192f0
Ghidra address:
BRGlide: 0x100168b0

◆ DrawText()

void DrawText ( const char * text,
s32 x,
s32 y )

Draw text at a position, aligned as the last alignment set.

Parameters
textThe text to draw.
xThe horizontal position the alignment applies to, in pixels.
yThe baseline, in pixels.
Ghidra address:
USA: 0x8022f5dc
Ghidra address:
Asia: 0x8022F12C
Ghidra address:
EUR: 0x80230aec
Ghidra address:
JPN: 0x8023080c
Ghidra address:
BRD3D: 0x10019300
Ghidra address:
BRGlide: 0x100168c0

◆ DrawHudLabelAtFraction()

void DrawHudLabelAtFraction ( const char * text,
f32 x,
f32 y,
s32 unused )

Draw text at a position in fractions of the screen, measured from the bottom left.

A unit is a little under a thousandth of the screen.

Parameters
textThe text to draw.
xThe distance from the left edge, in units of the width.
yThe distance from the bottom edge, in units of the height.
unusedAn argument that is not read.
Ghidra address:
USA: 0x8022f694
Ghidra address:
Asia: 0x8022F1E4
Ghidra address:
EUR: 0x80230ba4
Ghidra address:
JPN: 0x802308c4

◆ MeasureTextWidth()

s32 MeasureTextWidth ( const char * text,
s32 size )

The width in pixels of text drawn at a size.

Parameters
textThe text to measure.
sizeThe height of text in pixels of the low-resolution screen.
Returns
The width of the text, in pixels.
Ghidra address:
USA: 0x8022f720
Ghidra address:
Asia: 0x8022F270
Ghidra address:
EUR: 0x80230c30
Ghidra address:
JPN: 0x80230950
Ghidra address:
BRD3D: 0x100193c0
Ghidra address:
BRGlide: 0x10016980

Variable Documentation

◆ g_bTextStyleBold

u8 g_bTextStyleBold
extern

Whether text draws in the bold colors.

Ghidra address:
USA: 0x8028bdc0
Ghidra address:
Asia: 0x8028B910
Ghidra address:
EUR: 0x8028e520
Ghidra address:
JPN: 0x8028df70
Ghidra address:
BRD3D: 0x104b0358
Ghidra address:
BRGlide: 0x104abb40

◆ g_nTextAlignment

u8 g_nTextAlignment
extern

The alignment of DrawText(), one of the TextAlignment values.

Ghidra address:
USA: 0x8028bdc4
Ghidra address:
Asia: 0x8028B914
Ghidra address:
EUR: 0x8028e524
Ghidra address:
JPN: 0x8028df74
Ghidra address:
BRD3D: 0x104b035c
Ghidra address:
BRGlide: 0x104abb44

◆ g_bTextShadowEnabled

u8 g_bTextShadowEnabled
extern

Whether glyphs draw with the shadow gradient.

Ghidra address:
USA: 0x8028bdc8
Ghidra address:
Asia: 0x8028B918
Ghidra address:
EUR: 0x8028e528
Ghidra address:
JPN: 0x8028df78
Ghidra address:
BRD3D: 0x104b0360
Ghidra address:
BRGlide: 0x104abb48

◆ g_bTextCustomColorsEnabled

s32 g_bTextCustomColorsEnabled
extern

Whether text draws in the colors of SetTextCustomColors() rather than the style.

Ghidra address:
USA: 0x8028bdcc
Ghidra address:
Asia: 0x8028B91C
Ghidra address:
EUR: 0x8028e52c
Ghidra address:
JPN: 0x8028df7c
Ghidra address:
BRD3D: 0x104b0364
Ghidra address:
BRGlide: 0x104abb4c

◆ g_dwTextCustomColorR

s32 g_dwTextCustomColorR
extern

The red of the top of custom text.

Ghidra address:
USA: 0x8028bdd0
Ghidra address:
Asia: 0x8028B920
Ghidra address:
EUR: 0x8028e530
Ghidra address:
JPN: 0x8028df80
Ghidra address:
BRD3D: 0x100a74a8
Ghidra address:
BRGlide: 0x100a6c68

◆ g_dwTextCustomColorG

s32 g_dwTextCustomColorG
extern

The green of the top of custom text.

Ghidra address:
USA: 0x8028bdd4
Ghidra address:
Asia: 0x8028B924
Ghidra address:
EUR: 0x8028e534
Ghidra address:
JPN: 0x8028df84
Ghidra address:
BRD3D: 0x100a74ac
Ghidra address:
BRGlide: 0x100a6c6c

◆ g_dwTextCustomColorB

s32 g_dwTextCustomColorB
extern

The blue of the top of custom text.

Ghidra address:
USA: 0x8028bdd8
Ghidra address:
Asia: 0x8028B928
Ghidra address:
EUR: 0x8028e538
Ghidra address:
JPN: 0x8028df88
Ghidra address:
BRD3D: 0x100a74b0
Ghidra address:
BRGlide: 0x100a6c70

◆ g_dwTextCustomColor2R

s32 g_dwTextCustomColor2R
extern

The red of the bottom of custom text.

Ghidra address:
USA: 0x8028bddc
Ghidra address:
Asia: 0x8028B92C
Ghidra address:
EUR: 0x8028e53c
Ghidra address:
JPN: 0x8028df8c
Ghidra address:
BRD3D: 0x104b0368
Ghidra address:
BRGlide: 0x104abb50

◆ g_dwTextCustomColor2G

s32 g_dwTextCustomColor2G
extern

The green of the bottom of custom text.

Ghidra address:
USA: 0x8028bde0
Ghidra address:
Asia: 0x8028B930
Ghidra address:
EUR: 0x8028e540
Ghidra address:
JPN: 0x8028df90
Ghidra address:
BRD3D: 0x104b036c
Ghidra address:
BRGlide: 0x104abb54

◆ g_dwTextCustomColor2B

s32 g_dwTextCustomColor2B
extern

The blue of the bottom of custom text.

Ghidra address:
USA: 0x8028bde4
Ghidra address:
Asia: 0x8028B934
Ghidra address:
EUR: 0x8028e544
Ghidra address:
JPN: 0x8028df94
Ghidra address:
BRD3D: 0x104b0370
Ghidra address:
BRGlide: 0x104abb58

◆ g_abLargeFontGradient

u8 g_abLargeFontGradient[]
extern

The gradient of large glyphs.

Ghidra address:
USA: 0x8028bdf0
Ghidra address:
Asia: 0x8028B940
Ghidra address:
EUR: 0x8028e550
Ghidra address:
JPN: 0x8028dfa0
Ghidra address:
BRD3D: 0x100a74b8
Ghidra address:
BRGlide: 0x100a6c78

◆ g_abLargeFontShadowGradient

u8 g_abLargeFontShadowGradient[]
extern

The gradient of large glyphs with a shadow.

Ghidra address:
USA: 0x8028bf30
Ghidra address:
Asia: 0x8028BA80
Ghidra address:
EUR: 0x8028e690
Ghidra address:
JPN: 0x8028e0e0
Ghidra address:
BRD3D: 0x100a75f8
Ghidra address:
BRGlide: 0x100a6db8

◆ g_abSmallFontGradient

u8 g_abSmallFontGradient[]
extern

The gradient of small glyphs.

Ghidra address:
USA: 0x8028c070
Ghidra address:
Asia: 0x8028BBC0
Ghidra address:
EUR: 0x8028e7d0
Ghidra address:
JPN: 0x8028e220
Ghidra address:
BRD3D: 0x100a7738
Ghidra address:
BRGlide: 0x100a6ef8

◆ g_abSmallFontShadowGradient

u8 g_abSmallFontShadowGradient[]
extern

The gradient of small glyphs with a shadow.

Ghidra address:
USA: 0x8028c1b0
Ghidra address:
Asia: 0x8028BD00
Ghidra address:
EUR: 0x8028e910
Ghidra address:
JPN: 0x8028e360
Ghidra address:
BRD3D: 0x100a7878
Ghidra address:
BRGlide: 0x100a7038

◆ g_aLargeFontTexture

u8 g_aLargeFontTexture[]
extern

The large font, two rows of glyphs in 8-bit intensity and alpha.

Ghidra address:
USA: 0x8028fe00
Ghidra address:
Asia: 0x8028F950
Ghidra address:
EUR: 0x802925c0
Ghidra address:
JPN: 0x80292060

◆ g_aSmallFontTexture

u8 g_aSmallFontTexture[]
extern

The small font, two rows of glyphs in 8-bit intensity and alpha.

Ghidra address:
USA: 0x8029da00
Ghidra address:
Asia: 0x8029D550
Ghidra address:
EUR: 0x802a01c0
Ghidra address:
JPN: 0x8029fc60

◆ g_abHudFontCharToGlyph

u8 g_abHudFontCharToGlyph[]
extern

The glyph of each character from ! on.

Ghidra address:
USA: 0x802a1740
Ghidra address:
Asia: 0x802A1290
Ghidra address:
EUR: 0x802a3f00
Ghidra address:
JPN: 0x802a39a0
Ghidra address:
BRD3D: 0x100a6010
Ghidra address:
BRGlide: 0x100a5918

◆ g_adwLargeFontGlyphOffsets

s32 g_adwLargeFontGlyphOffsets[]
extern

The first column of each glyph of the large font, and one past the last glyph.

Ghidra address:
USA: 0x802a17a0
Ghidra address:
Asia: 0x802A12F0
Ghidra address:
EUR: 0x802a3f60
Ghidra address:
JPN: 0x802a3a00

◆ g_adwSmallFontGlyphOffsets

s32 g_adwSmallFontGlyphOffsets[]
extern

The first column of each glyph of the small font, and one past the last glyph.

Ghidra address:
USA: 0x802a187c
Ghidra address:
Asia: 0x802A13CC
Ghidra address:
EUR: 0x802a403c
Ghidra address:
JPN: 0x802a3adc

◆ g_nTextDrawX

s32 g_nTextDrawX
extern

The left of the next text RenderTextToDisplayList() draws.

Ghidra address:
USA: 0x803519d0
Ghidra address:
Asia: 0x80351480
Ghidra address:
EUR: 0x80353ed0
Ghidra address:
JPN: 0x80352b40
Ghidra address:
BRD3D: 0x104b0340
Ghidra address:
BRGlide: 0x104abb28

◆ g_nTextDrawY

s32 g_nTextDrawY
extern

The baseline of the next text RenderTextToDisplayList() draws.

Ghidra address:
USA: 0x803519d4
Ghidra address:
Asia: 0x80351484
Ghidra address:
EUR: 0x80353ed4
Ghidra address:
JPN: 0x80352b44
Ghidra address:
BRD3D: 0x104b0344
Ghidra address:
BRGlide: 0x104abb2c

◆ g_nFontSize

s32 g_nFontSize
extern

The height of text in pixels of the low-resolution screen.

Ghidra address:
USA: 0x803519d8
Ghidra address:
Asia: 0x80351488
Ghidra address:
EUR: 0x80353ed8
Ghidra address:
JPN: 0x80352b48
Ghidra address:
BRD3D: 0x104b0348
Ghidra address:
BRGlide: 0x104abb30

◆ g_aGlyphRomOffsets

s32 g_aGlyphRomOffsets[GLYPH_ROM_OFFSETS]
extern

The offset of each glyph from the start of the glyphs on the cartridge, from the character 0x20, then one past the last.

A negative offset marks a glyph stored without compression, and the size of a glyph is the distance to the absolute offset of the next.

Ghidra address:
JPN: 0x80352258

◆ g_bGlyphOffsetTableLoaded

s32 g_bGlyphOffsetTableLoaded
extern

Whether g_aGlyphRomOffsets has been read from the cartridge.

Ghidra address:
JPN: 0x8028df60

◆ g_abGlyphCharToSlot

u8 g_abGlyphCharToSlot[GLYPH_CACHE_CHARACTERS]
extern

The slot of the glyph cache of each character used since ResetGlyphCache(), or 0 for none.

Ghidra address:
JPN: 0x80352058

◆ g_abGlyphSlotChar

u8 g_abGlyphSlotChar[]
extern

The character whose glyph is in each slot of the glyph cache, or 0 for none.

Ghidra address:
JPN: 0x80351f50

◆ g_abGlyphRleBuffer

u8 g_abGlyphRleBuffer[GLYPH_CACHE_SLOT_SIZE]
extern

The compressed glyph LoadCachedGlyphTextures() reads before it expands the glyph into its slot.

Ghidra address:
JPN: 0x803525a0

◆ g_nGlyphCacheNextSlot

s32 g_nGlyphCacheNextSlot
extern

The next free slot of the glyph cache, from 1.

Ghidra address:
JPN: 0x8028df50

◆ g_pGlyphCacheBuffer

u8* g_pGlyphCacheBuffer
extern

The texture of slot 0 of the glyph cache, a slot before its memory.

Ghidra address:
JPN: 0x8028df54

◆ g_pGlyphCacheBufferEnd

u8* g_pGlyphCacheBufferEnd
extern

The end of the slots of the glyph cache.

Ghidra address:
JPN: 0x8028df58

◆ g_nGlyphCacheSlotLimit

s32 g_nGlyphCacheSlotLimit
extern

The number of slots that fit in the memory of the glyph cache.

Ghidra address:
JPN: 0x8028df5c

◆ g_abGlyphCacheMemory

u8 g_abGlyphCacheMemory[]
extern

The memory after the BSS where the glyph cache starts, once aligned to 8 bytes.

The link script places it.

Ghidra address:
JPN: 0x803837a0

◆ g_pfnTextSink

void(* g_pfnTextSink) (const char *text, s32 x, s32 y) ( const char * text,
s32 x,
s32 y )
extern

The routine DrawText() hands its text to in place of the display list while it is set, with the size, the alignment, and the colours of the text in the globals of the text.

The SDL game draws the HUD of a race through it.