1 /*
2  * Copyright (C) 2003  Aaron
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  */
18 #ifndef INCLUDED_BINARY_LADDER_TYPES
19 #define INCLUDED_BINARY_LADDER_TYPES
20 
21 
22 typedef enum
23 {	WAR3_SOLO, WAR3_TEAM, WAR3_FFA, WAR3_AT,
24 	W3XP_SOLO, W3XP_TEAM, W3XP_FFA, W3XP_AT,
25 	STAR_AR,   STAR_AW,   STAR_AG,	/* AR = active-rating, AW = active-wins, AG = active-games */
26 	STAR_CR,   STAR_CW,   STAR_CG,	/* CR = current-rating, CW = current-wins, CG = current-games */
27 	SEXP_AR,   SEXP_AW,   SEXP_AG,
28 	SEXP_CR,   SEXP_CW,   SEXP_CG,
29 	W2BN_AR,   W2BN_AW,   W2BN_AG,
30 	W2BN_CR,   W2BN_CW,   W2BN_CG,
31 	W2BN_ARI,  W2BN_AWI,  W2BN_AGI, /* I = Ironman */
32 	W2BN_CRI,  W2BN_CWI,  W2BN_CGI
33 
34 } t_binary_ladder_types;
35 
36 typedef enum
37 {	load_success = 0,
38         illegal_checksum,
39 	load_failed
40 } t_binary_ladder_load_result;
41 
42 typedef int (* t_cb_get_from_ladder)(t_binary_ladder_types type, int rank, int *results);
43 typedef int (* t_cb_add_to_ladder)(t_binary_ladder_types, int *values);
44 
45 #ifdef BINARY_LADDER_INTERNAL_ACCESS
46 
47 #define magick 0xdeadbeef
48 
49 #endif
50 
51 #endif
52 
53 /*****/
54 #ifndef JUST_NEED_TYPES
55 #ifndef INCLUDED_BINARY_LADDER_PROTOS
56 #define INCLUDED_BINARY_LADDER_PROTOS
57 
58 // some protos here
59 
60 extern int binary_ladder_save(t_binary_ladder_types type, unsigned int paracount, t_cb_get_from_ladder _cb_get_from_ladder);
61 extern t_binary_ladder_load_result binary_ladder_load(t_binary_ladder_types type, unsigned int paracount, t_cb_add_to_ladder _cb_add_to_ladder);
62 
63 #endif
64 #endif
65