]> icculus.org git repositories - taylor/freespace2.git/blob - include/multi_pmsg.h
Initial revision
[taylor/freespace2.git] / include / multi_pmsg.h
1 /*
2  * $Logfile: /Freespace2/code/Network/multi_pmsg.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * $Log$
8  * Revision 1.1  2002/05/03 03:28:12  root
9  * Initial revision
10  * 
11  * 
12  * 2     10/07/98 10:53a Dave
13  * Initial checkin.
14  * 
15  * 1     10/07/98 10:50a Dave
16  * 
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.
21  * 
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
26  * 
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
30  * observer.
31  * 
32  * 3     3/27/98 11:57a Dave
33  * Put in expression checking for text messages.
34  * 
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
38  * keys.
39  * 
40  * 1     3/19/98 5:04p Dave
41  *  
42  * 
43  * $NoKeywords: $
44  */
45
46 #ifndef _MULTIPLAYER_MESSAGING_HEADER_FILE
47 #define _MULTIPLAYER_MESSAGING_HEADER_FILE
48
49
50 // ----------------------------------------------------------------------------------
51 // MULTI MESSAGING DEFINES/VARS
52 //
53
54 struct net_player;
55 struct ai_info;
56 struct header;
57
58 // messaging modes
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
66
67 // max length for an entered text message
68 #define MULTI_MSG_MAX_TEXT_LEN                  255                                             
69
70
71 // ----------------------------------------------------------------------------------
72 // MULTI MESSAGING FUNCTIONS
73 //
74
75 // called when a messaging key has been detected as being pressed
76 void multi_msg_key_down(int mode);
77
78 // returns true when messaging system has determined that we should be messaging with voice
79 int multi_msg_voice_record();
80
81 // general processing function to do things like timing keydown, etc. call from multi_do_frame()
82 void multi_msg_process();
83
84 // get the current messaging mode
85 int multi_msg_mode();
86
87 // maybe process a keypress in text messaging mode, return true if the key was processed
88 int multi_msg_text_process(int k);
89
90 // return 0 or 1 if in text chat mode or not
91 int multi_msg_text_mode();
92
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);
95
96 // display ingame,inmission message text
97 void multi_msg_display_mission_text(char *msg,int player_index);
98
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);
101
102 // if text input mode is active, clear it
103 void multi_msg_text_flush();
104
105
106 // -----------------------------------------------------------------------------------
107 // MULTI SQUADMATE MESSAGING FUNCTIONS
108 //
109
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);
113
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);
117
118 // process incoming squadmate messaging info 
119 void multi_msg_process_squadmsg_packet(unsigned char *data, header *hinfo);
120
121 #endif
122