author | unc0rr |
Tue, 03 Jul 2007 17:03:41 +0000 | |
changeset 550 | f6a18d2bab00 |
parent 547 | b81a055f2d06 |
child 553 | 5478386d935f |
permissions | -rw-r--r-- |
4 | 1 |
(* |
2 |
* Hedgewars, a worms-like game |
|
393 | 3 |
* Copyright (c) 2004-2007 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 |
||
19 |
unit uConsts; |
|
20 |
interface |
|
80 | 21 |
uses SDLh, uLocale; |
4 | 22 |
{$INCLUDE options.inc} |
271 | 23 |
{$INCLUDE proto.inc} |
80 | 24 |
type TStuff = (sConsoleBG, sPowerBar, sQuestion, sWindBar, |
35 | 25 |
sWindL, sWindR, sRopeNode); |
282 | 26 |
|
4 | 27 |
TGameState = (gsLandGen, gsStart, gsGame, gsConsole, gsExit); |
282 | 28 |
|
155
401f4ea24715
Engine can generate land preview and send it via IPC
unc0rr
parents:
112
diff
changeset
|
29 |
TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview); |
282 | 30 |
|
80 | 31 |
TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps, |
32 |
ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, |
|
161 | 33 |
ptLocale, ptAmmoMenu); |
282 | 34 |
|
4 | 35 |
TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame, |
36 |
sprLag, sprArrow, sprGrenade, sprTargetP, sprUFO, |
|
10 | 37 |
sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff, |
78 | 38 |
sprMineOn, sprCase, sprFAid, sprDynamite, sprPower, |
80 | 39 |
sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont, |
161 | 40 |
sprSky, sprAMBorders, sprAMSlot, sprAMSlotName, sprAMAmmos, |
283 | 41 |
sprAMSlotKeys, sprAMSelection, sprFinger, sprAirBomb, |
534 | 42 |
sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask, |
43 |
sprSwitch); |
|
282 | 44 |
|
4 | 45 |
TGearType = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, |
83 | 46 |
gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, |
49 | 47 |
gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite, |
82 | 48 |
gtTeamHealthSorter, gtClusterBomb, gtCluster, gtShover, gtFlame, |
211 | 49 |
gtFirePunch, gtATStartGame, gtATSmoothWindCh, gtATFinishGame, |
520 | 50 |
gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, gtGirder, |
534 | 51 |
gtTeleport, gtSmallDamage, gtSwitcher); |
282 | 52 |
|
16 | 53 |
TGearsType = set of TGearType; |
282 | 54 |
|
55 |
TSound = (sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease, |
|
56 |
sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact, |
|
57 |
sndMineTick, sndPickhammer); |
|
58 |
||
82 | 59 |
TAmmoType = (amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer, |
60 |
amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, |
|
409 | 61 |
amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, |
534 | 62 |
amGirder, amTeleport, amSwitch); |
282 | 63 |
|
522 | 64 |
THWFont = (fnt16, fntBig, fntSmall); |
282 | 65 |
|
174 | 66 |
TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpNetSay, capgrpVolume); |
282 | 67 |
|
307 | 68 |
TStatInfoType = (siGameResult, siMaxStepDamage, siKilledHHs); |
306 | 69 |
|
4 | 70 |
THHFont = record |
71 |
Handle: PTTF_Font; |
|
371 | 72 |
Height: LongInt; |
73 |
style: LongInt; |
|
4 | 74 |
Name: string[15]; |
75 |
end; |
|
282 | 76 |
|
4 | 77 |
TAmmo = record |
78 |
Propz: LongWord; |
|
79 |
Count: LongWord; |
|
80 |
NumPerTurn: LongWord; |
|
81 |
Timer: LongWord; |
|
408 | 82 |
Pos: LongWord; |
4 | 83 |
AmmoType: TAmmoType; |
84 |
end; |
|
85 |
||
86 |
||
105 | 87 |
const |
43 | 88 |
errmsgCreateSurface = 'Error creating SDL surface'; |
4 | 89 |
errmsgTransparentSet = 'Error setting transparent color'; |
90 |
errmsgUnknownCommand = 'Unknown command'; |
|
91 |
errmsgUnknownVariable = 'Unknown variable'; |
|
92 |
errmsgIncorrectUse = 'Incorrect use'; |
|
93 |
errmsgShouldntRun = 'This program shouldn''t be run manually'; |
|
94 |
||
95 |
msgLoading = 'Loading '; |
|
96 |
msgOK = 'ok'; |
|
97 |
msgFailed = 'failed'; |
|
98 |
msgGettingConfig = 'Getting game config...'; |
|
99 |
||
100 |
const |
|
304 | 101 |
cMaxPower = 1500; |
102 |
cMaxAngle = 2048; |
|
103 |
cPowerDivisor = 1500; |
|
104 |
||
74 | 105 |
MAXNAMELEN = 32; |
106 |
||
64 | 107 |
COLOR_LAND = $00FFFFFF; |
108 |
||
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
109 |
cifRandomize = $00000001; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
110 |
cifTheme = $00000002; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
111 |
cifMap = $00000002; // either theme or map (or map+theme) |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
112 |
cifAllInited = cifRandomize or |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
113 |
cifTheme or |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
114 |
cifMap; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
115 |
|
188 | 116 |
cTransparentColor: Longword = $000000; |
4 | 117 |
|
547 | 118 |
cMaxTeams = 6; |
109 | 119 |
cMaxHHIndex = 7; |
423 | 120 |
cMaxHHs = 30; |
53 | 121 |
cMaxSpawnPoints = 1024; |
4 | 122 |
|
22 | 123 |
cMaxEdgePoints = 16384; |
124 |
||
53 | 125 |
cHHRadius = 9; |
70 | 126 |
cHHStepTicks = 38; |
509 | 127 |
|
294 | 128 |
cHHZ = 1000; |
129 |
cCurrHHZ = Succ(cHHZ); |
|
4 | 130 |
|
509 | 131 |
cShotgunRadius = 22; |
511 | 132 |
cBlowTorchC = 6; |
509 | 133 |
|
109 | 134 |
cKeyMaxIndex = 1023; |
4 | 135 |
|
97
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
136 |
cMaxCaptions = 4; |
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
137 |
|
4 | 138 |
cInactDelay = 1500; |
139 |
||
140 |
gfForts = $00000001; |
|
141 |
||
142 |
gstDrowning = $00000001; |
|
143 |
gstHHDriven = $00000002; |
|
144 |
gstMoving = $00000004; |
|
145 |
gstAttacked = $00000008; |
|
146 |
gstAttacking = $00000010; |
|
147 |
gstCollision = $00000020; |
|
148 |
gstHHChooseTarget = $00000040; |
|
149 |
gstHHJumping = $00000100; |
|
150 |
gsttmpFlag = $00000200; |
|
151 |
gstHHThinking = $00000800; |
|
79 | 152 |
gstNoDamage = $00001000; |
424 | 153 |
gstHHHJump = $00002000; |
511 | 154 |
gstAnimation = $00004000; |
4 | 155 |
|
156 |
gm_Left = $00000001; |
|
157 |
gm_Right = $00000002; |
|
158 |
gm_Up = $00000004; |
|
159 |
gm_Down = $00000008; |
|
160 |
gm_Switch = $00000010; |
|
161 |
gm_Attack = $00000020; |
|
162 |
gm_LJump = $00000040; |
|
163 |
gm_HJump = $00000080; |
|
164 |
gm_Destroy= $00000100; |
|
165 |
||
263 | 166 |
cMaxSlotIndex = 8; |
409 | 167 |
cMaxSlotAmmoIndex = 2; |
4 | 168 |
|
169 |
ammoprop_Timerable = $00000001; |
|
170 |
ammoprop_Power = $00000002; |
|
171 |
ammoprop_NeedTarget = $00000004; |
|
172 |
ammoprop_ForwMsgs = $00000008; |
|
542 | 173 |
ammoprop_AttackInMove = $00000010; |
13 | 174 |
ammoprop_NoCrosshair = $00000040; |
263 | 175 |
ammoprop_AttackingPut = $00000080; |
4 | 176 |
AMMO_INFINITE = High(LongWord); |
177 |
||
42 | 178 |
EXPLAllDamageInRadius = $00000001; |
179 |
EXPLAutoSound = $00000002; |
|
180 |
EXPLNoDamage = $00000004; |
|
181 |
EXPLDoNotTouchHH = $00000008; |
|
305 | 182 |
EXPLDontDraw = $00000010; |
42 | 183 |
|
184 |
posCaseAmmo = $00000001; |
|
185 |
posCaseHealth = $00000002; |
|
4 | 186 |
|
371 | 187 |
NoPointX = Low(LongInt); |
4 | 188 |
|
74 | 189 |
cHHFileName = 'Hedgehog'; |
190 |
cCHFileName = 'Crosshair'; |
|
4 | 191 |
cThemeCFGFilename = 'theme.cfg'; |
192 |
||
193 |
Fontz: array[THWFont] of THHFont = ( |
|
351 | 194 |
(Handle: nil; |
195 |
Height: 12; |
|
202 | 196 |
style: TTF_STYLE_NORMAL; |
74 | 197 |
Name: 'DejaVuSans.ttf'), |
351 | 198 |
(Handle: nil; |
199 |
Height: 24; |
|
202 | 200 |
style: TTF_STYLE_NORMAL; |
522 | 201 |
Name: 'DejaVuSans.ttf'), |
202 |
(Handle: nil; |
|
203 |
Height: 10; |
|
204 |
style: TTF_STYLE_NORMAL; |
|
74 | 205 |
Name: 'DejaVuSans.ttf') |
4 | 206 |
); |
207 |
||
202 | 208 |
FontBorder = 2; |
209 |
||
99 | 210 |
PathPrefix: string = './'; |
211 |
Pathz: array[TPathType] of string = ( |
|
80 | 212 |
'', // ptNone |
267 | 213 |
'', // ptData |
214 |
'Graphics', // ptGraphics |
|
215 |
'Themes', // ptThemes |
|
216 |
'Themes/avematan', // ptCurrTheme |
|
217 |
'Teams', // ptTeams |
|
218 |
'Maps', // ptMaps |
|
53 | 219 |
'', // ptMapCurrent |
267 | 220 |
'Demos', // ptDemos |
221 |
'Sounds', // ptSounds |
|
222 |
'Graphics/Graves', // ptGraves |
|
223 |
'Fonts', // ptFonts |
|
224 |
'Forts', // ptForts |
|
225 |
'Locale', // ptLocale |
|
226 |
'Graphics/AmmoMenu' // ptAmmoMenu |
|
4 | 227 |
); |
228 |
||
229 |
StuffLoadData: array[TStuff] of record |
|
230 |
FileName: String[31]; |
|
231 |
Path : TPathType; |
|
232 |
end = ( |
|
74 | 233 |
(FileName: 'Console'; Path: ptGraphics ), // sConsoleBG |
234 |
(FileName: 'PowerBar'; Path: ptGraphics ), // sPowerBar |
|
235 |
(FileName: 'thinking'; Path: ptGraphics ), // sQuestion |
|
236 |
(FileName: 'WindBar'; Path: ptGraphics ), // sWindBar |
|
237 |
(FileName: 'WindL'; Path: ptGraphics ), // sWindL |
|
238 |
(FileName: 'WindR'; Path: ptGraphics ), // sWindR |
|
239 |
(FileName: 'RopeNode'; Path: ptGraphics ) // sRopeNode |
|
4 | 240 |
); |
241 |
StuffPoz: array[TStuff] of TSDL_Rect = ( |
|
242 |
(x: 256; y: 256; w: 256; h: 256), // sConsoleBG |
|
243 |
(x: 256; y: 768; w: 256; h: 32), // sPowerBar |
|
5 | 244 |
(x: 256; y: 512; w: 32; h: 32), // sQuestion |
245 |
(x: 256; y: 800; w: 151; h: 17), // sWindBar |
|
246 |
(x: 256; y: 817; w: 80; h: 13), // sWindL |
|
35 | 247 |
(x: 336; y: 817; w: 80; h: 13), // sWindR |
248 |
(x: 256; y: 544; w: 6; h: 6) // sRopeNode |
|
4 | 249 |
); |
250 |
SpritesData: array[TSprite] of record |
|
35 | 251 |
FileName: String[31]; |
80 | 252 |
Path, AltPath: TPathType; |
35 | 253 |
Surface : PSDL_Surface; |
371 | 254 |
Width, Height: LongInt; |
35 | 255 |
hasAlpha: boolean; |
256 |
end = ( |
|
351 | 257 |
(FileName: 'BlueWater'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
258 |
Width: 256; Height: 48; hasAlpha: false),// sprWater |
|
259 |
(FileName: 'Clouds'; Path: ptCurrTheme; AltPath: ptGraphics; Surface: nil; |
|
260 |
Width: 256; Height:128; hasAlpha: false),// sprCloud |
|
261 |
(FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
262 |
Width: 16; Height: 16; hasAlpha: false),// sprBomb |
|
263 |
(FileName: 'BigDigits'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
264 |
Width: 32; Height: 32; hasAlpha: true),// sprBigDigit |
|
265 |
(FileName: 'Frame'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
266 |
Width: 4; Height: 32; hasAlpha: true),// sprFrame |
|
267 |
(FileName: 'Lag'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
446 | 268 |
Width: 65; Height: 65; hasAlpha: true),// sprLag |
351 | 269 |
(FileName: 'Arrow'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
270 |
Width: 16; Height: 16; hasAlpha: false),// sprCursor |
|
271 |
(FileName: 'Grenade'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
272 |
Width: 32; Height: 32; hasAlpha: false),// sprGrenade |
|
273 |
(FileName: 'Targetp'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
274 |
Width: 32; Height: 32; hasAlpha: false),// sprTargetP |
|
275 |
(FileName: 'UFO'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
276 |
Width: 32; Height: 32; hasAlpha: false),// sprUFO |
|
277 |
(FileName:'SmokeTrace'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
278 |
Width: 32; Height: 32; hasAlpha: true),// sprSmokeTrace |
|
279 |
(FileName: 'RopeHook'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
280 |
Width: 32; Height: 32; hasAlpha: false),// sprRopeHook |
|
281 |
(FileName: 'Expl50'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
282 |
Width: 64; Height: 64; hasAlpha: false),// sprExplosion50 |
|
283 |
(FileName: 'MineOff'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
284 |
Width: 16; Height: 16; hasAlpha: false),// sprMineOff |
|
285 |
(FileName: 'MineOn'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
286 |
Width: 16; Height: 16; hasAlpha: false),// sprMineOn |
|
287 |
(FileName: 'Case'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
288 |
Width: 32; Height: 32; hasAlpha: false),// sprCase |
|
289 |
(FileName: 'FirstAid'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
290 |
Width: 48; Height: 48; hasAlpha: false),// sprFAid |
|
291 |
(FileName: 'dynamite'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
292 |
Width: 32; Height: 32; hasAlpha: false),// sprDynamite |
|
293 |
(FileName: 'Power'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
294 |
Width: 32; Height: 32; hasAlpha: true),// sprPower |
|
295 |
(FileName: 'ClBomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
296 |
Width: 16; Height: 16; hasAlpha: false),// sprClusterBomb |
|
297 |
(FileName:'ClParticle'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
298 |
Width: 16; Height: 16; hasAlpha: false),// sprClusterParticle |
|
299 |
(FileName: 'Flame'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
300 |
Width: 16; Height: 16; hasAlpha: false),// sprFlame |
|
301 |
(FileName: 'horizont'; Path: ptCurrTheme; AltPath: ptNone; Surface: nil; |
|
302 |
Width: 0; Height: 0; hasAlpha: false),// sprHorizont |
|
303 |
(FileName: 'Sky'; Path: ptCurrTheme; AltPath: ptNone; Surface: nil; |
|
304 |
Width: 0; Height: 0; hasAlpha: false),// sprSky |
|
305 |
(FileName: 'BrdrLines'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
306 |
Width: 202; Height: 1; hasAlpha: false),// sprAMBorders |
|
307 |
(FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
308 |
Width: 202; Height: 33; hasAlpha: false),// sprAMSlot |
|
309 |
(FileName: 'AmmoName'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
310 |
Width: 202; Height: 33; hasAlpha: false),// sprAMSlotName |
|
311 |
(FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
312 |
Width: 32; Height: 32; hasAlpha: false),// sprAMAmmos |
|
313 |
(FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
314 |
Width: 32; Height: 32; hasAlpha: false),// sprAMSlotKeys |
|
315 |
(FileName: 'Selection'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
316 |
Width: 32; Height: 32; hasAlpha: false),// sprAMSelection |
|
317 |
(FileName: 'Finger'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
318 |
Width: 32; Height: 48; hasAlpha: false),// sprFinger |
|
319 |
(FileName: 'AirBomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
320 |
Width: 32; Height: 32; hasAlpha: false),// sprAirBomb |
|
321 |
(FileName: 'Airplane'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
408 | 322 |
Width: 125; Height: 42; hasAlpha: false),// sprAirplane |
323 |
(FileName:'amAirplane'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
409 | 324 |
Width: 64; Height: 32; hasAlpha: true),// sprAirplane |
325 |
(FileName: 'amGirder'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
520 | 326 |
Width: 160; Height:160; hasAlpha: false),// sprAmGirder |
327 |
(FileName: 'hhMask'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
534 | 328 |
Width: 32; Height: 32; hasAlpha: false),// sprHHTelepMask |
329 |
(FileName: 'Switch'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
330 |
Width: 32; Height: 32; hasAlpha: false) // sprSwitch |
|
35 | 331 |
); |
4 | 332 |
Soundz: array[TSound] of record |
333 |
FileName: String[31]; |
|
334 |
Path : TPathType; |
|
335 |
id : PMixChunk; |
|
282 | 336 |
lastChan: LongInt; |
4 | 337 |
end = ( |
467 | 338 |
(FileName: 'grenadeimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGrenadeImpact |
339 |
(FileName: 'explosion.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndExplosion |
|
340 |
(FileName: 'throwpowerup.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowPowerUp |
|
341 |
(FileName: 'throwrelease.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowRelease |
|
342 |
(FileName: 'splash.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndSplash |
|
343 |
(FileName: 'shotgunreload.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunReload |
|
344 |
(FileName: 'shotgunfire.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunFire |
|
345 |
(FileName: 'graveimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGraveImpact |
|
346 |
(FileName: 'minetick.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndMineTicks |
|
347 |
(FileName: 'pickhammer.ogg'; Path: ptSounds; id: nil; lastChan: 0) // sndPickhammer |
|
4 | 348 |
); |
349 |
||
350 |
Ammoz: array [TAmmoType] of record |
|
80 | 351 |
NameId: TAmmoStrId; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
352 |
Probability, NumberInCase: Longword; |
4 | 353 |
Ammo: TAmmo; |
112 | 354 |
Slot: 0..cMaxSlotIndex; |
4 | 355 |
TimeAfterTurn: Longword; |
304 | 356 |
minAngle, maxAngle: Longword; |
408 | 357 |
PosCount: Longword; |
358 |
PosSprite: TSprite; |
|
4 | 359 |
end = ( |
80 | 360 |
(NameId: sidGrenade; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
361 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
362 |
NumberInCase: 1; |
263 | 363 |
Ammo: (Propz: ammoprop_Timerable or |
364 |
ammoprop_Power; |
|
4 | 365 |
Count: AMMO_INFINITE; |
366 |
NumPerTurn: 0; |
|
367 |
Timer: 3000; |
|
408 | 368 |
Pos: 0; |
4 | 369 |
AmmoType: amGrenade); |
10 | 370 |
Slot: 1; |
351 | 371 |
TimeAfterTurn: 3000; |
372 |
minAngle: 0; |
|
408 | 373 |
maxAngle: 0; |
495 | 374 |
PosCount: 1; |
375 |
PosSprite: sprWater), |
|
80 | 376 |
(NameId: sidClusterBomb; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
377 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
378 |
NumberInCase: 3; |
263 | 379 |
Ammo: (Propz: ammoprop_Timerable or |
380 |
ammoprop_Power; |
|
78 | 381 |
Count: 5; |
382 |
NumPerTurn: 0; |
|
383 |
Timer: 3000; |
|
408 | 384 |
Pos: 0; |
78 | 385 |
AmmoType: amClusterBomb); |
386 |
Slot: 1; |
|
351 | 387 |
TimeAfterTurn: 3000; |
388 |
minAngle: 0; |
|
408 | 389 |
maxAngle: 0; |
495 | 390 |
PosCount: 1; |
391 |
PosSprite: sprWater), |
|
80 | 392 |
(NameId: sidBazooka; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
393 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
394 |
NumberInCase: 1; |
4 | 395 |
Ammo: (Propz: ammoprop_Power; |
396 |
Count: AMMO_INFINITE; |
|
397 |
NumPerTurn: 0; |
|
398 |
Timer: 0; |
|
408 | 399 |
Pos: 0; |
4 | 400 |
AmmoType: amBazooka); |
10 | 401 |
Slot: 0; |
351 | 402 |
TimeAfterTurn: 3000; |
403 |
minAngle: 0; |
|
408 | 404 |
maxAngle: 0; |
495 | 405 |
PosCount: 1; |
406 |
PosSprite: sprWater), |
|
80 | 407 |
(NameId: sidUFO; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
408 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
409 |
NumberInCase: 1; |
263 | 410 |
Ammo: (Propz: ammoprop_Power or |
411 |
ammoprop_NeedTarget; |
|
56 | 412 |
Count: 2; |
4 | 413 |
NumPerTurn: 0; |
414 |
Timer: 0; |
|
408 | 415 |
Pos: 0; |
4 | 416 |
AmmoType: amUFO); |
417 |
Slot: 0; |
|
351 | 418 |
TimeAfterTurn: 3000; |
419 |
minAngle: 0; |
|
408 | 420 |
maxAngle: 0; |
495 | 421 |
PosCount: 1; |
422 |
PosSprite: sprWater), |
|
80 | 423 |
(NameId: sidShotgun; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
424 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
425 |
NumberInCase: 1; |
95 | 426 |
Ammo: (Propz: ammoprop_ForwMsgs; |
4 | 427 |
Count: AMMO_INFINITE; |
428 |
NumPerTurn: 1; |
|
429 |
Timer: 0; |
|
408 | 430 |
Pos: 0; |
4 | 431 |
AmmoType: amShotgun); |
432 |
Slot: 2; |
|
351 | 433 |
TimeAfterTurn: 3000; |
434 |
minAngle: 0; |
|
408 | 435 |
maxAngle: 0; |
495 | 436 |
PosCount: 1; |
437 |
PosSprite: sprWater), |
|
80 | 438 |
(NameId: sidPickHammer; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
439 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
440 |
NumberInCase: 1; |
263 | 441 |
Ammo: (Propz: ammoprop_ForwMsgs or |
542 | 442 |
ammoprop_AttackInMove or |
263 | 443 |
ammoprop_NoCrosshair; |
4 | 444 |
Count: 2; |
445 |
NumPerTurn: 0; |
|
446 |
Timer: 0; |
|
408 | 447 |
Pos: 0; |
4 | 448 |
AmmoType: amPickHammer); |
263 | 449 |
Slot: 6; |
351 | 450 |
TimeAfterTurn: 0; |
451 |
minAngle: 0; |
|
408 | 452 |
maxAngle: 0; |
495 | 453 |
PosCount: 1; |
454 |
PosSprite: sprWater), |
|
80 | 455 |
(NameId: sidSkip; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
456 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
457 |
NumberInCase: 1; |
4 | 458 |
Ammo: (Propz: 0; |
459 |
Count: AMMO_INFINITE; |
|
460 |
NumPerTurn: 0; |
|
461 |
Timer: 0; |
|
408 | 462 |
Pos: 0; |
4 | 463 |
AmmoType: amSkip); |
263 | 464 |
Slot: 8; |
351 | 465 |
TimeAfterTurn: 0; |
466 |
minAngle: 0; |
|
408 | 467 |
maxAngle: 0; |
495 | 468 |
PosCount: 1; |
469 |
PosSprite: sprWater), |
|
80 | 470 |
(NameId: sidRope; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
471 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
472 |
NumberInCase: 3; |
263 | 473 |
Ammo: (Propz: ammoprop_ForwMsgs or |
542 | 474 |
ammoprop_AttackInMove; |
4 | 475 |
Count: 5; |
476 |
NumPerTurn: 0; |
|
477 |
Timer: 0; |
|
408 | 478 |
Pos: 0; |
4 | 479 |
AmmoType: amRope); |
263 | 480 |
Slot: 7; |
304 | 481 |
TimeAfterTurn: 0; |
351 | 482 |
minAngle: 0; |
408 | 483 |
maxAngle: cMaxAngle div 2; |
495 | 484 |
PosCount: 1; |
485 |
PosSprite: sprWater), |
|
80 | 486 |
(NameId: sidMine; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
487 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
488 |
NumberInCase: 1; |
13 | 489 |
Ammo: (Propz: ammoprop_NoCrosshair; |
56 | 490 |
Count: 2; |
10 | 491 |
NumPerTurn: 0; |
492 |
Timer: 0; |
|
408 | 493 |
Pos: 0; |
10 | 494 |
AmmoType: amMine); |
79 | 495 |
Slot: 4; |
351 | 496 |
TimeAfterTurn: 5000; |
497 |
minAngle: 0; |
|
408 | 498 |
maxAngle: 0; |
495 | 499 |
PosCount: 1; |
500 |
PosSprite: sprWater), |
|
80 | 501 |
(NameId: sidDEagle; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
502 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
503 |
NumberInCase: 2; |
37 | 504 |
Ammo: (Propz: 0; |
75 | 505 |
Count: 3; |
37 | 506 |
NumPerTurn: 3; |
507 |
Timer: 0; |
|
408 | 508 |
Pos: 0; |
37 | 509 |
AmmoType: amDEagle); |
510 |
Slot: 2; |
|
351 | 511 |
TimeAfterTurn: 3000; |
512 |
minAngle: 0; |
|
408 | 513 |
maxAngle: 0; |
495 | 514 |
PosCount: 1; |
515 |
PosSprite: sprWater), |
|
408 | 516 |
(NameId: sidDynamite; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
517 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
518 |
NumberInCase: 1; |
408 | 519 |
Ammo: (Propz: ammoprop_NoCrosshair or |
542 | 520 |
ammoprop_AttackInMove; |
408 | 521 |
Count: 1; |
522 |
NumPerTurn: 0; |
|
523 |
Timer: 0; |
|
524 |
Pos: 0; |
|
525 |
AmmoType: amDynamite); |
|
526 |
Slot: 4; |
|
527 |
TimeAfterTurn: 5000; |
|
351 | 528 |
minAngle: 0; |
408 | 529 |
maxAngle: 0; |
495 | 530 |
PosCount: 1; |
531 |
PosSprite: sprWater), |
|
408 | 532 |
(NameId: sidFirePunch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
533 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
534 |
NumberInCase: 1; |
408 | 535 |
Ammo: (Propz: ammoprop_NoCrosshair or |
536 |
ammoprop_ForwMsgs or |
|
542 | 537 |
ammoprop_AttackInMove; |
408 | 538 |
Count: AMMO_INFINITE; |
539 |
NumPerTurn: 0; |
|
540 |
Timer: 0; |
|
541 |
Pos: 0; |
|
542 |
AmmoType: amFirePunch); |
|
543 |
Slot: 3; |
|
544 |
TimeAfterTurn: 3000; |
|
545 |
MinAngle: 0; |
|
546 |
maxAngle: 0; |
|
495 | 547 |
PosCount: 1; |
548 |
PosSprite: sprWater), |
|
408 | 549 |
(NameId: sidBaseballBat; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
550 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
551 |
NumberInCase: 1; |
408 | 552 |
Ammo: (Propz: 0; |
553 |
Count: 1; |
|
554 |
NumPerTurn: 0; |
|
555 |
Timer: 0; |
|
556 |
Pos: 0; |
|
557 |
AmmoType: amBaseballBat); |
|
558 |
Slot: 3; |
|
559 |
TimeAfterTurn: 5000; |
|
351 | 560 |
minAngle: 0; |
408 | 561 |
maxAngle: cMaxAngle div 2; |
495 | 562 |
PosCount: 1; |
563 |
PosSprite: sprWater), |
|
211 | 564 |
(NameId: sidParachute; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
565 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
566 |
NumberInCase: 1; |
263 | 567 |
Ammo: (Propz: ammoprop_ForwMsgs or |
542 | 568 |
ammoprop_AttackInMove or |
454 | 569 |
ammoprop_NoCrosshair; |
211 | 570 |
Count: 2; |
571 |
NumPerTurn: 0; |
|
572 |
Timer: 0; |
|
408 | 573 |
Pos: 0; |
211 | 574 |
AmmoType: amParachute); |
263 | 575 |
Slot: 7; |
351 | 576 |
TimeAfterTurn: 0; |
577 |
minAngle: 0; |
|
408 | 578 |
maxAngle: 0; |
495 | 579 |
PosCount: 1; |
580 |
PosSprite: sprWater), |
|
263 | 581 |
(NameId: sidAirAttack; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
582 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
583 |
NumberInCase: 1; |
263 | 584 |
Ammo: (Propz: ammoprop_NoCrosshair or |
585 |
ammoprop_NeedTarget or |
|
586 |
ammoprop_AttackingPut; |
|
285 | 587 |
Count: 1; |
263 | 588 |
NumPerTurn: 0; |
589 |
Timer: 0; |
|
408 | 590 |
Pos: 0; |
263 | 591 |
AmmoType: amAirAttack); |
592 |
Slot: 5; |
|
351 | 593 |
TimeAfterTurn: 0; |
594 |
minAngle: 0; |
|
408 | 595 |
maxAngle: 0; |
596 |
PosCount: 2; |
|
597 |
PosSprite: sprAmAirplane), |
|
285 | 598 |
(NameId: sidMineStrike; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
599 |
Probability: 400; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
600 |
NumberInCase: 1; |
285 | 601 |
Ammo: (Propz: ammoprop_NoCrosshair or |
602 |
ammoprop_NeedTarget or |
|
603 |
ammoprop_AttackingPut; |
|
604 |
Count: 1; |
|
605 |
NumPerTurn: 0; |
|
606 |
Timer: 0; |
|
408 | 607 |
Pos: 0; |
285 | 608 |
AmmoType: amMineStrike); |
609 |
Slot: 5; |
|
351 | 610 |
TimeAfterTurn: 0; |
611 |
minAngle: 0; |
|
408 | 612 |
maxAngle: 0; |
613 |
PosCount: 2; |
|
614 |
PosSprite: sprAmAirplane), |
|
302 | 615 |
(NameId: sidBlowTorch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
616 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
617 |
NumberInCase: 2; |
302 | 618 |
Ammo: (Propz: ammoprop_ForwMsgs; |
619 |
Count: 1; |
|
620 |
NumPerTurn: 0; |
|
621 |
Timer: 0; |
|
408 | 622 |
Pos: 0; |
302 | 623 |
AmmoType: amBlowTorch); |
624 |
Slot: 6; |
|
304 | 625 |
TimeAfterTurn: 3000; |
305 | 626 |
minAngle: 768; |
408 | 627 |
maxAngle: 1280; |
495 | 628 |
PosCount: 1; |
629 |
PosSprite: sprWater), |
|
409 | 630 |
(NameId: sidGirder; |
631 |
Probability: 400; |
|
411 | 632 |
NumberInCase: 3; |
409 | 633 |
Ammo: (Propz: ammoprop_NoCrosshair or |
634 |
ammoprop_NeedTarget or |
|
635 |
ammoprop_AttackingPut; |
|
636 |
Count: 1; |
|
637 |
NumPerTurn: 0; |
|
638 |
Timer: 0; |
|
639 |
Pos: 0; |
|
640 |
AmmoType: amGirder); |
|
641 |
Slot: 6; |
|
642 |
TimeAfterTurn: 3000; |
|
643 |
minAngle: 0; |
|
644 |
maxAngle: 0; |
|
423 | 645 |
PosCount: 8; |
520 | 646 |
PosSprite: sprAmGirder), |
647 |
(NameId: sidTeleport; |
|
648 |
Probability: 400; |
|
649 |
NumberInCase: 1; |
|
525 | 650 |
Ammo: (Propz: ammoprop_ForwMsgs or |
651 |
ammoprop_NoCrosshair or |
|
520 | 652 |
ammoprop_NeedTarget or |
653 |
ammoprop_AttackingPut; |
|
654 |
Count: 2; |
|
655 |
NumPerTurn: 0; |
|
656 |
Timer: 0; |
|
657 |
Pos: 0; |
|
658 |
AmmoType: amTeleport); |
|
659 |
Slot: 7; |
|
660 |
TimeAfterTurn: 0; |
|
661 |
minAngle: 0; |
|
662 |
maxAngle: 0; |
|
663 |
PosCount: 1; |
|
534 | 664 |
PosSprite: sprWater), |
665 |
(NameId: sidSwitch; |
|
666 |
Probability: 100; |
|
667 |
NumberInCase: 1; |
|
668 |
Ammo: (Propz: ammoprop_ForwMsgs or |
|
669 |
ammoprop_NoCrosshair; |
|
670 |
Count: 3; |
|
671 |
NumPerTurn: 0; |
|
672 |
Timer: 0; |
|
673 |
Pos: 0; |
|
674 |
AmmoType: amSwitch); |
|
675 |
Slot: 8; |
|
676 |
TimeAfterTurn: 0; |
|
677 |
minAngle: 0; |
|
678 |
maxAngle: 0; |
|
679 |
PosCount: 1; |
|
520 | 680 |
PosSprite: sprWater)); |
37 | 681 |
|
4 | 682 |
implementation |
683 |
||
684 |
end. |