hedgewars/uConsts.pas
author Wuzzy <almikes@aol.com>
Sat, 30 Sep 2017 02:04:58 +0200
changeset 12610 d05a159e7874
parent 12604 95f0e475ca8e
child 12654 2837dee472cc
permissions -rw-r--r--
ACF1: Fix princess/elder flying very weirdly when punching to direction they look at
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
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10818
diff changeset
     3
 * Copyright (c) 2004-2015 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
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 10015
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  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;
1906
644f93d8f148 Apply koda's OpenGL ES compatibility patch
unc0rr
parents: 1904
diff changeset
    25
2924
908851e59958 Engine:
smxx
parents: 2921
diff changeset
    26
{$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
    27
3709
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    28
const
11841
1d41f297b3d3 bit of a start on HDPI monitor support. Fonts.
nemo
parents: 11594
diff changeset
    29
    HDPIScaleFactor     =  1;
12604
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    30
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    31
    // application return codes
10307
e13d3147f15b do not get stuck on "in game..." page just because of game crash. output a message instead. could still need some tweaking, but a man gotta sleep. and sheep too...
sheepluva
parents: 10306
diff changeset
    32
    HaltNoError         =  0;
12604
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    33
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    34
    // error codes are placed in range 50-99 because that way then don't overlap with run-time errors of pascal
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    35
    // see https://www.freepascal.org/docs-html/user/userap4.html
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    36
    HaltUsageError      =  51;
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    37
    HaltFatalError      =  52;
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    38
    HaltStartupError    =  53;
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    39
    HaltFatalErrorNoIPC =  54;
10306
4fca8bcfaff0 clean up halting a little
sheepluva
parents: 10108
diff changeset
    40
4fca8bcfaff0 clean up halting a little
sheepluva
parents: 10108
diff changeset
    41
    // for automatic tests
10307
e13d3147f15b do not get stuck on "in game..." page just because of game crash. output a message instead. could still need some tweaking, but a man gotta sleep. and sheep too...
sheepluva
parents: 10306
diff changeset
    42
    HaltTestSuccess     =  0;
12604
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    43
    HaltTestFailed      =  60;
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    44
    HaltTestLuaError    =  61;
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12598
diff changeset
    45
    HaltTestUnexpected  =  62;
10306
4fca8bcfaff0 clean up halting a little
sheepluva
parents: 10108
diff changeset
    46
4fca8bcfaff0 clean up halting a little
sheepluva
parents: 10108
diff changeset
    47
3709
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    48
    sfMax = 1000;
3107
1fa539758c10 Engine:
smxx
parents: 3102
diff changeset
    49
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    50
    // message constants
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    51
    errmsgCreateSurface   = 'Error creating SDL surface';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    52
    errmsgTransparentSet  = 'Error setting transparent color';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    53
    errmsgUnknownCommand  = 'Unknown command';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    54
    errmsgUnknownVariable = 'Unknown variable';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    55
    errmsgIncorrectUse    = 'Incorrect use';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    56
    errmsgShouldntRun     = 'This program shouldn''t be run manually';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    57
    errmsgWrongNumber     = 'Wrong parameters number';
10622
9551211455a3 pas2c-whoops
sheepluva
parents: 10619
diff changeset
    58
    errmsgLuaTestTerm     = 'WARNING: Lua test terminated before the test was properly finished with EndLuaTest()!';
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    59
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    60
    msgLoading           = 'Loading ';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    61
    msgOK                = 'ok';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    62
    msgFailed            = 'failed';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    63
    msgFailedSize        = 'failed due to size';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    64
    msgGettingConfig     = 'Getting game config...';
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    65
8346
3443e0de2c9d GCI2012: Advanced Keyboard Configuration
dag10
parents: 8325
diff changeset
    66
    // camera movement multipliers
3443e0de2c9d GCI2012: Advanced Keyboard Configuration
dag10
parents: 8325
diff changeset
    67
    cameraKeyboardSpeed : ShortInt = 10;
3443e0de2c9d GCI2012: Advanced Keyboard Configuration
dag10
parents: 8325
diff changeset
    68
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    69
    // color constants
9311
5baf10a52f43 engine uses final (?) SDL 2 APIs, new events and types added. Touch input broke by the way, and system events should be handled differently
koda
parents: 9249
diff changeset
    70
    cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; a:$FF);
5baf10a52f43 engine uses final (?) SDL 2 APIs, new events and types added. Touch input broke by the way, and system events should be handled differently
koda
parents: 9249
diff changeset
    71
    cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; a:$FF);
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    72
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    73
    cWhiteColor           : Longword = $FFFFFFFF;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    74
    cYellowColor          : Longword = $FFFFFF00;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    75
    cNearBlackColor       : Longword = $FF000010;
2376
ece7b87f1334 Strip trailing spaces
nemo
parents: 2362
diff changeset
    76
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    77
{$WARNINGS OFF}
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    78
    cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    79
    cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    80
{$WARNINGS ON}
621
8bdbc240f50f New game flag for non-destroyable land
unc0rr
parents: 615
diff changeset
    81
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
    82
    // 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
    83
    rqNone        = $00000000;  // don't reduce quality
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    84
    rqLowRes      = $00000001;  // use half land array
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    85
    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
    86
    rqNoBackground= $00000004;  // don't draw background
3862
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    87
    rqSimpleRope  = $00000008;  // draw rope using lines only
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    88
    rq2DWater     = $00000010;  // disable 3D water effect
4809
9c7d5f802618 rearrange quality flags a little, disable snow rendering on rqLowRes
koda
parents: 4808
diff changeset
    89
    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
    90
    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
    91
    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
    92
    rqPlainSplash = $00000100;  // no droplets
3611
ed00aa2b339e interpret parameters before initializing everything
koda
parents: 3594
diff changeset
    93
    rqClampLess   = $00000200;  // don't clamp textures
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    94
    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
    95
    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
    96
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    97
    // image flags (for LoadImage())
12598
d6bd8b327a09 don't use colorkey for land spray
sheepluva
parents: 12597
diff changeset
    98
    // TODO: discuss whether ifAlpha and ifColorKey are actually needed and if and where we want to support which colorkeys
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    99
    ifNone        = $00000000;  // nothing special
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   100
    ifAlpha       = $00000001;  // use alpha channel (unused right now?)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   101
    ifCritical    = $00000002;  // image is critical for gameplay (exit game if unable to load)
12598
d6bd8b327a09 don't use colorkey for land spray
sheepluva
parents: 12597
diff changeset
   102
    ifColorKey    = $00000004;  // image uses transparent pixels (color keying)
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   103
    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
   104
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   105
    // 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
   106
    tpLowest      = 0.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   107
    tpLow         = 0.25;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   108
    tpMedium      = 0.50;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   109
    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
   110
    tpHighest     = 1.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   111
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
   112
// 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
   113
// TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
6081
537bbd5c1a62 Basic test implementation of an ice flag. Allows for slick parts of terrain. Intended for ice gun, or "ice" mask on portions of land objects.
nemo
parents: 6077
diff changeset
   114
// lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
10717
0810826cdf80 Tweak to land texturing. Treat any non-lfBasic as edge
nemo
parents: 10661
diff changeset
   115
    lfBasic          = $8000;  // black
3519
56cbc035b74b rename flags
nemo
parents: 3509
diff changeset
   116
    lfIndestructible = $4000;  // red
10717
0810826cdf80 Tweak to land texturing. Treat any non-lfBasic as edge
nemo
parents: 10661
diff changeset
   117
    lfObject         = $2000;  // white
6081
537bbd5c1a62 Basic test implementation of an ice flag. Allows for slick parts of terrain. Intended for ice gun, or "ice" mask on portions of land objects.
nemo
parents: 6077
diff changeset
   118
    lfDamaged        = $1000;  //
537bbd5c1a62 Basic test implementation of an ice flag. Allows for slick parts of terrain. Intended for ice gun, or "ice" mask on portions of land objects.
nemo
parents: 6077
diff changeset
   119
    lfIce            = $0800;  // blue
7293
468cf6d561e5 Add green mask for anti-portal areas on custom maps. Flagged as Bouncy since it is intended for that general use. Needs testing.
nemo
parents: 7197
diff changeset
   120
    lfBouncy         = $0400;  // green
8751
4609823efc94 More flagging of Land values. Also use less than for tests of non-terrain, instead of "and $FF00 = 0". Saves a couple of ops, which actually matters a small amount in a few places.
nemo
parents: 8744
diff changeset
   121
    lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
64
9df467527ae5 - Start AI rewrite
unc0rr
parents: 56
diff changeset
   122
9521
8054d9d775fd merge with latest defaul, fixing compiling with fpc, parsing and rendering with pas2c, some minor problems with compiling with clang
koda
parents: 9127 9387
diff changeset
   123
    lfCurrentHog     = $0080;  // CurrentHog.  It is also used to flag crates, for convenience of AI.  Since an active hog would instantly collect the crate, this does not impact play
8751
4609823efc94 More flagging of Land values. Also use less than for tests of non-terrain, instead of "and $FF00 = 0". Saves a couple of ops, which actually matters a small amount in a few places.
nemo
parents: 8744
diff changeset
   124
    lfNotCurrentMask = $FF7F;  // inverse of above. frequently used
11594
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   125
    lfObjMask        = $007F;  // lower 7 bits used for hogs and explosives and mines 
8744
6c87486fd89b Add some flags for a few of the magic Land values
nemo
parents: 8346
diff changeset
   126
    lfNotObjMask     = $FF80;  // inverse of above.
11594
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   127
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   128
// breaking up hogs would makes it easier to differentiate 
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   129
// colliding with a hog from colliding with other things
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   130
// if overlapping hogs are less common than objects, the division can be altered.
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   131
// 3 bits for objects, 4 for hogs, that is, overlap 7 barrels/mines before possible dents, and 15 hogs.
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   132
    lfHHMask         = $000F;  // lower 4 bits used only for hogs
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   133
    lfNotHHObjMask   = $0070;  // next 3 bits used for non-hog things
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   134
    lfNotHHObjShift  = 4;
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   135
    lfNotHHObjSize   = lfNotHHObjMask shr lfNotHHObjShift;  
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   136
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9998 9950
diff changeset
   137
    // lower byte is for objects.
4feced261c68 partial merge of the webgl branch
koda
parents: 9998 9950
diff changeset
   138
    // consists of 0-127 counted for object checkins and $80 as a bit flag for current hog.
8751
4609823efc94 More flagging of Land values. Also use less than for tests of non-terrain, instead of "and $FF00 = 0". Saves a couple of ops, which actually matters a small amount in a few places.
nemo
parents: 8744
diff changeset
   139
    lfAllObjMask     = $00FF;  // lfCurrentHog or lfObjMask
4609823efc94 More flagging of Land values. Also use less than for tests of non-terrain, instead of "and $FF00 = 0". Saves a couple of ops, which actually matters a small amount in a few places.
nemo
parents: 8744
diff changeset
   140
8744
6c87486fd89b Add some flags for a few of the magic Land values
nemo
parents: 8346
diff changeset
   141
11594
c453620cc6d6 Break up the hog/object collision. Currently is $7F, allowing 128 overlapping objects accurately. Breaking it up into 15 for hogs, 7 for other objects. I'm thinking the overall accuracy should be just fine as far as people noticing even with a ton of overlapping hogs, and this way we can tell the difference between a hog and "something else". For experiment and rope-breaking purposes, make rope pass through hogs.
nemo
parents: 11058
diff changeset
   142
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   143
    cMaxPower     = 1500;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   144
    cMaxAngle     = 2048;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   145
    cPowerDivisor = 1500;
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
   146
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   147
    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
   148
    MAXROPEPOINTS = 3840;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   149
6891
ab9843957664 Improve rendering of function types, ranges, and more
unc0rr
parents: 6797
diff changeset
   150
    {$IFNDEF PAS2C}
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   151
    // some opengl headers do not have these macros
3493
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   152
    GL_BGR              = $80E0;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   153
    GL_BGRA             = $80E1;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   154
    GL_CLAMP_TO_EDGE    = $812F;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   155
    GL_TEXTURE_PRIORITY = $8066;
6891
ab9843957664 Improve rendering of function types, ranges, and more
unc0rr
parents: 6797
diff changeset
   156
    {$ENDIF}
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   157
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   158
    cVisibleWater       : LongInt = 128;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   159
    cTeamHealthWidth    : LongInt = 128;
2163
12730f5e79b9 koda's patch fixing some iphone port troubles (color, mouse)
unc0rr
parents: 2153
diff changeset
   160
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   161
    cifRandomize = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   162
    cifTheme     = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   163
    cifMap       = $00000002; // either theme or map (or map+theme)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   164
    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
   165
5441
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   166
    RGB_LUMINANCE_RED    = 0.212671;
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   167
    RGB_LUMINANCE_GREEN  = 0.715160;
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   168
    RGB_LUMINANCE_BLUE   = 0.072169;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   169
4406
beb4de0af990 Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents: 4396
diff changeset
   170
    cMaxTeams        = 8;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   171
    cMaxHHIndex      = 7;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   172
    cMaxHHs          = 48;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   173
10499
0d8016085108 modestly randomise dab, bump points again.
nemo
parents: 10483
diff changeset
   174
    cMaxEdgePoints = 32768;
22
517be8dc5b76 - Fixed spawning boxes under water
unc0rr
parents: 17
diff changeset
   175
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   176
    cHHRadius = 9;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   177
    cHHStepTicks = 29;
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   178
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   179
    cHHZ = 1000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   180
    cCurrHHZ = Succ(cHHZ);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   181
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   182
    cBarrelHealth = 60;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   183
    cShotgunRadius = 22;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   184
    cBlowTorchC    = 6;
7416
2f2f78fc65a3 AI uses cake! Known issues: AI could damage itself for no reason, could let cake go looping in a hole with exit closed by AI hog.
unc0rr
parents: 7400
diff changeset
   185
    cakeDmg =   75;
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   186
8026
4a4f21070479 merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents: 7996
diff changeset
   187
    cKeyMaxIndex = 1600;
7191
9419294e5f33 first attempt at implementing support for keys with modifiers
Xeli
parents: 6982
diff changeset
   188
    cKbdMaxIndex = 65536;//need more room for the modifier keys
6917
4889c2b779b4 - change uKeys to be event based rather than polling
Xeli
parents: 6891
diff changeset
   189
11841
1d41f297b3d3 bit of a start on HDPI monitor support. Fonts.
nemo
parents: 11594
diff changeset
   190
    cFontBorder = 2 * HDPIScaleFactor;
1d41f297b3d3 bit of a start on HDPI monitor support. Fonts.
nemo
parents: 11594
diff changeset
   191
    cFontPadding = 2 * HDPIScaleFactor;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   192
11058
b91667fd6f20 Lua API: SetMaxBuildDistance([ distInPx ]) -- set to 0 for no limit; call with no param to reset to default
sheepluva
parents: 11046
diff changeset
   193
    cDefaultBuildMaxDist = 256;
b91667fd6f20 Lua API: SetMaxBuildDistance([ distInPx ]) -- set to 0 for no limit; call with no param to reset to default
sheepluva
parents: 11046
diff changeset
   194
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
   195
    // do not change this value
3668
3f7a95234d8a tap to play piano notes, fix for audio and pause glitch
koda
parents: 3667
diff changeset
   196
    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
   197
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   198
    // game flags
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   199
    gfAny                = $FFFFFFFF;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   200
    gfOneClanMode        = $00000001;           // used in trainings
3999
411e71912f4c restore king mode
koda
parents: 3991
diff changeset
   201
    gfMultiWeapon        = $00000002;           // used in trainings
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   202
    gfSolidLand          = $00000004;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   203
    gfBorder             = $00000008;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   204
    gfDivideTeams        = $00000010;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   205
    gfLowGravity         = $00000020;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   206
    gfLaserSight         = $00000040;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   207
    gfInvulnerable       = $00000080;
4099
af612377fcba health reset mode ftw (replaces gfmines)
koda
parents: 4042
diff changeset
   208
    gfResetHealth        = $00000100;
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   209
    gfVampiric           = $00000200;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   210
    gfKarma              = $00000400;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   211
    gfArtillery          = $00000800;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   212
    gfForts              = $00001000;
3743
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   213
    gfRandomOrder        = $00002000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   214
    gfKing               = $00004000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   215
    gfPlaceHog           = $00008000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   216
    gfSharedAmmo         = $00010000;
234ce4da76d4 Flag for AI survival mode
nemo
parents: 3737
diff changeset
   217
    gfDisableGirders     = $00020000;
4000
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   218
    gfDisableLandObjects = $00040000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   219
    gfAISurvival         = $00080000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   220
    gfInfAttack          = $00100000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   221
    gfResetWeps          = $00200000;
ddc4a09889e7 engine: reorder GameFlags and update files, frontend and other stuff
koda
parents: 3999
diff changeset
   222
    gfPerHogAmmo         = $00400000;
4776
ab956d4647a4 set windspeed to 0 at the very beginning of the game. (fixes DisableWind game modifier)
sheepluva
parents: 4406
diff changeset
   223
    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
   224
    gfMoreWind           = $01000000;
5016
9347d82a26cc added game mode Tag Team, mostly untested, please test :)
Henek
parents: 4976
diff changeset
   225
    gfTagTeam            = $02000000;
5717
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5441
diff changeset
   226
    gfBottomBorder       = $04000000;
9387
6478ed9ead25 gfShoppaBorder
unc0rr
parents: 9311
diff changeset
   227
    gfShoppaBorder       = $08000000;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   228
    // NOTE: When adding new game flags, ask yourself
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   229
    // 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
   230
    // add one in uWorld.pas - look for "AddGoal".
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   231
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   232
    // gear states
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   233
    gstDrowning       = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   234
    gstHHDriven       = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   235
    gstMoving         = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   236
    gstAttacked       = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   237
    gstAttacking      = $00000010;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   238
    gstCollision      = $00000020;
10818
f642a28cab0c Add placement of airmines in engine outside of hog proximity. Has a bug, only protecting 1st team. Also fix a spelling error and rename gstHHChooseTarget to gstChooseTarget
nemo
parents: 10789
diff changeset
   239
    gstChooseTarget   = $00000040;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   240
    gstHHJumping      = $00000100;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   241
    gsttmpFlag        = $00000200;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   242
    gstHHThinking     = $00000800;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   243
    gstNoDamage       = $00001000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   244
    gstHHHJump        = $00002000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   245
    gstAnimation      = $00004000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   246
    gstHHDeath        = $00008000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   247
    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
   248
    gstWait           = $00020000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   249
    gstNotKickable    = $00040000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   250
    gstLoser          = $00080000;
3310
e6e9b811d32f Engine:
smxx
parents: 3287
diff changeset
   251
    gstHHGone         = $00100000;
5348
0bc81de36e08 Don't draw snow flakes spawned in land, introduce gstInvisible flag
unc0rr
parents: 5316
diff changeset
   252
    gstInvisible      = $00200000;
9026
f6074540bab2 Add gstFrozen state to mines/gears in range on frozen land creation, and set the mines to dud state. gstFrozen does nothing yet. Visually or otherwise.
nemo
parents: 8992
diff changeset
   253
    gstSubmersible    = $00400000;
f6074540bab2 Add gstFrozen state to mines/gears in range on frozen land creation, and set the mines to dud state. gstFrozen does nothing yet. Visually or otherwise.
nemo
parents: 8992
diff changeset
   254
    gstFrozen         = $00800000;
10789
acbf69e2e5cf experiment with air mines. thought they could make shoppa... interesting. ToDo: Allow mines to give up, tweak distances, real graphics, toggle for whether they can acquire a new target while they haven't given up.
nemo
parents: 10717
diff changeset
   255
    gstNoGravity      = $01000000;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   256
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   257
    // gear messages
7400
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   258
    gmLeft           = $00000001;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   259
    gmRight          = $00000002;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   260
    gmUp             = $00000004;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   261
    gmDown           = $00000008;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   262
    gmSwitch         = $00000010;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   263
    gmAttack         = $00000020;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   264
    gmLJump          = $00000040;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   265
    gmHJump          = $00000080;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   266
    gmDestroy        = $00000100;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   267
    gmSlot           = $00000200; // with param
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   268
    gmWeapon         = $00000400; // with param
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   269
    gmTimer          = $00000800; // with param
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   270
    gmAnimate        = $00001000; // with param
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   271
    gmPrecise        = $00002000;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   272
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   273
    gmRemoveFromList = $00004000;
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   274
    gmAddToList      = $00008000;
7517
f287f00063e8 Allow scripting to delete gears
nemo
parents: 7505
diff changeset
   275
    gmDelete         = $00010000;
3894
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   276
    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
   277
3485
ab91c56a9050 Engine (Henek):
smxx
parents: 3483
diff changeset
   278
    cMaxSlotIndex       = 9;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   279
    cMaxSlotAmmoIndex   = 5;
8330
aaefa587e277 update branch with default
koda
parents: 8026 8325
diff changeset
   280
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   281
    // ai hints
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   282
    aihUsualProcessing    = $00000000;
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   283
    aihDoesntMatter       = $00000001;
8330
aaefa587e277 update branch with default
koda
parents: 8026 8325
diff changeset
   284
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   285
    // ammo properties
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   286
    ammoprop_Timerable    = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   287
    ammoprop_Power        = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   288
    ammoprop_NeedTarget   = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   289
    ammoprop_ForwMsgs     = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   290
    ammoprop_AttackInMove = $00000010;
9573
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   291
    ammoprop_DoesntStopTimerWhileAttacking
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   292
                          = $00000020;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   293
    ammoprop_NoCrosshair  = $00000040;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   294
    ammoprop_AttackingPut = $00000080;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   295
    ammoprop_DontHold     = $00000100;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   296
    ammoprop_AltAttack    = $00000200;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   297
    ammoprop_AltUse       = $00000400;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   298
    ammoprop_NotBorder    = $00000800;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   299
    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
   300
    ammoprop_Effect       = $00002000;
5316
191cd6c06203 Allow control of grenade bounce. Not sure if this is a good idea, but has been requested a lot, so...
nemo
parents: 5313
diff changeset
   301
    ammoprop_SetBounce    = $00004000;
8330
aaefa587e277 update branch with default
koda
parents: 8026 8325
diff changeset
   302
    ammoprop_NeedUpDown   = $00008000;//Used by TouchInterface to show or hide up/down widgets
7197
5a9775b97c7e - TestSniperRifle ftw (still needs some consts adjustments, because AI seems to love sniper rifle too much)
unc0rr
parents: 7191
diff changeset
   303
    ammoprop_OscAim       = $00010000;
5a9775b97c7e - TestSniperRifle ftw (still needs some consts adjustments, because AI seems to love sniper rifle too much)
unc0rr
parents: 7191
diff changeset
   304
    ammoprop_NoMoveAfter  = $00020000;
7416
2f2f78fc65a3 AI uses cake! Known issues: AI could damage itself for no reason, could let cake go looping in a hole with exit closed by AI hog.
unc0rr
parents: 7400
diff changeset
   305
    ammoprop_Track        = $00040000;
9573
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   306
    ammoprop_DoesntStopTimerInMultiShoot
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   307
                          = $00080000;
11920
16ce211010cf Add ammoprop for blowtorch and pickhammer for not stopping timer in inf attack
Wuzzy <almikes@aol.com>
parents: 11841
diff changeset
   308
    ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode
16ce211010cf Add ammoprop for blowtorch and pickhammer for not stopping timer in inf attack
Wuzzy <almikes@aol.com>
parents: 11841
diff changeset
   309
                          = $00100000;
4828
4ed71ae56b05 Fix formatting
unc0rr
parents: 4809
diff changeset
   310
    ammoprop_NoRoundEnd   = $10000000;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   311
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   312
    AMMO_INFINITE = 100;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   313
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   314
    // explosion flags
6765
8fcd2508c49f bug #336
nemo
parents: 6700
diff changeset
   315
    //EXPLAllDamageInRadius = $00000001;  Completely unused for ages
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   316
    EXPLAutoSound         = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   317
    EXPLNoDamage          = $00000004;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   318
    EXPLDoNotTouchHH      = $00000008;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   319
    EXPLDontDraw          = $00000010;
3004
e9b3613cc3fb Engine:
smxx
parents: 2989
diff changeset
   320
    EXPLNoGfx             = $00000020;
3383
45a73be4d8c1 Fixed broken whitespace
mbait
parents: 3382
diff changeset
   321
    EXPLPoisoned          = $00000040;
3712
de2026031833 Engine:
smaxx
parents: 3710
diff changeset
   322
    EXPLDoNotTouchAny     = $00000080;
42
72ffe21f027c - Fixed console behavior
unc0rr
parents: 39
diff changeset
   323
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   324
    posCaseAmmo    = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   325
    posCaseHealth  = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   326
    posCaseUtility = $00000004;
5313
5e18eaef65d0 now scripts can create unique crates: dummy (empty) crates and booby traps. scripts can also set health crate values
Henek
parents: 5016
diff changeset
   327
    posCaseDummy   = $00000008;
5343
ff7ecf483759 fake crates now with complementary poison
Henek
parents: 5316
diff changeset
   328
    posCaseExplode = $00000010;
ff7ecf483759 fake crates now with complementary poison
Henek
parents: 5316
diff changeset
   329
    posCasePoison  = $00000020;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   330
10506
325f7bb60580 fix health crate collision
sheepluva
parents: 10499
diff changeset
   331
    cCaseHealthRadius = 14;
325f7bb60580 fix health crate collision
sheepluva
parents: 10499
diff changeset
   332
9249
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   333
    // hog tag mask
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   334
    //htNone        = $00;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   335
    htTeamName    = $01;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   336
    htName        = $02;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   337
    htHealth      = $04;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   338
    htTransparent = $08;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   339
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   340
    NoPointX = Low(LongInt);
9521
8054d9d775fd merge with latest defaul, fixing compiling with fpc, parsing and rendering with pas2c, some minor problems with compiling with clang
koda
parents: 9127 9387
diff changeset
   341
    cTargetPointRef : TPoint = (x: NoPointX; y: 0);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   342
8204
9a6030d96273 GCI2012: Convert uMobile into a Callback Record
Rowan D
parents: 8145
diff changeset
   343
    kSystemSoundID_Vibrate = $00000FFF;
9a6030d96273 GCI2012: Convert uMobile into a Callback Record
Rowan D
parents: 8145
diff changeset
   344
10354
56bd029245fc WIP: weSea tweaks, functional and visual
sheepluva
parents: 10307
diff changeset
   345
    cMinPlayWidth = 200;
10661
0da243c01bde world edge tweakes/fixes
sheepluva
parents: 10626
diff changeset
   346
    cWorldEdgeDist = 200;
10354
56bd029245fc WIP: weSea tweaks, functional and visual
sheepluva
parents: 10307
diff changeset
   347
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   348
implementation
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   349
3145
a9af6bf223cf Birdy's falling feathers
mbait
parents: 3142
diff changeset
   350
end.