author | koda |
Thu, 28 Feb 2013 22:47:42 +0100 | |
changeset 8608 | 50cc0131b109 |
parent 8607 | 59a6df839710 |
child 8613 | 82c649dfc7c3 |
permissions | -rw-r--r-- |
583 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
6952 | 3 |
* Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> |
583 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*/ |
|
18 |
||
5200
7440fe992e73
* move ammo lines from .cpp.in to .h so that it is readable from the ios frontend (and who knows, maybe from other frontends as well)
koda
parents:
4976
diff
changeset
|
19 |
#if !defined(TARGET_OS_IPHONE) |
583 | 20 |
#include <QString> |
21 |
#include <QDir> |
|
22 |
#include <QStringList> |
|
1967 | 23 |
#include <QPair> |
583 | 24 |
|
5289
9d18b61bd3eb
- Implement ThemesModel (load theme icons once, store in memory, don't reload from disk every time selection changes)
unc0rr
parents:
5201
diff
changeset
|
25 |
|
583 | 26 |
extern QString * cProtoVer; |
907 | 27 |
extern QString * cVersionString; |
583 | 28 |
extern QString * cDataDir; |
29 |
||
30 |
extern QDir * bindir; |
|
31 |
extern QDir * cfgdir; |
|
32 |
extern QDir * datadir; |
|
33 |
||
3932 | 34 |
extern bool custom_config; |
35 |
extern bool custom_data; |
|
36 |
||
3865 | 37 |
extern int cMaxTeams; |
4973
53411a26df7e
Add server version (which is separate from protocol version) and a check in frontend for a new enough server (currently only qWarning)
unc0rr
parents:
4513
diff
changeset
|
38 |
extern int cMinServerVersion; |
3865 | 39 |
|
7130 | 40 |
class QStandardItemModel; |
5289
9d18b61bd3eb
- Implement ThemesModel (load theme icons once, store in memory, don't reload from disk every time selection changes)
unc0rr
parents:
5201
diff
changeset
|
41 |
|
607 | 42 |
extern QString * cDefaultAmmoStore; |
2369
c3eb11f1ab3a
Implement probability editor for weapon schemes (engine doesn't support that yet)
unc0rr
parents:
1967
diff
changeset
|
43 |
extern int cAmmoNumber; |
1967 | 44 |
extern QList< QPair<QString, QString> > cDefaultAmmos; |
616 | 45 |
|
7258 | 46 |
extern unsigned int colors[]; |
654 | 47 |
|
48 |
extern QString * netHost; |
|
49 |
extern quint16 netPort; |
|
1415
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1210
diff
changeset
|
50 |
|
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1210
diff
changeset
|
51 |
extern bool haveServer; |
3074 | 52 |
extern bool isDevBuild; |
6579 | 53 |
|
54 |
//Current season, SEASON_NONE by default |
|
55 |
extern int season; |
|
56 |
//On the day of hedgewars birthday (Oct 31st) this variable is assigned |
|
57 |
//with number of years past 2004 (foundation of hedgewars) |
|
58 |
//Could be used to implement a text/graphic like "This is the xxth birthday of hedgewars" or similar |
|
59 |
extern int years_since_foundation; |
|
60 |
||
5200
7440fe992e73
* move ammo lines from .cpp.in to .h so that it is readable from the ios frontend (and who knows, maybe from other frontends as well)
koda
parents:
4976
diff
changeset
|
61 |
#endif |
7440fe992e73
* move ammo lines from .cpp.in to .h so that it is readable from the ios frontend (and who knows, maybe from other frontends as well)
koda
parents:
4976
diff
changeset
|
62 |
|
6015
daffc14a518a
cleaning up a little bit more, especially team class. we were leaking teams into heap memory on quick game starts btw
sheepluva
parents:
5771
diff
changeset
|
63 |
|
6579 | 64 |
//Different seasons; assigned to season (int) |
65 |
#define SEASON_NONE 0 |
|
66 |
#define SEASON_CHRISTMAS 2 |
|
67 |
#define SEASON_HWBDAY 4 |
|
68 |
#define SEASON_EASTER 8 |
|
5201 | 69 |
|
70 |
#define NETGAME_DEFAULT_PORT 46631 |
|
8607
59a6df839710
add icegun everywhere (default, crazy, 1oe) with a qt prob delay crate of 2
koda
parents:
8605
diff
changeset
|
71 |
#define HEDGEHOGS_PER_TEAM 8 |
5201 | 72 |
|
73 |
||
74 |
// see http://en.wikipedia.org/wiki/List_of_colors |
|
5443
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
75 |
/*define HW_TEAMCOLOR_ARRAY {0xff007fff, /. azure ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
76 |
0xffdd0000, /. classic red ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
77 |
0xff3e9321, /. classic green ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
78 |
0xffa23dbb, /. classic purple ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
79 |
0xffffb347, /. pastel orange ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
80 |
0xffcfcfc4, /. pastel gray ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
81 |
0xffbff000, /. lime ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
82 |
0xffffef00, /. yellow ./ \ |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6579
diff
changeset
|
83 |
// add new colors here |
5443
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
84 |
0 }*/ |
6309
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
85 |
/* |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
86 |
#define HW_TEAMCOLOR_ARRAY { 0xffd12b42, /. red ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
87 |
0xff4980c1, /. blue ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
88 |
0xff6ab530, /. green ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
89 |
0xffbc64c4, /. purple ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
90 |
0xffe76d14, /. orange ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
91 |
0xff3fb6e6, /. cyan ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
92 |
0xffe3e90c, /. yellow ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
93 |
0xff61d4ac, /. mint ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
94 |
0xfff1c3e1, /. pink ./ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
95 |
// add new colors here |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
96 |
0 }*/ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
97 |
/* another set. this one is a merge of mikade/bugq colours w/ a bit of channel feedback */ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
98 |
#define HW_TEAMCOLOR_ARRAY { 0xffff0204, /* red */ \ |
5443
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
99 |
0xff4980c1, /* blue */ \ |
6309
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
100 |
0xff1de6ba, /* teal */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
101 |
0xffb541ef, /* purple */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
102 |
0xffe55bb0, /* pink */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
103 |
0xff20bf00, /* green */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
104 |
0xfffe8b0e, /* orange */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
105 |
0xff5f3605, /* brown */ \ |
82e846e5d502
Another set of colours. These are an attempt to fuse ideas from mikade and bugq, based on channel feedback/voting.
nemo
parents:
6015
diff
changeset
|
106 |
0xffffff01, /* yellow */ \ |
5201 | 107 |
/* add new colors here */ \ |
108 |
0 } |