author | Stepan777 <stepik-777@mail.ru> |
Fri, 08 Jun 2012 02:52:35 +0400 | |
changeset 7198 | 5debd5fe526e |
parent 7130 | fcab1fd02bc6 |
child 7258 | 722e8a0d89dc |
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; |
2428 | 29 |
extern QString * cConfigDir; |
583 | 30 |
|
31 |
extern QDir * bindir; |
|
32 |
extern QDir * cfgdir; |
|
33 |
extern QDir * datadir; |
|
34 |
||
3932 | 35 |
extern bool custom_config; |
36 |
extern bool custom_data; |
|
37 |
||
3865 | 38 |
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
|
39 |
extern int cMinServerVersion; |
3865 | 40 |
|
7130 | 41 |
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
|
42 |
|
607 | 43 |
extern QString * cDefaultAmmoStore; |
2369
c3eb11f1ab3a
Implement probability editor for weapon schemes (engine doesn't support that yet)
unc0rr
parents:
1967
diff
changeset
|
44 |
extern int cAmmoNumber; |
1967 | 45 |
extern QList< QPair<QString, QString> > cDefaultAmmos; |
616 | 46 |
|
7130 | 47 |
//extern unsigned int colors[]; |
48 |
extern QStandardItemModel * colorsModel; |
|
654 | 49 |
|
50 |
extern QString * netHost; |
|
51 |
extern quint16 netPort; |
|
1415
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1210
diff
changeset
|
52 |
|
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1210
diff
changeset
|
53 |
extern bool haveServer; |
3074 | 54 |
extern bool isDevBuild; |
6579 | 55 |
|
56 |
//Current season, SEASON_NONE by default |
|
57 |
extern int season; |
|
58 |
//On the day of hedgewars birthday (Oct 31st) this variable is assigned |
|
59 |
//with number of years past 2004 (foundation of hedgewars) |
|
60 |
//Could be used to implement a text/graphic like "This is the xxth birthday of hedgewars" or similar |
|
61 |
extern int years_since_foundation; |
|
62 |
||
7130 | 63 |
void hwConstsInit(); |
64 |
||
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
|
65 |
#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
|
66 |
|
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
|
67 |
#define HEDGEHOGS_PER_TEAM 8 |
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
|
68 |
|
7007 | 69 |
#define AMMOLINE_DEFAULT_QT "9391929422199121032235111001201000000211110101011111011" |
70 |
#define AMMOLINE_DEFAULT_PROB "0405040541600655546554464776576666666155510101115411011" |
|
71 |
#define AMMOLINE_DEFAULT_DELAY "0000000000000205500000040007004000000000220000000600000" |
|
72 |
#define AMMOLINE_DEFAULT_CRATE "1311110312111111123114111111111111111211111101111111010" |
|
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
|
73 |
|
7007 | 74 |
#define AMMOLINE_CRAZY_QT "9999999999999999992999999999999999299999999909999992099" |
75 |
#define AMMOLINE_CRAZY_PROB "1111110111111111111111111111111111111111111101111111011" |
|
76 |
#define AMMOLINE_CRAZY_DELAY "0000000000000000000000000000000000000000000000000000000" |
|
77 |
#define AMMOLINE_CRAZY_CRATE "1311110312111111123114111111111111111211110101111111011" |
|
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
|
78 |
|
7007 | 79 |
#define AMMOLINE_PROMODE_QT "9090009000000000000009000000000000000000000000000000000" |
80 |
#define AMMOLINE_PROMODE_PROB "0000000000000000000000000000000000000000000000000000000" |
|
81 |
#define AMMOLINE_PROMODE_DELAY "0000000000000205500000040007004000000000200000000000000" |
|
82 |
#define AMMOLINE_PROMODE_CRATE "1111111111111111111111111111111111111111100101111111011" |
|
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
|
83 |
|
7007 | 84 |
#define AMMOLINE_SHOPPA_QT "0000009900000000000000000000000000000000000000000000000" |
85 |
#define AMMOLINE_SHOPPA_PROB "4444410044244402210112121222422000000002000400010011000" |
|
86 |
#define AMMOLINE_SHOPPA_DELAY "0000000000000000000000000000000000000000000000000000000" |
|
87 |
#define AMMOLINE_SHOPPA_CRATE "1111111111111111111111111111111111111111101101111111001" |
|
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
|
88 |
|
7007 | 89 |
#define AMMOLINE_CLEAN_QT "1010009000010000011000000000000000000000000000001000000" |
90 |
#define AMMOLINE_CLEAN_PROB "0405040541600655546554464776576666666155510101115411011" |
|
91 |
#define AMMOLINE_CLEAN_DELAY "0000000000000000000000000000000000000000000000000000000" |
|
92 |
#define AMMOLINE_CLEAN_CRATE "1311110312111111123114111111111111111211111101111111011" |
|
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
|
93 |
|
7007 | 94 |
#define AMMOLINE_MINES_QT "0000009900090000000300000000000000000000000000000000000" |
95 |
#define AMMOLINE_MINES_PROB "0000000000000000000000000000000000000000000000000000000" |
|
96 |
#define AMMOLINE_MINES_DELAY "0000000000000205500000040007004000000000200000000600000" |
|
97 |
#define AMMOLINE_MINES_CRATE "1111111111111111111111111111111111111111111101111111011" |
|
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
|
98 |
|
7007 | 99 |
#define AMMOLINE_PORTALS_QT "9000009002000000002100000000000000110000090000000000000" |
100 |
#define AMMOLINE_PORTALS_PROB "0405040541600655546554464776576666666155510101115411011" |
|
101 |
#define AMMOLINE_PORTALS_DELAY "0000000000000205500000040007004000000000200000000600000" |
|
102 |
#define AMMOLINE_PORTALS_CRATE "1311110312111111123114111111111111111211111101111111011" |
|
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
|
103 |
|
6579 | 104 |
//Different seasons; assigned to season (int) |
105 |
#define SEASON_NONE 0 |
|
106 |
#define SEASON_CHRISTMAS 2 |
|
107 |
#define SEASON_HWBDAY 4 |
|
108 |
#define SEASON_EASTER 8 |
|
5201 | 109 |
|
110 |
#define NETGAME_DEFAULT_PORT 46631 |
|
111 |
||
112 |
||
113 |
// 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
|
114 |
/*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
|
115 |
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
|
116 |
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
|
117 |
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
|
118 |
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
|
119 |
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
|
120 |
0xffbff000, /. lime ./ \ |
83cb9dd54469
set of 9 colours proposed by bugq - attempting to avoid colours that are hard to distinguish
nemo
parents:
5289
diff
changeset
|
121 |
0xffffef00, /. yellow ./ \ |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6579
diff
changeset
|
122 |
// 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
|
123 |
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
|
124 |
/* |
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
|
125 |
#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
|
126 |
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
|
127 |
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
|
128 |
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
|
129 |
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
|
130 |
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
|
131 |
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
|
132 |
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
|
133 |
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
|
134 |
// 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
|
135 |
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
|
136 |
/* 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
|
137 |
#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
|
138 |
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
|
139 |
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
|
140 |
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
|
141 |
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
|
142 |
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
|
143 |
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
|
144 |
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
|
145 |
0xffffff01, /* yellow */ \ |
5201 | 146 |
/* add new colors here */ \ |
147 |
0 } |