QTfrontend/hwconsts.cpp.in
author unc0rr
Sun, 13 Mar 2011 15:09:04 +0300
changeset 5003 db4726bf9205
parent 4976 088d40d8aba2
child 5024 1e332947147c
permissions -rw-r--r--
Implement Store truncating, so the memory even gets freed sometimes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 1021
diff changeset
     2
 * Hedgewars, a free turn based strategy game
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 4973
diff changeset
     3
 * Copyright (c) 2007-2011 Andrey Korotaev <unC0Rr@gmail.com>
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     4
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     8
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    12
 * GNU General Public License for more details.
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    13
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    17
 */
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    18
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    19
#include "hwconsts.h"
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    20
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    21
QString * cProtoVer = new QString("${HEDGEWARS_PROTO_VER}");
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    22
QString * cDataDir = new QString("${HEDGEWARS_DATADIR}");
2428
6800f8aa0184 Huge Smaxx patch with some fixes by me:
unc0rr
parents: 2370
diff changeset
    23
QString * cConfigDir = new QString("");
4903
21dd1def5aaf if source has uncommitted changes:
sheepluva
parents: 4883
diff changeset
    24
QString * cVersionString = new QString("${HEDGEWARS_VERSION}${HGCHANGED}");
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    25
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    26
QDir * bindir = new QDir("${HEDGEWARS_BINDIR}");
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    27
QDir * cfgdir = new QDir();
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    28
QDir * datadir = new QDir();
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    29
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    30
QStringList * Themes;
1210
bfed1b89bc85 Add themes list to map selection widget
unc0rr
parents: 1088
diff changeset
    31
QStringList * mapList;
4513
1dd97c710f5a added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents: 4337
diff changeset
    32
QStringList * scriptList;
607
26a91a9f5514 Now trainings can have custom ammostore
unc0rr
parents: 579
diff changeset
    33
3932
2fc211f60015 Engine:
smaxx
parents: 3876
diff changeset
    34
bool custom_config = false;
2fc211f60015 Engine:
smaxx
parents: 3876
diff changeset
    35
bool custom_data = false;
2fc211f60015 Engine:
smaxx
parents: 3876
diff changeset
    36
3865
0b1c426b035f Frontend:
smaxx
parents: 3836
diff changeset
    37
int cMaxTeams = 6;
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: 4903
diff changeset
    38
int cMinServerVersion = 0;
3865
0b1c426b035f Frontend:
smaxx
parents: 3836
diff changeset
    39
2369
c3eb11f1ab3a Implement probability editor for weapon schemes (engine doesn't support that yet)
unc0rr
parents: 2177
diff changeset
    40
QString * cDefaultAmmoStore = new QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    41
        "93919294221991210322351110012010000002111101010111299"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    42
        "04050405416006555465544647765766666661555101011154111"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    43
        "00000000000002055000000400070040000000002000000006000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    44
        "13111103121111111231141111111111111112111111011111211"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    45
        );
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
    46
int cAmmoNumber = cDefaultAmmoStore->size() / 4;
2369
c3eb11f1ab3a Implement probability editor for weapon schemes (engine doesn't support that yet)
unc0rr
parents: 2177
diff changeset
    47
1967
213d368a002f Predefine some ammo schemes
unc0rr
parents: 1966
diff changeset
    48
QList< QPair<QString, QString> > cDefaultAmmos =
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    49
        QList< QPair<QString, QString> >()
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    50
        << qMakePair(QString("Default"), *cDefaultAmmoStore)
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    51
        << qMakePair(QString("Crazy"),     QString(
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    52
        // TODO: Remove Piano's unlimited uses!
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    53
        "99999999999999999929999999999999992999999999099999922"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    54
        "11111101111111111111111111111111111111111111011111111"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    55
        "00000000000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    56
        "13111103121111111231141111111111111112111101011111111"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    57
        ))
4237
ef9b201c97fe by default selecting a game mode will select a weapon with the same name, and viceversa; toggable for every game
koda
parents: 4231
diff changeset
    58
        << qMakePair(QString("Pro Mode"),  QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    59
        "90900090000000000000090000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    60
        "00000000000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    61
        "00000000000002055000000400070040000000002000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    62
        "11111111111111111111111111111111111111111001011111111"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    63
        ))
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    64
        << qMakePair(QString("Shoppa"),    QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    65
        "00000099000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    66
        "44444100442444022101121212224220000000020004000100111"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    67
        "00000000000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    68
        "11111111111111111111111111111111111111111011011111111"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    69
        ))
4130
f437909ac9d4 Replace the deprecated Basketball mode with Clean Slate mode which uses a few of the new scheme options
nemo
parents: 3971
diff changeset
    70
        << qMakePair(QString("Clean Slate"),QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    71
        "10100090000100000110000000000000000000000000000010000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    72
        "04050405416006555465544647765766666661555101011154111"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    73
        "00000000000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    74
        "13111103121111111231141111111111111112111111011111111"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    75
        ))
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    76
        << qMakePair(QString("Minefield"), QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    77
        "00000099000900000003000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    78
        "00000000000000000000000000000000000000000000000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    79
        "00000000000002055000000400070040000000002000000006000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    80
        "11111111111111111111111111111111111111111111011111111"
4231
f2eb9ac629e4 added two games modes and one weaponset
koda
parents: 4212
diff changeset
    81
        ))
f2eb9ac629e4 added two games modes and one weaponset
koda
parents: 4212
diff changeset
    82
        << qMakePair(QString("Thinking with Portals"), QString(
4883
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    83
        "90000090020000000021000000000000001100000900000000000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    84
        "04050405416006555465544647765766666661555101011154111"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    85
        "00000000000002055000000400070040000000002000000006000"
7cddc9201a1d added dummy for tardis and ugly icons for tardis and structure
Henek
parents: 4881
diff changeset
    86
        "13111103121111111231141111111111111112111111011111111"
3971
5c82ee165ed5 minor stuff
koda
parents: 3963
diff changeset
    87
        ));
616
00928b3cf505 Use same team colors everywhere
unc0rr
parents: 608
diff changeset
    88
3876
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    89
QColor *colors[] = {
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    90
                    new QColor(221,   0,   0), // classic red
4212
9cf7f962cc97 Darken blue, brighten cyan to make more distinguishable, replace gold with peach. Should hopefully resolve objections about colour distinguishability
nemo
parents: 4206
diff changeset
    91
                    new QColor( 51, 102, 217), // dark blue
3876
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    92
                    new QColor( 62, 147,  33), // classic green
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    93
                    new QColor(162,  61, 187), // classic purple
4317
ba5d5a2f4c4b merge 0.9.14 back into trunk
nemo
parents: 4246 4294
diff changeset
    94
                    new QColor(255, 255,  0), // yellow
3876
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    95
                    new QColor(115, 115, 115), // classic gray
4212
9cf7f962cc97 Darken blue, brighten cyan to make more distinguishable, replace gold with peach. Should hopefully resolve objections about colour distinguishability
nemo
parents: 4206
diff changeset
    96
                    new QColor(0, 255, 255),   // cyan
9cf7f962cc97 Darken blue, brighten cyan to make more distinguishable, replace gold with peach. Should hopefully resolve objections about colour distinguishability
nemo
parents: 4206
diff changeset
    97
                    new QColor(255, 136, 136), // peach
3876
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    98
                    // add new colors here
3dd031a8b395 Frontend:
smaxx
parents: 3865
diff changeset
    99
                    0};
654
1019b8fa8638 Finish asking host/port dialog implementation
unc0rr
parents: 616
diff changeset
   100
1019b8fa8638 Finish asking host/port dialog implementation
unc0rr
parents: 616
diff changeset
   101
QString * netHost = new QString();
1019b8fa8638 Finish asking host/port dialog implementation
unc0rr
parents: 616
diff changeset
   102
quint16 netPort = 46631;
1415
6fbfee0e113a Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents: 1263
diff changeset
   103
6fbfee0e113a Allow build without net game server: introduce -DWITH_SERVER configuration parameter
unc0rr
parents: 1263
diff changeset
   104
bool haveServer = ${HAVE_NETSERVER};
3074
271cfcb2bcda Frontend:
smxx
parents: 3070
diff changeset
   105
bool isDevBuild = ${HW_DEV};