| 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_GAMERESULT_TYPES
|
| 17 |
|
|
#define INCLUDED_ANONGAME_GAMERESULT_TYPES
|
| 18 |
|
|
|
| 19 |
|
|
#ifdef ANONGAME_GAMERESULT_INTERNAL_ACCESS
|
| 20 |
|
|
typedef struct
|
| 21 |
|
|
{
|
| 22 |
|
|
char number;
|
| 23 |
|
|
int result;
|
| 24 |
|
|
int race;
|
| 25 |
|
|
} t_anongame_player;
|
| 26 |
|
|
|
| 27 |
|
|
typedef struct
|
| 28 |
|
|
{
|
| 29 |
|
|
int level;
|
| 30 |
|
|
int race_and_name;
|
| 31 |
|
|
int hero_xp;
|
| 32 |
|
|
} t_anongame_hero;
|
| 33 |
|
|
#endif
|
| 34 |
|
|
|
| 35 |
|
|
typedef struct anongame_gameresult_struct
|
| 36 |
|
|
#ifdef ANONGAME_GAMERESULT_INTERNAL_ACCESS
|
| 37 |
|
|
{
|
| 38 |
|
|
char number_of_results;
|
| 39 |
|
|
t_anongame_player *players;
|
| 40 |
|
|
int unit_score;
|
| 41 |
|
|
int heroes_score;
|
| 42 |
|
|
int resource_score;
|
| 43 |
|
|
int units_produced;
|
| 44 |
|
|
int units_killed;
|
| 45 |
|
|
int buildings_produced;
|
| 46 |
|
|
int buildings_razed;
|
| 47 |
|
|
int largest_army;
|
| 48 |
|
|
int heroes_used_count;
|
| 49 |
|
|
t_anongame_hero *heroes;
|
| 50 |
|
|
int heroes_killed;
|
| 51 |
|
|
int items_obtained;
|
| 52 |
|
|
int mercenaries_hired;
|
| 53 |
|
|
int total_hero_xp;
|
| 54 |
|
|
int gold_mined;
|
| 55 |
|
|
int lumber_harvested;
|
| 56 |
|
|
int resources_traded_given;
|
| 57 |
|
|
int resources_traded_taken;
|
| 58 |
|
|
int tech_percentage;
|
| 59 |
|
|
int gold_lost_to_upkeep;
|
| 60 |
|
|
}
|
| 61 |
|
|
#endif
|
| 62 |
|
|
t_anongame_gameresult;
|
| 63 |
|
|
|
| 64 |
|
|
#endif
|
| 65 |
|
|
|
| 66 |
|
|
#ifndef JUST_NEED_TYPES
|
| 67 |
|
|
#ifndef INCLUDED_ANONGAME_GAMERESULT_PROTOS
|
| 68 |
|
|
#define INCLUDED_ANONGAME_GAMERESULT_PROTOS
|
| 69 |
|
|
|
| 70 |
|
|
extern t_anongame_gameresult * anongame_gameresult_parse(t_packet const * const packet);
|
| 71 |
|
|
extern int gameresult_destroy(t_anongame_gameresult * gameresult);
|
| 72 |
|
|
|
| 73 |
|
|
extern char gameresult_get_number_of_results(t_anongame_gameresult * gameresult);
|
| 74 |
|
|
extern int gameresult_get_player_result(t_anongame_gameresult * gameresult, int player);
|
| 75 |
|
|
extern int gameresult_get_player_number(t_anongame_gameresult * gameresult, int player);
|
| 76 |
|
|
|
| 77 |
|
|
#endif
|
| 78 |
|
|
#endif
|