2 * $Logfile: /Freespace2/code/Network/multi_pmsg.h $
8 * Revision 1.1 2002/05/03 03:28:12 root
12 * 2 10/07/98 10:53a Dave
15 * 1 10/07/98 10:50a Dave
17 * 6 5/08/98 5:05p Dave
18 * Go to the join game screen when quitting multiplayer. Fixed mission
19 * text chat bugs. Put mission type symbols on the create game list.
20 * Started updating standalone gui controls.
22 * 5 4/22/98 4:59p Allender
23 * new multiplayer dead popup. big changes to the comm menu system for
24 * team vs. team. Start of debriefing stuff for team vs. team Make form
25 * on my wing work with individual ships who have high priority orders
27 * 4 4/02/98 5:50p Dave
28 * Put in support for standard comm messages to get sent to netplayers as
29 * well as ai ships. Make critical button presses not get evaluated on the
32 * 3 3/27/98 11:57a Dave
33 * Put in expression checking for text messages.
35 * 2 3/25/98 2:16p Dave
36 * Select random default image for newly created pilots. Fixed several
37 * multi-pause messaging bugs. Begin work on online help for multiplayer
40 * 1 3/19/98 5:04p Dave
46 #ifndef _MULTIPLAYER_MESSAGING_HEADER_FILE
47 #define _MULTIPLAYER_MESSAGING_HEADER_FILE
50 // ----------------------------------------------------------------------------------
51 // MULTI MESSAGING DEFINES/VARS
59 // netgame messaging settings
60 #define MULTI_MSG_NONE -1 // not in messaging mode (send to no one)
61 #define MULTI_MSG_ALL 0 // all players in the game
62 #define MULTI_MSG_FRIENDLY 1 // friendly ships
63 #define MULTI_MSG_HOSTILE 2 // hostile ships
64 #define MULTI_MSG_TARGET 3 // to whatever is my targeted ship (if a player)
65 #define MULTI_MSG_EXPR 4 // send to all players whose callsigns match the expr
67 // max length for an entered text message
68 #define MULTI_MSG_MAX_TEXT_LEN 255
71 // ----------------------------------------------------------------------------------
72 // MULTI MESSAGING FUNCTIONS
75 // called when a messaging key has been detected as being pressed
76 void multi_msg_key_down(int mode);
78 // returns true when messaging system has determined that we should be messaging with voice
79 int multi_msg_voice_record();
81 // general processing function to do things like timing keydown, etc. call from multi_do_frame()
82 void multi_msg_process();
84 // get the current messaging mode
87 // maybe process a keypress in text messaging mode, return true if the key was processed
88 int multi_msg_text_process(int k);
90 // return 0 or 1 if in text chat mode or not
91 int multi_msg_text_mode();
93 // return 0 or 1 if there is multi text to be rendered (filling in txt if necessary)
94 int multi_msg_message_text(char *txt);
96 // display ingame,inmission message text
97 void multi_msg_display_mission_text(char *msg,int player_index);
99 // if the passed net_player's callsign matches the reg expression of the passed expr
100 int multi_msg_matches_expr(net_player *player,char *expr);
102 // if text input mode is active, clear it
103 void multi_msg_text_flush();
106 // -----------------------------------------------------------------------------------
107 // MULTI SQUADMATE MESSAGING FUNCTIONS
110 // evaluate if a wing SQUADMATE MESSAGE command should be sent to a player
111 // return 0 if at least one ai ship got the order, 1 if only players
112 int multi_msg_eval_wing_squadmsg(int wingnum,int command,ai_info *aif,int player_num);
114 // evaluate if a ship SQUADMATE MESSAGE command should be sent to a player
115 // return 0 if not sent to a netplayer, 1 if it was
116 int multi_msg_eval_ship_squadmsg(int shipnum,int command,ai_info *aif, int player_num);
118 // process incoming squadmate messaging info
119 void multi_msg_process_squadmsg_packet(unsigned char *data, header *hinfo);