author | koda |
Tue, 25 Dec 2012 01:13:07 +0100 | |
changeset 8327 | a6f3452f5f94 |
parent 8323 | ab0b618bdf13 |
child 8363 | 0b4ac686fc44 |
child 8605 | 2865389fec96 |
permissions | -rw-r--r-- |
579 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
6952 | 3 |
* Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> |
579 | 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 |
||
7130 | 19 |
#include <QStandardItemModel> |
20 |
||
579 | 21 |
#include "hwconsts.h" |
22 |
||
23 |
QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}"); |
|
24 |
QString * cDataDir = new QString("${HEDGEWARS_DATADIR}"); |
|
8090
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7258
diff
changeset
|
25 |
QString * cVersionString = new QString("${HEDGEWARS_VERSION}"); |
579 | 26 |
|
8323
ab0b618bdf13
get executable directory at runtime rather than configure time
koda
parents:
8090
diff
changeset
|
27 |
QDir * bindir = new QDir(); |
579 | 28 |
QDir * cfgdir = new QDir(); |
29 |
QDir * datadir = new QDir(); |
|
30 |
||
3932 | 31 |
bool custom_config = false; |
32 |
bool custom_data = false; |
|
33 |
||
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:
5049
diff
changeset
|
34 |
int cMaxTeams = 8; |
6737
ce5fbd98370f
- Increase server version number due to rooms list protocol changes
unc0rr
parents:
6579
diff
changeset
|
35 |
int cMinServerVersion = 1; |
3865 | 36 |
|
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:
5049
diff
changeset
|
37 |
QString * cDefaultAmmoStore = new QString( AMMOLINE_DEFAULT_QT AMMOLINE_DEFAULT_PROB |
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:
5049
diff
changeset
|
38 |
AMMOLINE_DEFAULT_DELAY AMMOLINE_DEFAULT_CRATE ); |
2860
13a53315ae18
Awesome patch from TheException - adds editing of weapon delay and crate count. Tiy might want to tweak the crate graphic, could make be smaller or less overlappy.
nemo
parents:
2473
diff
changeset
|
39 |
int cAmmoNumber = cDefaultAmmoStore->size() / 4; |
2369
c3eb11f1ab3a
Implement probability editor for weapon schemes (engine doesn't support that yet)
unc0rr
parents:
2177
diff
changeset
|
40 |
|
1967 | 41 |
QList< QPair<QString, QString> > cDefaultAmmos = |
3971 | 42 |
QList< QPair<QString, QString> >() |
43 |
<< qMakePair(QString("Default"), *cDefaultAmmoStore) |
|
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:
5049
diff
changeset
|
44 |
<< qMakePair(QString("Crazy"), QString( |
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:
5049
diff
changeset
|
45 |
AMMOLINE_CRAZY_QT AMMOLINE_CRAZY_PROB |
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:
5049
diff
changeset
|
46 |
AMMOLINE_CRAZY_DELAY AMMOLINE_CRAZY_CRATE )) |
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:
5049
diff
changeset
|
47 |
<< qMakePair(QString("Pro Mode"), QString( |
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:
5049
diff
changeset
|
48 |
AMMOLINE_PROMODE_QT AMMOLINE_PROMODE_PROB |
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:
5049
diff
changeset
|
49 |
AMMOLINE_PROMODE_DELAY AMMOLINE_PROMODE_CRATE )) |
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:
5049
diff
changeset
|
50 |
<< qMakePair(QString("Shoppa"), QString( |
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:
5049
diff
changeset
|
51 |
AMMOLINE_SHOPPA_QT AMMOLINE_SHOPPA_PROB |
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:
5049
diff
changeset
|
52 |
AMMOLINE_SHOPPA_DELAY AMMOLINE_SHOPPA_CRATE )) |
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:
5049
diff
changeset
|
53 |
<< qMakePair(QString("Clean Slate"), QString( |
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:
5049
diff
changeset
|
54 |
AMMOLINE_CLEAN_QT AMMOLINE_CLEAN_PROB |
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:
5049
diff
changeset
|
55 |
AMMOLINE_CLEAN_DELAY AMMOLINE_CLEAN_CRATE )) |
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:
5049
diff
changeset
|
56 |
<< qMakePair(QString("Minefield"), QString( |
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:
5049
diff
changeset
|
57 |
AMMOLINE_MINES_QT AMMOLINE_MINES_PROB |
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:
5049
diff
changeset
|
58 |
AMMOLINE_MINES_DELAY AMMOLINE_MINES_CRATE )) |
4231 | 59 |
<< qMakePair(QString("Thinking with Portals"), QString( |
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:
5049
diff
changeset
|
60 |
AMMOLINE_PORTALS_QT AMMOLINE_PORTALS_PROB |
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:
5049
diff
changeset
|
61 |
AMMOLINE_PORTALS_DELAY AMMOLINE_PORTALS_CRATE )) |
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:
5049
diff
changeset
|
62 |
; |
616 | 63 |
|
5201 | 64 |
unsigned int colors[] = HW_TEAMCOLOR_ARRAY; |
654 | 65 |
|
66 |
QString * netHost = new QString(); |
|
5201 | 67 |
quint16 netPort = NETGAME_DEFAULT_PORT; |
1415
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1263
diff
changeset
|
68 |
|
6fbfee0e113a
Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents:
1263
diff
changeset
|
69 |
bool haveServer = ${HAVE_NETSERVER}; |
3074 | 70 |
bool isDevBuild = ${HW_DEV}; |
6579 | 71 |
|
72 |
int season = SEASON_NONE; |
|
73 |
int years_since_foundation = 0; |