FS2_Open
Open source remastering of the Freespace 2 engine
multi_pmsg.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
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 the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _MULTIPLAYER_MESSAGING_HEADER_FILE
13 #define _MULTIPLAYER_MESSAGING_HEADER_FILE
14 
15 
16 // ----------------------------------------------------------------------------------
17 // MULTI MESSAGING DEFINES/VARS
18 //
19 
20 struct net_player;
21 struct ai_info;
22 struct header;
23 
24 // messaging modes
25 // netgame messaging settings
26 #define MULTI_MSG_NONE -1 // not in messaging mode (send to no one)
27 #define MULTI_MSG_ALL 0 // all players in the game
28 #define MULTI_MSG_FRIENDLY 1 // friendly ships
29 #define MULTI_MSG_HOSTILE 2 // hostile ships
30 #define MULTI_MSG_TARGET 3 // to whatever is my targeted ship (if a player)
31 #define MULTI_MSG_EXPR 4 // send to all players whose callsigns match the expr
32 
33 // max length for an entered text message
34 #define MULTI_MSG_MAX_TEXT_LEN 255
35 
36 
37 // ----------------------------------------------------------------------------------
38 // MULTI MESSAGING FUNCTIONS
39 //
40 
41 // called when a messaging key has been detected as being pressed
42 void multi_msg_key_down(int mode);
43 
44 // returns true when messaging system has determined that we should be messaging with voice
46 
47 // general processing function to do things like timing keydown, etc. call from multi_do_frame()
48 void multi_msg_process();
49 
50 // get the current messaging mode
51 int multi_msg_mode();
52 
53 // maybe process a keypress in text messaging mode, return true if the key was processed
54 int multi_msg_text_process(int k);
55 
56 // return 0 or 1 if in text chat mode or not
58 
59 // return 0 or 1 if there is multi text to be rendered (filling in txt if necessary)
60 int multi_msg_message_text(char *txt);
61 
62 // display ingame,inmission message text
63 void multi_msg_display_mission_text(const char *msg, int player_index);
64 
65 // if the passed net_player's callsign matches the reg expression of the passed expr
66 int multi_msg_matches_expr(net_player *player, const char *expr);
67 
68 // if text input mode is active, clear it
70 
71 
72 // -----------------------------------------------------------------------------------
73 // MULTI SQUADMATE MESSAGING FUNCTIONS
74 //
75 
76 // evaluate if a wing SQUADMATE MESSAGE command should be sent to a player
77 // return 0 if at least one ai ship got the order, 1 if only players
78 int multi_msg_eval_wing_squadmsg(int wingnum,int command,ai_info *aif,int player_num);
79 
80 // evaluate if a ship SQUADMATE MESSAGE command should be sent to a player
81 // return 0 if not sent to a netplayer, 1 if it was
82 int multi_msg_eval_ship_squadmsg(int shipnum,int command,ai_info *aif, int player_num);
83 
84 // process incoming squadmate messaging info
85 void multi_msg_process_squadmsg_packet(unsigned char *data, header *hinfo);
86 
87 #endif
int multi_msg_text_mode()
Definition: multi_pmsg.cpp:163
int multi_msg_matches_expr(net_player *player, const char *expr)
Definition: multi_pmsg.cpp:318
void multi_msg_key_down(int mode)
Definition: multi_pmsg.cpp:89
int multi_msg_text_process(int k)
Definition: multi_pmsg.cpp:207
void multi_msg_text_flush()
Definition: multi_pmsg.cpp:329
int multi_msg_mode()
Definition: multi_pmsg.cpp:157
void multi_msg_process()
Definition: multi_pmsg.cpp:125
GLenum mode
Definition: Glext.h:5794
Definition: ai.h:329
void multi_msg_display_mission_text(const char *msg, int player_index)
Definition: multi_pmsg.cpp:302
int multi_msg_eval_ship_squadmsg(int shipnum, int command, ai_info *aif, int player_num)
Definition: multi_pmsg.cpp:677
Definition: player.h:85
int multi_msg_voice_record()
Definition: multi_pmsg.cpp:119
void multi_msg_process_squadmsg_packet(unsigned char *data, header *hinfo)
Definition: multi_pmsg.cpp:725
int multi_msg_message_text(char *txt)
Definition: multi_pmsg.cpp:264
Definition: multi.h:385
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
int multi_msg_eval_wing_squadmsg(int wingnum, int command, ai_info *aif, int player_num)
Definition: multi_pmsg.cpp:621