author | tonghuix |
Fri, 29 Oct 2010 09:55:29 -0400 | |
changeset 4012 | c364d52c2401 |
parent 3758 | 80007c41c35e |
child 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
3236
4ab3917d7d44
Update (c) lines to 2010 as unc0rr requested - they all had varying values so I just took the first year mentioned, then tacked on -2010
nemo
parents:
3159
diff
changeset
|
3 |
* Copyright (c) 2005-2010 Andrey Korotaev <unC0Rr@gmail.com> |
486 | 4 |
* Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com> |
184 | 5 |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
|
7 |
* it under the terms of the GNU General Public License as published by |
|
8 |
* the Free Software Foundation; version 2 of the License |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
18 |
*/ |
|
19 |
||
20 |
#ifndef TEAM_H |
|
21 |
#define TEAM_H |
|
22 |
||
207 | 23 |
#include <QColor> |
184 | 24 |
#include <QString> |
25 |
#include "binds.h" |
|
3344 | 26 |
#include "achievements.h" |
184 | 27 |
|
28 |
class HWForm; |
|
29 |
class GameUIConfig; |
|
30 |
||
314 | 31 |
class HWTeamConstructException |
32 |
{ |
|
33 |
}; |
|
34 |
||
3344 | 35 |
struct HWHog |
36 |
{ |
|
37 |
QString Name; |
|
38 |
QString Hat; |
|
39 |
int Rounds, Kills, Deaths, Suicides; |
|
40 |
}; |
|
41 |
||
184 | 42 |
class HWTeam |
43 |
{ |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
44 |
public: |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
45 |
HWTeam(const QString & teamname); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
46 |
HWTeam(const QStringList& strLst); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
47 |
HWTeam(); |
184 | 48 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
49 |
bool isNetTeam() const; |
352 | 50 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
51 |
QString TeamName; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
52 |
QString Grave; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
53 |
QString Fort; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
54 |
QString Flag; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
55 |
QString Voicepack; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
56 |
QString Owner; |
3381 | 57 |
int Rounds; |
58 |
int Wins; |
|
3758 | 59 |
int CampaignProgress; |
3344 | 60 |
HWHog Hedgehogs[8]; |
61 |
unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
62 |
unsigned int difficulty; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
63 |
BindAction binds[BINDS_NUMBER]; |
341 | 64 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
65 |
unsigned char numHedgehogs; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
66 |
QColor teamColor; |
184 | 67 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
68 |
bool LoadFromFile(); |
3159 | 69 |
bool DeleteFile(); |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
70 |
bool SaveToFile(); |
3381 | 71 |
bool FileExists(); |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
72 |
void SetToPage(HWForm * hwform); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
73 |
void GetFromPage(HWForm * hwform); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
74 |
QStringList TeamGameConfig(quint32 InitHealth) const; |
184 | 75 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
76 |
bool operator==(const HWTeam& t1) const; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
77 |
bool operator<(const HWTeam& t1) const; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
78 |
private: |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
79 |
bool m_isNetTeam; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2747
diff
changeset
|
80 |
QString OldTeamName; |
1840 | 81 |
|
184 | 82 |
}; |
83 |
||
84 |
#endif |