author | nemo |
Sun, 05 May 2013 22:50:17 -0400 | |
changeset 8962 | 9780e79619ed |
parent 8838 | aa2ffd427f6a |
child 8847 | ff7fbab7cd56 |
child 8987 | 47cf32305d99 |
permissions | -rw-r--r-- |
4 | 1 |
(* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
6700 | 3 |
* Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com> |
4 | 4 |
* |
183 | 5 |
* This program is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
4 | 8 |
* |
183 | 9 |
* This program is distributed in the hope that it will be useful, |
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
4 | 13 |
* |
183 | 14 |
* You should have received a copy of the GNU General Public License |
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
4 | 17 |
*) |
18 |
||
2599 | 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 | 21 |
unit uConsts; |
22 |
interface |
|
1906 | 23 |
|
4361 | 24 |
uses SDLh, uFloat, GLunit; |
1906 | 25 |
|
2924 | 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 | 28 |
const |
29 |
sfMax = 1000; |
|
3107 | 30 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
31 |
// message constants |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
32 |
errmsgCreateSurface = 'Error creating SDL surface'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
33 |
errmsgTransparentSet = 'Error setting transparent color'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
34 |
errmsgUnknownCommand = 'Unknown command'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
35 |
errmsgUnknownVariable = 'Unknown variable'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
36 |
errmsgIncorrectUse = 'Incorrect use'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
37 |
errmsgShouldntRun = 'This program shouldn''t be run manually'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
38 |
errmsgWrongNumber = 'Wrong parameters number'; |
4 | 39 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
40 |
msgLoading = 'Loading '; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
41 |
msgOK = 'ok'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
42 |
msgFailed = 'failed'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
43 |
msgFailedSize = 'failed due to size'; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
44 |
msgGettingConfig = 'Getting game config...'; |
4 | 45 |
|
8346 | 46 |
// camera movement multipliers |
47 |
cameraKeyboardSpeed : ShortInt = 10; |
|
48 |
||
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
49 |
// color constants |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
50 |
cWhiteColorChannels : TSDL_Color = (r:$FF; g:$FF; b:$FF; unused:$FF); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
51 |
cNearBlackColorChannels : TSDL_Color = (r:$00; g:$00; b:$10; unused:$FF); |
2699
249adefa9c1c
replace initialization/finalization statements with custom init functions
koda
parents:
2697
diff
changeset
|
52 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
53 |
cWhiteColor : Longword = $FFFFFFFF; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
54 |
cYellowColor : Longword = $FFFFFF00; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
55 |
cNearBlackColor : Longword = $FF000010; |
2376 | 56 |
|
2699
249adefa9c1c
replace initialization/finalization statements with custom init functions
koda
parents:
2697
diff
changeset
|
57 |
{$WARNINGS OFF} |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
58 |
cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue: 3006477107); // 1.4 |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
59 |
cBombsSpeed : hwFloat = (isNegative: false; QWordValue: 429496729); |
2699
249adefa9c1c
replace initialization/finalization statements with custom init functions
koda
parents:
2697
diff
changeset
|
60 |
{$WARNINGS ON} |
621 | 61 |
|
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
|
62 |
// 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
|
63 |
rqNone = $00000000; // don't reduce quality |
3634 | 64 |
rqLowRes = $00000001; // use half land array |
65 |
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
|
66 |
rqNoBackground= $00000004; // don't draw background |
3862 | 67 |
rqSimpleRope = $00000008; // draw rope using lines only |
68 |
rq2DWater = $00000010; // disable 3D water effect |
|
4809
9c7d5f802618
rearrange quality flags a little, disable snow rendering on rqLowRes
koda
parents:
4808
diff
changeset
|
69 |
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
|
70 |
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
|
71 |
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
|
72 |
rqPlainSplash = $00000100; // no droplets |
3611 | 73 |
rqClampLess = $00000200; // don't clamp textures |
3634 | 74 |
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
|
75 |
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
|
76 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
77 |
// image flags (for LoadImage()) |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
78 |
ifNone = $00000000; // nothing special |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
79 |
ifAlpha = $00000001; // use alpha channel (unused right now?) |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
80 |
ifCritical = $00000002; // image is critical for gameplay (exit game if unable to load) |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
81 |
ifTransparent = $00000004; // image uses transparent pixels (color keying) |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
82 |
ifIgnoreCaps = $00000008; // ignore hardware capabilities when loading (i.e. image will not be drawn using OpenGL) |
74 | 83 |
|
3491 | 84 |
// 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
|
85 |
tpLowest = 0.00; |
3491 | 86 |
tpLow = 0.25; |
87 |
tpMedium = 0.50; |
|
88 |
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
|
89 |
tpHighest = 1.00; |
3491 | 90 |
|
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
|
91 |
// 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
|
92 |
// 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
|
93 |
// lfObject and lfBasic are only to be different *graphically* in all other ways they should be treated the same |
3519 | 94 |
lfBasic = $8000; // white |
95 |
lfIndestructible = $4000; // red |
|
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
|
96 |
lfObject = $2000; |
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
|
97 |
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
|
98 |
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
|
99 |
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
|
100 |
lfLandMask = $FF00; // upper byte is used for terrain, not objects. |
64 | 101 |
|
8744 | 102 |
lfCurrentHog = $0080; // CurrentHog. It is also used to flag crates, for convenience of AI. Since an active hog would instantly collect the crate, this doesn't 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
|
103 |
lfNotCurrentMask = $FF7F; // inverse of above. frequently used |
8744 | 104 |
lfObjMask = $007F; // lower 7 bits used for hogs |
105 |
lfNotObjMask = $FF80; // inverse of above. |
|
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
|
106 |
// lower byte is for objects. |
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
|
107 |
// consists of 0-127 counted for object checkins and $80 as a bit flag for current hog. |
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
|
108 |
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
|
109 |
|
8744 | 110 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
111 |
cMaxPower = 1500; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
112 |
cMaxAngle = 2048; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
113 |
cPowerDivisor = 1500; |
2699
249adefa9c1c
replace initialization/finalization statements with custom init functions
koda
parents:
2697
diff
changeset
|
114 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
115 |
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
|
116 |
MAXROPEPOINTS = 3840; |
3697 | 117 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
118 |
// some opengl headers do not have these macros |
3493 | 119 |
GL_BGR = $80E0; |
120 |
GL_BGRA = $80E1; |
|
121 |
GL_CLAMP_TO_EDGE = $812F; |
|
122 |
GL_TEXTURE_PRIORITY = $8066; |
|
3697 | 123 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
124 |
cVisibleWater : LongInt = 128; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
125 |
cTeamHealthWidth : LongInt = 128; |
2163
12730f5e79b9
koda's patch fixing some iphone port troubles (color, mouse)
unc0rr
parents:
2153
diff
changeset
|
126 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
127 |
cifRandomize = $00000001; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
128 |
cifTheme = $00000002; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
129 |
cifMap = $00000002; // either theme or map (or map+theme) |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
130 |
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
|
131 |
|
5441
39962b855540
Add grayscale option for 3d, helps with colour clashing
nemo
parents:
5366
diff
changeset
|
132 |
RGB_LUMINANCE_RED = 0.212671; |
39962b855540
Add grayscale option for 3d, helps with colour clashing
nemo
parents:
5366
diff
changeset
|
133 |
RGB_LUMINANCE_GREEN = 0.715160; |
39962b855540
Add grayscale option for 3d, helps with colour clashing
nemo
parents:
5366
diff
changeset
|
134 |
RGB_LUMINANCE_BLUE = 0.072169; |
4 | 135 |
|
4406
beb4de0af990
Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents:
4396
diff
changeset
|
136 |
cMaxTeams = 8; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
137 |
cMaxHHIndex = 7; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
138 |
cMaxHHs = 48; |
4 | 139 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
140 |
cMaxEdgePoints = 16384; |
22 | 141 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
142 |
cHHRadius = 9; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
143 |
cHHStepTicks = 29; |
509 | 144 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
145 |
cHHZ = 1000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
146 |
cCurrHHZ = Succ(cHHZ); |
4 | 147 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
148 |
cBarrelHealth = 60; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
149 |
cShotgunRadius = 22; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
150 |
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
|
151 |
cakeDmg = 75; |
509 | 152 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
153 |
cKeyMaxIndex = 1023; |
7191
9419294e5f33
first attempt at implementing support for keys with modifiers
Xeli
parents:
6982
diff
changeset
|
154 |
cKbdMaxIndex = 65536;//need more room for the modifier keys |
6917 | 155 |
|
6982 | 156 |
cFontBorder = 2; |
4 | 157 |
|
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
|
158 |
// do not change this value |
3668
3f7a95234d8a
tap to play piano notes, fix for audio and pause glitch
koda
parents:
3667
diff
changeset
|
159 |
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
|
160 |
|
7996 | 161 |
// game flags |
3743 | 162 |
gfAny = $FFFFFFFF; |
4000
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
163 |
gfOneClanMode = $00000001; // used in trainings |
3999 | 164 |
gfMultiWeapon = $00000002; // used in trainings |
3743 | 165 |
gfSolidLand = $00000004; |
166 |
gfBorder = $00000008; |
|
167 |
gfDivideTeams = $00000010; |
|
168 |
gfLowGravity = $00000020; |
|
169 |
gfLaserSight = $00000040; |
|
170 |
gfInvulnerable = $00000080; |
|
4099 | 171 |
gfResetHealth = $00000100; |
3743 | 172 |
gfVampiric = $00000200; |
173 |
gfKarma = $00000400; |
|
174 |
gfArtillery = $00000800; |
|
4000
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
175 |
gfForts = $00001000; |
3743 | 176 |
gfRandomOrder = $00002000; |
177 |
gfKing = $00004000; |
|
178 |
gfPlaceHog = $00008000; |
|
179 |
gfSharedAmmo = $00010000; |
|
180 |
gfDisableGirders = $00020000; |
|
4000
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
181 |
gfDisableLandObjects = $00040000; |
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
182 |
gfAISurvival = $00080000; |
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
183 |
gfInfAttack = $00100000; |
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
184 |
gfResetWeps = $00200000; |
ddc4a09889e7
engine: reorder GameFlags and update files, frontend and other stuff
koda
parents:
3999
diff
changeset
|
185 |
gfPerHogAmmo = $00400000; |
4776
ab956d4647a4
set windspeed to 0 at the very beginning of the game. (fixes DisableWind game modifier)
sheepluva
parents:
4406
diff
changeset
|
186 |
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
|
187 |
gfMoreWind = $01000000; |
5016
9347d82a26cc
added game mode Tag Team, mostly untested, please test :)
Henek
parents:
4976
diff
changeset
|
188 |
gfTagTeam = $02000000; |
5717 | 189 |
gfBottomBorder = $04000000; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
190 |
// NOTE: When adding new game flags, ask yourself |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
191 |
// 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
|
192 |
// add one in uWorld.pas - look for "AddGoal". |
4 | 193 |
|
7996 | 194 |
// gear states |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
195 |
gstDrowning = $00000001; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
196 |
gstHHDriven = $00000002; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
197 |
gstMoving = $00000004; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
198 |
gstAttacked = $00000008; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
199 |
gstAttacking = $00000010; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
200 |
gstCollision = $00000020; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
201 |
gstHHChooseTarget = $00000040; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
202 |
gstHHJumping = $00000100; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
203 |
gsttmpFlag = $00000200; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
204 |
gstHHThinking = $00000800; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
205 |
gstNoDamage = $00001000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
206 |
gstHHHJump = $00002000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
207 |
gstAnimation = $00004000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
208 |
gstHHDeath = $00008000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
209 |
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
|
210 |
gstWait = $00020000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
211 |
gstNotKickable = $00040000; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
212 |
gstLoser = $00080000; |
3310 | 213 |
gstHHGone = $00100000; |
5348
0bc81de36e08
Don't draw snow flakes spawned in land, introduce gstInvisible flag
unc0rr
parents:
5316
diff
changeset
|
214 |
gstInvisible = $00200000; |
4 | 215 |
|
7996 | 216 |
// gear messages |
7400
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
217 |
gmLeft = $00000001; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
218 |
gmRight = $00000002; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
219 |
gmUp = $00000004; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
220 |
gmDown = $00000008; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
221 |
gmSwitch = $00000010; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
222 |
gmAttack = $00000020; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
223 |
gmLJump = $00000040; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
224 |
gmHJump = $00000080; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
225 |
gmDestroy = $00000100; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
226 |
gmSlot = $00000200; // with param |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
227 |
gmWeapon = $00000400; // with param |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
228 |
gmTimer = $00000800; // with param |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
229 |
gmAnimate = $00001000; // with param |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
230 |
gmPrecise = $00002000; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
231 |
|
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
232 |
gmRemoveFromList = $00004000; |
09427dbec1d8
Fix TARDIS, make switcher work w/ the new more stringent check.
nemo
parents:
7293
diff
changeset
|
233 |
gmAddToList = $00008000; |
7517 | 234 |
gmDelete = $00010000; |
3894 | 235 |
gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise; |
4 | 236 |
|
3485 | 237 |
cMaxSlotIndex = 9; |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
238 |
cMaxSlotAmmoIndex = 5; |
7996 | 239 |
|
240 |
// ai hints |
|
241 |
aihUsualProcessing = $00000000; |
|
242 |
aihDoesntMatter = $00000001; |
|
243 |
||
244 |
// ammo properties |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
245 |
ammoprop_Timerable = $00000001; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
246 |
ammoprop_Power = $00000002; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
247 |
ammoprop_NeedTarget = $00000004; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
248 |
ammoprop_ForwMsgs = $00000008; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
249 |
ammoprop_AttackInMove = $00000010; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
250 |
ammoprop_NoCrosshair = $00000040; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
251 |
ammoprop_AttackingPut = $00000080; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
252 |
ammoprop_DontHold = $00000100; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
253 |
ammoprop_AltAttack = $00000200; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
254 |
ammoprop_AltUse = $00000400; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
255 |
ammoprop_NotBorder = $00000800; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
256 |
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
|
257 |
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
|
258 |
ammoprop_SetBounce = $00004000; |
6941
228c0ab239f1
add ammoprop to enable to up and down buttons on for the touch interface
Xeli
parents:
6917
diff
changeset
|
259 |
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
|
260 |
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
|
261 |
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
|
262 |
ammoprop_Track = $00040000; |
4828 | 263 |
ammoprop_NoRoundEnd = $10000000; |
3697 | 264 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
265 |
AMMO_INFINITE = 100; |
4 | 266 |
|
7996 | 267 |
// explosion flags |
6765 | 268 |
//EXPLAllDamageInRadius = $00000001; Completely unused for ages |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
269 |
EXPLAutoSound = $00000002; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
270 |
EXPLNoDamage = $00000004; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
271 |
EXPLDoNotTouchHH = $00000008; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
272 |
EXPLDontDraw = $00000010; |
3004 | 273 |
EXPLNoGfx = $00000020; |
3383 | 274 |
EXPLPoisoned = $00000040; |
3712 | 275 |
EXPLDoNotTouchAny = $00000080; |
42 | 276 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
277 |
posCaseAmmo = $00000001; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
278 |
posCaseHealth = $00000002; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
279 |
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
|
280 |
posCaseDummy = $00000008; |
5343 | 281 |
posCaseExplode = $00000010; |
282 |
posCasePoison = $00000020; |
|
4 | 283 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
284 |
NoPointX = Low(LongInt); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2947
diff
changeset
|
285 |
cTargetPointRef : TPoint = (X: NoPointX; Y: 0); |
4 | 286 |
|
8204 | 287 |
kSystemSoundID_Vibrate = $00000FFF; |
288 |
||
4 | 289 |
implementation |
2716
b9ca1bfca24f
complete the replacement of init/free wrappers for every unit
koda
parents:
2715
diff
changeset
|
290 |
|
3145 | 291 |
end. |