author | unc0rr |
Mon, 04 Jun 2007 21:29:05 +0000 | |
changeset 537 | 4d2e60623e44 |
parent 534 | 92fb2b0d5117 |
child 542 | ec26095f1bed |
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 |
|
109 | 118 |
cMaxHHIndex = 7; |
423 | 119 |
cMaxHHs = 30; |
53 | 120 |
cMaxSpawnPoints = 1024; |
4 | 121 |
|
22 | 122 |
cMaxEdgePoints = 16384; |
123 |
||
53 | 124 |
cHHRadius = 9; |
70 | 125 |
cHHStepTicks = 38; |
509 | 126 |
|
294 | 127 |
cHHZ = 1000; |
128 |
cCurrHHZ = Succ(cHHZ); |
|
4 | 129 |
|
509 | 130 |
cShotgunRadius = 22; |
511 | 131 |
cBlowTorchC = 6; |
509 | 132 |
|
109 | 133 |
cKeyMaxIndex = 1023; |
4 | 134 |
|
97
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
135 |
cMaxCaptions = 4; |
e7c1df9cce2c
- make the game be run from ${PREFIX}/bin with data in ${PREFIX}/share/hedgewars/Data
unc0rr
parents:
95
diff
changeset
|
136 |
|
4 | 137 |
cInactDelay = 1500; |
138 |
||
139 |
gfForts = $00000001; |
|
140 |
||
141 |
gstDrowning = $00000001; |
|
142 |
gstHHDriven = $00000002; |
|
143 |
gstMoving = $00000004; |
|
144 |
gstAttacked = $00000008; |
|
145 |
gstAttacking = $00000010; |
|
146 |
gstCollision = $00000020; |
|
147 |
gstHHChooseTarget = $00000040; |
|
148 |
gstFalling = $00000080; |
|
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; |
|
173 |
ammoprop_AttackInFall = $00000010; |
|
174 |
ammoprop_AttackInJump = $00000020; |
|
13 | 175 |
ammoprop_NoCrosshair = $00000040; |
263 | 176 |
ammoprop_AttackingPut = $00000080; |
4 | 177 |
AMMO_INFINITE = High(LongWord); |
178 |
||
42 | 179 |
EXPLAllDamageInRadius = $00000001; |
180 |
EXPLAutoSound = $00000002; |
|
181 |
EXPLNoDamage = $00000004; |
|
182 |
EXPLDoNotTouchHH = $00000008; |
|
305 | 183 |
EXPLDontDraw = $00000010; |
42 | 184 |
|
185 |
posCaseAmmo = $00000001; |
|
186 |
posCaseHealth = $00000002; |
|
4 | 187 |
|
371 | 188 |
NoPointX = Low(LongInt); |
4 | 189 |
|
74 | 190 |
cHHFileName = 'Hedgehog'; |
191 |
cCHFileName = 'Crosshair'; |
|
4 | 192 |
cThemeCFGFilename = 'theme.cfg'; |
193 |
||
194 |
Fontz: array[THWFont] of THHFont = ( |
|
351 | 195 |
(Handle: nil; |
196 |
Height: 12; |
|
202 | 197 |
style: TTF_STYLE_NORMAL; |
74 | 198 |
Name: 'DejaVuSans.ttf'), |
351 | 199 |
(Handle: nil; |
200 |
Height: 24; |
|
202 | 201 |
style: TTF_STYLE_NORMAL; |
522 | 202 |
Name: 'DejaVuSans.ttf'), |
203 |
(Handle: nil; |
|
204 |
Height: 10; |
|
205 |
style: TTF_STYLE_NORMAL; |
|
74 | 206 |
Name: 'DejaVuSans.ttf') |
4 | 207 |
); |
208 |
||
202 | 209 |
FontBorder = 2; |
210 |
||
99 | 211 |
PathPrefix: string = './'; |
212 |
Pathz: array[TPathType] of string = ( |
|
80 | 213 |
'', // ptNone |
267 | 214 |
'', // ptData |
215 |
'Graphics', // ptGraphics |
|
216 |
'Themes', // ptThemes |
|
217 |
'Themes/avematan', // ptCurrTheme |
|
218 |
'Teams', // ptTeams |
|
219 |
'Maps', // ptMaps |
|
53 | 220 |
'', // ptMapCurrent |
267 | 221 |
'Demos', // ptDemos |
222 |
'Sounds', // ptSounds |
|
223 |
'Graphics/Graves', // ptGraves |
|
224 |
'Fonts', // ptFonts |
|
225 |
'Forts', // ptForts |
|
226 |
'Locale', // ptLocale |
|
227 |
'Graphics/AmmoMenu' // ptAmmoMenu |
|
4 | 228 |
); |
229 |
||
230 |
StuffLoadData: array[TStuff] of record |
|
231 |
FileName: String[31]; |
|
232 |
Path : TPathType; |
|
233 |
end = ( |
|
74 | 234 |
(FileName: 'Console'; Path: ptGraphics ), // sConsoleBG |
235 |
(FileName: 'PowerBar'; Path: ptGraphics ), // sPowerBar |
|
236 |
(FileName: 'thinking'; Path: ptGraphics ), // sQuestion |
|
237 |
(FileName: 'WindBar'; Path: ptGraphics ), // sWindBar |
|
238 |
(FileName: 'WindL'; Path: ptGraphics ), // sWindL |
|
239 |
(FileName: 'WindR'; Path: ptGraphics ), // sWindR |
|
240 |
(FileName: 'RopeNode'; Path: ptGraphics ) // sRopeNode |
|
4 | 241 |
); |
242 |
StuffPoz: array[TStuff] of TSDL_Rect = ( |
|
243 |
(x: 256; y: 256; w: 256; h: 256), // sConsoleBG |
|
244 |
(x: 256; y: 768; w: 256; h: 32), // sPowerBar |
|
5 | 245 |
(x: 256; y: 512; w: 32; h: 32), // sQuestion |
246 |
(x: 256; y: 800; w: 151; h: 17), // sWindBar |
|
247 |
(x: 256; y: 817; w: 80; h: 13), // sWindL |
|
35 | 248 |
(x: 336; y: 817; w: 80; h: 13), // sWindR |
249 |
(x: 256; y: 544; w: 6; h: 6) // sRopeNode |
|
4 | 250 |
); |
251 |
SpritesData: array[TSprite] of record |
|
35 | 252 |
FileName: String[31]; |
80 | 253 |
Path, AltPath: TPathType; |
35 | 254 |
Surface : PSDL_Surface; |
371 | 255 |
Width, Height: LongInt; |
35 | 256 |
hasAlpha: boolean; |
257 |
end = ( |
|
351 | 258 |
(FileName: 'BlueWater'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
259 |
Width: 256; Height: 48; hasAlpha: false),// sprWater |
|
260 |
(FileName: 'Clouds'; Path: ptCurrTheme; AltPath: ptGraphics; Surface: nil; |
|
261 |
Width: 256; Height:128; hasAlpha: false),// sprCloud |
|
262 |
(FileName: 'Bomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
263 |
Width: 16; Height: 16; hasAlpha: false),// sprBomb |
|
264 |
(FileName: 'BigDigits'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
265 |
Width: 32; Height: 32; hasAlpha: true),// sprBigDigit |
|
266 |
(FileName: 'Frame'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
267 |
Width: 4; Height: 32; hasAlpha: true),// sprFrame |
|
268 |
(FileName: 'Lag'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
446 | 269 |
Width: 65; Height: 65; hasAlpha: true),// sprLag |
351 | 270 |
(FileName: 'Arrow'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
271 |
Width: 16; Height: 16; hasAlpha: false),// sprCursor |
|
272 |
(FileName: 'Grenade'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
273 |
Width: 32; Height: 32; hasAlpha: false),// sprGrenade |
|
274 |
(FileName: 'Targetp'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
275 |
Width: 32; Height: 32; hasAlpha: false),// sprTargetP |
|
276 |
(FileName: 'UFO'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
277 |
Width: 32; Height: 32; hasAlpha: false),// sprUFO |
|
278 |
(FileName:'SmokeTrace'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
279 |
Width: 32; Height: 32; hasAlpha: true),// sprSmokeTrace |
|
280 |
(FileName: 'RopeHook'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
281 |
Width: 32; Height: 32; hasAlpha: false),// sprRopeHook |
|
282 |
(FileName: 'Expl50'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
283 |
Width: 64; Height: 64; hasAlpha: false),// sprExplosion50 |
|
284 |
(FileName: 'MineOff'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
285 |
Width: 16; Height: 16; hasAlpha: false),// sprMineOff |
|
286 |
(FileName: 'MineOn'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
287 |
Width: 16; Height: 16; hasAlpha: false),// sprMineOn |
|
288 |
(FileName: 'Case'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
289 |
Width: 32; Height: 32; hasAlpha: false),// sprCase |
|
290 |
(FileName: 'FirstAid'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
291 |
Width: 48; Height: 48; hasAlpha: false),// sprFAid |
|
292 |
(FileName: 'dynamite'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
293 |
Width: 32; Height: 32; hasAlpha: false),// sprDynamite |
|
294 |
(FileName: 'Power'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
295 |
Width: 32; Height: 32; hasAlpha: true),// sprPower |
|
296 |
(FileName: 'ClBomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
297 |
Width: 16; Height: 16; hasAlpha: false),// sprClusterBomb |
|
298 |
(FileName:'ClParticle'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
299 |
Width: 16; Height: 16; hasAlpha: false),// sprClusterParticle |
|
300 |
(FileName: 'Flame'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
301 |
Width: 16; Height: 16; hasAlpha: false),// sprFlame |
|
302 |
(FileName: 'horizont'; Path: ptCurrTheme; AltPath: ptNone; Surface: nil; |
|
303 |
Width: 0; Height: 0; hasAlpha: false),// sprHorizont |
|
304 |
(FileName: 'Sky'; Path: ptCurrTheme; AltPath: ptNone; Surface: nil; |
|
305 |
Width: 0; Height: 0; hasAlpha: false),// sprSky |
|
306 |
(FileName: 'BrdrLines'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
307 |
Width: 202; Height: 1; hasAlpha: false),// sprAMBorders |
|
308 |
(FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
309 |
Width: 202; Height: 33; hasAlpha: false),// sprAMSlot |
|
310 |
(FileName: 'AmmoName'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
311 |
Width: 202; Height: 33; hasAlpha: false),// sprAMSlotName |
|
312 |
(FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
313 |
Width: 32; Height: 32; hasAlpha: false),// sprAMAmmos |
|
314 |
(FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
315 |
Width: 32; Height: 32; hasAlpha: false),// sprAMSlotKeys |
|
316 |
(FileName: 'Selection'; Path: ptAmmoMenu; AltPath: ptNone; Surface: nil; |
|
317 |
Width: 32; Height: 32; hasAlpha: false),// sprAMSelection |
|
318 |
(FileName: 'Finger'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
319 |
Width: 32; Height: 48; hasAlpha: false),// sprFinger |
|
320 |
(FileName: 'AirBomb'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
321 |
Width: 32; Height: 32; hasAlpha: false),// sprAirBomb |
|
322 |
(FileName: 'Airplane'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
408 | 323 |
Width: 125; Height: 42; hasAlpha: false),// sprAirplane |
324 |
(FileName:'amAirplane'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
409 | 325 |
Width: 64; Height: 32; hasAlpha: true),// sprAirplane |
326 |
(FileName: 'amGirder'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
520 | 327 |
Width: 160; Height:160; hasAlpha: false),// sprAmGirder |
328 |
(FileName: 'hhMask'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
534 | 329 |
Width: 32; Height: 32; hasAlpha: false),// sprHHTelepMask |
330 |
(FileName: 'Switch'; Path: ptGraphics; AltPath: ptNone; Surface: nil; |
|
331 |
Width: 32; Height: 32; hasAlpha: false) // sprSwitch |
|
35 | 332 |
); |
4 | 333 |
Soundz: array[TSound] of record |
334 |
FileName: String[31]; |
|
335 |
Path : TPathType; |
|
336 |
id : PMixChunk; |
|
282 | 337 |
lastChan: LongInt; |
4 | 338 |
end = ( |
467 | 339 |
(FileName: 'grenadeimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGrenadeImpact |
340 |
(FileName: 'explosion.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndExplosion |
|
341 |
(FileName: 'throwpowerup.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowPowerUp |
|
342 |
(FileName: 'throwrelease.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndThrowRelease |
|
343 |
(FileName: 'splash.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndSplash |
|
344 |
(FileName: 'shotgunreload.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunReload |
|
345 |
(FileName: 'shotgunfire.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndShotgunFire |
|
346 |
(FileName: 'graveimpact.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndGraveImpact |
|
347 |
(FileName: 'minetick.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndMineTicks |
|
348 |
(FileName: 'pickhammer.ogg'; Path: ptSounds; id: nil; lastChan: 0) // sndPickhammer |
|
4 | 349 |
); |
350 |
||
351 |
Ammoz: array [TAmmoType] of record |
|
80 | 352 |
NameId: TAmmoStrId; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
353 |
Probability, NumberInCase: Longword; |
4 | 354 |
Ammo: TAmmo; |
112 | 355 |
Slot: 0..cMaxSlotIndex; |
4 | 356 |
TimeAfterTurn: Longword; |
304 | 357 |
minAngle, maxAngle: Longword; |
408 | 358 |
PosCount: Longword; |
359 |
PosSprite: TSprite; |
|
4 | 360 |
end = ( |
80 | 361 |
(NameId: sidGrenade; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
362 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
363 |
NumberInCase: 1; |
263 | 364 |
Ammo: (Propz: ammoprop_Timerable or |
365 |
ammoprop_Power; |
|
4 | 366 |
Count: AMMO_INFINITE; |
367 |
NumPerTurn: 0; |
|
368 |
Timer: 3000; |
|
408 | 369 |
Pos: 0; |
4 | 370 |
AmmoType: amGrenade); |
10 | 371 |
Slot: 1; |
351 | 372 |
TimeAfterTurn: 3000; |
373 |
minAngle: 0; |
|
408 | 374 |
maxAngle: 0; |
495 | 375 |
PosCount: 1; |
376 |
PosSprite: sprWater), |
|
80 | 377 |
(NameId: sidClusterBomb; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
378 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
379 |
NumberInCase: 3; |
263 | 380 |
Ammo: (Propz: ammoprop_Timerable or |
381 |
ammoprop_Power; |
|
78 | 382 |
Count: 5; |
383 |
NumPerTurn: 0; |
|
384 |
Timer: 3000; |
|
408 | 385 |
Pos: 0; |
78 | 386 |
AmmoType: amClusterBomb); |
387 |
Slot: 1; |
|
351 | 388 |
TimeAfterTurn: 3000; |
389 |
minAngle: 0; |
|
408 | 390 |
maxAngle: 0; |
495 | 391 |
PosCount: 1; |
392 |
PosSprite: sprWater), |
|
80 | 393 |
(NameId: sidBazooka; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
394 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
395 |
NumberInCase: 1; |
4 | 396 |
Ammo: (Propz: ammoprop_Power; |
397 |
Count: AMMO_INFINITE; |
|
398 |
NumPerTurn: 0; |
|
399 |
Timer: 0; |
|
408 | 400 |
Pos: 0; |
4 | 401 |
AmmoType: amBazooka); |
10 | 402 |
Slot: 0; |
351 | 403 |
TimeAfterTurn: 3000; |
404 |
minAngle: 0; |
|
408 | 405 |
maxAngle: 0; |
495 | 406 |
PosCount: 1; |
407 |
PosSprite: sprWater), |
|
80 | 408 |
(NameId: sidUFO; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
409 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
410 |
NumberInCase: 1; |
263 | 411 |
Ammo: (Propz: ammoprop_Power or |
412 |
ammoprop_NeedTarget; |
|
56 | 413 |
Count: 2; |
4 | 414 |
NumPerTurn: 0; |
415 |
Timer: 0; |
|
408 | 416 |
Pos: 0; |
4 | 417 |
AmmoType: amUFO); |
418 |
Slot: 0; |
|
351 | 419 |
TimeAfterTurn: 3000; |
420 |
minAngle: 0; |
|
408 | 421 |
maxAngle: 0; |
495 | 422 |
PosCount: 1; |
423 |
PosSprite: sprWater), |
|
80 | 424 |
(NameId: sidShotgun; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
425 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
426 |
NumberInCase: 1; |
95 | 427 |
Ammo: (Propz: ammoprop_ForwMsgs; |
4 | 428 |
Count: AMMO_INFINITE; |
429 |
NumPerTurn: 1; |
|
430 |
Timer: 0; |
|
408 | 431 |
Pos: 0; |
4 | 432 |
AmmoType: amShotgun); |
433 |
Slot: 2; |
|
351 | 434 |
TimeAfterTurn: 3000; |
435 |
minAngle: 0; |
|
408 | 436 |
maxAngle: 0; |
495 | 437 |
PosCount: 1; |
438 |
PosSprite: sprWater), |
|
80 | 439 |
(NameId: sidPickHammer; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
440 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
441 |
NumberInCase: 1; |
263 | 442 |
Ammo: (Propz: ammoprop_ForwMsgs or |
443 |
ammoprop_AttackInFall or |
|
444 |
ammoprop_AttackInJump or |
|
445 |
ammoprop_NoCrosshair; |
|
4 | 446 |
Count: 2; |
447 |
NumPerTurn: 0; |
|
448 |
Timer: 0; |
|
408 | 449 |
Pos: 0; |
4 | 450 |
AmmoType: amPickHammer); |
263 | 451 |
Slot: 6; |
351 | 452 |
TimeAfterTurn: 0; |
453 |
minAngle: 0; |
|
408 | 454 |
maxAngle: 0; |
495 | 455 |
PosCount: 1; |
456 |
PosSprite: sprWater), |
|
80 | 457 |
(NameId: sidSkip; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
458 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
459 |
NumberInCase: 1; |
4 | 460 |
Ammo: (Propz: 0; |
461 |
Count: AMMO_INFINITE; |
|
462 |
NumPerTurn: 0; |
|
463 |
Timer: 0; |
|
408 | 464 |
Pos: 0; |
4 | 465 |
AmmoType: amSkip); |
263 | 466 |
Slot: 8; |
351 | 467 |
TimeAfterTurn: 0; |
468 |
minAngle: 0; |
|
408 | 469 |
maxAngle: 0; |
495 | 470 |
PosCount: 1; |
471 |
PosSprite: sprWater), |
|
80 | 472 |
(NameId: sidRope; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
473 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
474 |
NumberInCase: 3; |
263 | 475 |
Ammo: (Propz: ammoprop_ForwMsgs or |
476 |
ammoprop_AttackInFall or |
|
477 |
ammoprop_AttackInJump; |
|
4 | 478 |
Count: 5; |
479 |
NumPerTurn: 0; |
|
480 |
Timer: 0; |
|
408 | 481 |
Pos: 0; |
4 | 482 |
AmmoType: amRope); |
263 | 483 |
Slot: 7; |
304 | 484 |
TimeAfterTurn: 0; |
351 | 485 |
minAngle: 0; |
408 | 486 |
maxAngle: cMaxAngle div 2; |
495 | 487 |
PosCount: 1; |
488 |
PosSprite: sprWater), |
|
80 | 489 |
(NameId: sidMine; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
490 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
491 |
NumberInCase: 1; |
13 | 492 |
Ammo: (Propz: ammoprop_NoCrosshair; |
56 | 493 |
Count: 2; |
10 | 494 |
NumPerTurn: 0; |
495 |
Timer: 0; |
|
408 | 496 |
Pos: 0; |
10 | 497 |
AmmoType: amMine); |
79 | 498 |
Slot: 4; |
351 | 499 |
TimeAfterTurn: 5000; |
500 |
minAngle: 0; |
|
408 | 501 |
maxAngle: 0; |
495 | 502 |
PosCount: 1; |
503 |
PosSprite: sprWater), |
|
80 | 504 |
(NameId: sidDEagle; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
505 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
506 |
NumberInCase: 2; |
37 | 507 |
Ammo: (Propz: 0; |
75 | 508 |
Count: 3; |
37 | 509 |
NumPerTurn: 3; |
510 |
Timer: 0; |
|
408 | 511 |
Pos: 0; |
37 | 512 |
AmmoType: amDEagle); |
513 |
Slot: 2; |
|
351 | 514 |
TimeAfterTurn: 3000; |
515 |
minAngle: 0; |
|
408 | 516 |
maxAngle: 0; |
495 | 517 |
PosCount: 1; |
518 |
PosSprite: sprWater), |
|
408 | 519 |
(NameId: sidDynamite; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
520 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
521 |
NumberInCase: 1; |
408 | 522 |
Ammo: (Propz: ammoprop_NoCrosshair or |
523 |
ammoprop_AttackInJump or |
|
524 |
ammoprop_AttackInFall; |
|
525 |
Count: 1; |
|
526 |
NumPerTurn: 0; |
|
527 |
Timer: 0; |
|
528 |
Pos: 0; |
|
529 |
AmmoType: amDynamite); |
|
530 |
Slot: 4; |
|
531 |
TimeAfterTurn: 5000; |
|
351 | 532 |
minAngle: 0; |
408 | 533 |
maxAngle: 0; |
495 | 534 |
PosCount: 1; |
535 |
PosSprite: sprWater), |
|
408 | 536 |
(NameId: sidFirePunch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
537 |
Probability: 0; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
538 |
NumberInCase: 1; |
408 | 539 |
Ammo: (Propz: ammoprop_NoCrosshair or |
540 |
ammoprop_ForwMsgs or |
|
541 |
ammoprop_AttackInJump or |
|
542 |
ammoprop_AttackInFall; |
|
543 |
Count: AMMO_INFINITE; |
|
544 |
NumPerTurn: 0; |
|
545 |
Timer: 0; |
|
546 |
Pos: 0; |
|
547 |
AmmoType: amFirePunch); |
|
548 |
Slot: 3; |
|
549 |
TimeAfterTurn: 3000; |
|
550 |
MinAngle: 0; |
|
551 |
maxAngle: 0; |
|
495 | 552 |
PosCount: 1; |
553 |
PosSprite: sprWater), |
|
408 | 554 |
(NameId: sidBaseballBat; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
555 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
556 |
NumberInCase: 1; |
408 | 557 |
Ammo: (Propz: 0; |
558 |
Count: 1; |
|
559 |
NumPerTurn: 0; |
|
560 |
Timer: 0; |
|
561 |
Pos: 0; |
|
562 |
AmmoType: amBaseballBat); |
|
563 |
Slot: 3; |
|
564 |
TimeAfterTurn: 5000; |
|
351 | 565 |
minAngle: 0; |
408 | 566 |
maxAngle: cMaxAngle div 2; |
495 | 567 |
PosCount: 1; |
568 |
PosSprite: sprWater), |
|
211 | 569 |
(NameId: sidParachute; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
570 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
571 |
NumberInCase: 1; |
263 | 572 |
Ammo: (Propz: ammoprop_ForwMsgs or |
573 |
ammoprop_AttackInJump or |
|
454 | 574 |
ammoprop_AttackInFall or |
575 |
ammoprop_NoCrosshair; |
|
211 | 576 |
Count: 2; |
577 |
NumPerTurn: 0; |
|
578 |
Timer: 0; |
|
408 | 579 |
Pos: 0; |
211 | 580 |
AmmoType: amParachute); |
263 | 581 |
Slot: 7; |
351 | 582 |
TimeAfterTurn: 0; |
583 |
minAngle: 0; |
|
408 | 584 |
maxAngle: 0; |
495 | 585 |
PosCount: 1; |
586 |
PosSprite: sprWater), |
|
263 | 587 |
(NameId: sidAirAttack; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
588 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
589 |
NumberInCase: 1; |
263 | 590 |
Ammo: (Propz: ammoprop_NoCrosshair or |
591 |
ammoprop_NeedTarget or |
|
592 |
ammoprop_AttackingPut; |
|
285 | 593 |
Count: 1; |
263 | 594 |
NumPerTurn: 0; |
595 |
Timer: 0; |
|
408 | 596 |
Pos: 0; |
263 | 597 |
AmmoType: amAirAttack); |
598 |
Slot: 5; |
|
351 | 599 |
TimeAfterTurn: 0; |
600 |
minAngle: 0; |
|
408 | 601 |
maxAngle: 0; |
602 |
PosCount: 2; |
|
603 |
PosSprite: sprAmAirplane), |
|
285 | 604 |
(NameId: sidMineStrike; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
605 |
Probability: 400; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
606 |
NumberInCase: 1; |
285 | 607 |
Ammo: (Propz: ammoprop_NoCrosshair or |
608 |
ammoprop_NeedTarget or |
|
609 |
ammoprop_AttackingPut; |
|
610 |
Count: 1; |
|
611 |
NumPerTurn: 0; |
|
612 |
Timer: 0; |
|
408 | 613 |
Pos: 0; |
285 | 614 |
AmmoType: amMineStrike); |
615 |
Slot: 5; |
|
351 | 616 |
TimeAfterTurn: 0; |
617 |
minAngle: 0; |
|
408 | 618 |
maxAngle: 0; |
619 |
PosCount: 2; |
|
620 |
PosSprite: sprAmAirplane), |
|
302 | 621 |
(NameId: sidBlowTorch; |
394
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
622 |
Probability: 100; |
4c017ae1226a
- Implement hack to let ammo stores work without needed assistance of frontend
unc0rr
parents:
393
diff
changeset
|
623 |
NumberInCase: 2; |
302 | 624 |
Ammo: (Propz: ammoprop_ForwMsgs; |
625 |
Count: 1; |
|
626 |
NumPerTurn: 0; |
|
627 |
Timer: 0; |
|
408 | 628 |
Pos: 0; |
302 | 629 |
AmmoType: amBlowTorch); |
630 |
Slot: 6; |
|
304 | 631 |
TimeAfterTurn: 3000; |
305 | 632 |
minAngle: 768; |
408 | 633 |
maxAngle: 1280; |
495 | 634 |
PosCount: 1; |
635 |
PosSprite: sprWater), |
|
409 | 636 |
(NameId: sidGirder; |
637 |
Probability: 400; |
|
411 | 638 |
NumberInCase: 3; |
409 | 639 |
Ammo: (Propz: ammoprop_NoCrosshair or |
640 |
ammoprop_NeedTarget or |
|
641 |
ammoprop_AttackingPut; |
|
642 |
Count: 1; |
|
643 |
NumPerTurn: 0; |
|
644 |
Timer: 0; |
|
645 |
Pos: 0; |
|
646 |
AmmoType: amGirder); |
|
647 |
Slot: 6; |
|
648 |
TimeAfterTurn: 3000; |
|
649 |
minAngle: 0; |
|
650 |
maxAngle: 0; |
|
423 | 651 |
PosCount: 8; |
520 | 652 |
PosSprite: sprAmGirder), |
653 |
(NameId: sidTeleport; |
|
654 |
Probability: 400; |
|
655 |
NumberInCase: 1; |
|
525 | 656 |
Ammo: (Propz: ammoprop_ForwMsgs or |
657 |
ammoprop_NoCrosshair or |
|
520 | 658 |
ammoprop_NeedTarget or |
659 |
ammoprop_AttackingPut; |
|
660 |
Count: 2; |
|
661 |
NumPerTurn: 0; |
|
662 |
Timer: 0; |
|
663 |
Pos: 0; |
|
664 |
AmmoType: amTeleport); |
|
665 |
Slot: 7; |
|
666 |
TimeAfterTurn: 0; |
|
667 |
minAngle: 0; |
|
668 |
maxAngle: 0; |
|
669 |
PosCount: 1; |
|
534 | 670 |
PosSprite: sprWater), |
671 |
(NameId: sidSwitch; |
|
672 |
Probability: 100; |
|
673 |
NumberInCase: 1; |
|
674 |
Ammo: (Propz: ammoprop_ForwMsgs or |
|
675 |
ammoprop_NoCrosshair; |
|
676 |
Count: 3; |
|
677 |
NumPerTurn: 0; |
|
678 |
Timer: 0; |
|
679 |
Pos: 0; |
|
680 |
AmmoType: amSwitch); |
|
681 |
Slot: 8; |
|
682 |
TimeAfterTurn: 0; |
|
683 |
minAngle: 0; |
|
684 |
maxAngle: 0; |
|
685 |
PosCount: 1; |
|
520 | 686 |
PosSprite: sprWater)); |
37 | 687 |
|
4 | 688 |
implementation |
689 |
||
690 |
end. |