FS2_Open
Open source remastering of the Freespace 2 engine
multi_team.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 _MULTI_TEAMPLAY_HEADER_FILE
13 #define _MULTI_TEAMPLAY_HEADER_FILE
14 
15 #include <globalincs/globals.h>
16 
17 // ------------------------------------------------------------------------------------
18 // MULTIPLAYER TEAMPLAY DEFINES/VARS
19 //
20 
21 // prototypes
22 struct header;
23 struct net_player;
24 class ship;
25 
26 // score for teams for this mission
28 
29 // ------------------------------------------------------------------------------------
30 // MULTIPLAYER TEAMPLAY FUNCTIONS
31 //
32 
33 // call before level load (pre-sync)
35 
36 // call to determine who won the sw match, -1 == tie, 0 == team 0, 1 == team 1
37 int multi_team_winner();
38 
39 // call to add score to a team
41 
42 // reset all players and assign them to default teams
43 void multi_team_reset();
44 
45 // set the captaincy status of this player
46 void multi_team_set_captain(net_player *pl,int set);
47 
48 // 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)
49 void multi_team_set_team(net_player *pl,int team);
50 
51 // is it ok for the host to hit commit
53 
54 // handle a player drop
56 
57 // handle a player join
59 
60 // send a full update on a player-per-player basis (should call this to update all players after other relevant function calls)
62 
63 // set all ships in the mission to be marked as the proper team (TEAM_HOSTILE, TEAM_FRIENLY)
65 
66 // set the proper team for the passed in ship
67 void multi_team_mark_ship(ship *sp);
68 
69 // host locks all players into their teams
71 
72 // verify that we have valid team stuff
73 void multi_team_verify();
74 
75 // get the player counts for team 0 and team 1 (NULL values are valid)
76 void multi_team_get_player_counts(int *team0,int *team1);
77 
78 // report on the winner/loser of the game via chat text
79 void multi_team_report();
80 
81 // ------------------------------------------------------------------------------------
82 // MULTIPLAYER TEAMPLAY PACKET HANDLERS
83 //
84 
85 // process an incoming team update packet
86 void multi_team_process_packet(unsigned char *data,header *hinfo);
87 
88 #endif
void multi_team_mark_ship(ship *sp)
Definition: multi_team.cpp:514
void multi_team_host_lock_all()
Definition: multi_team.cpp:530
int multi_team_ok_to_commit()
Definition: multi_team.cpp:323
void multi_team_set_team(net_player *pl, int team)
Definition: multi_team.cpp:166
GLsizei const GLfloat * points
Definition: Glext.h:7583
CButton * team
void multi_team_handle_join(net_player *pl)
Definition: multi_team.cpp:438
void multi_team_process_packet(unsigned char *data, header *hinfo)
Definition: multi_team.cpp:628
void multi_team_get_player_counts(int *team0, int *team1)
Definition: multi_team.cpp:546
int Multi_team_score[MAX_TVT_TEAMS]
Definition: multi_team.cpp:41
void multi_team_report()
Definition: multi_team.cpp:572
void multi_team_maybe_add_score(int points, int team)
Definition: multi_team.cpp:105
void multi_team_mark_all_ships()
Definition: multi_team.cpp:497
Definition: ship.h:534
int multi_team_winner()
Definition: multi_team.cpp:76
Definition: multi.h:385
void multi_team_send_update()
Definition: multi_team.cpp:696
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
#define MAX_TVT_TEAMS
Definition: globals.h:57
void multi_team_set_captain(net_player *pl, int set)
Definition: multi_team.cpp:150
void multi_team_level_init()
Definition: multi_team.cpp:68
void multi_team_verify()
Definition: multi_team.cpp:802
void multi_team_handle_drop()
Definition: multi_team.cpp:356
void multi_team_reset()
Definition: multi_team.cpp:128