2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/Network/multi_pmsg.h $
16 * Revision 1.2 2002/06/09 04:41:14 relnev
17 * added copyright header
19 * Revision 1.1.1.1 2002/05/03 03:28:12 root
23 * 2 10/07/98 10:53a Dave
26 * 1 10/07/98 10:50a Dave
28 * 6 5/08/98 5:05p Dave
29 * Go to the join game screen when quitting multiplayer. Fixed mission
30 * text chat bugs. Put mission type symbols on the create game list.
31 * Started updating standalone gui controls.
33 * 5 4/22/98 4:59p Allender
34 * new multiplayer dead popup. big changes to the comm menu system for
35 * team vs. team. Start of debriefing stuff for team vs. team Make form
36 * on my wing work with individual ships who have high priority orders
38 * 4 4/02/98 5:50p Dave
39 * Put in support for standard comm messages to get sent to netplayers as
40 * well as ai ships. Make critical button presses not get evaluated on the
43 * 3 3/27/98 11:57a Dave
44 * Put in expression checking for text messages.
46 * 2 3/25/98 2:16p Dave
47 * Select random default image for newly created pilots. Fixed several
48 * multi-pause messaging bugs. Begin work on online help for multiplayer
51 * 1 3/19/98 5:04p Dave
57 #ifndef _MULTIPLAYER_MESSAGING_HEADER_FILE
58 #define _MULTIPLAYER_MESSAGING_HEADER_FILE
61 // ----------------------------------------------------------------------------------
62 // MULTI MESSAGING DEFINES/VARS
70 // netgame messaging settings
71 #define MULTI_MSG_NONE -1 // not in messaging mode (send to no one)
72 #define MULTI_MSG_ALL 0 // all players in the game
73 #define MULTI_MSG_FRIENDLY 1 // friendly ships
74 #define MULTI_MSG_HOSTILE 2 // hostile ships
75 #define MULTI_MSG_TARGET 3 // to whatever is my targeted ship (if a player)
76 #define MULTI_MSG_EXPR 4 // send to all players whose callsigns match the expr
78 // max length for an entered text message
79 #define MULTI_MSG_MAX_TEXT_LEN 255
82 // ----------------------------------------------------------------------------------
83 // MULTI MESSAGING FUNCTIONS
86 // called when a messaging key has been detected as being pressed
87 void multi_msg_key_down(int mode);
89 // returns true when messaging system has determined that we should be messaging with voice
90 int multi_msg_voice_record();
92 // general processing function to do things like timing keydown, etc. call from multi_do_frame()
93 void multi_msg_process();
95 // get the current messaging mode
98 // maybe process a keypress in text messaging mode, return true if the key was processed
99 int multi_msg_text_process(int k);
101 // return 0 or 1 if in text chat mode or not
102 int multi_msg_text_mode();
104 // return 0 or 1 if there is multi text to be rendered (filling in txt if necessary)
105 int multi_msg_message_text(char *txt);
107 // display ingame,inmission message text
108 void multi_msg_display_mission_text(char *msg,int player_index);
110 // if the passed net_player's callsign matches the reg expression of the passed expr
111 int multi_msg_matches_expr(net_player *player,char *expr);
113 // if text input mode is active, clear it
114 void multi_msg_text_flush();
117 // -----------------------------------------------------------------------------------
118 // MULTI SQUADMATE MESSAGING FUNCTIONS
121 // evaluate if a wing SQUADMATE MESSAGE command should be sent to a player
122 // return 0 if at least one ai ship got the order, 1 if only players
123 int multi_msg_eval_wing_squadmsg(int wingnum,int command,ai_info *aif,int player_num);
125 // evaluate if a ship SQUADMATE MESSAGE command should be sent to a player
126 // return 0 if not sent to a netplayer, 1 if it was
127 int multi_msg_eval_ship_squadmsg(int shipnum,int command,ai_info *aif, int player_num);
129 // process incoming squadmate messaging info
130 void multi_msg_process_squadmsg_packet(unsigned char *data, header *hinfo);