]> icculus.org git repositories - taylor/freespace2.git/blob - include/multi_team.h
rendering functions mostly done; more complete shader setup
[taylor/freespace2.git] / include / multi_team.h
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
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Network/multi_team.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * $Log$
16  * Revision 1.2  2002/06/09 04:41:14  relnev
17  * added copyright header
18  *
19  * Revision 1.1.1.1  2002/05/03 03:28:12  root
20  * Initial import.
21  *  
22  * 
23  * 5     9/04/99 1:54p Dave
24  * externed team scores.
25  * 
26  * 4     4/09/99 2:21p Dave
27  * Multiplayer beta stuff. CD checking.
28  * 
29  * 3     2/17/99 2:11p Dave
30  * First full run of squad war. All freespace and tracker side stuff
31  * works.
32  * 
33  * 2     10/07/98 10:53a Dave
34  * Initial checkin.
35  * 
36  * 1     10/07/98 10:50a Dave
37  * 
38  * 8     5/22/98 9:35p Dave
39  * Put in channel based support for PXO. Put in "shutdown" button for
40  * standalone. UI tweaks for TvT
41  * 
42  * 7     5/15/98 5:16p Dave
43  * Fix a standalone resetting bug.Tweaked PXO interface. Display captaincy
44  * status for team vs. team. Put in asserts to check for invalid team vs.
45  * team situations.
46  * 
47  * 6     4/08/98 2:51p Dave
48  * Fixed pilot image xfer once again. Solidify team selection process in
49  * pre-briefing multiplayer.
50  * 
51  * 5     3/31/98 4:51p Dave
52  * Removed medals screen and multiplayer buttons from demo version. Put in
53  * new pilot popup screen. Make ships in mp team vs. team have proper team
54  * ids. Make mp respawns a permanent option saved in the player file.
55  * 
56  * 4     3/10/98 4:26p Dave
57  * Second pass at furball mode. Fixed several team vs. team bugs.
58  * 
59  * 3     3/09/98 5:54p Dave
60  * Fixed stats to take asteroid hits into account. Polished up UI stuff in
61  * team select. Finished up pilot info popup. Tracked down and fixed
62  * double click bug.
63  * 
64  * 2     3/03/98 8:55p Dave
65  * Finished pre-briefing team vs. team support.
66  * 
67  * 1     3/03/98 5:09p Dave
68  *  
69  * $NoKeywords: $
70  */
71
72 #ifndef _MULTI_TEAMPLAY_HEADER_FILE
73 #define _MULTI_TEAMPLAY_HEADER_FILE
74
75 // ------------------------------------------------------------------------------------
76 // MULTIPLAYER TEAMPLAY DEFINES/VARS
77 //
78
79 // prototypes
80 struct header;
81 struct net_player;
82 struct ship;
83
84 // score for teams 0 and 1 for this mission
85 extern int Multi_team0_score;
86 extern int Multi_team1_score;
87
88 // ------------------------------------------------------------------------------------
89 // MULTIPLAYER TEAMPLAY FUNCTIONS
90 //
91
92 // call before level load (pre-sync)
93 void multi_team_level_init();
94
95 // call to determine who won the sw match, -1 == tie, 0 == team 0, 1 == team 1
96 int multi_team_winner();
97
98 // call to add score to a team
99 void multi_team_maybe_add_score(int points, int team);
100
101 // reset all players and assign them to default teams
102 void multi_team_reset();
103
104 // set the captaincy status of this player
105 void multi_team_set_captain(net_player *pl,int set);
106
107 // set the team of this given player (if called by the host, the player becomes locked, cnad only the host can modify him from thereon)
108 void multi_team_set_team(net_player *pl,int team);
109
110 // is it ok for the host to hit commit
111 int multi_team_ok_to_commit();
112
113 // handle a player drop
114 void multi_team_handle_drop();
115
116 // handle a player join
117 void multi_team_handle_join(net_player *pl);
118
119 // send a full update on a player-per-player basis (should call this to update all players after other relevant function calls)
120 void multi_team_send_update();
121
122 // set all ships in the mission to be marked as the proper team (TEAM_HOSTILE, TEAM_FRIENLY)
123 void multi_team_mark_all_ships();
124
125 // set the proper team for the passed in ship
126 void multi_team_mark_ship(ship *sp);
127
128 // host locks all players into their teams
129 void multi_team_host_lock_all();
130
131 // verify that we have valid team stuff
132 void multi_team_verify();
133
134 // get the player counts for team 0 and team 1 (NULL values are valid)
135 void multi_team_get_player_counts(int *team0,int *team1);
136
137 // report on the winner/loser of the game via chat text
138 void multi_team_report();
139
140 // ------------------------------------------------------------------------------------
141 // MULTIPLAYER TEAMPLAY PACKET HANDLERS
142 //
143
144 // process an incoming team update packet
145 void multi_team_process_packet(unsigned char *data,header *hinfo);
146
147 #endif
148