1 /*
2  * Copyright (C) Volition, Inc. 2005.  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 #ifndef __FREESPACE2_SQUAD_WAR_HEADER_FILE
11 #define __FREESPACE2_SQUAD_WAR_HEADER_FILE
12 
13 #include "network/ptrack.h"
14 
15 // ------------------------------------------------------------------------------------
16 // MULTIPLAYER SQUAD WAR DEFINES/VARS
17 //
18 
19 // the min # of players required from each squad for the mission to be valid
20 #define MULTI_SW_MIN_PLAYERS					1
21 
22 // set on the host in response to a standalone sw query, -1 == waiting, 0 == fail, 1 == success
23 extern int Multi_sw_std_query;
24 
25 // match code
26 #define MATCH_CODE_LEN		34			// from ptrack.h
27 extern char Multi_sw_match_code[MATCH_CODE_LEN];
28 
29 // reply from a standalone on a bad response
30 extern char Multi_sw_bad_reply[MAX_SQUAD_RESPONSE_LEN+1];
31 
32 // ------------------------------------------------------------------------------------
33 // MULTIPLAYER SQUAD WAR FUNCTIONS
34 //
35 
36 // call before loading level - mission sync phase. only the server need do this
37 void multi_sw_level_init();
38 
39 // determine if everything is ok to move forward for a squad war match
40 int multi_sw_ok_to_commit();
41 
42 // query PXO on the standalone
43 void multi_sw_std_query(char *match_code);
44 
45 // call to update everything on the tracker
46 void multi_sw_report(int stats_saved);
47 
48 #endif
49 
50