Main Page   Modules   Data Structures   File List   Globals  

msh_hud.h File Reference

Sprite based text functions. More...


Defines

#define hud_print(x, y,)   {sprintf(_hud_string, __VA_ARGS__); _hud_print(x, y, _hud_string);}

Functions

void set_hud_y_offset (u8 y_offset)
void hud_init (u8 obj, u8 pal, u8 y_offset, u16 tile_offset)
void hud_show (bool show)
void hud_clear_line (u8 y)
void hud_clear_all ()


Detailed Description

The HUD provides a 30x8 character interface for printing text on the GBA screen. This is similar to using the dtext() functions, but the HUD renders text with sprites instead of using a background layer. These functions are generally meant for debugging and probably not very suitable for use as text in games.


Define Documentation

#define hud_print x,
     {sprintf(_hud_string, __VA_ARGS__); _hud_print(x, y, _hud_string);}
 

Parameters:
x  [0..29] X Position
y  [0..7] Y Position
...  Format string
Used for writing text to the HUD


Function Documentation

void set_hud_y_offset u8    y_offset
 

Parameters:
y_offset  [0..255] Y Position
Moves the HUD to the specified Y position (in pixels)

void hud_init u8    obj,
u8    pal,
u8    y_offset,
u16    tile_offset
 

Parameters:
obj  [0..124] Starting sprite index (uses 4 sprites)
pal  [0..15] Palette
y_offset  [0..255] HUD Y Position (in pixels)
tile_offset  [0..768] Starting sprite tile (uses 256 tiles)
Sets 2 colors in the palette specified and sets up 4 objects (sprites) from the obj index. The HUD will also use 256 sprite tiles.

Call this function before using any of the other HUD functions.

void hud_show bool    show
 

Parameters:
show  [TRUE or FALSE] Display the HUD
Show or hide the HUD

void hud_clear_line u8    y
 

Parameters:
y  [0..7] Line to clear
Clears the specified HUD line

void hud_clear_all  
 

Clears the entire HUD


Generated on Wed May 19 21:45:08 2004 for Mushroom GBALib by doxygen 1.2.18