hedgewars/uLandPainted.pas
author unc0rr
Sat, 04 Dec 2010 22:33:14 +0300
changeset 4457 ffb766e85150
child 4458 7351e6f1ee28
permissions -rw-r--r--
- Change painted map file format - Stub for uLandPainted.pas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4457
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     1
(*
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     3
 * Copyright (c) 2010 Andrey Korotaev <unC0Rr@gmail.com>
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     4
 *
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     8
 *
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    12
 * GNU General Public License for more details.
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    13
 *
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    17
 *)
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    18
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    19
{$INCLUDE "options.inc"}
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    20
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    21
unit uLandPainted;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    22
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    23
interface
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    24
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    25
procedure LoadFromFile(fileName: shortstring);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    26
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    27
implementation
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    28
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    29
type PointRec = packed record
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    30
    x, y: ShortInt;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    31
    flags: byte;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    32
    end;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    33
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    34
procedure LoadFromFile(fileName: shortstring);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    35
var
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    36
    f: file of PointRec;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    37
    rec: PointRec;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    38
begin
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    39
    fileMode = foReadOnly;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    40
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    41
    assignFile(f, fileName);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    42
    reset(f);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    43
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    44
    while not eof(f) do
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    45
        begin
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    46
        read(f, rec);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    47
        end;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    48
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    49
    closeFile(f);
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    50
end;
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    51
ffb766e85150 - Change painted map file format
unc0rr
parents:
diff changeset
    52
end.