cp_messages.h

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 2002-2010 UFO: Alien Invasion.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 */
00024 
00025 #ifndef CLIENT_CP_MESSAGES_H
00026 #define CLIENT_CP_MESSAGES_H
00027 
00028 #define MAX_MESSAGE_TEXT 256
00029 
00030 /* message systems */
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 /* Russian timestamp (with UTF-8) is 23 bytes long */
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 /* CLIENT_CP_MESSAGES_H */

Generated by  doxygen 1.6.2