hedgewars/uMisc.pas
author unc0rr
Mon, 22 Aug 2005 13:35:41 +0000
changeset 1 30f2d1037d5d
child 2 4eeab397c3c6
permissions -rw-r--r--
Add current sources. hw, hwserv and runhelper are compilable under Windows and *nix with FreePascal (and use -Od option) and run well on these OSes Hedge.dpr can be run only in Windows... to be ported
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     1
(*
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a worms-like game
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     3
 * Copyright (c) 2004, 2005 Andrey Korotaev <unC0Rr@gmail.com>
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     4
 *
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     5
 * Distributed under the terms of the BSD-modified licence:
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     6
 *
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     7
 * Permission is hereby granted, free of charge, to any person obtaining a copy
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     8
 * of this software and associated documentation files (the "Software"), to deal
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
     9
 * with the Software without restriction, including without limitation the
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    10
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    11
 * sell copies of the Software, and to permit persons to whom the Software is
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    12
 * furnished to do so, subject to the following conditions:
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    13
 *
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    14
 * 1. Redistributions of source code must retain the above copyright notice,
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    15
 *    this list of conditions and the following disclaimer.
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    16
 * 2. Redistributions in binary form must reproduce the above copyright notice,
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    17
 *    this list of conditions and the following disclaimer in the documentation
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    18
 *    and/or other materials provided with the distribution.
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    19
 * 3. The name of the author may not be used to endorse or promote products
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    20
 *    derived from this software without specific prior written permission.
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    21
 *
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    22
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    23
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    24
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    25
 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    26
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    27
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    28
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    29
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    30
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    31
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    32
 *)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    33
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    34
unit uMisc;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    35
interface
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    36
uses uConsts, SDLh;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    37
{$INCLUDE options.inc}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    38
var isCursorVisible : boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    39
    isTerminated    : boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    40
    isInLag         : boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    41
    isSoundEnabled  : boolean = true;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    42
    isInMultiShoot  : boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    43
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    44
    GameState     : TGameState = gsLandGen;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    45
    GameType      : TGameType = gmtLocal;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    46
    TurnTimeLeft  : Longword = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    47
    cHedgehogTurnTime: Longword = 30000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    48
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    49
    cLandYShift      : integer = 888;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    50
    cCloudsNumber    : integer = 9;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    51
    cConsoleHeight   : integer = 320;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    52
    cConsoleYAdd     : integer = 0; 
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    53
    cTimerInterval   : Cardinal = 15;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    54
    cScreenWidth     : integer = 1024;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    55
    cScreenHeight    : integer = 768;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    56
    cBits            : integer = 16;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    57
    cWaterLine       : integer = 1024;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    58
    cVisibleWater    : integer = 64;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    59
    cScreenEdgesDist : integer = 240;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    60
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    61
    GameTicks     : LongWord = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    62
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    63
    cSkyColor     : Cardinal = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    64
    cWaterColor   : Cardinal = $32397A;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    65
    cMapBackColor : Cardinal = $FFFFFF;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    66
    cWhiteColor   : Cardinal = $FFFFFF;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    67
    cConsoleSplitterColor : Cardinal = $FF0000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    68
    cColorNearBlack       : Cardinal = 16;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    69
    cExplosionBorderColor : LongWord = $808080;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    70
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    71
    cDrownSpeed   : Real = 0.06;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    72
    cMaxWindSpeed : Real = 0.0003;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    73
    cWindSpeed    : Real = 0.0001;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    74
    cGravity      : Real = 0.0005;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    75
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    76
    cShowFPS      : boolean = true;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    77
    cFullScreen   : boolean = true;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    78
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    79
const
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    80
    cMaxPower     = 1500;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    81
    cMaxAngle     = 2048;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    82
    cPowerDivisor = 1500;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    83
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    84
var
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    85
    cSendEmptyPacketTime : LongWord = 2000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    86
    cSendCursorPosTime   : LongWord = 50;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    87
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    88
    flagMakeCapture: boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    89
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    90
    AttackBar     : integer = 0; // 0 - отсутствует, 1 - внизу, 2 - как в wwp
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    91
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    92
function Sign(r: real): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    93
function Min(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    94
function Max(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    95
procedure OutError(Msg: String; const isFatalError: boolean=false);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    96
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    97
procedure SDLTry(Assert: boolean; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    98
function IntToStr(n: integer): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    99
function FloatToStr(n: real): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   100
function arctan(const Y, X: real): real;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   101
function DxDy2Angle32(const _dY, _dX: Extended): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   102
procedure AdjustColor(var Color: Longword);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   103
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   104
procedure AddFileLog(s: shortstring);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   105
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   106
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   107
var CursorPoint: TPoint;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   108
    TargetPoint: TPoint = (X: NoPointX; Y: 0);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   109
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   110
implementation
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   111
uses uConsole, uStore;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   112
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   113
var f: textfile;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   114
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   115
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   116
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   117
function Sign(r: real): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   118
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   119
if r < 0 then Result:= -1 else Result:= 1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   120
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   121
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   122
function Min(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   123
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   124
if a < b then Result:= a else Result:= b
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   125
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   126
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   127
function Max(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   128
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   129
if a > b then Result:= a else Result:= b
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   130
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   131
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   132
procedure OutError(Msg: String; const isFatalError: boolean=false);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   133
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   134
{$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   135
if isFatalError then
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   136
   begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   137
   WriteLn(Msg);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   138
   SDL_Quit;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   139
   Readln;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   140
   halt(1)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   141
   end else WriteLnToConsole(Msg)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   142
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   143
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   144
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   145
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   146
if not Assert then OutError(msg, isFatal)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   147
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   148
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   149
procedure SDLTry(Assert: boolean; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   150
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   151
if not Assert then OutError(SDL_GetError, isFatal)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   152
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   153
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   154
procedure AdjustColor(var Color: Cardinal);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   155
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   156
Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   157
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   158
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   159
function IntToStr(n: integer): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   160
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   161
str(n, Result)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   162
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   163
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   164
function FloatToStr(n: real): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   165
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   166
str(n, Result)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   167
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   168
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   169
function arctan(const Y, X: real): real;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   170
asm
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   171
        fld     Y
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   172
        fld     X
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   173
        fpatan
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   174
        fwait
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   175
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   176
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   177
function DxDy2Angle32(const _dY, _dX: Extended): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   178
const piDIV32: Extended = pi/32;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   179
asm
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   180
        fld     _dY
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   181
        fld     _dX
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   182
        fpatan
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   183
        fld     piDIV32
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   184
        fdiv
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   185
        sub     esp, 4
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   186
        fistp   dword ptr [esp]
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   187
        pop     eax
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   188
        shr     eax, 1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   189
        and     eax, $1F
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   190
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   191
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   192
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   193
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   194
procedure AddFileLog(s: shortstring);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   195
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   196
writeln(f, GameTicks: 6, ': ', s);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   197
flush(f)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   198
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   199
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   200
initialization
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   201
assignfile(f, 'debug.txt');
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   202
rewrite(f);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   203
finalization
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   204
writeln(f, '-= halt at ',GameTicks,' ticks =-');
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   205
Flush(f);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   206
closefile(f)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   207
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   208
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   209
end.