Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Macros | Functions
print.h File Reference
#include "types.h"

Go to the source code of this file.

Macros

#define TEXRECT_MIN_X   10
 
#define TEXRECT_MAX_X   300
 
#define TEXRECT_MIN_Y   5
 
#define TEXRECT_MAX_Y   220
 
#define GLYPH_SPACE   -1
 
#define GLYPH_U   30
 
#define GLYPH_EXCLAMATION_PNT   36
 
#define GLYPH_TWO_EXCLAMATION   37
 
#define GLYPH_QUESTION_MARK   38
 
#define GLYPH_AMPERSAND   39
 
#define GLYPH_PERCENT   40
 
#define GLYPH_MULTIPLY   50
 
#define GLYPH_COIN   51
 
#define GLYPH_MARIO_HEAD   52
 
#define GLYPH_STAR   53
 
#define GLYPH_PERIOD   54
 
#define GLYPH_BETA_KEY   55
 
#define GLYPH_UMLAUT   58
 

Functions

void print_text_fmt_int (s32 x, s32 y, const char *str, s32 n)
 Takes a number, finds the intended base, formats the number, and prints it at the given X & Y coordinates. More...
 
void print_text (s32 x, s32 y, const char *str)
 Prints text in the colorful lettering at given X, Y coordinates. More...
 
void print_text_centered (s32 x, s32 y, const char *str)
 Prints text in the colorful lettering centered at given X, Y coordinates. More...
 
void render_text_labels (void)
 Renders the text in sTextLabels on screen at the proper locations by iterating a for loop. More...
 

Macro Definition Documentation

◆ GLYPH_AMPERSAND

#define GLYPH_AMPERSAND   39

◆ GLYPH_BETA_KEY

#define GLYPH_BETA_KEY   55

◆ GLYPH_COIN

#define GLYPH_COIN   51

◆ GLYPH_EXCLAMATION_PNT

#define GLYPH_EXCLAMATION_PNT   36

◆ GLYPH_MARIO_HEAD

#define GLYPH_MARIO_HEAD   52

◆ GLYPH_MULTIPLY

#define GLYPH_MULTIPLY   50

◆ GLYPH_PERCENT

#define GLYPH_PERCENT   40

◆ GLYPH_PERIOD

#define GLYPH_PERIOD   54

◆ GLYPH_QUESTION_MARK

#define GLYPH_QUESTION_MARK   38

◆ GLYPH_SPACE

#define GLYPH_SPACE   -1

◆ GLYPH_STAR

#define GLYPH_STAR   53

◆ GLYPH_TWO_EXCLAMATION

#define GLYPH_TWO_EXCLAMATION   37

◆ GLYPH_U

#define GLYPH_U   30

◆ GLYPH_UMLAUT

#define GLYPH_UMLAUT   58

◆ TEXRECT_MAX_X

#define TEXRECT_MAX_X   300

◆ TEXRECT_MAX_Y

#define TEXRECT_MAX_Y   220

◆ TEXRECT_MIN_X

#define TEXRECT_MIN_X   10

◆ TEXRECT_MIN_Y

#define TEXRECT_MIN_Y   5

Function Documentation

◆ print_text()

void print_text ( s32  x,
s32  y,
const char str 
)

Prints text in the colorful lettering at given X, Y coordinates.

◆ print_text_centered()

void print_text_centered ( s32  x,
s32  y,
const char str 
)

Prints text in the colorful lettering centered at given X, Y coordinates.

◆ print_text_fmt_int()

void print_text_fmt_int ( s32  x,
s32  y,
const char str,
s32  n 
)

Takes a number, finds the intended base, formats the number, and prints it at the given X & Y coordinates.

Warning: this fails on too large numbers, because format_integer has bugs related to overflow. For romhacks, prefer sprintf + print_text.

◆ render_text_labels()

void render_text_labels ( void  )

Renders the text in sTextLabels on screen at the proper locations by iterating a for loop.