| 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_ANONGAME_INFOS_TYPES
|
| 17 |
|
|
#define INCLUDED_ANONGAME_INFOS_TYPES
|
| 18 |
|
|
|
| 19 |
|
|
#ifdef JUST_NEED_TYPES
|
| 20 |
|
|
#include "common/list.h"
|
| 21 |
|
|
#else
|
| 22 |
|
|
#define JUST_NEED_TYPES
|
| 23 |
|
|
#include "common/list.h"
|
| 24 |
|
|
#undef JUST_NEED_TYPES
|
| 25 |
|
|
#endif
|
| 26 |
|
|
|
| 27 |
|
|
#define anongame_infos_URL_count 14
|
| 28 |
|
|
|
| 29 |
|
|
typedef enum
|
| 30 |
|
|
{
|
| 31 |
|
|
URL_server,
|
| 32 |
|
|
URL_player,
|
| 33 |
|
|
URL_tourney,
|
| 34 |
|
|
URL_clan,
|
| 35 |
|
|
|
| 36 |
|
|
URL_ladder_PG_1v1,
|
| 37 |
|
|
URL_ladder_PG_ffa,
|
| 38 |
|
|
URL_ladder_PG_team,
|
| 39 |
|
|
|
| 40 |
|
|
URL_ladder_AT_2v2,
|
| 41 |
|
|
URL_ladder_AT_3v3,
|
| 42 |
|
|
URL_ladder_AT_4v4,
|
| 43 |
|
|
|
| 44 |
|
|
URL_ladder_clan_1v1,
|
| 45 |
|
|
URL_ladder_clan_2v2,
|
| 46 |
|
|
URL_ladder_clan_3v3,
|
| 47 |
|
|
URL_ladder_clan_4v4
|
| 48 |
|
|
} t_anongame_infos_URLs;
|
| 49 |
|
|
|
| 50 |
|
|
#define anongame_infos_DESC_count 38
|
| 51 |
|
|
|
| 52 |
|
|
typedef enum {
|
| 53 |
|
|
ladder_PG_1v1_desc,
|
| 54 |
|
|
ladder_PG_ffa_desc,
|
| 55 |
|
|
ladder_PG_team_desc,
|
| 56 |
|
|
|
| 57 |
|
|
ladder_AT_2v2_desc,
|
| 58 |
|
|
ladder_AT_3v3_desc,
|
| 59 |
|
|
ladder_AT_4v4_desc,
|
| 60 |
|
|
|
| 61 |
|
|
ladder_clan_1v1_desc,
|
| 62 |
|
|
ladder_clan_2v2_desc,
|
| 63 |
|
|
ladder_clan_3v3_desc,
|
| 64 |
|
|
ladder_clan_4v4_desc,
|
| 65 |
|
|
|
| 66 |
|
|
gametype_1v1_short,
|
| 67 |
|
|
gametype_1v1_long,
|
| 68 |
|
|
gametype_2v2_short,
|
| 69 |
|
|
gametype_2v2_long,
|
| 70 |
|
|
gametype_3v3_short,
|
| 71 |
|
|
gametype_3v3_long,
|
| 72 |
|
|
gametype_4v4_short,
|
| 73 |
|
|
gametype_4v4_long,
|
| 74 |
|
|
gametype_ffa_short,
|
| 75 |
|
|
gametype_ffa_long,
|
| 76 |
|
|
gametype_2v2v2_short,
|
| 77 |
|
|
gametype_2v2v2_long,
|
| 78 |
|
|
|
| 79 |
|
|
gametype_sffa_short,
|
| 80 |
|
|
gametype_sffa_long,
|
| 81 |
|
|
gametype_tffa_short,
|
| 82 |
|
|
gametype_tffa_long,
|
| 83 |
|
|
gametype_3v3v3_short,
|
| 84 |
|
|
gametype_3v3v3_long,
|
| 85 |
|
|
gametype_4v4v4_short,
|
| 86 |
|
|
gametype_4v4v4_long,
|
| 87 |
|
|
gametype_2v2v2v2_short,
|
| 88 |
|
|
gametype_2v2v2v2_long,
|
| 89 |
|
|
gametype_3v3v3v3_short,
|
| 90 |
|
|
gametype_3v3v3v3_long,
|
| 91 |
|
|
gametype_5v5_short,
|
| 92 |
|
|
gametype_5v5_long,
|
| 93 |
|
|
gametype_6v6_short,
|
| 94 |
|
|
gametype_6v6_long
|
| 95 |
|
|
} t_anongame_infos_DESCs;
|
| 96 |
|
|
|
| 97 |
|
|
typedef struct
|
| 98 |
|
|
{
|
| 99 |
|
|
char * langID;
|
| 100 |
|
|
char ** descs;
|
| 101 |
|
|
} t_anongame_infos_DESC;
|
| 102 |
|
|
|
| 103 |
|
|
#define anongame_infos_THUMBSDOWN_count 17
|
| 104 |
|
|
|
| 105 |
|
|
typedef enum {
|
| 106 |
|
|
PG_1v1,
|
| 107 |
|
|
PG_2v2,
|
| 108 |
|
|
PG_3v3,
|
| 109 |
|
|
PG_4v4,
|
| 110 |
|
|
PG_ffa,
|
| 111 |
|
|
AT_2v2,
|
| 112 |
|
|
AT_3v3,
|
| 113 |
|
|
AT_4v4,
|
| 114 |
|
|
PG_2v2v2,
|
| 115 |
|
|
AT_ffa,
|
| 116 |
|
|
PG_5v5,
|
| 117 |
|
|
PG_6v6,
|
| 118 |
|
|
PG_3v3v3,
|
| 119 |
|
|
PG_4v4v4,
|
| 120 |
|
|
PG_2v2v2v2,
|
| 121 |
|
|
PG_3v3v3v3,
|
| 122 |
|
|
AT_2v2v2
|
| 123 |
|
|
} t_anongame_infos_THUMBDOWNs;
|
| 124 |
|
|
|
| 125 |
|
|
#define anongame_infos_ICON_REQ_count 14
|
| 126 |
|
|
|
| 127 |
|
|
typedef enum {
|
| 128 |
|
|
ICON_REQ_WAR3_Level1,
|
| 129 |
|
|
ICON_REQ_WAR3_Level2,
|
| 130 |
|
|
ICON_REQ_WAR3_Level3,
|
| 131 |
|
|
ICON_REQ_WAR3_Level4,
|
| 132 |
|
|
ICON_REQ_W3XP_Level1,
|
| 133 |
|
|
ICON_REQ_W3XP_Level2,
|
| 134 |
|
|
ICON_REQ_W3XP_Level3,
|
| 135 |
|
|
ICON_REQ_W3XP_Level4,
|
| 136 |
|
|
ICON_REQ_W3XP_Level5,
|
| 137 |
|
|
ICON_REQ_TRNY_Level1,
|
| 138 |
|
|
ICON_REQ_TRNY_Level2,
|
| 139 |
|
|
ICON_REQ_TRNY_Level3,
|
| 140 |
|
|
ICON_REQ_TRNY_Level4,
|
| 141 |
|
|
ICON_REQ_TRNY_Level5
|
| 142 |
|
|
} t_anongame_infos_ICON_REQs;
|
| 143 |
|
|
|
| 144 |
|
|
typedef struct {
|
| 145 |
|
|
char * langID;
|
| 146 |
|
|
|
| 147 |
|
|
char * desc_data;
|
| 148 |
|
|
char * ladr_data;
|
| 149 |
|
|
|
| 150 |
|
|
char * desc_comp_data;
|
| 151 |
|
|
char * ladr_comp_data;
|
| 152 |
|
|
|
| 153 |
|
|
int desc_len;
|
| 154 |
|
|
int ladr_len;
|
| 155 |
|
|
|
| 156 |
|
|
int desc_comp_len;
|
| 157 |
|
|
int ladr_comp_len;
|
| 158 |
|
|
} t_anongame_infos_data_lang;
|
| 159 |
|
|
|
| 160 |
|
|
typedef struct {
|
| 161 |
|
|
char * langID;
|
| 162 |
|
|
|
| 163 |
|
|
char * url_comp_data;
|
| 164 |
|
|
char * url_comp_data_115;
|
| 165 |
|
|
char * map_comp_data;
|
| 166 |
|
|
char * type_comp_data;
|
| 167 |
|
|
char * desc_comp_data;
|
| 168 |
|
|
char * ladr_comp_data;
|
| 169 |
|
|
|
| 170 |
|
|
int url_comp_len;
|
| 171 |
|
|
int url_comp_len_115;
|
| 172 |
|
|
int map_comp_len;
|
| 173 |
|
|
int type_comp_len;
|
| 174 |
|
|
int desc_comp_len;
|
| 175 |
|
|
int ladr_comp_len;
|
| 176 |
|
|
} t_anongame_infos_data;
|
| 177 |
|
|
|
| 178 |
|
|
typedef struct {
|
| 179 |
|
|
char ** anongame_infos_URL;
|
| 180 |
|
|
t_anongame_infos_DESC * anongame_infos_DESC; // for default DESC
|
| 181 |
|
|
t_list * anongame_infos_DESC_list; // for localized DESC's
|
| 182 |
|
|
char anongame_infos_THUMBSDOWN[anongame_infos_THUMBSDOWN_count];
|
| 183 |
|
|
int anongame_infos_ICON_REQ[anongame_infos_ICON_REQ_count];
|
| 184 |
|
|
t_anongame_infos_data * anongame_infos_data_war3;
|
| 185 |
|
|
t_anongame_infos_data * anongame_infos_data_w3xp;
|
| 186 |
|
|
t_list * anongame_infos_data_lang_war3;
|
| 187 |
|
|
t_list * anongame_infos_data_lang_w3xp;
|
| 188 |
|
|
} t_anongame_infos;
|
| 189 |
|
|
|
| 190 |
|
|
#endif
|
| 191 |
|
|
|
| 192 |
|
|
#ifndef JUST_NEED_TYPES
|
| 193 |
|
|
#ifndef INCLUDED_ANONGAME_INFOS_PROTOS
|
| 194 |
|
|
#define INCLUDED_ANONGAME_INFOS_PROTOS
|
| 195 |
|
|
|
| 196 |
|
|
#define JUST_NEED_TYPES
|
| 197 |
|
|
#include "common/tag.h"
|
| 198 |
|
|
#undef JUST_NEED_TYPES
|
| 199 |
|
|
|
| 200 |
|
|
extern int anongame_infos_load(char const * filename);
|
| 201 |
|
|
extern int anongame_infos_unload(void);
|
| 202 |
|
|
|
| 203 |
|
|
extern char anongame_infos_get_thumbsdown(int queue);
|
| 204 |
|
|
|
| 205 |
|
|
extern short anongame_infos_get_ICON_REQ_WAR3(int Level);
|
| 206 |
|
|
extern short anongame_infos_get_ICON_REQ_W3XP(int Level);
|
| 207 |
|
|
extern short anongame_infos_get_ICON_REQ_TOURNEY(int Level);
|
| 208 |
|
|
|
| 209 |
|
|
extern char * anongame_infos_data_get_url(t_clienttag clienttag, int versionid, int * len);
|
| 210 |
|
|
extern char * anongame_infos_data_get_map(t_clienttag clienttag, int versionid, int * len);
|
| 211 |
|
|
extern char * anongame_infos_data_get_type(t_clienttag clienttag, int versionid, int * len);
|
| 212 |
|
|
extern char * anongame_infos_data_get_desc(char const * langID, t_clienttag clienttag, int versionid, int * len);
|
| 213 |
|
|
extern char * anongame_infos_data_get_ladr(char const * langID, t_clienttag clienttag, int versionid, int * len);
|
| 214 |
|
|
|
| 215 |
|
|
#endif
|
| 216 |
|
|
#endif
|