1 #ifndef __NETWORK_GAMES_H
2 #define __NETWORK_GAMES_H
3 
4 /*
5 	network_games.h
6 
7 	Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc.
8 	and the "Aleph One" developers.
9 
10 	This program is free software; you can redistribute it and/or modify
11 	it under the terms of the GNU General Public License as published by
12 	the Free Software Foundation; either version 3 of the License, or
13 	(at your option) any later version.
14 
15 	This program is distributed in the hope that it will be useful,
16 	but WITHOUT ANY WARRANTY; without even the implied warranty of
17 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 	GNU General Public License for more details.
19 
20 	This license is contained in the file "COPYING",
21 	which is included with this source code; it is available online at
22 	http://www.gnu.org/licenses/gpl.html
23 
24 	Wednesday, July 19, 1995 11:03:09 AM- rdm created.
25 
26 */
27 
28 #include "player.h"
29 
30 struct player_ranking_data {
31 	short player_index;
32 	long ranking;
33 };
34 
35 extern int32 team_netgame_parameters[NUMBER_OF_TEAM_COLORS][2];
36 
37 void initialize_net_game(void);
38 
39 /* returns true if the game is over.. */
40 bool update_net_game(void);
41 
42 /* Returns the player net ranking, which may mean different things */
43 long get_player_net_ranking(short player_index, short *kills, short *deaths,
44 	bool game_is_over);
45 long get_team_net_ranking(short team, short *kills, short *deaths,
46 			  bool game_is_over);
47 
48 void calculate_player_rankings(struct player_ranking_data *rankings);
49 void calculate_ranking_text(char *buffer, long ranking);
50 bool current_net_game_has_scores(void);
51 void calculate_ranking_text_for_post_game(char *buffer, long ranking);
52 bool get_network_score_text_for_postgame(char *buffer, bool team_mode);
53 bool current_game_has_balls(void);
54 void get_network_joined_message(char *buffer, short game_type);
55 long get_entry_point_flags_for_game_type(size_t game_type);
56 
57 bool player_killed_player(short dead_player_index, short aggressor_player_index);
58 
59 bool game_is_over(void);
60 
61 enum
62 {
63 	_network_compass_all_off= 0,
64 
65 	_network_compass_nw= 0x0001,
66 	_network_compass_ne= 0x0002,
67 	_network_compass_sw= 0x0004,
68 	_network_compass_se= 0x0008,
69 
70 	_network_compass_all_on= 0x000f,
71 
72 	_network_compass_use_beacon = 0x0010
73 };
74 
75 short get_network_compass_state(short player_index);
76 
77 #endif
78