author | unc0rr |
Sun, 27 Jul 2008 13:32:15 +0000 | |
changeset 1107 | ee873ada9e86 |
parent 1080 | 8735046fc698 |
child 1121 | d595dc56b4f3 |
permissions | -rw-r--r-- |
4 | 1 |
(* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
883 | 3 |
* Copyright (c) 2004-2008 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 uMisc; |
|
20 |
interface |
|
753 | 21 |
uses uConsts, SDLh, uFloat, GL; |
4 | 22 |
{$INCLUDE options.inc} |
1054 | 23 |
var |
24 |
isCursorVisible : boolean = false; |
|
25 |
isTerminated : boolean = false; |
|
26 |
isInLag : boolean = false; |
|
27 |
isPaused : boolean = false; |
|
28 |
isSoundEnabled : boolean = true; |
|
29 |
isSEBackup : boolean = true; |
|
30 |
isInMultiShoot : boolean = false; |
|
31 |
isSpeed : boolean = false; |
|
4 | 32 |
|
1054 | 33 |
GameState : TGameState = Low(TGameState); |
34 |
GameType : TGameType = gmtLocal; |
|
35 |
GameFlags : Longword = 0; |
|
36 |
TurnTimeLeft : Longword = 0; |
|
37 |
cHedgehogTurnTime: Longword = 45000; |
|
38 |
cMaxAIThinkTime : Longword = 9000; |
|
4 | 39 |
|
1054 | 40 |
cCloudsNumber : LongInt = 9; |
41 |
cScreenWidth : LongInt = 1024; |
|
42 |
cScreenHeight : LongInt = 768; |
|
43 |
cBits : LongInt = 16; |
|
44 |
cBitsStr : string[2] = '16'; |
|
45 |
cTagsMask : byte = 7; |
|
74 | 46 |
|
1054 | 47 |
cWaterLine : LongInt = 1024; |
48 |
cVisibleWater : LongInt = 128; |
|
49 |
cGearScrEdgesDist: LongInt = 240; |
|
50 |
cCursorEdgesDist : LongInt = 40; |
|
51 |
cTeamHealthWidth : LongInt = 128; |
|
52 |
cAltDamage : boolean = true; |
|
4 | 53 |
|
1054 | 54 |
GameTicks : LongWord = 0; |
55 |
||
56 |
cSkyColor : Longword = 0; |
|
57 |
cWhiteColor : Longword = $FFFFFFFF; |
|
58 |
cColorNearBlack : Longword = $FF000010; |
|
59 |
cExplosionBorderColor : LongWord = $808080; |
|
4 | 60 |
|
1054 | 61 |
cShowFPS : boolean = true; |
62 |
cCaseFactor : Longword = 5; {0..9} |
|
63 |
cLandAdditions: Longword = 4; |
|
64 |
cFullScreen : boolean = true; |
|
65 |
cLocaleFName : shortstring = 'en.txt'; |
|
66 |
cSeed : shortstring = ''; |
|
67 |
cInitVolume : LongInt = 128; |
|
68 |
cVolumeDelta : LongInt = 0; |
|
69 |
cTimerInterval : Longword = 5; |
|
70 |
cHasFocus : boolean = true; |
|
1057 | 71 |
cInactDelay : Longword = 1250; |
4 | 72 |
|
1054 | 73 |
bBetweenTurns: boolean = false; |
1055
9af540b23409
Water rises after 25 mins of round, health is decreased after 20 mins
unc0rr
parents:
1054
diff
changeset
|
74 |
cHealthDecrease: LongWord = 0; |
9af540b23409
Water rises after 25 mins of round, health is decreased after 20 mins
unc0rr
parents:
1054
diff
changeset
|
75 |
bWaterRising : Boolean = false; |
4 | 76 |
|
614 | 77 |
{$WARNINGS OFF} |
1054 | 78 |
cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue: 6012954214); // 1.4 |
79 |
cBombsSpeed : hwFloat = (isNegative: false; QWordValue: 429496729); |
|
614 | 80 |
{$WARNINGS ON} |
543
465e2ec8f05f
- Better randomness of placing hedgehogs on the land
unc0rr
parents:
539
diff
changeset
|
81 |
|
4 | 82 |
var |
1054 | 83 |
cSendEmptyPacketTime : LongWord = 2000; |
84 |
cSendCursorPosTime : LongWord = 50; |
|
85 |
ShowCrosshair : boolean; |
|
86 |
cDrownSpeed, |
|
87 |
cMaxWindSpeed, |
|
88 |
cWindSpeed, |
|
89 |
cGravity: hwFloat; |
|
4 | 90 |
|
1054 | 91 |
flagMakeCapture: boolean = false; |
4 | 92 |
|
1054 | 93 |
InitStepsFlags: Longword = 0; |
55
e09f7c952a40
Send run parameters by cmd line, game parameters by IPC... breaks network game
unc0rr
parents:
53
diff
changeset
|
94 |
|
1054 | 95 |
RealTicks: Longword = 0; |
836 | 96 |
|
1054 | 97 |
AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
4 | 98 |
|
371 | 99 |
function hwSign(r: hwFloat): LongInt; |
802
ed5450a89b96
Start implementing 'visual gears' - gears, that don't need to be synchronized (clouds and flakes)
unc0rr
parents:
788
diff
changeset
|
100 |
function Min(a, b: LongInt): LongInt; |
371 | 101 |
function Max(a, b: LongInt): LongInt; |
351 | 102 |
procedure OutError(Msg: String; isFatalError: boolean); |
4 | 103 |
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
104 |
procedure SDLTry(Assert: boolean; isFatal: boolean); |
|
316 | 105 |
function IntToStr(n: LongInt): shortstring; |
351 | 106 |
function FloatToStr(n: hwFloat): shortstring; |
775 | 107 |
function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat; |
371 | 108 |
function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt; |
109 |
function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt; |
|
4 | 110 |
procedure AdjustColor(var Color: Longword); |
111 |
{$IFDEF DEBUGFILE} |
|
112 |
procedure AddFileLog(s: shortstring); |
|
24 | 113 |
function RectToStr(Rect: TSDL_Rect): shortstring; |
4 | 114 |
{$ENDIF} |
208 | 115 |
procedure SetKB(n: Longword); |
116 |
procedure SendKB; |
|
351 | 117 |
procedure SetLittle(var r: hwFloat); |
306 | 118 |
procedure SendStat(sit: TStatInfoType; s: shortstring); |
753 | 119 |
function Str2PChar(const s: shortstring): PChar; |
755 | 120 |
function Surface2Tex(surf: PSDL_Surface): PTexture; |
759 | 121 |
procedure FreeTexture(tex: PTexture); |
945
4ead9cde4e14
- Start chat implementation: chat strings are on the screen
unc0rr
parents:
916
diff
changeset
|
122 |
function toPowerOf2(i: Longword): Longword; |
949 | 123 |
function DecodeBase64(s: shortstring): shortstring; |
1080 | 124 |
procedure MakeScreenshot(s: shortstring); |
4 | 125 |
|
126 |
var CursorPoint: TPoint; |
|
127 |
TargetPoint: TPoint = (X: NoPointX; Y: 0); |
|
128 |
||
129 |
implementation |
|
771 | 130 |
uses uConsole, uStore, uIO, Math, uRandom, GLU; |
208 | 131 |
var KBnum: Longword = 0; |
4 | 132 |
{$IFDEF DEBUGFILE} |
133 |
var f: textfile; |
|
134 |
{$ENDIF} |
|
135 |
||
371 | 136 |
function hwSign(r: hwFloat): LongInt; |
4 | 137 |
begin |
351 | 138 |
if r.isNegative then hwSign:= -1 else hwSign:= 1 |
4 | 139 |
end; |
140 |
||
371 | 141 |
function Min(a, b: LongInt): LongInt; |
4 | 142 |
begin |
351 | 143 |
if a < b then Min:= a else Min:= b |
4 | 144 |
end; |
145 |
||
371 | 146 |
function Max(a, b: LongInt): LongInt; |
4 | 147 |
begin |
351 | 148 |
if a > b then Max:= a else Max:= b |
4 | 149 |
end; |
150 |
||
351 | 151 |
procedure OutError(Msg: String; isFatalError: boolean); |
4 | 152 |
begin |
153 |
{$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF} |
|
53 | 154 |
WriteLnToConsole(Msg); |
4 | 155 |
if isFatalError then |
156 |
begin |
|
53 | 157 |
SendIPC('E' + GetLastConsoleLine); |
4 | 158 |
SDL_Quit; |
159 |
halt(1) |
|
53 | 160 |
end |
4 | 161 |
end; |
162 |
||
163 |
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
|
164 |
begin |
|
70 | 165 |
if not Assert then OutError(Msg, isFatal) |
4 | 166 |
end; |
167 |
||
168 |
procedure SDLTry(Assert: boolean; isFatal: boolean); |
|
169 |
begin |
|
170 |
if not Assert then OutError(SDL_GetError, isFatal) |
|
171 |
end; |
|
172 |
||
188 | 173 |
procedure AdjustColor(var Color: Longword); |
4 | 174 |
begin |
175 |
Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF) |
|
176 |
end; |
|
177 |
||
316 | 178 |
function IntToStr(n: LongInt): shortstring; |
4 | 179 |
begin |
351 | 180 |
str(n, IntToStr) |
4 | 181 |
end; |
182 |
||
351 | 183 |
function FloatToStr(n: hwFloat): shortstring; |
4 | 184 |
begin |
351 | 185 |
FloatToStr:= cstr(n) |
4 | 186 |
end; |
187 |
||
775 | 188 |
function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat; |
189 |
var dY, dX: Extended; |
|
190 |
begin |
|
191 |
dY:= _dY.QWordValue / $100000000; |
|
192 |
if _dY.isNegative then dY:= - dY; |
|
193 |
dX:= _dX.QWordValue / $100000000; |
|
194 |
if _dX.isNegative then dX:= - dX; |
|
195 |
DxDy2Angle:= arctan2(dY, dX) * 180 / pi |
|
196 |
end; |
|
197 |
||
371 | 198 |
function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt; |
100 | 199 |
const _16divPI: Extended = 16/pi; |
370
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
200 |
var dY, dX: Extended; |
100 | 201 |
begin |
370
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
202 |
dY:= _dY.QWordValue / $100000000; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
203 |
if _dY.isNegative then dY:= - dY; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
204 |
dX:= _dX.QWordValue / $100000000; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
205 |
if _dX.isNegative then dX:= - dX; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
206 |
DxDy2Angle32:= trunc(arctan2(dY, dX) * _16divPI) and $1f |
4 | 207 |
end; |
208 |
||
371 | 209 |
function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt; |
100 | 210 |
const MaxAngleDivPI: Extended = cMaxAngle/pi; |
370
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
211 |
var dY, dX: Extended; |
100 | 212 |
begin |
370
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
213 |
dY:= _dY.QWordValue / $100000000; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
214 |
if _dY.isNegative then dY:= - dY; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
215 |
dX:= _dX.QWordValue / $100000000; |
c75410fe3133
- Repair bots: they can walk and use bazooka, possible cannot jump (why?)
unc0rr
parents:
351
diff
changeset
|
216 |
if _dX.isNegative then dX:= - dX; |
438 | 217 |
DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI) |
100 | 218 |
end; |
4 | 219 |
|
208 | 220 |
procedure SetKB(n: Longword); |
221 |
begin |
|
222 |
KBnum:= n |
|
223 |
end; |
|
224 |
||
225 |
procedure SendKB; |
|
226 |
var s: shortstring; |
|
227 |
begin |
|
228 |
if KBnum <> 0 then |
|
229 |
begin |
|
230 |
s:= 'K' + inttostr(KBnum); |
|
231 |
SendIPCRaw(@s, Length(s) + 1) |
|
232 |
end |
|
233 |
end; |
|
234 |
||
351 | 235 |
procedure SetLittle(var r: hwFloat); |
300 | 236 |
begin |
553
5478386d935f
- Switch to bazooka (or whatever) after use of some weapon (fixes problem with bots)
unc0rr
parents:
543
diff
changeset
|
237 |
r:= SignAs(cLittle, r) |
300 | 238 |
end; |
239 |
||
337 | 240 |
procedure SendStat(sit: TStatInfoType; s: shortstring); |
869 | 241 |
const stc: array [TStatInfoType] of char = 'rDkK'; |
337 | 242 |
begin |
243 |
SendIPC('i' + stc[sit] + s) |
|
244 |
end; |
|
245 |
||
534 | 246 |
function Str2PChar(const s: shortstring): PChar; |
351 | 247 |
const CharArray: array[byte] of Char = ''; |
248 |
begin |
|
249 |
CharArray:= s; |
|
250 |
CharArray[Length(s)]:= #0; |
|
251 |
Str2PChar:= @CharArray |
|
252 |
end; |
|
253 |
||
771 | 254 |
function isPowerOf2(i: Longword): boolean; |
255 |
begin |
|
256 |
if i = 0 then exit(true); |
|
257 |
while (i and 1) = 0 do i:= i shr 1; |
|
258 |
isPowerOf2:= (i = 1) |
|
259 |
end; |
|
260 |
||
261 |
function toPowerOf2(i: Longword): Longword; |
|
262 |
begin |
|
263 |
toPowerOf2:= 1; |
|
264 |
while (toPowerOf2 < i) do toPowerOf2:= toPowerOf2 shl 1 |
|
265 |
end; |
|
266 |
||
755 | 267 |
function Surface2Tex(surf: PSDL_Surface): PTexture; |
753 | 268 |
var mode: LongInt; |
771 | 269 |
tw, th: Longword; |
270 |
tmpp: pointer; |
|
753 | 271 |
begin |
755 | 272 |
new(Surface2Tex); |
273 |
Surface2Tex^.w:= surf^.w; |
|
274 |
Surface2Tex^.h:= surf^.h; |
|
275 |
||
753 | 276 |
if (surf^.format^.BytesPerPixel = 3) then mode:= GL_RGB else |
277 |
if (surf^.format^.BytesPerPixel = 4) then mode:= GL_RGBA else |
|
278 |
begin |
|
869 | 279 |
TryDo(false, 'Surface2Tex: BytesPerPixel not in [3, 4]', true); |
755 | 280 |
Surface2Tex^.id:= 0; |
753 | 281 |
exit |
282 |
end; |
|
283 |
||
755 | 284 |
glGenTextures(1, @Surface2Tex^.id); |
753 | 285 |
|
755 | 286 |
glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id); |
753 | 287 |
|
771 | 288 |
if SDL_MustLock(surf) then |
289 |
SDLTry(SDL_LockSurface(surf) >= 0, true); |
|
290 |
||
291 |
if not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h)) then |
|
292 |
begin |
|
293 |
tw:= toPowerOf2(Surf^.w); |
|
294 |
th:= toPowerOf2(Surf^.h); |
|
295 |
||
296 |
GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel); |
|
297 |
||
298 |
gluScaleImage(mode, Surf^.w, Surf^.h, GL_UNSIGNED_BYTE, |
|
299 |
Surf^.pixels, tw, th, GL_UNSIGNED_BYTE, |
|
300 |
tmpp); |
|
301 |
||
302 |
glTexImage2D(GL_TEXTURE_2D, 0, mode, tw, th, 0, mode, GL_UNSIGNED_BYTE, tmpp); |
|
303 |
||
304 |
FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel) |
|
305 |
end else |
|
306 |
glTexImage2D(GL_TEXTURE_2D, 0, mode, surf^.w, surf^.h, 0, mode, GL_UNSIGNED_BYTE, surf^.pixels); |
|
753 | 307 |
|
754 | 308 |
if SDL_MustLock(surf) then |
309 |
SDL_UnlockSurface(surf); |
|
310 |
||
788
00720357601f
- Get rid of PageSimpleGame, now pressing 'quick game' just starts round
unc0rr
parents:
785
diff
changeset
|
311 |
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
00720357601f
- Get rid of PageSimpleGame, now pressing 'quick game' just starts round
unc0rr
parents:
785
diff
changeset
|
312 |
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) |
753 | 313 |
end; |
314 |
||
759 | 315 |
procedure FreeTexture(tex: PTexture); |
316 |
begin |
|
317 |
glDeleteTextures(1, @tex^.id); |
|
318 |
dispose(tex) |
|
319 |
end; |
|
337 | 320 |
|
949 | 321 |
function DecodeBase64(s: shortstring): shortstring; |
322 |
const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
|
323 |
var i, t, c: Longword; |
|
324 |
begin |
|
325 |
c:= 0; |
|
326 |
for i:= 1 to Length(s) do |
|
327 |
begin |
|
328 |
t:= Pos(s[i], table); |
|
329 |
if s[i] = '=' then inc(c); |
|
330 |
if t > 0 then byte(s[i]):= t - 1 else byte(s[i]):= 0 |
|
331 |
end; |
|
332 |
||
333 |
i:= 1; |
|
334 |
t:= 1; |
|
335 |
while i <= length(s) do |
|
336 |
begin |
|
337 |
DecodeBase64[t ]:= char((byte(s[i ]) shl 2) or (byte(s[i + 1]) shr 4)); |
|
338 |
DecodeBase64[t + 1]:= char((byte(s[i + 1]) shl 4) or (byte(s[i + 2]) shr 2)); |
|
339 |
DecodeBase64[t + 2]:= char((byte(s[i + 2]) shl 6) or (byte(s[i + 3]) )); |
|
340 |
inc(t, 3); |
|
341 |
inc(i, 4) |
|
342 |
end; |
|
343 |
||
344 |
if c < 3 then t:= t - c; |
|
345 |
||
346 |
byte(DecodeBase64[0]):= t - 1 |
|
347 |
end; |
|
348 |
||
1080 | 349 |
const GL_BGR = $80E0; // some opengl headers don't have that const (?) |
350 |
procedure MakeScreenshot(s: shortstring); |
|
351 |
const head: array[0..8] of Word = (0, 2, 0, 0, 0, 0, 0, 0, 24); |
|
352 |
var p: Pointer; |
|
353 |
size: Longword; |
|
354 |
f: file; |
|
355 |
begin |
|
356 |
head[6]:= cScreenWidth; |
|
357 |
head[7]:= cScreenHeight; |
|
358 |
||
359 |
size:= cScreenWidth * cScreenHeight * 3; |
|
360 |
p:= GetMem(size); |
|
361 |
||
362 |
glReadBuffer(GL_FRONT); |
|
363 |
glReadPixels(0, 0, cScreenWidth, cScreenHeight, GL_BGR, GL_UNSIGNED_BYTE, p); |
|
364 |
||
365 |
{$I-} |
|
366 |
Assign(f, s); |
|
367 |
Rewrite(f, 1); |
|
368 |
if IOResult = 0 then |
|
369 |
begin |
|
370 |
BlockWrite(f, head, sizeof(head)); |
|
371 |
BlockWrite(f, p^, size); |
|
372 |
Close(f); |
|
373 |
end; |
|
374 |
{$I+} |
|
375 |
||
376 |
FreeMem(p) |
|
377 |
end; |
|
378 |
||
949 | 379 |
{$IFDEF DEBUGFILE} |
380 |
procedure AddFileLog(s: shortstring); |
|
381 |
begin |
|
382 |
writeln(f, GameTicks: 6, ': ', s); |
|
383 |
flush(f) |
|
384 |
end; |
|
385 |
||
386 |
function RectToStr(Rect: TSDL_Rect): shortstring; |
|
387 |
begin |
|
388 |
RectToStr:= '(x: ' + inttostr(rect.x) + '; y: ' + inttostr(rect.y) + '; w: ' + inttostr(rect.w) + '; h: ' + inttostr(rect.h) + ')' |
|
389 |
end; |
|
390 |
||
371 | 391 |
var i: LongInt; |
488 | 392 |
{$ENDIF} |
306 | 393 |
|
4 | 394 |
initialization |
351 | 395 |
cDrownSpeed.QWordValue:= 257698038;// 0.06 |
488 | 396 |
cMaxWindSpeed.QWordValue:= 2147484;// 0.0005 |
397 |
cWindSpeed.QWordValue:= 429496;// 0.0001 |
|
351 | 398 |
cGravity:= cMaxWindSpeed; |
399 |
||
488 | 400 |
{$IFDEF DEBUGFILE} |
337 | 401 |
{$I-} |
497 | 402 |
if ParamCount > 0 then |
403 |
for i:= 0 to 7 do |
|
337 | 404 |
begin |
497 | 405 |
Assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); |
337 | 406 |
rewrite(f); |
407 |
if IOResult = 0 then break |
|
408 |
end; |
|
409 |
{$I+} |
|
17 | 410 |
|
4 | 411 |
finalization |
916 | 412 |
//uRandom.DumpBuffer; |
4 | 413 |
writeln(f, '-= halt at ',GameTicks,' ticks =-'); |
414 |
Flush(f); |
|
351 | 415 |
close(f) |
4 | 416 |
{$ENDIF} |
417 |
||
418 |
end. |