cp_messages.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CLIENT_CP_MESSAGES_H
00026 #define CLIENT_CP_MESSAGES_H
00027
00028 #define MAX_MESSAGE_TEXT 256
00029
00030
00031 typedef enum {
00032 MSG_DEBUG,
00033 MSG_INFO,
00034 MSG_STANDARD,
00035 MSG_RESEARCH_PROPOSAL,
00036 MSG_RESEARCH_HALTED,
00037 MSG_RESEARCH_FINISHED,
00038 MSG_CONSTRUCTION,
00039 MSG_UFOSPOTTED,
00040 MSG_TERRORSITE,
00041 MSG_BASEATTACK,
00042 MSG_TRANSFERFINISHED,
00043 MSG_PROMOTION,
00044 MSG_PRODUCTION,
00045 MSG_NEWS,
00046 MSG_DEATH,
00047 MSG_CRASHSITE,
00048 MSG_EVENT,
00049
00050 MSG_MAX
00051 } messageType_t;
00052
00053
00054 #define TIMESTAMP_TEXT 24
00055 typedef struct message_s {
00056 char title[MAX_VAR];
00057 char timestamp[TIMESTAMP_TEXT];
00058 char *text;
00059 messageType_t type;
00060 struct technology_s *pedia;
00061 struct eventMail_s *eventMail;
00062 struct message_s *next;
00063 date_t date;
00064 int lineUsed;
00065 } message_t;
00066
00067 message_t *MS_AddNewMessage(const char *title, const char *text, qboolean popup, messageType_t type, struct technology_s *pedia);
00068 message_t *MS_AddNewMessageSound(const char *title, const char *text, qboolean popup, messageType_t type, struct technology_s *pedia, qboolean playSound);
00069 void MS_MessageInit(void);
00070
00071 extern char cp_messageBuffer[MAX_MESSAGE_TEXT];
00072 extern message_t *cp_messageStack;
00073
00074 #endif