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

The bitmap text the debug tools draw straight into the frame buffer, and the other debug aids beside it. More...

#include <PR/ultratypes.h>
Include dependency graph for debugtext.h:

Go to the source code of this file.

Macros

#define BITMAP_FONT_GLYPHS   69
 The characters of the bitmap fonts, from space to the last of {|}~.
#define BITMAP_FONT_ROWS   7
 The rows of a glyph.
#define BITMAP_FONT_WIDE_COLUMNS   5
#define BITMAP_FONT_NARROW_COLUMNS   3

Functions

void DebugFrameStubA (void)
 A per-frame debug hook with an empty body.
void DrawBitmapTextToFramebuffer (const char *text)
 Draw text into the frame buffer on display, outlined in black.
void InitBitmapText (void)
 Start the bitmap text at the top left in white, in the wide font.
void StepDebugHiddenInstance (void)
 Step the hidden placed model by the cycle step until it reaches one drawn this frame, or the first, then stop stepping.
void BeginDebugStats (void)
 Start the debug statistics of a frame.
void DebugFrameStubB (void)
 A per-frame debug hook with an empty body.

Variables

s16 g_aBitmapFontWide [BITMAP_FONT_GLYPHS][BITMAP_FONT_ROWS][BITMAP_FONT_WIDE_COLUMNS]
 The wide font.
s16 g_aBitmapFontNarrow [BITMAP_FONT_GLYPHS][BITMAP_FONT_ROWS][BITMAP_FONT_NARROW_COLUMNS]
 The narrow font.
s32 g_dwBitmapTextX
 The column where the bitmap text starts its line.
s32 g_dwBitmapTextY
 The row where the bitmap text starts.
s32 g_bBitmapTextNarrow
 Whether the bitmap text uses the narrow font.
u16 g_wBitmapTextColor
 The colour of the wide font.
s32 g_nDebugInstanceCycleStep
 The step StepDebugHiddenInstance() takes through the placed models, or 0 to stay.

Detailed Description

The bitmap text the debug tools draw straight into the frame buffer, and the other debug aids beside it.

Macro Definition Documentation

◆ BITMAP_FONT_GLYPHS

#define BITMAP_FONT_GLYPHS   69

The characters of the bitmap fonts, from space to the last of {|}~.

◆ BITMAP_FONT_ROWS

#define BITMAP_FONT_ROWS   7

The rows of a glyph.

◆ BITMAP_FONT_WIDE_COLUMNS

#define BITMAP_FONT_WIDE_COLUMNS   5

The columns of a glyph of the wide font.

◆ BITMAP_FONT_NARROW_COLUMNS

#define BITMAP_FONT_NARROW_COLUMNS   3

The columns of a glyph of the narrow font.

Function Documentation

◆ DebugFrameStubA()

void DebugFrameStubA ( void )

A per-frame debug hook with an empty body.

Ghidra address:
USA: 0x80254870
Ghidra address:
Asia: 0x802543C0
Ghidra address:
EUR: 0x80255e10
Ghidra address:
JPN: 0x802557a0

◆ DrawBitmapTextToFramebuffer()

void DrawBitmapTextToFramebuffer ( const char * text)

Draw text into the frame buffer on display, outlined in black.

Lower case draws as upper case, a newline moves down a line, and another control character draws as a space.

Parameters
textThe text, terminated by a null character.
Ghidra address:
USA: 0x80254878
Ghidra address:
Asia: 0x802543C8
Ghidra address:
EUR: 0x80255e18
Ghidra address:
JPN: 0x802557a8

◆ InitBitmapText()

void InitBitmapText ( void )

Start the bitmap text at the top left in white, in the wide font.

Ghidra address:
USA: 0x80254d4c
Ghidra address:
Asia: 0x8025489C
Ghidra address:
EUR: 0x802562ec
Ghidra address:
JPN: 0x80255c7c

◆ StepDebugHiddenInstance()

void StepDebugHiddenInstance ( void )

Step the hidden placed model by the cycle step until it reaches one drawn this frame, or the first, then stop stepping.

Ghidra address:
USA: 0x80254d90
Ghidra address:
Asia: 0x802548E0
Ghidra address:
EUR: 0x80256330
Ghidra address:
JPN: 0x80255cc0
Ghidra address:
BRD3D: 0x1000ba70
Ghidra address:
BRGlide: 0x10008f90

◆ BeginDebugStats()

void BeginDebugStats ( void )

Start the debug statistics of a frame.

Ghidra address:
USA: 0x80254e3c
Ghidra address:
Asia: 0x8025498C
Ghidra address:
EUR: 0x802563dc
Ghidra address:
JPN: 0x80255d6c

◆ DebugFrameStubB()

void DebugFrameStubB ( void )

A per-frame debug hook with an empty body.

Ghidra address:
USA: 0x80254f2c
Ghidra address:
Asia: 0x80254A7C
Ghidra address:
EUR: 0x802564cc
Ghidra address:
JPN: 0x80255e5c

Variable Documentation

◆ g_aBitmapFontWide

The wide font.

A pixel is drawn in the text colour where its entry is not zero.

Ghidra address:
USA: 0x8028dfc0
Ghidra address:
Asia: 0x8028DB10
Ghidra address:
EUR: 0x80290780
Ghidra address:
JPN: 0x80290220

◆ g_aBitmapFontNarrow

The narrow font.

Each entry not zero is the colour of its pixel.

Ghidra address:
USA: 0x8028f2a0
Ghidra address:
Asia: 0x8028EDF0
Ghidra address:
EUR: 0x80291a60
Ghidra address:
JPN: 0x80291500

◆ g_dwBitmapTextX

s32 g_dwBitmapTextX
extern

The column where the bitmap text starts its line.

Ghidra address:
USA: 0x8028ddd0
Ghidra address:
Asia: 0x8028D920
Ghidra address:
EUR: 0x80290570
Ghidra address:
JPN: 0x80290010

◆ g_dwBitmapTextY

s32 g_dwBitmapTextY
extern

The row where the bitmap text starts.

Ghidra address:
USA: 0x8028ddd4
Ghidra address:
Asia: 0x8028D924
Ghidra address:
EUR: 0x80290574
Ghidra address:
JPN: 0x80290014

◆ g_bBitmapTextNarrow

s32 g_bBitmapTextNarrow
extern

Whether the bitmap text uses the narrow font.

Ghidra address:
USA: 0x8028ddd8
Ghidra address:
Asia: 0x8028D928
Ghidra address:
EUR: 0x80290578
Ghidra address:
JPN: 0x80290018

◆ g_wBitmapTextColor

u16 g_wBitmapTextColor
extern

The colour of the wide font.

Ghidra address:
USA: 0x8028dddc
Ghidra address:
Asia: 0x8028D92C
Ghidra address:
EUR: 0x8029057c
Ghidra address:
JPN: 0x8029001c

◆ g_nDebugInstanceCycleStep

s32 g_nDebugInstanceCycleStep
extern

The step StepDebugHiddenInstance() takes through the placed models, or 0 to stay.

Ghidra address:
USA: 0x8028dde0
Ghidra address:
Asia: 0x8028D930
Ghidra address:
EUR: 0x80290580
Ghidra address:
JPN: 0x80290020
Ghidra address:
BRD3D: 0x10277b20
Ghidra address:
BRGlide: 0x10273308