hedgewars/uLandPainted.pas
changeset 4457 ffb766e85150
child 4458 7351e6f1ee28
equal deleted inserted replaced
4455:a0c8779713f2 4457:ffb766e85150
       
     1 (*
       
     2  * Hedgewars, a free turn based strategy game
       
     3  * Copyright (c) 2010 Andrey Korotaev <unC0Rr@gmail.com>
       
     4  *
       
     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
       
     8  *
       
     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.
       
    13  *
       
    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
       
    17  *)
       
    18 
       
    19 {$INCLUDE "options.inc"}
       
    20 
       
    21 unit uLandPainted;
       
    22 
       
    23 interface
       
    24 
       
    25 procedure LoadFromFile(fileName: shortstring);
       
    26 
       
    27 implementation
       
    28 
       
    29 type PointRec = packed record
       
    30     x, y: ShortInt;
       
    31     flags: byte;
       
    32     end;
       
    33 
       
    34 procedure LoadFromFile(fileName: shortstring);
       
    35 var
       
    36     f: file of PointRec;
       
    37     rec: PointRec;
       
    38 begin
       
    39     fileMode = foReadOnly;
       
    40 
       
    41     assignFile(f, fileName);
       
    42     reset(f);
       
    43 
       
    44     while not eof(f) do
       
    45         begin
       
    46         read(f, rec);
       
    47         end;
       
    48 
       
    49     closeFile(f);
       
    50 end;
       
    51 
       
    52 end.