hedgewars/uConsts.pas
author Vekhir
Wed, 10 Jan 2024 20:54:29 +0100
changeset 16012 2c92499daa67
parent 16003 8bb07b0f50ca
permissions -rw-r--r--
Fix server build with modern mtl library
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
11836
1d41f297b3d3 bit of a start on HDPI monitor support. Fonts.
nemo
parents: 11589
diff changeset
    29
    HDPIScaleFactor     =  1;
12599
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12593
diff changeset
    30
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12593
diff changeset
    31
    // application return codes
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    32
    HaltNoError         =  0; // Hedgewars quits normally
12599
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12593
diff changeset
    33
95f0e475ca8e change return codes to avoid overlap with fpc ones
sheepluva
parents: 12593
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: 12593
diff changeset
    35
    // see https://www.freepascal.org/docs-html/user/userap4.html
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    36
    HaltUsageError      =  51; // Hedgewars was invoked incorrectly (e.g. bad command-line parameter)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    37
    HaltFatalError      =  52; // Fatal internal error. See logs for more. Also reports error to frontend
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    38
    HaltStartupError    =  53; // Failure loading critical resources
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    39
    HaltFatalErrorNoIPC =  54; // Fatal internal error, IPC socket is not available
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
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    42
    HaltTestSuccess     =  0;  // Test result: success
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    43
    HaltTestFailed      =  60; // Test result: failed
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    44
    HaltTestLuaError    =  61; // Lua runtime error
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    45
    HaltTestUnexpected  =  62; // Unexpected error
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
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    48
    // maximum ScreenFadeValue
3709
c7849b74748d clean and reorder arguments passed to engine
koda
parents: 3704
diff changeset
    49
    sfMax = 1000;
3107
1fa539758c10 Engine:
smxx
parents: 3102
diff changeset
    50
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    51
    // log message constants
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    52
    errmsgCreateSurface   = 'Error creating SDL surface';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    53
    errmsgTransparentSet  = 'Error setting transparent color';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    54
    errmsgUnknownCommand  = 'Unknown command';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    55
    errmsgUnknownVariable = 'Unknown variable';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    56
    errmsgIncorrectUse    = 'Incorrect use';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    57
    errmsgShouldntRun     = 'This program shouldn''t be run manually';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    58
    errmsgWrongNumber     = 'Wrong parameters number';
10622
9551211455a3 pas2c-whoops
sheepluva
parents: 10619
diff changeset
    59
    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
    60
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    61
    msgLoading           = 'Loading ';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    62
    msgOK                = 'ok';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    63
    msgFailed            = 'failed';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    64
    msgFailedSize        = 'failed due to size';
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    65
    msgGettingConfig     = 'Getting game config...';
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
    66
8346
3443e0de2c9d GCI2012: Advanced Keyboard Configuration
dag10
parents: 8325
diff changeset
    67
    // camera movement multipliers
14917
63357ed39886 Precise + camera movement keys = move camera at slower
Wuzzy <Wuzzy2@mail.ru>
parents: 14757
diff changeset
    68
    cameraKeyboardSpeed     : LongInt = 10;
63357ed39886 Precise + camera movement keys = move camera at slower
Wuzzy <Wuzzy2@mail.ru>
parents: 14757
diff changeset
    69
    cameraKeyboardSpeedSlow : LongInt =  3;
8346
3443e0de2c9d GCI2012: Advanced Keyboard Configuration
dag10
parents: 8325
diff changeset
    70
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    71
    // 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
    72
    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
    73
    cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; a:$FF);
14757
8563cc40fc1e Invert colors if clan color is very dark
Wuzzy <Wuzzy2@mail.ru>
parents: 14698
diff changeset
    74
    cInvertTextColorAt    : Byte = 64;
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    75
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    76
    cWhiteColor           : Longword = $FFFFFFFF; // white
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
    77
    cNearBlackColor       : Longword = $FF000010; // nearly black
2376
ece7b87f1334 Strip trailing spaces
nemo
parents: 2362
diff changeset
    78
13642
3d14950641a4 Refactor text color variable names, export 2 color values to Lua
Wuzzy <Wuzzy2@mail.ru>
parents: 13641
diff changeset
    79
    capcolDefault         : Longword = $FFFFFFFF; // default caption color
3d14950641a4 Refactor text color variable names, export 2 color values to Lua
Wuzzy <Wuzzy2@mail.ru>
parents: 13641
diff changeset
    80
    capcolSetting         : Longword = $FFCCCCCC; // caption color for changing client setting like volume or auto camera
15198
a22013a817e4 Lua: Fix incorrect values for capcolDefault, capcolSetting
Wuzzy <Wuzzy2@mail.ru>
parents: 15179
diff changeset
    81
    capcolDefaultLua      : Longword = $FFFFFFFF; // capcolDefault for Lua
a22013a817e4 Lua: Fix incorrect values for capcolDefault, capcolSetting
Wuzzy <Wuzzy2@mail.ru>
parents: 15179
diff changeset
    82
    capcolSettingLua      : Longword = $CCCCCCFF; // capcolSetting for Lua
13642
3d14950641a4 Refactor text color variable names, export 2 color values to Lua
Wuzzy <Wuzzy2@mail.ru>
parents: 13641
diff changeset
    83
3d14950641a4 Refactor text color variable names, export 2 color values to Lua
Wuzzy <Wuzzy2@mail.ru>
parents: 13641
diff changeset
    84
    cCentralMessageColor  : Longword = $FFFFFF00; // color of message in center of screen like quit or pause
3d14950641a4 Refactor text color variable names, export 2 color values to Lua
Wuzzy <Wuzzy2@mail.ru>
parents: 13641
diff changeset
    85
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    86
{$WARNINGS OFF}
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    87
    cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
    88
    cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
    89
{$WARNINGS ON}
621
8bdbc240f50f New game flag for non-destroyable land
unc0rr
parents: 615
diff changeset
    90
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
    91
    // 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
    92
    rqNone        = $00000000;  // don't reduce quality
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    93
    rqLowRes      = $00000001;  // use half land array
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
    94
    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
    95
    rqNoBackground= $00000004;  // don't draw background
3862
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    96
    rqSimpleRope  = $00000008;  // draw rope using lines only
4d462b29428e Engine:
smaxx
parents: 3851
diff changeset
    97
    rq2DWater     = $00000010;  // disable 3D water effect
4809
9c7d5f802618 rearrange quality flags a little, disable snow rendering on rqLowRes
koda
parents: 4808
diff changeset
    98
    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
    99
    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
   100
    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
   101
    rqPlainSplash = $00000100;  // no droplets
3611
ed00aa2b339e interpret parameters before initializing everything
koda
parents: 3594
diff changeset
   102
    rqClampLess   = $00000200;  // don't clamp textures
3634
93d260c96635 cWeaponTooltips -> rqTooltipsOff
koda
parents: 3612
diff changeset
   103
    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
   104
    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
   105
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   106
    // image flags (for LoadImage())
12593
d6bd8b327a09 don't use colorkey for land spray
sheepluva
parents: 12592
diff changeset
   107
    // 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
   108
    ifNone        = $00000000;  // nothing special
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   109
    ifAlpha       = $00000001;  // use alpha channel (unused right now?)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   110
    ifCritical    = $00000002;  // image is critical for gameplay (exit game if unable to load)
12593
d6bd8b327a09 don't use colorkey for land spray
sheepluva
parents: 12592
diff changeset
   111
    ifColorKey    = $00000004;  // image uses transparent pixels (color keying)
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   112
    ifIgnoreCaps  = $00000008;  // ignore hardware capabilities when loading (i.e. image will not be drawn using OpenGL)
15382
34eb5cc72241 add permenent digest logging
alfadur
parents: 15244
diff changeset
   113
    ifDigestAlpha = $00000010;  // add alpha channel to the digest
34eb5cc72241 add permenent digest logging
alfadur
parents: 15244
diff changeset
   114
    ifDigestAll   = $00000020;  // add all channels to the digest
74
42257fee61ae - Unicode support for team and hedgehogs names
unc0rr
parents: 72
diff changeset
   115
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   116
    // 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
   117
    tpLowest      = 0.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   118
    tpLow         = 0.25;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   119
    tpMedium      = 0.50;
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   120
    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
   121
    tpHighest     = 1.00;
3491
4619b1ae99b5 Engine:
smxx
parents: 3489
diff changeset
   122
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
   123
// 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
   124
// 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
   125
// lfObject and lfBasic are only to be different *graphically*  in all other ways they should be treated the same
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   126
    lfBasic          = $8000;  // normal destructible terrain (mask.png: black)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   127
    lfIndestructible = $4000;  // indestructible terrain (mask.png: red)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   128
    lfObject         = $2000;  // destructible terrain, land object (mask.png: 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
   129
    lfDamaged        = $1000;  //
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   130
    lfIce            = $0800;  // icy terrain (mask.png: blue)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   131
    lfBouncy         = $0400;  // bouncy terrain (mask.png: 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
   132
    lfLandMask       = $FF00;  // upper byte is used for terrain, not objects.
64
9df467527ae5 - Start AI rewrite
unc0rr
parents: 56
diff changeset
   133
13469
f1d349a52bc7 Refactor: lfCurrentHog→lfCurHogCrate, lfNotCurrentMask→lfNotCurHogCrate
Wuzzy <Wuzzy2@mail.ru>
parents: 13456
diff changeset
   134
    lfCurHogCrate    = $0080;  // CurrentHedgehog, and crates, for convenience of AI.  Since an active hog would instantly collect the crate, this does not impact playj
f1d349a52bc7 Refactor: lfCurrentHog→lfCurHogCrate, lfNotCurrentMask→lfNotCurHogCrate
Wuzzy <Wuzzy2@mail.ru>
parents: 13456
diff changeset
   135
    lfNotCurHogCrate = $FF7F;  // inverse of above. frequently used
11589
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
    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
   137
    lfNotObjMask     = $FF80;  // inverse of above.
11589
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
   138
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
   139
// 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
   140
// 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
   141
// 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
   142
// 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
   143
    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
   144
    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
   145
    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
   146
    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
   147
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9998 9950
diff changeset
   148
    // lower byte is for objects.
4feced261c68 partial merge of the webgl branch
koda
parents: 9998 9950
diff changeset
   149
    // consists of 0-127 counted for object checkins and $80 as a bit flag for current hog.
13469
f1d349a52bc7 Refactor: lfCurrentHog→lfCurHogCrate, lfNotCurrentMask→lfNotCurHogCrate
Wuzzy <Wuzzy2@mail.ru>
parents: 13456
diff changeset
   150
    lfAllObjMask     = $00FF;  // lfCurHogCrate or lfObjMask
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
   151
13470
7b4643ff60ea Refactor collision mask checks, remove hardcoded numbers
Wuzzy <Wuzzy2@mail.ru>
parents: 13469
diff changeset
   152
    lfAll            = $FFFF;  // everything
7b4643ff60ea Refactor collision mask checks, remove hardcoded numbers
Wuzzy <Wuzzy2@mail.ru>
parents: 13469
diff changeset
   153
8744
6c87486fd89b Add some flags for a few of the magic Land values
nemo
parents: 8346
diff changeset
   154
11589
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
   155
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   156
    cMaxPower     = 1500; // maximum power value for ammo that powers up
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   157
    cMaxAngle     = 2048; // maximum positive value for Gear angle
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   158
    cPowerDivisor = 1500;
2699
249adefa9c1c replace initialization/finalization statements with custom init functions
koda
parents: 2697
diff changeset
   159
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   160
    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
   161
    MAXROPEPOINTS = 3840;
15045
af2f6f4074de add rope layers
alfadur
parents: 15016
diff changeset
   162
    MAXROPELAYERS = 16;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   163
6891
ab9843957664 Improve rendering of function types, ranges, and more
unc0rr
parents: 6797
diff changeset
   164
    {$IFNDEF PAS2C}
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   165
    // some opengl headers do not have these macros
3493
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   166
    GL_BGR              = $80E0;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   167
    GL_BGRA             = $80E1;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   168
    GL_CLAMP_TO_EDGE    = $812F;
2adbae321127 fix iphone version for map preview
koda
parents: 3491
diff changeset
   169
    GL_TEXTURE_PRIORITY = $8066;
6891
ab9843957664 Improve rendering of function types, ranges, and more
unc0rr
parents: 6797
diff changeset
   170
    {$ENDIF}
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   171
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   172
    cVisibleWater       : LongInt = 128;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   173
    cTeamHealthWidth    : LongInt = 128;
16003
8bb07b0f50ca add some round() so that the scale factor compiles at least with non-integer values
nemo
parents: 15733
diff changeset
   174
    cTeamHealthHeight   : LongInt = round(19 * HDPIScaleFactor);
15221
0879fba70510 Render contour of air mines when in highly opaque water
Wuzzy <Wuzzy2@mail.ru>
parents: 15198
diff changeset
   175
    cGearContourThreshold : LongInt = 179; // if water opacity is higher than this, draw contour for some gears when in water
2163
12730f5e79b9 koda's patch fixing some iphone port troubles (color, mouse)
unc0rr
parents: 2153
diff changeset
   176
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   177
    cifRandomize = $00000001;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   178
    cifTheme     = $00000002;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   179
    cifMap       = $00000002; // either theme or map (or map+theme)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   180
    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
   181
5441
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   182
    RGB_LUMINANCE_RED    = 0.212671;
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   183
    RGB_LUMINANCE_GREEN  = 0.715160;
39962b855540 Add grayscale option for 3d, helps with colour clashing
nemo
parents: 5366
diff changeset
   184
    RGB_LUMINANCE_BLUE   = 0.072169;
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   185
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   186
    // hedgehog info
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   187
    cMaxTeams        = 8; // maximum number of teams
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   188
    cMaxHHIndex      = 7; // maximum hedgehog index (counting starts at 0)
13882
d82c580b6596 Precalculate cMaxHogHealth
Wuzzy <Wuzzy2@mail.ru>
parents: 13663
diff changeset
   189
                          // NOTE: If you change cMaxHHIndex, also change cMaxHogHealth!
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   190
    cMaxHHs          = cMaxTeams * (cMaxHHIndex+1); // maximum number of hogs
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   191
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   192
    cClanColors      = 9; // number of possible clan colors
13582
517b26009073 Lua: Allow to use negative value for AddTeam to select a default clan color
Wuzzy <Wuzzy2@mail.ru>
parents: 13573
diff changeset
   193
10499
0d8016085108 modestly randomise dab, bump points again.
nemo
parents: 10483
diff changeset
   194
    cMaxEdgePoints = 32768;
22
517be8dc5b76 - Fixed spawning boxes under water
unc0rr
parents: 17
diff changeset
   195
15179
4744d7b78c75 Refactor uLand.pas a bit and add constant for border width
Wuzzy <Wuzzy2@mail.ru>
parents: 15117
diff changeset
   196
    cBorderWidth = 6; // width of indestructible border
4744d7b78c75 Refactor uLand.pas a bit and add constant for border width
Wuzzy <Wuzzy2@mail.ru>
parents: 15117
diff changeset
   197
                      // width of 3 allowed hogs to be knocked through with grenade
15607
f8c1492601fe Flakes: Only spawn them inside valid area
Wuzzy <Wuzzy2@mail.ru>
parents: 15604
diff changeset
   198
    cCloudOffset = 1184; // Y offset for clouds (cloud height = LAND_HEIGHT-cCloudOffset)
15179
4744d7b78c75 Refactor uLand.pas a bit and add constant for border width
Wuzzy <Wuzzy2@mail.ru>
parents: 15117
diff changeset
   199
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   200
    cHHRadius = 9; // hedgehog radius
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   201
    cHHStepTicks = 29;
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   202
13882
d82c580b6596 Precalculate cMaxHogHealth
Wuzzy <Wuzzy2@mail.ru>
parents: 13663
diff changeset
   203
    cMaxHogHealth = 268435455; // maximum hedgehog health
d82c580b6596 Precalculate cMaxHogHealth
Wuzzy <Wuzzy2@mail.ru>
parents: 13663
diff changeset
   204
    // cMaxHogHealth was calculated by: High(LongInt) div (cMaxHHIndex+1);
13597
f7cbf7d8298d Cap hedgehog health to prevent overflow bugs
Wuzzy <Wuzzy2@mail.ru>
parents: 13593
diff changeset
   205
14062
44f20c9e6861 Add Ouch taunt for particulary damaging hits (fall, bullet, shove, hammer)
Wuzzy <Wuzzy2@mail.ru>
parents: 13882
diff changeset
   206
    ouchDmg = 55;        // least amount of damage a hog must take in one blow for sndOuch to play
44f20c9e6861 Add Ouch taunt for particulary damaging hits (fall, bullet, shove, hammer)
Wuzzy <Wuzzy2@mail.ru>
parents: 13882
diff changeset
   207
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   208
    // Z levels
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   209
    cHHZ = 1000;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   210
    cCurrHHZ = Succ(cHHZ);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   211
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   212
    // some gear constants
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   213
    cBarrelHealth = 60;  // initial barrel health
15733
4a8a1dd9528a add smoking to damaged sentries
alfadur
parents: 15705
diff changeset
   214
    cSentryHealth = 60;  // initial sentry health
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   215
    cShotgunRadius = 22; // radius of land a shotgun shot destroys
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   216
    cBlowTorchC    = 6;  // blow torch gear radius component (added to cHHRadius to get the full radius)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   217
    cakeDmg =   75;      // default cake damage
509
fd58135a4407 Bots know shotgun behavior better
unc0rr
parents: 495
diff changeset
   218
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   219
    // key stuff
8026
4a4f21070479 merge xymeng's gsoc engine with a few updates (and further checks on symbol definitions)
koda
parents: 7996
diff changeset
   220
    cKeyMaxIndex = 1600;
7191
9419294e5f33 first attempt at implementing support for keys with modifiers
Xeli
parents: 6982
diff changeset
   221
    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
   222
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   223
    // font stuff
16003
8bb07b0f50ca add some round() so that the scale factor compiles at least with non-integer values
nemo
parents: 15733
diff changeset
   224
    cFontBorder = round(2 * HDPIScaleFactor);
8bb07b0f50ca add some round() so that the scale factor compiles at least with non-integer values
nemo
parents: 15733
diff changeset
   225
    cFontPadding = round(2 * HDPIScaleFactor);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   226
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   227
    cDefaultBuildMaxDist = 256; // default max. building distance with girder/rubber
15117
eff1a080cf40 Move resurrector and seduction distance to uConsts
Wuzzy <Wuzzy2@mail.ru>
parents: 15045
diff changeset
   228
    cResurrectorDist = 100; // effect distance of resurrector
eff1a080cf40 Move resurrector and seduction distance to uConsts
Wuzzy <Wuzzy2@mail.ru>
parents: 15045
diff changeset
   229
    cSeductionDist = 250; // effect distance of seduction
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
   230
13663
91d48cbae927 Prevent wrapping of turn time when using extra time
Wuzzy <Wuzzy2@mail.ru>
parents: 13642
diff changeset
   231
    ExtraTime = 30000; // amount of time (ms) given for using Extra Time
15620
6e72bd61002e Disable gfMoreWind for land objects on turn end only after a fixed-time delay
Wuzzy <Wuzzy2@mail.ru>
parents: 15607
diff changeset
   232
    MaxMoreWindTime = 5000; // amount of time (ms) for land objects like gfMine to be affected after end of turn
13663
91d48cbae927 Prevent wrapping of turn time when using extra time
Wuzzy <Wuzzy2@mail.ru>
parents: 13642
diff changeset
   233
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
   234
    // do not change this value
14698
93429d8f6b3f Add setting to set default/initial zoom
Wuzzy <Wuzzy2@mail.ru>
parents: 14535
diff changeset
   235
    cDefaultZoomLevel = 2.0; // 100% zoom
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
   236
15672
85d2afe34116 Enforce camera limits regardless of zoom level
Wuzzy <Wuzzy2@mail.ru>
parents: 15620
diff changeset
   237
    // Maximum camera positions, values are "pixels outside the mainland"
15674
3d8c2ab2b98b Tweak airplane spawn point to avoid appear out of nowhere
Wuzzy <Wuzzy2@mail.ru>
parents: 15673
diff changeset
   238
    cCamLimitX = 1920; // X (left/right) camera limit, no border. Note: Influences sndFlyAway
3d8c2ab2b98b Tweak airplane spawn point to avoid appear out of nowhere
Wuzzy <Wuzzy2@mail.ru>
parents: 15673
diff changeset
   239
                       // Note: Also make sure it's far enough from airplane spawn
15672
85d2afe34116 Enforce camera limits regardless of zoom level
Wuzzy <Wuzzy2@mail.ru>
parents: 15620
diff changeset
   240
    cCamLimitY = 2048; // Top Y camera limit, no border
15674
3d8c2ab2b98b Tweak airplane spawn point to avoid appear out of nowhere
Wuzzy <Wuzzy2@mail.ru>
parents: 15673
diff changeset
   241
    cCamLimitBorderX = 1920; // X (left/right) camera limit, with border
15672
85d2afe34116 Enforce camera limits regardless of zoom level
Wuzzy <Wuzzy2@mail.ru>
parents: 15620
diff changeset
   242
    cCamLimitBorderY = 2048; // Top Y camera limit, with border
85d2afe34116 Enforce camera limits regardless of zoom level
Wuzzy <Wuzzy2@mail.ru>
parents: 15620
diff changeset
   243
15686
0b99e220568a fix chat-scaling being awkward due to font size pt/px confusion
sheepluva
parents: 15685
diff changeset
   244
    cFontPxToPtRatio   = 1.3281472327365;
13388
32a1696ca93a WIP: make chat resizing faster
sheepluva
parents: 13385
diff changeset
   245
    cBaseChatFontHeight = 12;
32a1696ca93a WIP: make chat resizing faster
sheepluva
parents: 13385
diff changeset
   246
    cChatScaleRelDelta = 0.1;
32a1696ca93a WIP: make chat resizing faster
sheepluva
parents: 13385
diff changeset
   247
    cMinChatScaleValue = 0.8;
15705
0d0f48f098f4 Reduce maximum chat size to 400%
Wuzzy <Wuzzy2@mail.ru>
parents: 15687
diff changeset
   248
    cMaxChatScaleValue = 4.0;
13388
32a1696ca93a WIP: make chat resizing faster
sheepluva
parents: 13385
diff changeset
   249
13385
ec1491bb5acc WIP: allow changing chat size
sheepluva
parents: 13272
diff changeset
   250
    cDefaultUIScaleLevel = 1.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
   251
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   252
    // game flags
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   253
    gfAny                = $FFFFFFFF; // mask for all possible gameflags
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   254
    gfOneClanMode        = $00000001; // Game does not end if there's only one clan in play. For missions
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   255
    gfMultiWeapon        = $00000002; // Enter multishoot mode after attack with infinite shots. For target practice
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   256
    gfSolidLand          = $00000004; // (almost) indestrutible land
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   257
    gfBorder             = $00000008; // border at top, left and right
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   258
    gfDivideTeams        = $00000010; // each clan spawns their hogs on own side of terrain
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   259
    gfLowGravity         = $00000020; // low gravity
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   260
    gfLaserSight         = $00000040; // laser sight for all
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   261
    gfInvulnerable       = $00000080; // invulerable for all
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   262
    gfResetHealth        = $00000100; // heal hogs health up to InitialHealth each turn
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   263
    gfVampiric           = $00000200; // vampirism for all
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   264
    gfKarma              = $00000400; // receive damage you deal
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   265
    gfArtillery          = $00000800; // hogs can't walk
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   266
    gfSwitchHog          = $00001000; // free switch hog at turn start
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   267
    gfRandomOrder        = $00002000; // hogs play in random order
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   268
    gfKing               = $00004000; // King Mode
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   269
    gfPlaceHog           = $00008000; // place all hogs at game start
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   270
    gfSharedAmmo         = $00010000; // ammo is shared per-clan
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   271
    gfDisableGirders     = $00020000; // disable land girders
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   272
    gfDisableLandObjects = $00040000; // disable land objects
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   273
    gfAISurvival         = $00080000; // AI is revived
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   274
    gfInfAttack          = $00100000; // infinite attack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   275
    gfResetWeps          = $00200000; // reset weapons each turn
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   276
    gfPerHogAmmo         = $00400000; // each hog has its own ammo
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   277
    gfDisableWind        = $00800000; // don't automatically change wind
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   278
    gfMoreWind           = $01000000; // wind influences most gears
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   279
    gfTagTeam            = $02000000; // hogs of same clan share their turn time
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   280
    gfBottomBorder       = $04000000; // border at bottom
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   281
    gfShoppaBorder       = $08000000; // Surround terrain with fancy "security border". Pure eye candy
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   282
    // NOTE: When adding new game flags, ask yourself
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   283
    // 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
   284
    // add one in uWorld.pas - look for "AddGoal".
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   285
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   286
    // gear states
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   287
    gstDrowning       = $00000001; // drowning
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   288
    gstHHDriven       = $00000002; // hog is controlled by current player
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   289
    gstMoving         = $00000004; // moving
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   290
    gstAttacked       = $00000008; // after attack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   291
    gstAttacking      = $00000010; // while attacking
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   292
    gstCollision      = $00000020; // it has *just* collided
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   293
    gstChooseTarget   = $00000040; // choosing target
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   294
    gstHHJumping      = $00000100; // hog is doing long jump
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   295
    gsttmpFlag        = $00000200; // temporary wildcard flag, use it for anything you want
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   296
    gstHHThinking     = $00000800; // AI hog is thinking
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   297
    gstNoDamage       = $00001000; // gear is immune to damage
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   298
    gstHHHJump        = $00002000; // hog is doing high jump
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   299
    gstAnimation      = $00004000; // hog is playing an animation
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   300
    gstHHDeath        = $00008000; // hog is dying
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   301
    gstWinner         = $00010000; // indicates if hog did well
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2947
diff changeset
   302
    gstWait           = $00020000;
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   303
    gstNotKickable    = $00040000; // gear cannot be pushed by forces
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   304
    gstLoser          = $00080000; // indicates if hog screwed up
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   305
    gstHHGone         = $00100000; // hog is gone (teamgone event)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   306
    gstInvisible      = $00200000; // invisible
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   307
    gstSubmersible    = $00400000; // can survive in water
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   308
    gstFrozen         = $00800000; // frozen
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   309
    gstNoGravity      = $01000000; // ignores gravity
15244
32678e65b25e Bounce world edge: Fix buggy gear behaviour if gear spawned inside bounce edge area
Wuzzy <Wuzzy2@mail.ru>
parents: 15221
diff changeset
   310
    gstInBounceEdge   = $02000000; // spawned in bounce edge
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   311
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   312
    // gear messages
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   313
    gmLeft           = $00000001; // left
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   314
    gmRight          = $00000002; // right
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   315
    gmUp             = $00000004; // up
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   316
    gmDown           = $00000008; // down
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   317
    gmSwitch         = $00000010; // switch hedgehog
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   318
    gmAttack         = $00000020; // attack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   319
    gmLJump          = $00000040; // long jump
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   320
    gmHJump          = $00000080; // high jump
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   321
    gmDestroy        = $00000100; // request to self-destruct
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   322
    gmSlot           = $00000200; // slot key; with param
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   323
    gmWeapon         = $00000400; // direct weapon selection (SetWeapon); with param
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   324
    gmTimer          = $00000800; // set timer; with param
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   325
    gmAnimate        = $00001000; // start animation; with param
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   326
    gmPrecise        = $00002000; // precise aim
7400
09427dbec1d8 Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents: 7293
diff changeset
   327
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   328
    // gmAddToList and gmRemoveFromList are used when changing order of gears in the gear list. They are used together when changing a gear's Z (drawing order)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   329
    gmRemoveFromList = $00004000; // remove gear from gear list
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   330
    gmAddToList      = $00008000; // add gear to gear list
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   331
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   332
    gmDelete         = $00010000; // delete gear
3894
9abce5468583 Engine:
smaxx
parents: 3875
diff changeset
   333
    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
   334
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   335
    // ammo slots
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   336
    cMaxSlotIndex       = 10; // maximum slot index (including hidden slot) (row in ammo menu)
12708
5ef6780b1c05 Move amNothing from F1 slot to new special hidden weapon slot. Move amDuck to F1
Wuzzy <almikes@aol.com>
parents: 12687
diff changeset
   337
    cHiddenSlotIndex    = cMaxSlotIndex; // slot for hidden ammo types, not visible and has no key
14327
12e7442e4034 Swap a few weapons in ammo menu to get a nice 6×10 grid
Wuzzy <Wuzzy2@mail.ru>
parents: 14062
diff changeset
   338
    cMaxSlotAmmoIndex   = 5; // maximum index for ammos per slot (column in ammo menu)
8330
aaefa587e277 update branch with default
koda
parents: 8026 8325
diff changeset
   339
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   340
    // AI hints to be set for any gear
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   341
    aihUsualProcessing    = $00000000; // treat gear as usual
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   342
    aihDoesntMatter       = $00000001; // ignore gear in attack calculations and don't intentionally attack it
15466
6031c0cfec89 Make sure AI doesn't skip after collecting ammo. Fixes bug 796
Wuzzy <Wuzzy2@mail.ru>
parents: 15382
diff changeset
   343
    aihAmmosChanged       = $00000002; // set when ammos were changed within this turn but not processed yet
8330
aaefa587e277 update branch with default
koda
parents: 8026 8325
diff changeset
   344
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   345
    // ammo properties
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   346
    ammoprop_Timerable    = $00000001; // can set timer
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   347
    ammoprop_Power        = $00000002; // can power up fire strength
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   348
    ammoprop_NeedTarget   = $00000004; // must select target
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   349
    ammoprop_ForwMsgs     = $00000008; // received gear messages are forwarded to the spawned gear
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   350
    ammoprop_AttackInMove = $00000010; // can attack while moving / in mid-air
9573
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   351
    ammoprop_DoesntStopTimerWhileAttacking
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   352
                          = $00000020; // doesn't stop timer while attacker is attacking
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   353
    ammoprop_NoCrosshair  = $00000040; // no crosshair rendered
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   354
    ammoprop_AttackingPut = $00000080; // selecting a target is considered an attack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   355
    ammoprop_DontHold     = $00000100; // don't keep ammo selected in next turn
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   356
    ammoprop_AltAttack    = $00000200; // ammo can equip alternate ammo (ammoprop_AltUse)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   357
    ammoprop_AltUse       = $00000400; // ammo can be equipped by an ammo with ammoprop_AltAttack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   358
    ammoprop_NotBorder    = $00000800; // ammo is not available if map has border
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   359
    ammoprop_Utility      = $00001000; // ammo is considered an utility instead of a weapon
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   360
    ammoprop_Effect       = $00002000; // ammo is considered an effect like extra time or vampirism
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   361
    ammoprop_SetBounce    = $00004000; // can set bounciness
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   362
    ammoprop_NeedUpDown   = $00008000; // used by TouchInterface to show or hide up/down widgets
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   363
    ammoprop_OscAim       = $00010000; // oscillating aim
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   364
    ammoprop_NoMoveAfter  = $00020000; // can't move after attacking
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   365
    ammoprop_Track        = $00040000; // ammo follows the landscape, used by AI
9573
49bca2fabbd3 Oh, dudes :(
unc0rr
parents: 9387
diff changeset
   366
    ammoprop_DoesntStopTimerInMultiShoot
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   367
                          = $00080000; // doesn't stop timer after entering multi-shoot mode
11915
16ce211010cf Add ammoprop for blowtorch and pickhammer for not stopping timer in inf attack
Wuzzy <almikes@aol.com>
parents: 11836
diff changeset
   368
    ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   369
                          = $00100000; // doesn't stop timer while Attacking gear msg is set and inf. attack mode is on
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   370
    ammoprop_ForceTurnEnd = $00200000; // always ends turn after usage, ignoring inf. attack
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   371
    ammoprop_NoTargetAfter= $00400000; // disable target selection after attack
14535
5ac181cb2396 Fix bee targeting fail across wrap world edge
Wuzzy <Wuzzy2@mail.ru>
parents: 14327
diff changeset
   372
    ammoprop_NoWrapTarget = $00800000; // allow to select target beyond wrap world edge limits
15016
e796e9a88394 Show icon above hedgehog for most ammos without hand image
Wuzzy <Wuzzy2@mail.ru>
parents: 14973
diff changeset
   373
    ammoprop_ShowSelIcon  = $01000000; // show icon when selected
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   374
    ammoprop_NoRoundEnd   = $10000000; // ammo doesn't end turn
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3689
diff changeset
   375
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   376
    AMMO_INFINITE = 100;               // internal representation of infinite ammo count
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   377
    AMMO_FINITE_MAX = 99;              // maximum possible finite ammo count
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   378
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   379
    JETPACK_FUEL_INFINITE : LongInt = Low(LongInt); // internal representation of infinite jetpack fuel
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   380
    BIRDY_ENERGY_INFINITE : LongInt = Low(LongInt); // as above, but for Birdy
13593
083733ec7941 Add support for infinite fly time of jetpack and Birdy
Wuzzy <Wuzzy2@mail.ru>
parents: 13582
diff changeset
   381
13533
0c8001e43fd3 Add control to cycle through timer/bounciness values
Wuzzy <Wuzzy2@mail.ru>
parents: 13532
diff changeset
   382
    // Special msgParam value used internally for invalid/non-existing value
0c8001e43fd3 Add control to cycle through timer/bounciness values
Wuzzy <Wuzzy2@mail.ru>
parents: 13532
diff changeset
   383
    // Must not be sent over the network!
0c8001e43fd3 Add control to cycle through timer/bounciness values
Wuzzy <Wuzzy2@mail.ru>
parents: 13532
diff changeset
   384
    MSGPARAM_INVALID = High(LongWord);
0c8001e43fd3 Add control to cycle through timer/bounciness values
Wuzzy <Wuzzy2@mail.ru>
parents: 13532
diff changeset
   385
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   386
    // raw probability values for crate drops
13456
794dcf69a5aa New Lua API function: GetAmmo, to get ammo config
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   387
    probabilityLevels: array [0..8] of LongWord = (0,20,30,60,100,200,400,600,800);
794dcf69a5aa New Lua API function: GetAmmo, to get ammo config
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   388
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   389
    // raw bounciness values for each of the player-selectable bounciness levels
13532
ee77086fc5fa Move hardcoded bounciness values to uConsts
Wuzzy <Wuzzy2@mail.ru>
parents: 13510
diff changeset
   390
    defaultBounciness = 1000;
ee77086fc5fa Move hardcoded bounciness values to uConsts
Wuzzy <Wuzzy2@mail.ru>
parents: 13510
diff changeset
   391
    bouncinessLevels: array [0..4] of LongWord = (350, 700, defaultBounciness, 2000, 4000);
ee77086fc5fa Move hardcoded bounciness values to uConsts
Wuzzy <Wuzzy2@mail.ru>
parents: 13510
diff changeset
   392
7996
66e8ac9c2274 Try to beat AI in Mutant!
unc0rr
parents: 7974
diff changeset
   393
    // explosion flags
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   394
    // By default, an explosion removes land, damages and pushes gears,
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   395
    // spawns an explosion animation and plays no sound.
6765
8fcd2508c49f bug #336
nemo
parents: 6700
diff changeset
   396
    //EXPLAllDamageInRadius = $00000001;  Completely unused for ages
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   397
    EXPLAutoSound         = $00000002; // enable sound (if appropriate)
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   398
    EXPLNoDamage          = $00000004; // don't damage gears
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   399
    EXPLDoNotTouchHH      = $00000008; // don't push hogs
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   400
    EXPLDontDraw          = $00000010; // don't remove land
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   401
    EXPLNoGfx             = $00000020; // don't spawn visual effects
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   402
    EXPLPoisoned          = $00000040; // poison hogs in effect radius
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   403
    EXPLDoNotTouchAny     = $00000080; // don't push anything
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   404
    EXPLForceDraw         = $00000100; // remove land even with gfSolidLand
42
72ffe21f027c - Fixed console behavior
unc0rr
parents: 39
diff changeset
   405
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   406
    // Pos flags for gtCase
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   407
    posCaseAmmo    = $00000001; // ammo crate
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   408
    posCaseHealth  = $00000002; // health crate
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   409
    posCaseUtility = $00000004; // utility crate
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   410
    posCaseDummy   = $00000008; // dummy crate
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   411
    posCaseExplode = $00000010; // crate explodes when touched
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   412
    posCasePoison  = $00000020; // crate poisons hog when touched
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   413
10506
325f7bb60580 fix health crate collision
sheepluva
parents: 10499
diff changeset
   414
    cCaseHealthRadius = 14;
325f7bb60580 fix health crate collision
sheepluva
parents: 10499
diff changeset
   415
9249
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   416
    // hog tag mask
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   417
    //htNone        = $00;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   418
    htTeamName    = $01;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   419
    htName        = $02;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   420
    htHealth      = $04;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   421
    htTransparent = $08;
7b8c82785145 Configuration for tag display default
nemo
parents: 9080
diff changeset
   422
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   423
    NoPointX = Low(LongInt); // special value for CursorX/CursorY if cursor's disabled
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
   424
    cTargetPointRef : TPoint = (x: NoPointX; y: 0);
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   425
8204
9a6030d96273 GCI2012: Convert uMobile into a Callback Record
Rowan D
parents: 8145
diff changeset
   426
    kSystemSoundID_Vibrate = $00000FFF;
9a6030d96273 GCI2012: Convert uMobile into a Callback Record
Rowan D
parents: 8145
diff changeset
   427
10354
56bd029245fc WIP: weSea tweaks, functional and visual
sheepluva
parents: 10307
diff changeset
   428
    cMinPlayWidth = 200;
10661
0da243c01bde world edge tweakes/fixes
sheepluva
parents: 10626
diff changeset
   429
    cWorldEdgeDist = 200;
10354
56bd029245fc WIP: weSea tweaks, functional and visual
sheepluva
parents: 10307
diff changeset
   430
13618
edffc9b7ad58 Add comments for most hwengine constants
Wuzzy <Wuzzy2@mail.ru>
parents: 13604
diff changeset
   431
    cMaxLaserSightWraps = 1; // maximum number of world wraps of laser sight
13573
e896ff1b1d96 Make laser sight work properly through wrap world edge
Wuzzy <Wuzzy2@mail.ru>
parents: 13568
diff changeset
   432
13663
91d48cbae927 Prevent wrapping of turn time when using extra time
Wuzzy <Wuzzy2@mail.ru>
parents: 13642
diff changeset
   433
    cMaxTurnTime = Pred(High(LongInt)); // maximum possible turn time
91d48cbae927 Prevent wrapping of turn time when using extra time
Wuzzy <Wuzzy2@mail.ru>
parents: 13642
diff changeset
   434
4
bcbd7adb4e4b - set svn:eol-style to native
unc0rr
parents: 2
diff changeset
   435
implementation
2716
b9ca1bfca24f complete the replacement of init/free wrappers for every unit
koda
parents: 2715
diff changeset
   436
3145
a9af6bf223cf Birdy's falling feathers
mbait
parents: 3142
diff changeset
   437
end.