FS2_Open
Open source remastering of the Freespace 2 engine
multiteamselect.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 _MULTITEAMSELECT_H
13 #define _MULTITEAMSELECT_H
14 
15 // ------------------------------------------------------------------------------------------------------
16 // TEAM SELECT DEFINES/VARS
17 //
18 #include "globalincs/pstypes.h"
19 
20 struct header;
21 
22 // should be initialize to 0 inside of multi_vars_init
23 extern int Multi_ts_inited;
24 
25 #define MULTI_TS_MAX_TVT_TEAMS 2 // 2 teams max for now
26 #define MULTI_TS_NUM_SHIP_SLOTS 12 // # of ship slots in non team vs. team mode
27 
28 // deleted ship objnums
30 extern int Multi_ts_num_deleted;
31 
32 // ------------------------------------------------------------------------------------------------------
33 // TEAM SELECT FUNCTIONS
34 //
35 
36 // initialize the team select screen (always call, even when switching between weapon select, etc)
37 void multi_ts_init();
38 
39 // initialize all critical internal data structures
41 
42 // do frame for team select
43 void multi_ts_do();
44 
45 // close the team select screen (always call, even when switching between weapon select, etc)
46 void multi_ts_close();
47 
48 // drop a carried icon
49 void multi_ts_drop(int from_type,int from_index,int to_type,int to_index,int ship_class,int player_index = -1);
50 
51 // assign all players to appropriate default wings/slots
53 
54 // is the given slot disabled for the specified player
55 int multi_ts_disabled_slot(int slot_index,int player_index = -1);
56 
57 // is the given slot disabled for the specified player, _and_ it is his ship as well
58 int multi_ts_disabled_high_slot(int slot_index,int player_index = -1);
59 
60 // delete ships which have been removed from the game, tidy things
62 
63 // resynch all display/interface elements based upon all the ship/weapon pool values
65 
66 // do any necessary processing for players who have left the game
68 
69 // handle all details when the commit button is pressed (including possibly reporting errors/popups)
71 
72 // get the team # of the given ship
73 int multi_ts_get_team(char *ship_name);
74 
75 // function to get the team and slot of a particular ship
76 void multi_ts_get_team_and_slot(char *ship_name,int *team_index,int *slot_index, bool mantis2757switch = false);
77 
78 // function to return the shipname of the ship belonging in slot N
79 void multi_ts_get_shipname( char *ship_name, int team, int slot_index );
80 
81 // the "lock" button has been pressed
83 
84 // if i'm "locked"
85 int multi_ts_is_locked();
86 
87 // show a popup saying "only host and team captains can modify, etc, etc"
89 
90 // ------------------------------------------------------------------------------------------------------
91 // TEAM SELECT PACKET HANDLERS
92 //
93 
94 // send a player slot position update
95 void send_pslot_update_packet(int team,int code,int sound = -1);
96 
97 // process a player slot position update
99 
100 
101 
102 // ------------------------------------------------------------------------------------------------------
103 // TEAM SELECT STUBBED FUNCTIONS
104 //
105 
106 #endif
Definition: sound.cpp:39
void send_pslot_update_packet(int team, int code, int sound=-1)
int multi_ts_is_locked()
void multi_ts_sync_interface()
int Multi_ts_inited
void multi_ts_do()
CButton * team
int multi_ts_disabled_high_slot(int slot_index, int player_index=-1)
void process_pslot_update_packet(ubyte *data, header *hinfo)
void multi_ts_commit_pressed()
int Multi_ts_num_deleted
HWND DWORD code
Definition: vddraw.h:425
void multi_ts_drop(int from_type, int from_index, int to_type, int to_index, int ship_class, int player_index=-1)
void multi_ts_lock_pressed()
void multi_ts_close()
void multi_ts_init()
unsigned char ubyte
Definition: pstypes.h:62
void multi_ts_assign_players_all()
#define MULTI_TS_MAX_TVT_TEAMS
void multi_ts_common_init()
void multi_ts_get_shipname(char *ship_name, int team, int slot_index)
void multi_ts_create_wings()
int multi_ts_disabled_slot(int slot_index, int player_index=-1)
int multi_ts_get_team(char *ship_name)
#define MULTI_TS_NUM_SHIP_SLOTS
Definition: multi.h:385
void multi_ts_handle_player_drop()
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
void multi_ts_maybe_host_only_popup()
void multi_ts_get_team_and_slot(char *ship_name, int *team_index, int *slot_index, bool mantis2757switch=false)
int Multi_ts_deleted_objnums[MULTI_TS_MAX_TVT_TEAMS *MULTI_TS_NUM_SHIP_SLOTS]