Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros | Functions | Variables
MESSAGE

Message Rendering. More...

Macros

#define MAX_NUM_MESSAGES   50
 
#define MAX_SIZE_MESSAGE   70
 
#define MAX_VIEWED_MESSAGES   4
 

Functions

T_void MessageAdd (T_byte8 *p_string)
 
T_void MessageClear (T_void)
 
T_void MessageDisplayMessage (T_word16 messagenum)
 
T_void MessageDraw (T_word16 x, T_word16 y, T_word16 interleave, T_color color)
 
T_void MessageDrawLine (T_word16 x_pos, T_word16 y_pos, T_byte8 *line, T_color color)
 
int MessagePrintf (char *fmt,...)
 
T_void MessageScrollDown (T_void)
 
T_void MessageScrollUp (T_void)
 
T_void MessageSetAlternateOutputOff (T_void)
 
T_void MessageSetAlternateOutputOn (T_void)
 

Variables

T_byte8 G_extendedColors [MAX_EXTENDED_COLORS]
 

Detailed Description

Message Rendering.

Messages are drawn here at the top of the game window. Escape codes for different colors are included.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Macro Definition Documentation

#define MAX_NUM_MESSAGES   50
#define MAX_SIZE_MESSAGE   70
#define MAX_VIEWED_MESSAGES   4

Function Documentation

T_void MessageAdd ( T_byte8 p_string)

MessageAdd appends a text line to the bottom of the message list. If needed, the messages are scroll up to make room (and one message is scroll off the list).

Parameters
p_string– String to add to message list
T_void MessageClear ( T_void  )

MessageClear clears all the messages in the list and starts with a fresh and emtpy list. This is useful when some people are tired of seeing the messages.

T_void MessageDisplayMessage ( T_word16  messagenum)

MessageDisplayMessage searches for a text file in the resource identified by MESSAGES/MSG##### where ##### is the message number to display.

T_void MessageDraw ( T_word16  x,
T_word16  y,
T_word16  interleave,
T_color  color 
)

MessageDraw draws MAX_VIEWED_MESSAGES of message lines on the currently active screen at given x and y coordinate. The amount of space from line to line is also given by an interleave variable.

NOTE: It is assumed that the currently active screen is where the messages need to be drawn.

Parameters
x– Starting x to draw
y– Starting y to draw
interleave– How far down to next line
color– Color of text
T_void MessageDrawLine ( T_word16  x_pos,
T_word16  y_pos,
T_byte8 line,
T_color  color 
)
int MessagePrintf ( char *  fmt,
  ... 
)
T_void MessageScrollDown ( T_void  )

MessageScrollDown moves one item down the message list.

T_void MessageScrollUp ( T_void  )

MessageScrollUp scrolls up the message display by one line.

T_void MessageSetAlternateOutputOff ( T_void  )
T_void MessageSetAlternateOutputOn ( T_void  )

Variable Documentation

T_byte8 G_extendedColors[MAX_EXTENDED_COLORS]