hedgewars/uMisc.pas
author unc0rr
Mon, 22 Aug 2005 15:06:42 +0000
changeset 2 4eeab397c3c6
parent 1 30f2d1037d5d
child 4 bcbd7adb4e4b
permissions -rw-r--r--
- Support for forts game mode option. Works for demos, frontend doesn't support it. - Updated copyright info for forts
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;
2
4eeab397c3c6 - Support for forts game mode option. Works for demos, frontend doesn't support it.
unc0rr
parents: 1
diff changeset
    46
    GameFlags     : Longword = 0;
1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    47
    TurnTimeLeft  : Longword = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    48
    cHedgehogTurnTime: Longword = 30000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    49
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    50
    cLandYShift      : integer = 888;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    51
    cCloudsNumber    : integer = 9;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    52
    cConsoleHeight   : integer = 320;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    53
    cConsoleYAdd     : integer = 0; 
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    54
    cTimerInterval   : Cardinal = 15;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    55
    cScreenWidth     : integer = 1024;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    56
    cScreenHeight    : integer = 768;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    57
    cBits            : integer = 16;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    58
    cWaterLine       : integer = 1024;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    59
    cVisibleWater    : integer = 64;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    60
    cScreenEdgesDist : integer = 240;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    61
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    62
    GameTicks     : LongWord = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    63
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    64
    cSkyColor     : Cardinal = 0;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    65
    cWaterColor   : Cardinal = $32397A;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    66
    cMapBackColor : Cardinal = $FFFFFF;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    67
    cWhiteColor   : Cardinal = $FFFFFF;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    68
    cConsoleSplitterColor : Cardinal = $FF0000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    69
    cColorNearBlack       : Cardinal = 16;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    70
    cExplosionBorderColor : LongWord = $808080;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    71
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    72
    cDrownSpeed   : Real = 0.06;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    73
    cMaxWindSpeed : Real = 0.0003;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    74
    cWindSpeed    : Real = 0.0001;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    75
    cGravity      : Real = 0.0005;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    76
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    77
    cShowFPS      : boolean = true;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    78
    cFullScreen   : boolean = true;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    79
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    80
const
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    81
    cMaxPower     = 1500;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    82
    cMaxAngle     = 2048;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    83
    cPowerDivisor = 1500;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    84
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    85
var
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    86
    cSendEmptyPacketTime : LongWord = 2000;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    87
    cSendCursorPosTime   : LongWord = 50;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    88
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    89
    flagMakeCapture: boolean = false;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    90
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    91
    AttackBar     : integer = 0; // 0 - отсутствует, 1 - внизу, 2 - как в wwp
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    92
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    93
function Sign(r: real): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    94
function Min(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    95
function Max(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    96
procedure OutError(Msg: String; const isFatalError: boolean=false);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    97
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    98
procedure SDLTry(Assert: boolean; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
    99
function IntToStr(n: integer): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   100
function FloatToStr(n: real): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   101
function arctan(const Y, X: real): real;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   102
function DxDy2Angle32(const _dY, _dX: Extended): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   103
procedure AdjustColor(var Color: Longword);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   104
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   105
procedure AddFileLog(s: shortstring);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   106
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   107
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   108
var CursorPoint: TPoint;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   109
    TargetPoint: TPoint = (X: NoPointX; Y: 0);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   110
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   111
implementation
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   112
uses uConsole, uStore;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   113
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   114
var f: textfile;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   115
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   116
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   117
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   118
function Sign(r: real): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   119
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   120
if r < 0 then Result:= -1 else Result:= 1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   121
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   122
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   123
function Min(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   124
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   125
if a < b then Result:= a else Result:= b
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   126
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   127
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   128
function Max(a, b: integer): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   129
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   130
if a > b then Result:= a else Result:= b
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   131
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   132
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   133
procedure OutError(Msg: String; const isFatalError: boolean=false);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   134
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   135
{$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   136
if isFatalError then
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   137
   begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   138
   WriteLn(Msg);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   139
   SDL_Quit;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   140
   Readln;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   141
   halt(1)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   142
   end else WriteLnToConsole(Msg)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   143
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   144
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   145
procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   146
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   147
if not Assert then OutError(msg, isFatal)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   148
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   149
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   150
procedure SDLTry(Assert: boolean; isFatal: boolean);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   151
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   152
if not Assert then OutError(SDL_GetError, isFatal)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   153
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   154
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   155
procedure AdjustColor(var Color: Cardinal);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   156
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   157
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
   158
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   159
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   160
function IntToStr(n: integer): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   161
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   162
str(n, Result)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   163
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   164
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   165
function FloatToStr(n: real): shortstring;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   166
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   167
str(n, Result)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   168
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   169
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   170
function arctan(const Y, X: real): real;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   171
asm
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   172
        fld     Y
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   173
        fld     X
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   174
        fpatan
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   175
        fwait
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   176
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   177
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   178
function DxDy2Angle32(const _dY, _dX: Extended): integer;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   179
const piDIV32: Extended = pi/32;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   180
asm
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   181
        fld     _dY
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   182
        fld     _dX
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   183
        fpatan
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   184
        fld     piDIV32
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   185
        fdiv
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   186
        sub     esp, 4
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   187
        fistp   dword ptr [esp]
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   188
        pop     eax
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   189
        shr     eax, 1
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   190
        and     eax, $1F
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   191
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   192
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   193
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   194
{$IFDEF DEBUGFILE}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   195
procedure AddFileLog(s: shortstring);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   196
begin
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   197
writeln(f, GameTicks: 6, ': ', s);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   198
flush(f)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   199
end;
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   200
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   201
initialization
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   202
assignfile(f, 'debug.txt');
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   203
rewrite(f);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   204
finalization
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   205
writeln(f, '-= halt at ',GameTicks,' ticks =-');
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   206
Flush(f);
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   207
closefile(f)
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   208
{$ENDIF}
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   209
30f2d1037d5d Add current sources.
unc0rr
parents:
diff changeset
   210
end.