author | unc0rr |
Wed, 30 May 2007 19:29:27 +0000 | |
changeset 532 | 8136a5363586 |
parent 525 | ae21b8e86dd9 |
child 534 | 92fb2b0d5117 |
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, |
520 | 42 |
sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask); |
282 | 43 |
|
4 | 44 |
TGearType = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, |
83 | 45 |
gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, |
49 | 46 |
gtSmokeTrace, gtExplosion, gtMine, gtCase, gtDEagleShot, gtDynamite, |
82 | 47 |
gtTeamHealthSorter, gtClusterBomb, gtCluster, gtShover, gtFlame, |
211 | 48 |
gtFirePunch, gtATStartGame, gtATSmoothWindCh, gtATFinishGame, |
520 | 49 |
gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, gtGirder, |
522 | 50 |
gtTeleport, gtSmallDamage); |
282 | 51 |
|
16 | 52 |
TGearsType = set of TGearType; |
282 | 53 |
|
54 |
TSound = (sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease, |
|
55 |
sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact, |
|
56 |
sndMineTick, sndPickhammer); |
|
57 |
||
82 | 58 |
TAmmoType = (amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer, |
59 |
amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, |
|
409 | 60 |
amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, |
520 | 61 |
amGirder, amTeleport); |
282 | 62 |
|
522 | 63 |
THWFont = (fnt16, fntBig, fntSmall); |
282 | 64 |
|
174 | 65 |
TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpNetSay, capgrpVolume); |
282 | 66 |
|
307 | 67 |
TStatInfoType = (siGameResult, siMaxStepDamage, siKilledHHs); |
306 | 68 |
|
4 | 69 |
THHFont = record |
70 |
Handle: PTTF_Font; |
|
371 | 71 |
Height: LongInt; |
72 |
style: LongInt; |
|
4 | 73 |
Name: string[15]; |
74 |
end; |
|
282 | 75 |
|
4 | 76 |
TAmmo = record |
77 |
Propz: LongWord; |
|
78 |
Count: LongWord; |
|
79 |
NumPerTurn: LongWord; |
|
80 |
Timer: LongWord; |
|
408 | 81 |
Pos: LongWord; |
4 | 82 |
AmmoType: TAmmoType; |
83 |
end; |
|
84 |
||
85 |
||
105 | 86 |
const |
43 | 87 |
errmsgCreateSurface = 'Error creating SDL surface'; |
4 | 88 |
errmsgTransparentSet = 'Error setting transparent color'; |
89 |
errmsgUnknownCommand = 'Unknown command'; |
|
90 |
errmsgUnknownVariable = 'Unknown variable'; |
|
91 |
errmsgIncorrectUse = 'Incorrect use'; |
|
92 |
errmsgShouldntRun = 'This program shouldn''t be run manually'; |
|
93 |
||
94 |
msgLoading = 'Loading '; |
|
95 |
msgOK = 'ok'; |
|
96 |
msgFailed = 'failed'; |
|
97 |
msgGettingConfig = 'Getting game config...'; |
|
98 |
||
99 |
const |
|
304 | 100 |
cMaxPower = 1500; |
101 |
cMaxAngle = 2048; |
|
102 |
cPowerDivisor = 1500; |
|
103 |
||
74 | 104 |
MAXNAMELEN = 32; |
105 |
||
64 | 106 |
COLOR_LAND = $00FFFFFF; |
107 |
||
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
108 |
cifRandomize = $00000001; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
109 |
cifTheme = $00000002; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
110 |
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
|
111 |
cifAllInited = cifRandomize or |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
112 |
cifTheme or |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
113 |
cifMap; |
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
114 |
|
188 | 115 |
cTransparentColor: Longword = $000000; |
4 | 116 |
|
109 | 117 |
cMaxHHIndex = 7; |
423 | 118 |
cMaxHHs = 30; |
53 | 119 |
cMaxSpawnPoints = 1024; |
4 | 120 |
|
22 | 121 |
cMaxEdgePoints = 16384; |
122 |
||
53 | 123 |
cHHRadius = 9; |
70 | 124 |
cHHStepTicks = 38; |
509 | 125 |
|
294 | 126 |
cHHZ = 1000; |
127 |
cCurrHHZ = Succ(cHHZ); |
|
4 | 128 |
|
509 | 129 |
cShotgunRadius = 22; |
511 | 130 |
cBlowTorchC = 6; |
509 | 131 |
|
109 | 132 |
cKeyMaxIndex = 1023; |
4 | 133 |
|
97
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
134 |
cMaxCaptions = 4; |
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
135 |
|
4 | 136 |
cInactDelay = 1500; |
137 |
||
138 |
gfForts = $00000001; |
|
139 |
||
140 |
gstDrowning = $00000001; |
|
141 |
gstHHDriven = $00000002; |
|
142 |
gstMoving = $00000004; |
|
143 |
gstAttacked = $00000008; |
|
144 |
gstAttacking = $00000010; |
|
145 |
gstCollision = $00000020; |
|
146 |
gstHHChooseTarget = $00000040; |
|
147 |
gstFalling = $00000080; |
|
148 |
gstHHJumping = $00000100; |
|
149 |
gsttmpFlag = $00000200; |
|
150 |
gstHHThinking = $00000800; |
|
79 | 151 |
gstNoDamage = $00001000; |
424 | 152 |
gstHHHJump = $00002000; |
511 | 153 |
gstAnimation = $00004000; |
4 | 154 |
|
155 |
gm_Left = $00000001; |
|
156 |
gm_Right = $00000002; |
|
157 |
gm_Up = $00000004; |
|
158 |
gm_Down = $00000008; |
|
159 |
gm_Switch = $00000010; |
|
160 |
gm_Attack = $00000020; |
|
161 |
gm_LJump = $00000040; |
|
162 |
gm_HJump = $00000080; |
|
163 |
gm_Destroy= $00000100; |
|
164 |
||
263 | 165 |
cMaxSlotIndex = 8; |
409 | 166 |
cMaxSlotAmmoIndex = 2; |
4 | 167 |
|
168 |
ammoprop_Timerable = $00000001; |
|
169 |
ammoprop_Power = $00000002; |
|
170 |
ammoprop_NeedTarget = $00000004; |
|
171 |
ammoprop_ForwMsgs = $00000008; |
|
172 |
ammoprop_AttackInFall = $00000010; |
|
173 |
ammoprop_AttackInJump = $00000020; |
|
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; |
|
328 |
Width: 32; Height: 32; hasAlpha: false) // sprHHTelepMask |
|
35 | 329 |
); |
4 | 330 |
Soundz: array[TSound] of record |
331 |
FileName: String[31]; |
|
332 |
Path : TPathType; |
|
333 |
id : PMixChunk; |
|
282 | 334 |
lastChan: LongInt; |
4 | 335 |
end = ( |
467 | 336 |
(FileName: 'grenadeimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGrenadeImpact |
337 |
(FileName: 'explosion.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndExplosion |
|
338 |
(FileName: 'throwpowerup.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowPowerUp |
|
339 |
(FileName: 'throwrelease.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowRelease |
|
340 |
(FileName: 'splash.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndSplash |
|
341 |
(FileName: 'shotgunreload.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunReload |
|
342 |
(FileName: 'shotgunfire.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunFire |
|
343 |
(FileName: 'graveimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGraveImpact |
|
344 |
(FileName: 'minetick.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndMineTicks |
|
345 |
(FileName: 'pickhammer.ogg'; Path: ptSounds; id: nil; lastChan: 0) // sndPickhammer |
|
4 | 346 |
); |
347 |
||
348 |
Ammoz: array [TAmmoType] of record |
|
80 | 349 |
NameId: TAmmoStrId; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
350 |
Probability, NumberInCase: Longword; |
4 | 351 |
Ammo: TAmmo; |
112 | 352 |
Slot: 0..cMaxSlotIndex; |
4 | 353 |
TimeAfterTurn: Longword; |
304 | 354 |
minAngle, maxAngle: Longword; |
408 | 355 |
PosCount: Longword; |
356 |
PosSprite: TSprite; |
|
4 | 357 |
end = ( |
80 | 358 |
(NameId: sidGrenade; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
359 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
360 |
NumberInCase: 1; |
263 | 361 |
Ammo: (Propz: ammoprop_Timerable or |
362 |
ammoprop_Power; |
|
4 | 363 |
Count: AMMO_INFINITE; |
364 |
NumPerTurn: 0; |
|
365 |
Timer: 3000; |
|
408 | 366 |
Pos: 0; |
4 | 367 |
AmmoType: amGrenade); |
10 | 368 |
Slot: 1; |
351 | 369 |
TimeAfterTurn: 3000; |
370 |
minAngle: 0; |
|
408 | 371 |
maxAngle: 0; |
495 | 372 |
PosCount: 1; |
373 |
PosSprite: sprWater), |
|
80 | 374 |
(NameId: sidClusterBomb; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
375 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
376 |
NumberInCase: 3; |
263 | 377 |
Ammo: (Propz: ammoprop_Timerable or |
378 |
ammoprop_Power; |
|
78 | 379 |
Count: 5; |
380 |
NumPerTurn: 0; |
|
381 |
Timer: 3000; |
|
408 | 382 |
Pos: 0; |
78 | 383 |
AmmoType: amClusterBomb); |
384 |
Slot: 1; |
|
351 | 385 |
TimeAfterTurn: 3000; |
386 |
minAngle: 0; |
|
408 | 387 |
maxAngle: 0; |
495 | 388 |
PosCount: 1; |
389 |
PosSprite: sprWater), |
|
80 | 390 |
(NameId: sidBazooka; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
391 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
392 |
NumberInCase: 1; |
4 | 393 |
Ammo: (Propz: ammoprop_Power; |
394 |
Count: AMMO_INFINITE; |
|
395 |
NumPerTurn: 0; |
|
396 |
Timer: 0; |
|
408 | 397 |
Pos: 0; |
4 | 398 |
AmmoType: amBazooka); |
10 | 399 |
Slot: 0; |
351 | 400 |
TimeAfterTurn: 3000; |
401 |
minAngle: 0; |
|
408 | 402 |
maxAngle: 0; |
495 | 403 |
PosCount: 1; |
404 |
PosSprite: sprWater), |
|
80 | 405 |
(NameId: sidUFO; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
406 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
407 |
NumberInCase: 1; |
263 | 408 |
Ammo: (Propz: ammoprop_Power or |
409 |
ammoprop_NeedTarget; |
|
56 | 410 |
Count: 2; |
4 | 411 |
NumPerTurn: 0; |
412 |
Timer: 0; |
|
408 | 413 |
Pos: 0; |
4 | 414 |
AmmoType: amUFO); |
415 |
Slot: 0; |
|
351 | 416 |
TimeAfterTurn: 3000; |
417 |
minAngle: 0; |
|
408 | 418 |
maxAngle: 0; |
495 | 419 |
PosCount: 1; |
420 |
PosSprite: sprWater), |
|
80 | 421 |
(NameId: sidShotgun; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
422 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
423 |
NumberInCase: 1; |
95 | 424 |
Ammo: (Propz: ammoprop_ForwMsgs; |
4 | 425 |
Count: AMMO_INFINITE; |
426 |
NumPerTurn: 1; |
|
427 |
Timer: 0; |
|
408 | 428 |
Pos: 0; |
4 | 429 |
AmmoType: amShotgun); |
430 |
Slot: 2; |
|
351 | 431 |
TimeAfterTurn: 3000; |
432 |
minAngle: 0; |
|
408 | 433 |
maxAngle: 0; |
495 | 434 |
PosCount: 1; |
435 |
PosSprite: sprWater), |
|
80 | 436 |
(NameId: sidPickHammer; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
437 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
438 |
NumberInCase: 1; |
263 | 439 |
Ammo: (Propz: ammoprop_ForwMsgs or |
440 |
ammoprop_AttackInFall or |
|
441 |
ammoprop_AttackInJump or |
|
442 |
ammoprop_NoCrosshair; |
|
4 | 443 |
Count: 2; |
444 |
NumPerTurn: 0; |
|
445 |
Timer: 0; |
|
408 | 446 |
Pos: 0; |
4 | 447 |
AmmoType: amPickHammer); |
263 | 448 |
Slot: 6; |
351 | 449 |
TimeAfterTurn: 0; |
450 |
minAngle: 0; |
|
408 | 451 |
maxAngle: 0; |
495 | 452 |
PosCount: 1; |
453 |
PosSprite: sprWater), |
|
80 | 454 |
(NameId: sidSkip; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
455 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
456 |
NumberInCase: 1; |
4 | 457 |
Ammo: (Propz: 0; |
458 |
Count: AMMO_INFINITE; |
|
459 |
NumPerTurn: 0; |
|
460 |
Timer: 0; |
|
408 | 461 |
Pos: 0; |
4 | 462 |
AmmoType: amSkip); |
263 | 463 |
Slot: 8; |
351 | 464 |
TimeAfterTurn: 0; |
465 |
minAngle: 0; |
|
408 | 466 |
maxAngle: 0; |
495 | 467 |
PosCount: 1; |
468 |
PosSprite: sprWater), |
|
80 | 469 |
(NameId: sidRope; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
470 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
471 |
NumberInCase: 3; |
263 | 472 |
Ammo: (Propz: ammoprop_ForwMsgs or |
473 |
ammoprop_AttackInFall or |
|
474 |
ammoprop_AttackInJump; |
|
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 |
520 |
ammoprop_AttackInJump or |
|
521 |
ammoprop_AttackInFall; |
|
522 |
Count: 1; |
|
523 |
NumPerTurn: 0; |
|
524 |
Timer: 0; |
|
525 |
Pos: 0; |
|
526 |
AmmoType: amDynamite); |
|
527 |
Slot: 4; |
|
528 |
TimeAfterTurn: 5000; |
|
351 | 529 |
minAngle: 0; |
408 | 530 |
maxAngle: 0; |
495 | 531 |
PosCount: 1; |
532 |
PosSprite: sprWater), |
|
408 | 533 |
(NameId: sidFirePunch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
534 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
535 |
NumberInCase: 1; |
408 | 536 |
Ammo: (Propz: ammoprop_NoCrosshair or |
537 |
ammoprop_ForwMsgs or |
|
538 |
ammoprop_AttackInJump or |
|
539 |
ammoprop_AttackInFall; |
|
540 |
Count: AMMO_INFINITE; |
|
541 |
NumPerTurn: 0; |
|
542 |
Timer: 0; |
|
543 |
Pos: 0; |
|
544 |
AmmoType: amFirePunch); |
|
545 |
Slot: 3; |
|
546 |
TimeAfterTurn: 3000; |
|
547 |
MinAngle: 0; |
|
548 |
maxAngle: 0; |
|
495 | 549 |
PosCount: 1; |
550 |
PosSprite: sprWater), |
|
408 | 551 |
(NameId: sidBaseballBat; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
552 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
553 |
NumberInCase: 1; |
408 | 554 |
Ammo: (Propz: 0; |
555 |
Count: 1; |
|
556 |
NumPerTurn: 0; |
|
557 |
Timer: 0; |
|
558 |
Pos: 0; |
|
559 |
AmmoType: amBaseballBat); |
|
560 |
Slot: 3; |
|
561 |
TimeAfterTurn: 5000; |
|
351 | 562 |
minAngle: 0; |
408 | 563 |
maxAngle: cMaxAngle div 2; |
495 | 564 |
PosCount: 1; |
565 |
PosSprite: sprWater), |
|
211 | 566 |
(NameId: sidParachute; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
567 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
568 |
NumberInCase: 1; |
263 | 569 |
Ammo: (Propz: ammoprop_ForwMsgs or |
570 |
ammoprop_AttackInJump or |
|
454 | 571 |
ammoprop_AttackInFall or |
572 |
ammoprop_NoCrosshair; |
|
211 | 573 |
Count: 2; |
574 |
NumPerTurn: 0; |
|
575 |
Timer: 0; |
|
408 | 576 |
Pos: 0; |
211 | 577 |
AmmoType: amParachute); |
263 | 578 |
Slot: 7; |
351 | 579 |
TimeAfterTurn: 0; |
580 |
minAngle: 0; |
|
408 | 581 |
maxAngle: 0; |
495 | 582 |
PosCount: 1; |
583 |
PosSprite: sprWater), |
|
263 | 584 |
(NameId: sidAirAttack; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
585 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
586 |
NumberInCase: 1; |
263 | 587 |
Ammo: (Propz: ammoprop_NoCrosshair or |
588 |
ammoprop_NeedTarget or |
|
589 |
ammoprop_AttackingPut; |
|
285 | 590 |
Count: 1; |
263 | 591 |
NumPerTurn: 0; |
592 |
Timer: 0; |
|
408 | 593 |
Pos: 0; |
263 | 594 |
AmmoType: amAirAttack); |
595 |
Slot: 5; |
|
351 | 596 |
TimeAfterTurn: 0; |
597 |
minAngle: 0; |
|
408 | 598 |
maxAngle: 0; |
599 |
PosCount: 2; |
|
600 |
PosSprite: sprAmAirplane), |
|
285 | 601 |
(NameId: sidMineStrike; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
602 |
Probability: 400; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
603 |
NumberInCase: 1; |
285 | 604 |
Ammo: (Propz: ammoprop_NoCrosshair or |
605 |
ammoprop_NeedTarget or |
|
606 |
ammoprop_AttackingPut; |
|
607 |
Count: 1; |
|
608 |
NumPerTurn: 0; |
|
609 |
Timer: 0; |
|
408 | 610 |
Pos: 0; |
285 | 611 |
AmmoType: amMineStrike); |
612 |
Slot: 5; |
|
351 | 613 |
TimeAfterTurn: 0; |
614 |
minAngle: 0; |
|
408 | 615 |
maxAngle: 0; |
616 |
PosCount: 2; |
|
617 |
PosSprite: sprAmAirplane), |
|
302 | 618 |
(NameId: sidBlowTorch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
619 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
620 |
NumberInCase: 2; |
302 | 621 |
Ammo: (Propz: ammoprop_ForwMsgs; |
622 |
Count: 1; |
|
623 |
NumPerTurn: 0; |
|
624 |
Timer: 0; |
|
408 | 625 |
Pos: 0; |
302 | 626 |
AmmoType: amBlowTorch); |
627 |
Slot: 6; |
|
304 | 628 |
TimeAfterTurn: 3000; |
305 | 629 |
minAngle: 768; |
408 | 630 |
maxAngle: 1280; |
495 | 631 |
PosCount: 1; |
632 |
PosSprite: sprWater), |
|
409 | 633 |
(NameId: sidGirder; |
634 |
Probability: 400; |
|
411 | 635 |
NumberInCase: 3; |
409 | 636 |
Ammo: (Propz: ammoprop_NoCrosshair or |
637 |
ammoprop_NeedTarget or |
|
638 |
ammoprop_AttackingPut; |
|
639 |
Count: 1; |
|
640 |
NumPerTurn: 0; |
|
641 |
Timer: 0; |
|
642 |
Pos: 0; |
|
643 |
AmmoType: amGirder); |
|
644 |
Slot: 6; |
|
645 |
TimeAfterTurn: 3000; |
|
646 |
minAngle: 0; |
|
647 |
maxAngle: 0; |
|
423 | 648 |
PosCount: 8; |
520 | 649 |
PosSprite: sprAmGirder), |
650 |
(NameId: sidTeleport; |
|
651 |
Probability: 400; |
|
652 |
NumberInCase: 1; |
|
525 | 653 |
Ammo: (Propz: ammoprop_ForwMsgs or |
654 |
ammoprop_NoCrosshair or |
|
520 | 655 |
ammoprop_NeedTarget or |
656 |
ammoprop_AttackingPut; |
|
657 |
Count: 2; |
|
658 |
NumPerTurn: 0; |
|
659 |
Timer: 0; |
|
660 |
Pos: 0; |
|
661 |
AmmoType: amTeleport); |
|
662 |
Slot: 7; |
|
663 |
TimeAfterTurn: 0; |
|
664 |
minAngle: 0; |
|
665 |
maxAngle: 0; |
|
666 |
PosCount: 1; |
|
667 |
PosSprite: sprWater)); |
|
37 | 668 |
|
4 | 669 |
implementation |
670 |
||
671 |
end. |