hedgewars/uConsts.pas
author unc0rr
Tue, 04 Jan 2011 22:33:20 +0300
changeset 4815 f2a3e1a51f4d
parent 4809 9c7d5f802618
child 4812 f924be23ffb4
child 4828 4ed71ae56b05
permissions -rw-r--r--
Clearly state which port is IPC connection on
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
     1
(*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 1047
diff changeset
     2
 * Hedgewars, a free turn based strategy game
883
07a568ba44e0 Update copyright info in source files headers
unc0rr
parents: 876
diff changeset
     3
 * Copyright (c) 2004-2008 Andrey Korotaev <unC0Rr@gmail.com>
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
     4
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
     8
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    12
 * GNU General Public License for more details.
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    13
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    14
 * You should have received a copy of the GNU General Public License
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    15
 * along with this program; if not, write to the Free Software
57c2ef19f719 Relicense to GPL
unc0rr
parents: 176
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    17
 *)
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    18
2599
c7153d2348f3 move compiler directives to standard pascal
koda
parents: 2588
diff changeset
    19
{$INCLUDE "options.inc"}
2587
0dfa56a8513c fix a segfault in the iphone simulator by moving options.inc at the beginning of the file
koda
parents: 2586
diff changeset
    20
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    21
unit uConsts;
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    22
interface
1906
644f93d8f148 Apply koda's OpenGL ES compatibility patch
unc0rr
parents: 1904
diff changeset
    23
4361
64ea345ab655 Move variables from uConsts to uVariables
unc0rr
parents: 4357
diff changeset
    24
uses    SDLh, uFloat, GLunit;
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    25
1906
644f93d8f148 Apply koda's OpenGL ES compatibility patch
unc0rr
parents: 1904
diff changeset
    26
2924
908851e59958 Engine:
smxx
parents: 2921
diff changeset
    27
{$INCLUDE "config.inc"}
2671
7e0f88013fe8 smaller patches, one missing Sky-lowres, IMG_Init and Mix_Init (might require newer libraries), updates to SDL bindings, code cleanup, new compile flags
koda
parents: 2653
diff changeset
    28
2697
75880595a9f1 code cleanup and opengles optimizations
koda
parents: 2677
diff changeset
    29
// typed const is a variable despite const qualifier
75880595a9f1 code cleanup and opengles optimizations
koda
parents: 2677
diff changeset
    30
// in freepascal you may actually use var for the same purpose
75880595a9f1 code cleanup and opengles optimizations
koda
parents: 2677
diff changeset
    31
3709
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    32
const
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    33
    sfMax = 1000;
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    34
    cDefaultParamNum = 16;
3107
1fa539758c10 Engine:
smxx
parents: 3102
diff changeset
    35
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    36
    // message constants
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    37
    errmsgCreateSurface   = 'Error creating SDL surface';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    38
    errmsgTransparentSet  = 'Error setting transparent color';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    39
    errmsgUnknownCommand  = 'Unknown command';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    40
    errmsgUnknownVariable = 'Unknown variable';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    41
    errmsgIncorrectUse    = 'Incorrect use';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    42
    errmsgShouldntRun     = 'This program shouldn''t be run manually';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    43
    errmsgWrongNumber     = 'Wrong parameters number';
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    44
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    45
    msgLoading           = 'Loading ';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    46
    msgOK                = 'ok';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    47
    msgFailed            = 'failed';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    48
    msgFailedSize        = 'failed due to size';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    49
    msgGettingConfig     = 'Getting game config...';
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    50
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    51
    // color constants
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    52
    cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; unused:$FF);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    53
    cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; unused:$FF);
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    54
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    55
    cWhiteColor           : Longword = $FFFFFFFF;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    56
    cYellowColor          : Longword = $FFFFFF00;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    57
    cNearBlackColor       : Longword = $FF000010;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    58
    cExplosionBorderColor : LongWord = $FF808080;
2376
ece7b87f1334 Strip trailing spaces
nemo
parents: 2362
diff changeset
    59
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    60
{$WARNINGS OFF}
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    61
    cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    62
    cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    63
{$WARNINGS ON}
621
8bdbc240f50f New game flag for non-destroyable land
unc0rr
parents: 615
diff changeset
    64
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    65
    // reducedquality flags
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    66
    rqNone        = $00000000;  // don't reduce quality
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    67
    rqLowRes      = $00000001;  // use half land array
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    68
    rqBlurryLand  = $00000002;  // downscaled terrain
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    69
    rqNoBackground= $00000004;  // don't draw background
3862
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    70
    rqSimpleRope  = $00000008;  // draw rope using lines only
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    71
    rq2DWater     = $00000010;  // disable 3D water effect
4809
9c7d5f802618 rearrange quality flags a little, disable snow rendering on rqLowRes
koda
parents: 4808
diff changeset
    72
    rqAntiBoom    = $00000020;  // no fancy explosion effects
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    73
    rqKillFlakes  = $00000040;  // no flakes
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    74
    rqSlowMenu    = $00000080;  // ammomenu appears with no animation
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    75
    rqPlainSplash = $00000100;  // no droplets
3611
ed00aa2b339e interpret parameters before initializing everything
koda
parents: 3594
diff changeset
    76
    rqClampLess   = $00000200;  // don't clamp textures
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    77
    rqTooltipsOff = $00000400;  // tooltips are not drawn
3670
4c673e57f0d7 use llvm to compile, don't preview map on wimpier devices, merge vsync, fix iphone launch image
koda
parents: 3668
diff changeset
    78
    rqDesyncVBlank= $00000800;  // don't sync on vblank
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    79
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    80
    // image flags (for LoadImage())
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    81
    ifNone        = $00000000;  // nothing special
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    82
    ifAlpha       = $00000001;  // use alpha channel (unused right now?)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    83
    ifCritical    = $00000002;  // image is critical for gameplay (exit game if unable to load)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    84
    ifTransparent = $00000004;  // image uses transparent pixels (color keying)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    85
    ifIgnoreCaps  = $00000008;  // ignore hardware capabilities when loading (i.e. image will not be drawn using OpenGL)
74
42257fee61ae - Unicode support for team and hedgehogs names
unc0rr
parents: 72
diff changeset
    86
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
    87
    // texture priority (allows OpenGL to keep frequently used textures in video memory more easily)
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    88
    tpLowest      = 0.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
    89
    tpLow         = 0.25;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
    90
    tpMedium      = 0.50;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
    91
    tpHigh        = 0.75;
3594
aeca3d8f1b29 turn cReducedQuality into a LongInt and provide a series of quality flags (and best of all, this is still compatible with current frontend)
koda
parents: 3569
diff changeset
    92
    tpHighest     = 1.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
    93
3509
d72c2219595d Make land types flagged (to allow stacking future attributes such as indestructible ice, but also for a damaged flag)
nemo
parents: 3493
diff changeset
    94
// To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
3524
8d0783d2a0ff This reduces CheckLand ~5.5% on average over prior making the overall reduction ~77.4% instead of ~81.9%. It does skip centre pixel in odd w/h, but that really shouldn't matter much in this case. Can alter if any objects are noticeably off.
nemo
parents: 3519
diff changeset
    95
// TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
3519
56cbc035b74b rename flags
nemo
parents: 3509
diff changeset
    96
    lfBasic          = $8000;  // white
56cbc035b74b rename flags
nemo
parents: 3509
diff changeset
    97
    lfIndestructible = $4000;  // red
56cbc035b74b rename flags
nemo
parents: 3509
diff changeset
    98
    lfObject         = $2000;  // no idea
56cbc035b74b rename flags
nemo
parents: 3509
diff changeset
    99
    lfDamaged        = $1000;  // no idea
64
9df467527ae5 - Start AI rewrite
unc0rr
parents: 56
diff changeset
   100
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   101
    cMaxPower     = 1500;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   102
    cMaxAngle     = 2048;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   103
    cPowerDivisor = 1500;
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
   104
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   105
    MAXNAMELEN = 192;
4396
3cfd2e15464a After repeated requests, variable length rope. Intended for the infinite rope folks, but values less than 100 make rope more interesting IMO.
nemo
parents: 4385
diff changeset
   106
    MAXROPEPOINTS = 3840;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   107
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   108
    // some opengl headers do not have these macros
3493
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   109
    GL_BGR              = $80E0;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   110
    GL_BGRA             = $80E1;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   111
    GL_CLAMP_TO_EDGE    = $812F;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   112
    GL_TEXTURE_PRIORITY = $8066;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   113
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   114
    cSendCursorPosTime  : LongWord = 50;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   115
    cVisibleWater       : LongInt = 128;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   116
    cCursorEdgesDist    : LongInt = 100;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   117
    cTeamHealthWidth    : LongInt = 128;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   118
    cWaterOpacity       : byte = $80;
4792
68f9b331014a sudden death changes: only change visual bit on health decrease and support for water transparancy change and clouds number change
Henek
parents: 4776
diff changeset
   119
    cSDWaterOpacity     : byte = $80;
2163
12730f5e79b9 koda's patch fixing some iphone port troubles (color, mouse)
unc0rr
parents: 2153
diff changeset
   120
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   121
    cifRandomize = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   122
    cifTheme     = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   123
    cifMap       = $00000002; // either theme or map (or map+theme)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   124
    cifAllInited = cifRandomize or cifTheme or cifMap;
55
e09f7c952a40 Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents: 53
diff changeset
   125
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   126
    cTransparentColor: Longword = $00000000;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   127
4406
beb4de0af990 Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents: 4396
diff changeset
   128
    cMaxTeams        = 8;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   129
    cMaxHHIndex      = 7;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   130
    cMaxHHs          = 48;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   131
    cMaxSpawnPoints  = 1024;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   132
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   133
    cMaxEdgePoints = 16384;
22
517be8dc5b76 - Fixed spawning boxes under water
unc0rr
parents: 17
diff changeset
   134
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   135
    cHHRadius = 9;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   136
    cHHStepTicks = 29;
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   137
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   138
    cUsualZ = 500;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   139
    cSmokeZ = 499;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   140
    cHHZ = 1000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   141
    cCurrHHZ = Succ(cHHZ);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   142
    cOnHHZ = 2000;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   143
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   144
    cBarrelHealth = 60;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   145
    cShotgunRadius = 22;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   146
    cBlowTorchC    = 6;
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   147
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   148
    cKeyMaxIndex = 1023;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   149
3737
2ba6ac8a114b reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents: 3734
diff changeset
   150
    // do not change this value
3668
3f7a95234d8a tap to play piano notes, fix for audio and pause glitch
koda
parents: 3667
diff changeset
   151
    cDefaultZoomLevel = 2.0;
3737
2ba6ac8a114b reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents: 3734
diff changeset
   152
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   153
{$IFDEF IPHONEOS}
3638
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   154
    cMaxZoomLevel = 0.5;
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   155
    cMinZoomLevel = 3.5;
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   156
    cZoomDelta = 0.20;
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   157
{$ELSE}
3638
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   158
    cMaxZoomLevel = 1.0;
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   159
    cMinZoomLevel = 3.0;
33ee433749ba touch overlay reworked, improvements to zoom and confirmation
koda
parents: 3637
diff changeset
   160
    cZoomDelta = 0.25;
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   161
{$ENDIF}
97
e7c1df9cce2c - make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents: 95
diff changeset
   162
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   163
    cSendEmptyPacketTime = 1000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   164
    trigTurns = $80000001;
2630
079ef82eac75 revamped file access and debug display
koda
parents: 2619
diff changeset
   165
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   166
    gfAny                = $FFFFFFFF;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   167
    gfOneClanMode        = $00000001;           // used in trainings
3999
411e71912f4c restore king mode
koda
parents: 3991
diff changeset
   168
    gfMultiWeapon        = $00000002;           // used in trainings
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   169
    gfSolidLand          = $00000004;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   170
    gfBorder             = $00000008;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   171
    gfDivideTeams        = $00000010;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   172
    gfLowGravity         = $00000020;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   173
    gfLaserSight         = $00000040;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   174
    gfInvulnerable       = $00000080;
4099
af612377fcba health reset mode ftw (replaces gfmines)
koda
parents: 4042
diff changeset
   175
    gfResetHealth        = $00000100;
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   176
    gfVampiric           = $00000200;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   177
    gfKarma              = $00000400;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   178
    gfArtillery          = $00000800;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   179
    gfForts              = $00001000;
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   180
    gfRandomOrder        = $00002000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   181
    gfKing               = $00004000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   182
    gfPlaceHog           = $00008000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   183
    gfSharedAmmo         = $00010000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   184
    gfDisableGirders     = $00020000;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   185
    gfDisableLandObjects = $00040000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   186
    gfAISurvival         = $00080000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   187
    gfInfAttack          = $00100000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   188
    gfResetWeps          = $00200000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   189
    gfPerHogAmmo         = $00400000;
4776
ab956d4647a4 set windspeed to 0 at the very beginning of the game. (fixes DisableWind game modifier)
sheepluva
parents: 4406
diff changeset
   190
    gfDisableWind        = $00800000;
4272
cf18de7ea3d4 engine side of a more wind patch. no frontend hook. just want to check it in to pull it from another machine
nemo
parents: 4246
diff changeset
   191
    gfMoreWind           = $01000000;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   192
    // NOTE: When adding new game flags, ask yourself
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   193
    // if a "game start notice" would be useful. If so,
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   194
    // add one in uWorld.pas - look for "AddGoal".
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   195
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   196
    gstDrowning       = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   197
    gstHHDriven       = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   198
    gstMoving         = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   199
    gstAttacked       = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   200
    gstAttacking      = $00000010;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   201
    gstCollision      = $00000020;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   202
    gstHHChooseTarget = $00000040;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   203
    gstHHJumping      = $00000100;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   204
    gsttmpFlag        = $00000200;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   205
    gstHHThinking     = $00000800;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   206
    gstNoDamage       = $00001000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   207
    gstHHHJump        = $00002000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   208
    gstAnimation      = $00004000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   209
    gstHHDeath        = $00008000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   210
    gstWinner         = $00010000;  // this, along with gstLoser, is good for indicating hedgies know they screwed up
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   211
    gstWait           = $00020000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   212
    gstNotKickable    = $00040000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   213
    gstLoser          = $00080000;
3310
e6e9b811d32f Engine:
smxx
parents: 3287
diff changeset
   214
    gstHHGone         = $00100000;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   215
3894
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   216
    gmLeft   = $00000001;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   217
    gmRight  = $00000002;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   218
    gmUp     = $00000004;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   219
    gmDown   = $00000008;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   220
    gmSwitch = $00000010;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   221
    gmAttack = $00000020;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   222
    gmLJump  = $00000040;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   223
    gmHJump  = $00000080;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   224
    gmDestroy= $00000100;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   225
    gmSlot   = $00000200; // with param
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   226
    gmWeapon = $00000400; // with param
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   227
    gmTimer  = $00000800; // with param
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   228
    gmAnimate= $00001000; // with param
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   229
    gmPrecise= $00002000;
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   230
    gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   231
3485
ab91c56a9050 Engine (Henek):
smxx
parents: 3483
diff changeset
   232
    cMaxSlotIndex       = 9;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   233
    cMaxSlotAmmoIndex   = 5;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   234
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   235
    ammoprop_Timerable    = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   236
    ammoprop_Power        = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   237
    ammoprop_NeedTarget   = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   238
    ammoprop_ForwMsgs     = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   239
    ammoprop_AttackInMove = $00000010;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   240
    ammoprop_NoCrosshair  = $00000040;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   241
    ammoprop_AttackingPut = $00000080;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   242
    ammoprop_DontHold     = $00000100;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   243
    ammoprop_AltAttack    = $00000200;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   244
    ammoprop_AltUse       = $00000400;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   245
    ammoprop_NotBorder    = $00000800;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   246
    ammoprop_Utility      = $00001000;
3037
ab6e949eb5cb Rename current things called utilities to Effects (since they impact game state / flags w/o using a gear) and add a bunch of things that don't cause damage and are just used to move to Utility crate.
nemo
parents: 3032
diff changeset
   247
    ammoprop_Effect       = $00002000;
4241
835fd7a0e1bf Move resurrection to utilities, reduce its probablit a bit to match other utilities, rename the "hint" prop since it really isn't being used as a hint anymore. That can be put back if it changes.
nemo
parents: 4230
diff changeset
   248
    ammoprop_NoRoundEnd=$10000000;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   249
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   250
    AMMO_INFINITE = 100;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   251
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   252
    EXPLAllDamageInRadius = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   253
    EXPLAutoSound         = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   254
    EXPLNoDamage          = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   255
    EXPLDoNotTouchHH      = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   256
    EXPLDontDraw          = $00000010;
3004
e9b3613cc3fb Engine:
smxx
parents: 2989
diff changeset
   257
    EXPLNoGfx             = $00000020;
3383
45a73be4d8c1 Fixed broken whitespace
mbait
parents: 3382
diff changeset
   258
    EXPLPoisoned          = $00000040;
3712
de2026031833 Engine:
smaxx
parents: 3710
diff changeset
   259
    EXPLDoNotTouchAny     = $00000080;
42
72ffe21f027c - Fixed console behavior
unc0rr
parents: 39
diff changeset
   260
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   261
    posCaseAmmo    = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   262
    posCaseHealth  = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   263
    posCaseUtility = $00000004;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   264
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   265
    NoPointX = Low(LongInt);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   266
    cTargetPointRef : TPoint = (X: NoPointX; Y: 0);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   267
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   268
    // hog tag mask
2947
803b277e4894 hate Smaxx (tested)
unc0rr
parents: 2941
diff changeset
   269
    htNone        = $00;
803b277e4894 hate Smaxx (tested)
unc0rr
parents: 2941
diff changeset
   270
    htTeamName    = $01;
803b277e4894 hate Smaxx (tested)
unc0rr
parents: 2941
diff changeset
   271
    htName        = $02;
803b277e4894 hate Smaxx (tested)
unc0rr
parents: 2941
diff changeset
   272
    htHealth      = $04;
803b277e4894 hate Smaxx (tested)
unc0rr
parents: 2941
diff changeset
   273
    htTransparent = $08;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   274
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   275
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   276
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   277
implementation
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   278
3145
a9af6bf223cf Birdy's falling feathers
mbait
parents: 3142
diff changeset
   279
end.