--- a/QTfrontend/team.h Sun Nov 25 01:13:51 2012 +0400
+++ b/QTfrontend/team.h Sun Nov 25 22:17:11 2012 +0400
@@ -34,14 +34,6 @@
{
};
-// structure for customization and statistics of a single hedgehog
-struct HWHog
-{
- QString Name;
- QString Hat;
- int Rounds, Kills, Deaths, Suicides;
-};
-
// class representing a team
class HWTeam : public QObject
{
@@ -50,9 +42,8 @@
public:
// constructors
- HWTeam(const QString & teamname);
- HWTeam(const QStringList& strLst);
- HWTeam();
+ HWTeam(const QString & teamname = QString(), QObject * parent = 0);
+ HWTeam(const QStringList& strLst, QObject * parent = 0);
HWTeam(const HWTeam & other);
~HWTeam();
@@ -71,7 +62,7 @@
QString flag() const;
QString fort() const;
QString grave() const;
- const HWHog & hedgehog(unsigned int idx) const;
+ //const HWHog & hedgehog(unsigned int idx) const;
bool isNetTeam() const;
QString keyBind(unsigned int idx) const;
QString name() const;
@@ -85,18 +76,19 @@
void setFlag(const QString & flag);
void setFort(const QString & fort);
void setGrave(const QString & grave);
- void setHedgehog(unsigned int idx, HWHog hh);
void setName(const QString & name);
void setNumHedgehogs(unsigned char num);
void setVoicepack(const QString & voicepack);
+ QString hedgehogName(int index) const;
+ QString hedgehogHat(int index) const;
+ void setHedgehogName(int index, const QString & name);
+ void setHedgehogHat(int index, const QString & hat);
+
// increments for statistical info
void incRounds();
void incWins();
- // convert team info into strings for further computation
- QStringList teamGameConfig(quint32 InitHealth) const;
-
// comparison operators
bool operator == (const HWTeam& t1) const;
bool operator < (const HWTeam& t1) const;
@@ -106,32 +98,10 @@
void setColor(int color);
private:
-
- QString OldTeamName;
+ QString m_oldTeamName;
// class members that contain the general team info and settings
- QString m_name;
- QString m_grave;
- QString m_fort;
- QString m_flag;
- QString m_voicepack;
- QList<HWHog> m_hedgehogs;
- quint8 m_difficulty;
- QList<BindAction> m_binds;
-
flib_team * m_team;
-
- // class members that contain info for the current game setup
- quint8 m_numHedgehogs;
- int m_color;
- bool m_isNetTeam;
- QString m_owner;
-
- // class members that contain statistics, etc.
- unsigned int m_campaignProgress;
- unsigned int m_rounds;
- unsigned int m_wins;
- unsigned int AchievementProgress[MAX_ACHIEVEMENTS];
};
#endif