| 1 |
sysadm |
1.1 |
/*
|
| 2 |
|
|
* This program is free software; you can redistribute it and/or
|
| 3 |
|
|
* modify it under the terms of the GNU General Public License
|
| 4 |
|
|
* as published by the Free Software Foundation; either version 2
|
| 5 |
|
|
* of the License, or (at your option) any later version.
|
| 6 |
|
|
*
|
| 7 |
|
|
* This program is distributed in the hope that it will be useful,
|
| 8 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
|
|
* GNU General Public License for more details.
|
| 11 |
|
|
*
|
| 12 |
|
|
* You should have received a copy of the GNU General Public License
|
| 13 |
|
|
* along with this program; if not, write to the Free Software
|
| 14 |
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 15 |
|
|
*/
|
| 16 |
|
|
#ifndef INCLUDED_TOURNAMENT_TYPES
|
| 17 |
|
|
#define INCLUDED_TOURNAMENT_TYPES
|
| 18 |
|
|
|
| 19 |
|
|
typedef struct
|
| 20 |
|
|
{
|
| 21 |
|
|
unsigned int start_preliminary;
|
| 22 |
|
|
unsigned int end_signup;
|
| 23 |
|
|
unsigned int end_preliminary;
|
| 24 |
|
|
unsigned int start_round_1;
|
| 25 |
|
|
unsigned int start_round_2;
|
| 26 |
|
|
unsigned int start_round_3;
|
| 27 |
|
|
unsigned int start_round_4;
|
| 28 |
|
|
unsigned int tournament_end;
|
| 29 |
|
|
unsigned int game_selection;
|
| 30 |
|
|
unsigned int game_type;
|
| 31 |
|
|
unsigned int game_client;
|
| 32 |
|
|
unsigned int races;
|
| 33 |
|
|
char * format;
|
| 34 |
|
|
char * sponsor; /* format: "ricon,sponsor"
|
| 35 |
|
|
* ricon = W3+icon reversed , if 2 char icon is selected
|
| 36 |
|
|
* or reversed icon if 4 char icon is selected
|
| 37 |
|
|
* ie. "4R3W,The PvPGN Team"
|
| 38 |
|
|
*/
|
| 39 |
|
|
unsigned int thumbs_down;
|
| 40 |
|
|
} t_tournament_info;
|
| 41 |
|
|
|
| 42 |
|
|
typedef struct
|
| 43 |
|
|
{
|
| 44 |
|
|
char * name;
|
| 45 |
|
|
unsigned int wins;
|
| 46 |
|
|
unsigned int losses;
|
| 47 |
|
|
unsigned int ties;
|
| 48 |
|
|
int in_game;
|
| 49 |
|
|
int in_finals;
|
| 50 |
|
|
} t_tournament_user;
|
| 51 |
|
|
|
| 52 |
|
|
#endif
|
| 53 |
|
|
|
| 54 |
|
|
#ifndef JUST_NEED_TYPES
|
| 55 |
|
|
#ifndef INCLUDED_TOURNAMENT_PROTOS
|
| 56 |
|
|
#define INCLUDED_TOURNAMENT_PROTOS
|
| 57 |
|
|
|
| 58 |
|
|
#define JUST_NEED_TYPES
|
| 59 |
|
|
#include "account.h"
|
| 60 |
|
|
#undef JUST_NEED_TYPES
|
| 61 |
|
|
|
| 62 |
|
|
extern int tournament_signup_user(t_account * account);
|
| 63 |
|
|
extern int tournament_user_signed_up(t_account * account);
|
| 64 |
|
|
extern int tournament_add_stat(t_account * account, int stat);
|
| 65 |
|
|
extern int tournament_get_stat(t_account * account, int stat);
|
| 66 |
|
|
extern int tournament_get_player_score(t_account * account);
|
| 67 |
|
|
extern int tournament_set_in_game_status(t_account * account, int status);
|
| 68 |
|
|
extern int tournament_get_in_finals_status(t_account * account);
|
| 69 |
|
|
extern int tournament_get_game_in_progress(void);
|
| 70 |
|
|
extern int tournament_check_client(t_clienttag clienttag);
|
| 71 |
|
|
|
| 72 |
|
|
extern int tournament_get_totalplayers(void);
|
| 73 |
|
|
extern int tournament_is_arranged(void);
|
| 74 |
|
|
|
| 75 |
|
|
/*****/
|
| 76 |
|
|
extern int tournament_init(char const * filename);
|
| 77 |
|
|
extern int tournament_destroy(void);
|
| 78 |
|
|
extern int tournament_reload(char const * filename);
|
| 79 |
|
|
|
| 80 |
|
|
/*****/
|
| 81 |
|
|
extern unsigned int tournament_get_start_preliminary(void);
|
| 82 |
|
|
extern unsigned int tournament_get_end_signup(void);
|
| 83 |
|
|
extern unsigned int tournament_get_end_preliminary(void);
|
| 84 |
|
|
extern unsigned int tournament_get_start_round_1(void);
|
| 85 |
|
|
extern unsigned int tournament_get_start_round_2(void);
|
| 86 |
|
|
extern unsigned int tournament_get_start_round_3(void);
|
| 87 |
|
|
extern unsigned int tournament_get_start_round_4(void);
|
| 88 |
|
|
extern unsigned int tournament_get_tournament_end(void);
|
| 89 |
|
|
extern unsigned int tournament_get_game_selection(void);
|
| 90 |
|
|
extern unsigned int tournament_get_game_type(void);
|
| 91 |
|
|
extern unsigned int tournament_get_races(void);
|
| 92 |
|
|
extern char * tournament_get_format(void);
|
| 93 |
|
|
extern char * tournament_get_sponsor(void);
|
| 94 |
|
|
extern unsigned int tournament_get_thumbs_down(void);
|
| 95 |
|
|
/*****/
|
| 96 |
|
|
#endif
|
| 97 |
|
|
#endif
|