cp_messages.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  message_s

Defines

#define MAX_MESSAGE_TEXT   256
#define TIMESTAMP_TEXT   24

Typedefs

typedef struct message_s message_t

Enumerations

enum  messageType_t {
  MSG_DEBUG, MSG_INFO, MSG_STANDARD, MSG_RESEARCH_PROPOSAL,
  MSG_RESEARCH_HALTED, MSG_RESEARCH_FINISHED, MSG_CONSTRUCTION, MSG_UFOSPOTTED,
  MSG_TERRORSITE, MSG_BASEATTACK, MSG_TRANSFERFINISHED, MSG_PROMOTION,
  MSG_PRODUCTION, MSG_NEWS, MSG_DEATH, MSG_CRASHSITE,
  MSG_EVENT, MSG_MAX
}

Functions

message_tMS_AddNewMessage (const char *title, const char *text, qboolean popup, messageType_t type, struct technology_s *pedia)
 Adds a new message to message stack.
message_tMS_AddNewMessageSound (const char *title, const char *text, qboolean popup, messageType_t type, struct technology_s *pedia, qboolean playSound)
 Adds a new message to message stack.
void MS_MessageInit (void)

Variables

char cp_messageBuffer [MAX_MESSAGE_TEXT]
message_tcp_messageStack

Detailed Description

Definition in file cp_messages.h.


Define Documentation

#define MAX_MESSAGE_TEXT   256

Definition at line 28 of file cp_messages.h.

Referenced by MS_LoadXML().

#define TIMESTAMP_TEXT   24

Definition at line 54 of file cp_messages.h.


Typedef Documentation

typedef struct message_s message_t

Enumeration Type Documentation

Enumerator:
MSG_DEBUG 

only save them in debug mode

MSG_INFO 

don't save these messages

MSG_STANDARD 
MSG_RESEARCH_PROPOSAL 
MSG_RESEARCH_HALTED 
MSG_RESEARCH_FINISHED 
MSG_CONSTRUCTION 
MSG_UFOSPOTTED 
MSG_TERRORSITE 
MSG_BASEATTACK 
MSG_TRANSFERFINISHED 
MSG_PROMOTION 
MSG_PRODUCTION 
MSG_NEWS 
MSG_DEATH 
MSG_CRASHSITE 
MSG_EVENT 
MSG_MAX 

Definition at line 31 of file cp_messages.h.


Function Documentation

message_t* MS_AddNewMessage ( const char *  title,
const char *  text,
qboolean  popup,
messageType_t  type,
technology_t pedia 
)

Adds a new message to message stack.

Note:
These are the messages that are displayed at geoscape
Parameters:
[in] title Already translated message/mail title
[in] text Already translated message/mail body
[in] popup Show this as a popup, too?
[in] type The message type
[in] pedia Pointer to technology (only if needed)
Returns:
message_t pointer
See also:
UP_OpenMail_f
CL_EventAddMail_f
Note:
this method forwards to MS_AddNewMessageSound with
 playSound = qtrue 

Definition at line 65 of file cp_messages.c.

References MS_AddNewMessageSound(), and qtrue.

Referenced by AIM_AircraftStart_f(), AIR_NewAircraft(), AIR_SendAircraftPursuingUFO(), AIR_SendAircraftToMission(), AIRFIGHT_ActionsAfterAirfight(), AIRFIGHT_ExecuteActions(), AL_AddAliens(), B_BuildBase_f(), B_Destroy_AntimaterStorage_f(), B_ManageAntimatter(), B_SellOrAddItems(), B_SetBaseTitle_f(), B_UpdateBaseData(), CL_AutoMissionAlienCollect(), CL_CampaignRunAircraft(), CL_EventAddMail_f(), CL_GameAutoGo(), CL_UpdateCharacterStats(), CP_BaseAttackMissionDestroyBase(), CP_MissionAddToGeoscape(), CP_MissionEndActions(), SAV_GameQuickLoad_f(), SAV_GameQuickSave_f(), UR_DialogStartSell_f(), and UR_DialogStartStore_f().

message_t* MS_AddNewMessageSound ( const char *  title,
const char *  text,
qboolean  popup,
messageType_t  type,
technology_t pedia,
qboolean  playSound 
)

Adds a new message to message stack.

Note:
These are the messages that are displayed at geoscape
Parameters:
[in] title Already translated message/mail title
[in] text Already translated message/mail body
[in] popup Show this as a popup, too?
[in] type The message type
[in] pedia Pointer to technology (only if needed)
[in] playSound Play notification sound?
Returns:
message_t pointer
See also:
UP_OpenMail_f
CL_EventAddMail_f

Todo:
(menu) Handle translated text - don't use single byte string copy here

Definition at line 83 of file cp_messages.c.

References ccs, cp_campaignPool, CP_PopupList(), ccs_s::date, message_s::date, Mem_PoolAlloc, Mem_PoolStrDup, MS_TimestampedText(), MSG_BASEATTACK, MSG_CONSTRUCTION, MSG_CRASHSITE, MSG_DEATH, MSG_DEBUG, MSG_EVENT, MSG_INFO, MSG_MAX, MSG_NEWS, MSG_PRODUCTION, MSG_PROMOTION, MSG_RESEARCH_FINISHED, MSG_RESEARCH_HALTED, MSG_RESEARCH_PROPOSAL, MSG_STANDARD, MSG_TERRORSITE, MSG_TRANSFERFINISHED, MSG_UFOSPOTTED, message_s::next, ccs_s::numUnreadMails, message_s::pedia, Q_strncpyz(), S_StartLocalSample(), SND_VOLUME_DEFAULT, message_s::text, message_s::timestamp, message_s::title, and message_s::type.

Referenced by CP_NationHandleBudget(), MS_AddNewMessage(), MS_LoadXML(), and MSO_CheckAddNewMessage().

void MS_MessageInit ( void   ) 

Definition at line 284 of file cp_messages.c.

References MSO_Init().

Referenced by CP_InitStartup().


Variable Documentation

char cp_messageBuffer[MAX_MESSAGE_TEXT]

Generated by  doxygen 1.6.2