2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
|
|
|
Copyright (C) 2005-2007 Warzone Resurrection Project
|
|
|
|
|
|
|
|
Warzone 2100 is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Warzone 2100 is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
/*
|
|
|
|
* multistat.h
|
2006-09-13 02:09:05 -07:00
|
|
|
*
|
2007-06-28 10:47:08 -07:00
|
|
|
* Alex Lee
|
2006-09-13 02:09:05 -07:00
|
|
|
*
|
2007-06-28 10:47:08 -07:00
|
|
|
* Pumpkin Studios, Eidos PLC, Jan98.
|
|
|
|
* Definitions for multi player statistics and scores for league tables.
|
|
|
|
* Also Definitions for saved Arena Forces to enable teams to be saved to disk
|
|
|
|
*/
|
|
|
|
|
2007-06-26 09:14:09 -07:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32_t played; /// propogated stats.
|
|
|
|
uint32_t wins;
|
|
|
|
uint32_t losses;
|
|
|
|
uint32_t totalKills;
|
|
|
|
uint32_t totalScore;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2007-06-26 09:14:09 -07:00
|
|
|
uint32_t recentKills; // score/kills in last game.
|
|
|
|
uint32_t recentScore;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2007-06-26 09:14:09 -07:00
|
|
|
uint32_t killsToAdd; // things to add next time score is updated.
|
|
|
|
uint32_t scoreToAdd;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2007-06-26 09:14:09 -07:00
|
|
|
} PLAYERSTATS;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
// stat defs
|
2007-06-26 09:14:09 -07:00
|
|
|
extern BOOL saveMultiStats (const char *sFName, const char *sPlayerName, const PLAYERSTATS *playerStats); // to disk
|
|
|
|
extern BOOL loadMultiStats (char *sPlayerName, PLAYERSTATS *playerStats); // form disk
|
2007-06-28 10:47:08 -07:00
|
|
|
extern PLAYERSTATS getMultiStats (UDWORD player,BOOL bLocal); // get from net
|
2006-11-04 15:16:51 -08:00
|
|
|
extern BOOL setMultiStats (SDWORD playerDPID, PLAYERSTATS plStats,BOOL bLocal); // send to net.
|
2006-09-13 02:09:05 -07:00
|
|
|
extern void updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted);
|
|
|
|
extern void updateMultiStatsGames (void);
|
|
|
|
extern void updateMultiStatsWins (void);
|
|
|
|
extern void updateMultiStatsLoses (void);
|
|
|
|
extern void updateMultiStatsKills (BASE_OBJECT *psKilled,UDWORD player);
|