Angband
message.h
Go to the documentation of this file.
1 
18 #ifndef INCLUDED_Z_MSG_H
19 #define INCLUDED_Z_MSG_H
20 
21 #include "h-basic.h"
22 
26 enum {
27  #define MSG(x, s) MSG_##x,
28  #include "list-message.h"
29  #undef MSG
30  SOUND_MAX = MSG_MAX,
31 };
32 
33 
34 /* Functions */
35 void messages_init(void);
36 void messages_free(void);
37 u16b messages_num(void);
38 void message_add(const char *str, u16b type);
39 const char *message_str(u16b age);
44 void message_color_define(u16b type, byte color);
45 int message_lookup_by_name(const char *name);
46 int message_lookup_by_sound_name(const char *name);
47 const char *message_sound_name(int message);
48 void sound(int type);
49 void bell(const char *fmt, ...);
50 void msg(const char *fmt, ...);
51 void msgt(unsigned int type, const char *fmt, ...);
52 
53 
54 #endif /* !INCLUDED_Z_MSG_H */
uint16_t u16b
Definition: h-basic.h:169
u16b message_count(u16b age)
Returns the number of times the message of age age was saved.
Definition: message.c:186
const char * message_str(u16b age)
Returns the text of the message of age age.
Definition: message.c:172
u16b message_type(u16b age)
Returns the type of the message of age age.
Definition: message.c:198
void messages_free(void)
Free the message package.
Definition: message.c:71
void messages_init(void)
Functions operating on the entire list
Definition: message.c:62
Definition: message.h:193
int message_lookup_by_sound_name(const char *name)
uint8_t byte
Definition: h-basic.h:167
void bell(const char *fmt,...)
Clear everything, display a formatted message, ring the system bell.
Definition: message.c:361
List of message types.
void message_color_define(u16b type, byte color)
Message-color functions
Definition: message.c:223
void msgt(unsigned int type, const char *fmt,...)
Display a formatted message with a given type, making a sound relevant to the message tyoe...
Definition: message.c:428
The lowest level header.
void msg(const char *fmt,...)
Display a formatted message.
Definition: message.c:395
int type
Definition: mon-msg.c:80
int message_lookup_by_name(const char *name)
u16b messages_num(void)
Return the current number of messages stored.
Definition: message.c:97
byte message_color(u16b age)
Returns the display colour of the message memorised age messages ago.
Definition: message.c:209
void sound(int type)
Make a noise, without a message.
Definition: message.c:347
const char * message_sound_name(int message)
Intialize random names
Definition: init.c:656
byte message_type_color(u16b type)
Returns the colour for the message type type.
Definition: message.c:252
void message_add(const char *str, u16b type)
Functions for individual messages
Definition: message.c:114