72 mess->
iconName =
"icons/message_debug";
75 mess->
iconName =
"icons/message_info";
78 mess->
iconName =
"icons/message_info";
81 mess->
iconName =
"icons/message_research";
84 mess->
iconName =
"icons/message_research";
87 mess->
iconName =
"icons/message_research";
90 mess->
iconName =
"icons/message_construction";
93 mess->
iconName =
"icons/message_ufo";
96 mess->
iconName =
"icons/message_ufo";
99 mess->
iconName =
"icons/message_ufo";
102 mess->
iconName =
"icons/message_transfer";
105 mess->
iconName =
"icons/message_promotion";
108 mess->
iconName =
"icons/message_production";
111 mess->
iconName =
"icons/message_death";
114 mess->
iconName =
"icons/message_ufo";
117 mess->
iconName =
"icons/message_info";
120 mess->
iconName =
"icons/message_info";
125 cgi->UI_MessageAddStack(mess);
145 const char* sound =
nullptr;
150 sound =
"geoscape/standard";
157 sound =
"geoscape/info";
167 sound =
"geoscape/mail";
170 sound =
"geoscape/ufolost";
173 sound =
"geoscape/ufospotted";
176 sound =
"geoscape/basealert";
179 sound =
"geoscape/alien-activity";
182 sound =
"geoscape/newmission";
185 sound =
"geoscape/promotion";
191 cgi->S_StartLocalSample(sound, 1.0f);
217 cgi->Com_RegisterConstList(saveMessageConstants);
230 cgi->Com_UnregisterConstList(saveMessageConstants);
265 cgi->S_SetSampleRepeatRate(500);
267 cgi->Com_RegisterConstList(saveMessageConstants);
279 cgi->Com_Printf(
"Invalid message type '%s'\n",
type);
297 if (mtype ==
MSG_DEBUG &&
cgi->Cvar_GetInteger(
"developer") == 0)
308 mess->eventMail = mail;
326 cgi->Com_UnregisterConstList(saveMessageConstants);
329 cgi->S_SetSampleRepeatRate(0);
DateTime class definition.
Share stuff between the different cgame implementations.
DateTime(int day=0, int second=0)
Construct for DateTime class from date as days and time as seconds.
int getTimeAsSeconds() const
Return the time part of the DateTime as seconds.
int getDateAsDays() const
Return the date part of the DateTime as days.
memPool_t * cp_campaignPool
Header file for single player campaign control.
const cgame_import_t * cgi
eventMail_t * CL_GetEventMail(const char *id)
Searches all event mails for a given id.
bool MS_LoadXML(xmlNode_t *p)
Load callback for messages.
uiMessageListNodeMessage_t * MS_AddNewMessage(const char *title, const char *text, messageType_t type, technology_t *pedia, bool popup, bool playSound)
Adds a new message to message stack.
static void MS_TimestampedText(char *text, uiMessageListNodeMessage_t *message, size_t textsize)
Returns formatted text of a message timestamp.
bool MS_SaveXML(xmlNode_t *p)
Save callback for messages.
static void MS_MessageSaveXML(xmlNode_t *p, uiMessageListNodeMessage_t *message)
Save a list of messages to xml.
char cp_messageBuffer[MAX_MESSAGE_TEXT]
void MS_MessageInit(void)
technology_t * RS_GetTechByID(const char *id)
return a pointer to the technology identified by given id string
void CP_GameTimeStop(void)
Stop game time speed.
void CP_DateConvertLong(const DateTime &date, dateLong_t *dateLong)
Converts a date from the engine in a (longer) human-readable format.
const char * Date_GetMonthName(int month)
Returns the short monthame to the given month index.
Campaign geoscape time header.
#define Mem_PoolAllocType(type, pool)
QGL_EXTERN GLint GLenum type
XML tag constants for savegame.
#define SAVE_MESSAGES_TITLE
#define SAVE_MESSAGES_PEDIAID
#define SAVE_MESSAGES_EVENTMAILREAD
#define SAVE_MESSAGETYPE_NAMESPACE
#define SAVE_MESSAGES_TYPE
#define SAVE_MESSAGES_MESSAGE
#define SAVE_MESSAGES_MESSAGES
#define SAVE_MESSAGES_DATE
#define SAVE_MESSAGES_TEXT
#define SAVE_MESSAGES_EVENTMAILID
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
xmlNode_t *IMPORT * XML_GetNode(xmlNode_t *parent, const char *name)
xmlNode_t *IMPORT * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
xmlNode_t *IMPORT * XML_AddNode(xmlNode_t *parent, const char *name)
xmlNode_t *IMPORT * XML_GetDate(xmlNode_t *parent, const char *name, int *day, int *sec)
char *IMPORT * PoolStrDup(const char *in, memPool_t *pool, const int tagNum)
const char *IMPORT * XML_GetString(xmlNode_t *parent, const char *name)
struct uiMessageListNodeMessage_s *IMPORT * UI_MessageGetStack(void)
const char *IMPORT * Com_GetConstVariable(const char *space, int value)
Human readable time information in the game.
available mails for a tech - mail and mail_pre in script files
This is the technology parsed from research.ufo.
char timestamp[TIMESTAMP_TEXT]
struct uiMessageListNodeMessage_s * next