Changeset 4


Ignore:
Timestamp:
Mar 6, 2011, 6:43:01 PM (13 years ago)
Author:
george
Message:
  • Added: Complete map visualizaiton.
  • Added: Generating map rock border.
  • Added: Tank movement colision detection.
  • Added: Some bullet shooting test.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r3 r4  
    88  Dialogs, Classes, SysUtils, Contnrs, Graphics, SpecializedMatrix, SpecializedList;
    99
     10const
     11  MaxBulletCount = 10;
     12
    1013type
    1114  TEngine = class;
    12 
    13   TSurfaceMatter = (smNothing, smDirt1, smDirt2, smRock,
    14     smPlayer1H, smPlayer1L, smPlayer2H, smPlayer2L, smCannon, smBullet);
     15  TPlayer = class;
     16
     17  TSurfaceMatter = (smNothing, smDirt1, smDirt2, smRock, smCannon, smBullet,
     18    smPlayer1H, smPlayer1L, smPlayer2H, smPlayer2L,
     19    smPlayer3H, smPlayer3L, smPlayer4H, smPlayer4L);
    1520
    1621  TPlayerKeys = record
     
    2227  end;
    2328
     29  TBullet = class
     30    Player: TPlayer;
     31    Position: TPoint;
     32    Direction: Integer;
     33  end;
     34
    2435  { TTank }
    2536
     
    3546  TPlayer = class
    3647  private
     48    NewDirection: Integer;
     49    NewPosition: TPoint;
     50    Dig: Boolean;
    3751    function ShowTankProc(Item1, Item2: Byte): Byte;
    3852    function HideTankProc(Item1, Item2: Byte): Byte;
     
    4660    Keys: TPlayerKeys;
    4761    Tanks: TListObject;
     62    Bullets: TListObject;
    4863    procedure Control;
    4964    procedure Paint;
    5065    procedure PlaceHouse;
    51     function CheckColision: Boolean;
     66    function CheckColision: TSurfaceMatter;
    5267    procedure ShowTank;
    5368    procedure HideTank;
     
    6984    constructor Create;
    7085    destructor Destroy; override;
     86    procedure DrawToBitmap(Bitmap: TBitmap);
    7187    property Size: TMatrixByteIndex read GetSize write SetSize;
    7288  end;
     
    7894    FBitmap: TBitmap;
    7995    FRedrawPending: Boolean;
     96    FBitmapLower: TBitmap;
    8097    function GetPlayerCount: Integer;
    8198    procedure SetBitmap(const AValue: TBitmap);
     
    90107    procedure ResizePlayerFrames;
    91108    procedure Tick;
     109    procedure Draw;
    92110    property PlayerCount: Integer read GetPlayerCount write SetPlayerCount;
    93111    property Bitmap: TBitmap read FBitmap write SetBitmap;
     
    97115const
    98116  SurfaceMatterColors: array[TSurfaceMatter] of TColor = (clBlack, $0756b0,
    99     $2170c3, TColor($9a9a9a), TColor($00ff00), TColor($00a000),
    100     TColor($ff2c2c), TColor($b60000), clYellow, clRed);
     117    $2170c3, TColor($9a9a9a), clYellow, clRed,
     118    TColor($00ff00), TColor($00a000), TColor($ff2c2c), TColor($b60000),
     119    TColor($0000ff), TColor($0000a0), TColor($ff2cff), TColor($b600b6));
     120  DirectionToDelta: array[0..7] of TPoint =
     121    ((X: 0; Y: -1), (X: 1; Y: -1), (X: 1; Y: 0), (X: 1; Y: 1),
     122    (X: 0; Y: 1), (X: -1; Y: 1), (X: -1; Y: 0), (X: -1; Y: -1));
    101123
    102124var
     
    136158var
    137159  X, Y: Integer;
     160  Distance: Double;
     161  Delta: Double;
    138162begin
    139163  for Y := 0 to Surface.Count.Y - 1 do
     
    143167        Surface.ItemsXY[Y, X] := Byte(smDirt2);
    144168    end;
     169
     170  Distance := 0.1 * Surface.Count.X;
     171  Delta := 0;
     172  for Y := 0 to Surface.Count.Y - 1 do begin
     173    for X := 0 to Round(Distance) - 1 do begin
     174      Surface.ItemsXY[Y, X] := Byte(smRock);
     175    end;
     176    Delta := (Random * 2 - 1) * 3 - (Distance / (0.1 * Surface.Count.X) * 2 - 1);
     177    Distance := Distance + Delta;
     178  end;
     179
     180  Distance := 0.1 * Surface.Count.X;
     181  Delta := 0;
     182  for Y := 0 to Surface.Count.Y - 1 do begin
     183    for X := 0 to Round(Distance) - 1 do begin
     184      Surface.ItemsXY[Y, Surface.Count.X - 1 - X] := Byte(smRock);
     185    end;
     186    Delta := (Random * 2 - 1) * 3 - (Distance / (0.1 * Surface.Count.X) * 2 - 1);
     187    Distance := Distance + Delta;
     188  end;
     189
     190  Distance := 0.1 * Surface.Count.Y;
     191  Delta := 0;
     192  for X := 0 to Surface.Count.X - 1 do begin
     193    for Y := 0 to Round(Distance) - 1 do begin
     194      Surface.ItemsXY[Y, X] := Byte(smRock);
     195    end;
     196    Delta := (Random * 2 - 1) * 3 - (Distance / (0.1 * Surface.Count.Y) * 2 - 1);
     197    Distance := Distance + Delta;
     198  end;
     199
     200  Distance := 0.1 * Surface.Count.Y;
     201  Delta := 0;
     202  for X := 0 to Surface.Count.X - 1 do begin
     203    for Y := 0 to Round(Distance) - 1 do begin
     204      Surface.ItemsXY[Surface.Count.Y - 1 - Y, X] := Byte(smRock);
     205    end;
     206    Delta := (Random * 2 - 1) * 3 - (Distance / (0.1 * Surface.Count.Y) * 2 - 1);
     207    Distance := Distance + Delta;
     208  end;
    145209end;
    146210
     
    150214begin
    151215  Surface := TMatrixByte.Create;
    152   NewSize.X := 100;
    153   NewSize.Y := 100;
     216  NewSize.X := 800;
     217  NewSize.Y := 300;
    154218  Size := NewSize;
    155219end;
     
    161225end;
    162226
     227procedure TWorld.DrawToBitmap(Bitmap: TBitmap);
     228var
     229  X, Y: Integer;
     230begin
     231  try
     232    Bitmap.BeginUpdate(True);
     233  for Y := 0 to Bitmap.Height - 1 do
     234    for X := 0 to Bitmap.Width - 1 do
     235      Bitmap.Canvas.Pixels[X, Y] := SurfaceMatterColors[TSurfaceMatter(
     236        Surface.ItemsXY[Trunc(Y / Bitmap.Height * Surface.Count.Y),
     237        Trunc(X / Bitmap.Width * Surface.Count.X)])];
     238  finally
     239    Bitmap.EndUpdate;
     240  end;
     241end;
     242
    163243{ TPlayer }
    164244
    165245procedure TPlayer.Control;
    166246var
    167   NewPosition: TPoint;
    168   NewDirection: Integer;
    169247  Delta: TPoint;
     248  Matter: TSurfaceMatter;
     249  NewBullet: TBullet;
     250  I: Integer;
    170251begin
    171252  Delta.X := 0;
    172253  Delta.Y := 0;
    173   if Engine.KeyState[Ord(Keys.Up)] then Delta.Y := Delta.Y + 1;
    174   if Engine.KeyState[Ord(Keys.Down)] then Delta.Y := Delta.Y - 1;
     254  if Engine.KeyState[Ord(Keys.Down)] then Delta.Y := Delta.Y + 1;
     255  if Engine.KeyState[Ord(Keys.Up)] then Delta.Y := Delta.Y - 1;
    175256  if Engine.KeyState[Ord(Keys.Right)] then Delta.X := Delta.X + 1;
    176257  if Engine.KeyState[Ord(Keys.Left)] then Delta.X := Delta.X - 1;
     
    186267    else if (Delta.X = -1) and (Delta.Y = 0) then NewDirection := 6
    187268    else if (Delta.X = -1) and (Delta.Y = -1) then NewDirection := 7;
    188   end;
    189 
    190   NewPosition := Point(Position.X + Delta.X, Position.Y + Delta.Y);
    191   if CheckColision then begin
     269
     270    if NewDirection = Direction then
     271      NewPosition := Point(Position.X + Delta.X, Position.Y + Delta.Y)
     272      else NewPosition := Position;
    192273    HideTank;
    193     Position := NewPosition;
    194     Direction := NewDirection;
     274    Matter := CheckColision;
     275    if (Matter = smDirt1) then Dig := not Dig;
     276    if (Matter = smNothing) or ((Matter = smDirt1) and (not Dig)) then begin
     277      Position := NewPosition;
     278      Direction := NewDirection;
     279      Engine.Redraw;
     280    end;
    195281    ShowTank;
    196     Engine.Redraw;
     282  end;
     283
     284
     285  if Engine.KeyState[Ord(Keys.Shoot)] then
     286    if Bullets.Count < MaxBulletCount then begin
     287      NewBullet := TBullet.Create;
     288      NewBullet.Player := Self;
     289      NewBullet.Position := Position;
     290      NewBullet.Direction := Direction;
     291      Bullets.Add(NewBullet);
     292    end;
     293
     294  for I := Bullets.Count - 1 downto 0 do
     295  with TBullet(Bullets[I]) do begin
     296    Engine.World.Surface.ItemsXY[Position.Y, Position.X] := Byte(smNothing);
     297
     298    Position.X := Position.X + DirectionToDelta[Direction].X;
     299    Position.Y := Position.Y + DirectionToDelta[Direction].Y;
     300
     301    with Engine.World.Surface do
     302    if (Position.X >= Count.X) or (Position.X < 0) or
     303      (Position.Y >= Count.Y) or (Position.Y < 0) then
     304      Bullets.Delete(I) else
     305      Engine.World.Surface.ItemsXY[Position.Y, Position.X] := Byte(smBullet);
    197306  end;
    198307end;
     
    203312  XX, YY: Integer;
    204313begin
    205   with Engine.Bitmap.Canvas do begin
     314  with Engine.FBitmapLower.Canvas do begin
    206315    Rectangle(ScreenFrame);
    207     //FillRect(ScreenFrame);
     316    Brush.Color := SurfaceMatterColors[smRock];
     317    FillRect(ScreenFrame);
    208318
    209319
     
    248358end;
    249359
    250 function TPlayer.CheckColision: Boolean;
    251 begin
    252 
     360function TPlayer.CheckColision: TSurfaceMatter;
     361var
     362  X, Y: Integer;
     363begin
     364  Result := smNothing;
     365  with Engine.World, TTank(Tanks[NewDirection]) do
     366  for Y := 0 to Image.Count.Y - 1 do
     367  for X := 0 to Image.Count.X - 1 do
     368    if (Image.ItemsXY[Y, X] > 0) and
     369    (Surface.ItemsXY[Y + NewPosition.Y, X + NewPosition.X] <> Byte(smNothing)) then
     370    begin
     371      Result := smDirt1;
     372      if (Surface.ItemsXY[Y + NewPosition.Y, X + NewPosition.X] <> Byte(smDirt1)) and
     373      (Surface.ItemsXY[Y + NewPosition.Y, X + NewPosition.X] <> Byte(smDirt2)) then
     374      begin
     375        Result := TSurfaceMatter(Surface.ItemsXY[Y + NewPosition.Y, X + NewPosition.X]);
     376        Exit;
     377      end;
     378    end;
    253379end;
    254380
     
    261387begin
    262388  with Engine.World do begin
    263     Surface.Merge(TMatrixByte.Point(Position.X, Position.Y), TTank(Tanks[Direction]).Image, ShowTankProc);
     389    Surface.Merge(Surface.CreateIndex(Position.X, Position.Y), TTank(Tanks[Direction]).Image, ShowTankProc);
    264390  end;
    265391end;
     
    273399begin
    274400  with Engine.World do begin
    275     Surface.Merge(TMatrixByte.Point(Position.X, Position.Y), TTank(Tanks[Direction]).Image, HideTankProc);
     401    Surface.Merge(Surface.CreateIndex(Position.X, Position.Y), TTank(Tanks[Direction]).Image, HideTankProc);
    276402  end;
    277403end;
     
    287413  NewTank := TTank.Create;
    288414  with NewTank do begin
    289     Image.Count := TMatrixByte.Point(7, 7);
     415    Image.Count := Image.CreateIndex(7, 7);
    290416    for I := 0 to 3 do
    291417      Image[I, 3] := Byte(smCannon);
     
    305431  NewTank := TTank.Create;
    306432  with NewTank do begin
    307     Image.Count := TMatrixByte.Point(7, 7);
     433    Image.Count := Image.CreateIndex(7, 7);
    308434    for I := 0 to 2 do
    309435      Image[3 - I, 3 + I] := Byte(smCannon);
     
    368494begin
    369495  Tanks := TListObject.Create;
     496  Bullets := TListObject.Create;
    370497end;
    371498
    372499destructor TPlayer.Destroy;
    373500begin
     501  Bullets.Free;
    374502  Tanks.Free;
    375503  inherited Destroy;
     
    422550  I: Integer;
    423551begin
    424   // TODO: Determine frames from player count
    425   if Assigned(Bitmap) then begin
    426     HorizFrameCount := 2;
    427     VertFrameCount := 1;
     552  if Assigned(FBitmapLower) then begin
     553    if Players.Count > 1 then begin
     554      if Players.Count > 2 then VertFrameCount := 2
     555        else VertFrameCount := 1;
     556      HorizFrameCount := Round(Players.Count / VertFrameCount);
     557    end else begin
     558      VertFrameCount := 1;
     559      HorizFrameCount := 1;
     560    end;
     561    FBitmapLower.SetSize(80 * HorizFrameCount, 60 * VertFrameCount);
    428562    for I := 0 to Players.Count - 1 do begin
    429563      TPlayer(Players[I]).ScreenFrame := Rect(
    430         (I mod HorizFrameCount) * (Bitmap.Width div HorizFrameCount),
    431         (I div HorizFrameCount) * (Bitmap.Height div VertFrameCount),
    432         ((I mod HorizFrameCount) + 1) * (Bitmap.Width div HorizFrameCount),
    433         ((I div HorizFrameCount) + 1) * (Bitmap.Height div VertFrameCount));
    434     end;
    435   end;
     564        (I mod HorizFrameCount) * (FBitmapLower.Width div HorizFrameCount),
     565        (I div HorizFrameCount) * (FBitmapLower.Height div VertFrameCount),
     566        ((I mod HorizFrameCount) + 1) * (FBitmapLower.Width div HorizFrameCount),
     567        ((I div HorizFrameCount) + 1) * (FBitmapLower.Height div VertFrameCount));
     568    end;
     569  end;
     570  Redraw;
    436571end;
    437572
    438573constructor TEngine.Create;
    439574begin
     575  FBitmapLower := TBitmap.Create;
    440576  Players := TObjectList.Create;
    441577  World := TWorld.Create;
    442578  World.Engine := Self;
     579  Redraw;
    443580end;
    444581
    445582destructor TEngine.Destroy;
    446583begin
     584  FBitmapLower.Free;
    447585  Players.Free;
    448586  World.Free;
     
    457595    TPlayer(Players[I]).Control;
    458596  end;
    459 
     597end;
     598
     599procedure TEngine.Draw;
     600var
     601  I: Integer;
     602begin
    460603  if FRedrawPending then begin
    461     if Assigned(Bitmap) then begin
    462       Bitmap.Canvas.FillRect(0, 0, Bitmap.Width, Bitmap.Height);
    463       for I := 0 to Players.Count - 1 do begin
    464         TPlayer(Players[I]).Control;
    465         TPlayer(Players[I]).Paint;
    466       end;
     604    FBitmapLower.Canvas.FillRect(0, 0, FBitmapLower.Width, FBitmapLower.Height);
     605    for I := 0 to Players.Count - 1 do begin
     606      TPlayer(Players[I]).Paint;
     607    end;
     608    if Assigned(FBitmap) then begin
     609      FBitmap.Canvas.StretchDraw(Rect(0, 0, FBitmap.Width, FBitmap.Height), FBitmapLower);
    467610    end;
    468611    FRedrawPending := False;
     
    481624  begin
    482625    // Reset position
    483     Position := Point(25 + Random(World.Surface.Count.X - 50),
    484       25 + Random(World.Surface.Count.Y - 50));
     626    Position := Point(Round(World.Surface.Count.X * 0.2) + Random(Round(World.Surface.Count.X * 0.6)),
     627      Round(World.Surface.Count.Y * 0.2) + Random(Round(World.Surface.Count.Y * 0.6)));
    485628
    486629    PlaceHouse;
    487630  end;
     631  Redraw;
    488632end;
    489633
  • trunk/UMainForm.lfm

    r2 r4  
    44  Top = 95
    55  Width = 514
    6   Caption = 'MainForm'
     6  Caption = 'Tunneler'
    77  ClientHeight = 389
    88  ClientWidth = 514
     
    1111  OnKeyDown = FormKeyDown
    1212  OnKeyUp = FormKeyUp
     13  OnShow = FormShow
    1314  LCLVersion = '0.9.31'
    1415  object Image1: TImage
     
    1920    Align = alClient
    2021    OnResize = Image1Resize
    21     Stretch = True
    2222  end
    2323  object StatusBar1: TStatusBar
     
    3535    SimplePanel = False
    3636  end
    37   object Timer1: TTimer
     37  object TimerDraw: TTimer
    3838    Interval = 50
    39     OnTimer = Timer1Timer
     39    OnTimer = TimerDrawTimer
    4040    left = 99
    4141    top = 50
     
    5050        OnClick = MenuItem3Click
    5151      end
     52      object MenuItemShowMap: TMenuItem
     53        Caption = 'Show map'
     54        OnClick = MenuItemShowMapClick
     55      end
    5256      object MenuItem2: TMenuItem
    5357        Caption = 'Exit'
     
    5660    end
    5761  end
     62  object TimerEngineTick: TTimer
     63    Interval = 10
     64    OnTimer = TimerEngineTickTimer
     65    left = 96
     66    top = 104
     67  end
    5868end
  • trunk/UMainForm.pas

    r3 r4  
    1919    MenuItem2: TMenuItem;
    2020    MenuItem3: TMenuItem;
     21    MenuItemShowMap: TMenuItem;
    2122    StatusBar1: TStatusBar;
    22     Timer1: TTimer;
     23    TimerDraw: TTimer;
     24    TimerEngineTick: TTimer;
    2325    procedure FormCreate(Sender: TObject);
    2426    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    2527    procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
     28    procedure FormShow(Sender: TObject);
    2629    procedure Image1Resize(Sender: TObject);
    2730    procedure MenuItem2Click(Sender: TObject);
    2831    procedure MenuItem3Click(Sender: TObject);
    29     procedure Timer1Timer(Sender: TObject);
     32    procedure MenuItemShowMapClick(Sender: TObject);
     33    procedure TimerDrawTimer(Sender: TObject);
     34    procedure TimerEngineTickTimer(Sender: TObject);
    3035  private
    31     { private declarations }
    3236  public
    3337    { public declarations }
     
    4145{$R *.lfm}
    4246
     47uses
     48  UMapForm;
     49
    4350{ TMainForm }
    4451
    45 procedure TMainForm.Timer1Timer(Sender: TObject);
     52procedure TMainForm.TimerDrawTimer(Sender: TObject);
    4653begin
    4754  try
    48     Timer1.Enabled := False;
    49     Engine.Tick;
     55    TimerDraw.Enabled := False;
     56    Engine.Draw;
    5057    StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
    5158      IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
    5259      IntToStr(TPlayer(Engine.Players[0]).Direction);
    5360  finally
    54     Timer1.Enabled := True;
     61    TimerDraw.Enabled := True;
    5562  end;
     63end;
     64
     65procedure TMainForm.TimerEngineTickTimer(Sender: TObject);
     66begin
     67  Engine.Tick;
    5668end;
    5769
     
    5971begin
    6072  Engine.Bitmap := Image1.Picture.Bitmap;
    61   Image1Resize(Self);
    6273  with Engine do begin
    63     PlayerCount := 2;
     74    PlayerCount := 4;
    6475    with TPlayer(Players[0]) do begin
    6576      Keys.Left := 65;
    66       Keys.Down := 87;
     77      Keys.Down := 83;
    6778      Keys.Right := 68;
    68       Keys.Up := 83;
     79      Keys.Up := 87;
    6980      Keys.Shoot := 69;
    7081    end;
    7182    with TPlayer(Players[1]) do begin
    7283      Keys.Left := 37;
    73       Keys.Down := 38;
     84      Keys.Down := 40;
    7485      Keys.Right := 39;
    75       Keys.Up := 40;
     86      Keys.Up := 38;
    7687      Keys.Shoot := 17;
     88    end;
     89    with TPlayer(Players[2]) do begin
     90      Keys.Left := 76;
     91      Keys.Down := 186;
     92      Keys.Right := 222;
     93      Keys.Up := 80;
     94      Keys.Shoot := 186;
     95    end;
     96    with TPlayer(Players[3]) do begin
     97      Keys.Left := 100;
     98      Keys.Down := 98;
     99      Keys.Right := 102;
     100      Keys.Up := 104;
     101      Keys.Shoot := 98;
    77102    end;
    78103  end;
    79104  Engine.NewGame;
     105  Image1Resize(Self);
    80106end;
    81107
     
    93119end;
    94120
     121procedure TMainForm.FormShow(Sender: TObject);
     122begin
     123end;
     124
    95125procedure TMainForm.Image1Resize(Sender: TObject);
    96126begin
    97 //  Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height);
    98   Image1.Picture.Bitmap.SetSize(80, 60);
     127  Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height);
    99128  Engine.ResizePlayerFrames;
    100129end;
     
    110139end;
    111140
     141procedure TMainForm.MenuItemShowMapClick(Sender: TObject);
     142begin
     143  MapForm.Show;
     144end;
     145
    112146end.
    113147
  • trunk/tunneler.lpi

    r3 r4  
    3030      </local>
    3131    </RunParams>
    32     <RequiredPackages Count="2">
     32    <RequiredPackages Count="3">
    3333      <Item1>
    34         <PackageName Value="TemplateGenerics"/>
     34        <PackageName Value="LCLBase"/>
     35        <MinVersion Major="1" Release="1" Valid="True"/>
    3536      </Item1>
    3637      <Item2>
     38        <PackageName Value="TemplateGenerics"/>
     39      </Item2>
     40      <Item3>
    3741        <PackageName Value="LCL"/>
    38       </Item2>
     42      </Item3>
    3943    </RequiredPackages>
    40     <Units Count="18">
     44    <Units Count="31">
    4145      <Unit0>
    4246        <Filename Value="tunneler.lpr"/>
    4347        <IsPartOfProject Value="True"/>
    4448        <UnitName Value="tunneler"/>
    45         <EditorIndex Value="0"/>
    4649        <WindowIndex Value="0"/>
    4750        <TopLine Value="1"/>
    48         <CursorPos X="28" Y="11"/>
    49         <UsageCount Value="36"/>
    50         <Loaded Value="True"/>
     51        <CursorPos X="14" Y="8"/>
     52        <UsageCount Value="49"/>
    5153      </Unit0>
    5254      <Unit1>
     
    5658        <ResourceBaseClass Value="Form"/>
    5759        <UnitName Value="UMainForm"/>
    58         <EditorIndex Value="2"/>
    59         <WindowIndex Value="0"/>
    60         <TopLine Value="11"/>
    61         <CursorPos X="1" Y="72"/>
    62         <UsageCount Value="36"/>
     60        <EditorIndex Value="1"/>
     61        <WindowIndex Value="0"/>
     62        <TopLine Value="12"/>
     63        <CursorPos X="20" Y="27"/>
     64        <UsageCount Value="49"/>
    6365        <Loaded Value="True"/>
    6466        <LoadedDesigner Value="True"/>
     
    6971        <UnitName Value="UCore"/>
    7072        <IsVisibleTab Value="True"/>
    71         <EditorIndex Value="1"/>
    72         <WindowIndex Value="0"/>
    73         <TopLine Value="451"/>
    74         <CursorPos X="6" Y="468"/>
    75         <UsageCount Value="36"/>
     73        <EditorIndex Value="0"/>
     74        <WindowIndex Value="0"/>
     75        <TopLine Value="161"/>
     76        <CursorPos X="38" Y="177"/>
     77        <UsageCount Value="49"/>
    7678        <Loaded Value="True"/>
    7779      </Unit2>
     
    8284        <TopLine Value="35"/>
    8385        <CursorPos X="20" Y="51"/>
    84         <UsageCount Value="13"/>
     86        <UsageCount Value="11"/>
    8587      </Unit3>
    8688      <Unit4>
     
    9092        <TopLine Value="52"/>
    9193        <CursorPos X="18" Y="57"/>
    92         <UsageCount Value="12"/>
     94        <UsageCount Value="10"/>
    9395      </Unit4>
    9496      <Unit5>
     
    98100        <TopLine Value="1"/>
    99101        <CursorPos X="61" Y="11"/>
    100         <UsageCount Value="27"/>
     102        <UsageCount Value="25"/>
    101103      </Unit5>
    102104      <Unit6>
     
    105107        <TopLine Value="252"/>
    106108        <CursorPos X="20" Y="271"/>
    107         <UsageCount Value="10"/>
     109        <UsageCount Value="9"/>
    108110      </Unit6>
    109111      <Unit7>
     
    111113        <UnitName Value="Graphics"/>
    112114        <WindowIndex Value="0"/>
    113         <TopLine Value="1071"/>
    114         <CursorPos X="15" Y="1087"/>
    115         <UsageCount Value="10"/>
     115        <TopLine Value="1281"/>
     116        <CursorPos X="15" Y="1298"/>
     117        <UsageCount Value="12"/>
    116118      </Unit7>
    117119      <Unit8>
    118120        <Filename Value="../../../lazarus/lcl/include/rasterimage.inc"/>
    119121        <WindowIndex Value="0"/>
    120         <TopLine Value="289"/>
    121         <CursorPos X="1" Y="308"/>
     122        <TopLine Value="143"/>
     123        <CursorPos X="3" Y="145"/>
    122124        <UsageCount Value="10"/>
    123125      </Unit8>
     
    125127        <Filename Value="../../../lazarus/lcl/include/canvas.inc"/>
    126128        <WindowIndex Value="0"/>
    127         <TopLine Value="102"/>
    128         <CursorPos X="7" Y="105"/>
    129         <UsageCount Value="10"/>
     129        <TopLine Value="34"/>
     130        <CursorPos X="1" Y="54"/>
     131        <UsageCount Value="9"/>
    130132      </Unit9>
    131133      <Unit10>
     
    135137        <TopLine Value="1433"/>
    136138        <CursorPos X="3" Y="1449"/>
    137         <UsageCount Value="10"/>
     139        <UsageCount Value="8"/>
    138140      </Unit10>
    139141      <Unit11>
    140142        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    141         <EditorIndex Value="4"/>
    142         <WindowIndex Value="0"/>
    143         <TopLine Value="1"/>
    144         <CursorPos X="16" Y="3"/>
    145         <UsageCount Value="13"/>
     143        <EditorIndex Value="3"/>
     144        <WindowIndex Value="0"/>
     145        <TopLine Value="149"/>
     146        <CursorPos X="59" Y="172"/>
     147        <UsageCount Value="20"/>
    146148        <Loaded Value="True"/>
    147149      </Unit11>
     
    149151        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedMatrix.pas"/>
    150152        <UnitName Value="SpecializedMatrix"/>
    151         <EditorIndex Value="5"/>
     153        <EditorIndex Value="4"/>
    152154        <WindowIndex Value="0"/>
    153155        <TopLine Value="69"/>
    154156        <CursorPos X="40" Y="98"/>
    155         <UsageCount Value="11"/>
     157        <UsageCount Value="17"/>
    156158        <Loaded Value="True"/>
    157159      </Unit12>
     
    161163        <TopLine Value="16"/>
    162164        <CursorPos X="19" Y="32"/>
    163         <UsageCount Value="13"/>
     165        <UsageCount Value="11"/>
    164166      </Unit13>
    165167      <Unit14>
    166168        <Filename Value="../../FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/types.pp"/>
    167169        <UnitName Value="types"/>
    168         <EditorIndex Value="3"/>
    169170        <WindowIndex Value="0"/>
    170171        <TopLine Value="54"/>
    171172        <CursorPos X="3" Y="70"/>
    172         <UsageCount Value="13"/>
    173         <Loaded Value="True"/>
     173        <UsageCount Value="14"/>
    174174      </Unit14>
    175175      <Unit15>
    176176        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>
    177         <EditorIndex Value="6"/>
     177        <EditorIndex Value="5"/>
    178178        <WindowIndex Value="0"/>
    179179        <TopLine Value="107"/>
    180180        <CursorPos X="1" Y="126"/>
    181         <UsageCount Value="11"/>
     181        <UsageCount Value="18"/>
    182182        <Loaded Value="True"/>
    183183      </Unit15>
     
    187187        <TopLine Value="783"/>
    188188        <CursorPos X="3" Y="785"/>
    189         <UsageCount Value="10"/>
     189        <UsageCount Value="9"/>
    190190      </Unit16>
    191191      <Unit17>
     
    194194        <TopLine Value="830"/>
    195195        <CursorPos X="11" Y="847"/>
     196        <UsageCount Value="9"/>
     197      </Unit17>
     198      <Unit18>
     199        <Filename Value="../../../lazarus/lcl/extctrls.pp"/>
     200        <UnitName Value="ExtCtrls"/>
     201        <WindowIndex Value="0"/>
     202        <TopLine Value="665"/>
     203        <CursorPos X="27" Y="682"/>
     204        <UsageCount Value="11"/>
     205      </Unit18>
     206      <Unit19>
     207        <Filename Value="../../../lazarus/lcl/include/customimage.inc"/>
     208        <WindowIndex Value="0"/>
     209        <TopLine Value="112"/>
     210        <CursorPos X="10" Y="114"/>
     211        <UsageCount Value="11"/>
     212      </Unit19>
     213      <Unit20>
     214        <Filename Value="../../../lazarus/lcl/controls.pp"/>
     215        <UnitName Value="Controls"/>
     216        <WindowIndex Value="0"/>
     217        <TopLine Value="1035"/>
     218        <CursorPos X="15" Y="1052"/>
     219        <UsageCount Value="9"/>
     220      </Unit20>
     221      <Unit21>
     222        <Filename Value="../../../lazarus/lcl/include/control.inc"/>
     223        <WindowIndex Value="0"/>
     224        <TopLine Value="3003"/>
     225        <CursorPos X="3" Y="3010"/>
     226        <UsageCount Value="9"/>
     227      </Unit21>
     228      <Unit22>
     229        <Filename Value="../../../lazarus/lcl/include/picture.inc"/>
     230        <WindowIndex Value="0"/>
     231        <TopLine Value="392"/>
     232        <CursorPos X="1" Y="411"/>
     233        <UsageCount Value="9"/>
     234      </Unit22>
     235      <Unit23>
     236        <Filename Value="../../../lazarus/lcl/include/lclintfh.inc"/>
     237        <WindowIndex Value="0"/>
     238        <TopLine Value="103"/>
     239        <CursorPos X="10" Y="120"/>
     240        <UsageCount Value="9"/>
     241      </Unit23>
     242      <Unit24>
     243        <Filename Value="../../../lazarus/lcl/include/lclintf.inc"/>
     244        <WindowIndex Value="0"/>
     245        <TopLine Value="437"/>
     246        <CursorPos X="1" Y="443"/>
     247        <UsageCount Value="9"/>
     248      </Unit24>
     249      <Unit25>
     250        <Filename Value="../../../lazarus/lcl/interfaces/gtk2/gtk2winapi.inc"/>
     251        <WindowIndex Value="0"/>
     252        <TopLine Value="9107"/>
     253        <CursorPos X="1" Y="9124"/>
     254        <UsageCount Value="9"/>
     255      </Unit25>
     256      <Unit26>
     257        <Filename Value="../../../lazarus/lcl/interfaces/gtk2/gtk2widgetset.inc"/>
     258        <WindowIndex Value="0"/>
     259        <TopLine Value="4226"/>
     260        <CursorPos X="1" Y="4254"/>
     261        <UsageCount Value="9"/>
     262      </Unit26>
     263      <Unit27>
     264        <Filename Value="UMapForm.pas"/>
     265        <IsPartOfProject Value="True"/>
     266        <ComponentName Value="MapForm"/>
     267        <ResourceBaseClass Value="Form"/>
     268        <UnitName Value="UMapForm"/>
     269        <EditorIndex Value="2"/>
     270        <WindowIndex Value="0"/>
     271        <TopLine Value="15"/>
     272        <CursorPos X="24" Y="39"/>
     273        <UsageCount Value="28"/>
     274        <Loaded Value="True"/>
     275      </Unit27>
     276      <Unit28>
     277        <Filename Value="../../../lazarus/lcl/include/customform.inc"/>
     278        <WindowIndex Value="0"/>
     279        <TopLine Value="858"/>
     280        <CursorPos X="1" Y="875"/>
    196281        <UsageCount Value="10"/>
    197       </Unit17>
     282      </Unit28>
     283      <Unit29>
     284        <Filename Value="../../../lazarus/lcl/include/application.inc"/>
     285        <WindowIndex Value="0"/>
     286        <TopLine Value="2102"/>
     287        <CursorPos X="1" Y="2119"/>
     288        <UsageCount Value="10"/>
     289      </Unit29>
     290      <Unit30>
     291        <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/inc/mathh.inc"/>
     292        <WindowIndex Value="0"/>
     293        <TopLine Value="63"/>
     294        <CursorPos X="65" Y="81"/>
     295        <UsageCount Value="9"/>
     296      </Unit30>
    198297    </Units>
    199     <JumpHistory Count="30" HistoryIndex="29">
     298    <JumpHistory Count="30" HistoryIndex="28">
    200299      <Position1>
    201         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    202         <Caret Line="415" Column="1" TopLine="391"/>
     300        <Filename Value="UCore.pas"/>
     301        <Caret Line="245" Column="56" TopLine="214"/>
    203302      </Position1>
    204303      <Position2>
    205         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    206         <Caret Line="410" Column="1" TopLine="391"/>
     304        <Filename Value="UCore.pas"/>
     305        <Caret Line="202" Column="14" TopLine="192"/>
    207306      </Position2>
    208307      <Position3>
    209         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    210         <Caret Line="411" Column="1" TopLine="391"/>
     308        <Filename Value="UMainForm.pas"/>
     309        <Caret Line="65" Column="3" TopLine="47"/>
    211310      </Position3>
    212311      <Position4>
    213         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    214         <Caret Line="412" Column="1" TopLine="391"/>
     312        <Filename Value="UCore.pas"/>
     313        <Caret Line="234" Column="7" TopLine="207"/>
    215314      </Position4>
    216315      <Position5>
    217         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    218         <Caret Line="413" Column="1" TopLine="391"/>
     316        <Filename Value="UMainForm.pas"/>
     317        <Caret Line="65" Column="3" TopLine="47"/>
    219318      </Position5>
    220319      <Position6>
    221         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    222         <Caret Line="412" Column="1" TopLine="391"/>
     320        <Filename Value="UMainForm.pas"/>
     321        <Caret Line="72" Column="3" TopLine="49"/>
    223322      </Position6>
    224323      <Position7>
    225         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    226         <Caret Line="413" Column="1" TopLine="391"/>
     324        <Filename Value="UMainForm.pas"/>
     325        <Caret Line="67" Column="15" TopLine="65"/>
    227326      </Position7>
    228327      <Position8>
    229         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    230         <Caret Line="412" Column="1" TopLine="391"/>
     328        <Filename Value="UMainForm.pas"/>
     329        <Caret Line="56" Column="9" TopLine="52"/>
    231330      </Position8>
    232331      <Position9>
    233         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    234         <Caret Line="413" Column="1" TopLine="391"/>
     332        <Filename Value="UCore.pas"/>
     333        <Caret Line="124" Column="15" TopLine="107"/>
    235334      </Position9>
    236335      <Position10>
    237         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    238         <Caret Line="412" Column="1" TopLine="391"/>
     336        <Filename Value="UCore.pas"/>
     337        <Caret Line="109" Column="20" TopLine="85"/>
    239338      </Position10>
    240339      <Position11>
    241         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    242         <Caret Line="413" Column="1" TopLine="391"/>
     340        <Filename Value="UCore.pas"/>
     341        <Caret Line="553" Column="29" TopLine="541"/>
    243342      </Position11>
    244343      <Position12>
    245         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    246         <Caret Line="415" Column="1" TopLine="391"/>
     344        <Filename Value="UCore.pas"/>
     345        <Caret Line="562" Column="1" TopLine="550"/>
    247346      </Position12>
    248347      <Position13>
    249         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    250         <Caret Line="410" Column="1" TopLine="391"/>
     348        <Filename Value="UCore.pas"/>
     349        <Caret Line="557" Column="20" TopLine="537"/>
    251350      </Position13>
    252351      <Position14>
    253         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    254         <Caret Line="411" Column="1" TopLine="391"/>
     352        <Filename Value="UCore.pas"/>
     353        <Caret Line="554" Column="1" TopLine="537"/>
    255354      </Position14>
    256355      <Position15>
    257         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    258         <Caret Line="412" Column="1" TopLine="391"/>
     356        <Filename Value="UCore.pas"/>
     357        <Caret Line="555" Column="1" TopLine="537"/>
    259358      </Position15>
    260359      <Position16>
    261         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    262         <Caret Line="413" Column="1" TopLine="391"/>
     360        <Filename Value="UCore.pas"/>
     361        <Caret Line="556" Column="1" TopLine="537"/>
    263362      </Position16>
    264363      <Position17>
    265         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    266         <Caret Line="411" Column="22" TopLine="394"/>
     364        <Filename Value="UCore.pas"/>
     365        <Caret Line="557" Column="1" TopLine="537"/>
    267366      </Position17>
    268367      <Position18>
    269         <Filename Value="UMainForm.pas"/>
    270         <Caret Line="70" Column="7" TopLine="41"/>
     368        <Filename Value="UCore.pas"/>
     369        <Caret Line="494" Column="1" TopLine="488"/>
    271370      </Position18>
    272371      <Position19>
    273372        <Filename Value="UCore.pas"/>
    274         <Caret Line="50" Column="17" TopLine="34"/>
     373        <Caret Line="235" Column="1" TopLine="215"/>
    275374      </Position19>
    276375      <Position20>
    277376        <Filename Value="UCore.pas"/>
    278         <Caret Line="328" Column="6" TopLine="314"/>
     377        <Caret Line="495" Column="1" TopLine="478"/>
    279378      </Position20>
    280379      <Position21>
    281         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    282         <Caret Line="116" Column="1" TopLine="91"/>
     380        <Filename Value="UCore.pas"/>
     381        <Caret Line="583" Column="1" TopLine="562"/>
    283382      </Position21>
    284383      <Position22>
    285384        <Filename Value="UCore.pas"/>
    286         <Caret Line="186" Column="9" TopLine="159"/>
     385        <Caret Line="558" Column="29" TopLine="541"/>
    287386      </Position22>
    288387      <Position23>
    289388        <Filename Value="UCore.pas"/>
    290         <Caret Line="48" Column="15" TopLine="31"/>
     389        <Caret Line="547" Column="27" TopLine="541"/>
    291390      </Position23>
    292391      <Position24>
    293392        <Filename Value="UCore.pas"/>
    294         <Caret Line="39" Column="5" TopLine="20"/>
     393        <Caret Line="171" Column="62" TopLine="157"/>
    295394      </Position24>
    296395      <Position25>
    297         <Filename Value="UCore.pas"/>
    298         <Caret Line="258" Column="1" TopLine="1"/>
     396        <Filename Value="UMapForm.pas"/>
     397        <Caret Line="39" Column="24" TopLine="15"/>
    299398      </Position25>
    300399      <Position26>
    301400        <Filename Value="UCore.pas"/>
    302         <Caret Line="241" Column="41" TopLine="228"/>
     401        <Caret Line="210" Column="5" TopLine="197"/>
    303402      </Position26>
    304403      <Position27>
    305404        <Filename Value="UCore.pas"/>
    306         <Caret Line="89" Column="17" TopLine="66"/>
     405        <Caret Line="202" Column="16" TopLine="193"/>
    307406      </Position27>
    308407      <Position28>
    309408        <Filename Value="UCore.pas"/>
    310         <Caret Line="83" Column="15" TopLine="72"/>
     409        <Caret Line="177" Column="29" TopLine="157"/>
    311410      </Position28>
    312411      <Position29>
    313412        <Filename Value="UCore.pas"/>
    314         <Caret Line="196" Column="12" TopLine="165"/>
     413        <Caret Line="188" Column="70" TopLine="161"/>
    315414      </Position29>
    316415      <Position30>
    317         <Filename Value="UCore.pas"/>
    318         <Caret Line="460" Column="7" TopLine="443"/>
     416        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
     417        <Caret Line="172" Column="59" TopLine="149"/>
    319418      </Position30>
    320419    </JumpHistory>
  • trunk/tunneler.lpr

    r2 r4  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UMainForm, UCore, TemplateGenerics
     10  Forms, UMainForm, UCore, TemplateGenerics, UMapForm
    1111  { you can add units after this };
    1212
     
    1616  Application.Initialize;
    1717  Application.CreateForm(TMainForm, MainForm);
     18  Application.CreateForm(TMapForm, MapForm);
    1819  Application.Run;
    1920end.
Note: See TracChangeset for help on using the changeset viewer.