hedgewars/uAILandMarks.pas
changeset 7850 fcbb024090a4
parent 7787 67c96b9c179c
child 10017 de822cd3df3a
equal deleted inserted replaced
7849:a12155461b34 7850:fcbb024090a4
     8 
     8 
     9 procedure addMark(X, Y: LongInt; mark: byte);
     9 procedure addMark(X, Y: LongInt; mark: byte);
    10 function  checkMark(X, Y: LongInt; mark: byte) : boolean;
    10 function  checkMark(X, Y: LongInt; mark: byte) : boolean;
    11 procedure clearAllMarks;
    11 procedure clearAllMarks;
    12 procedure clearMarks(mark: byte);
    12 procedure clearMarks(mark: byte);
       
    13 procedure setAILandMarks;
    13 
    14 
    14 procedure initModule;
    15 procedure initModule;
    15 procedure freeModule;
    16 procedure freeModule;
    16 
    17 
    17 implementation
    18 implementation
    55     for Y:= 0 to Pred(HEIGHT) do
    56     for Y:= 0 to Pred(HEIGHT) do
    56         for X:= 0 to Pred(WIDTH) do
    57         for X:= 0 to Pred(WIDTH) do
    57             marks[Y, X]:= marks[Y, X] and (not mark)
    58             marks[Y, X]:= marks[Y, X] and (not mark)
    58 end;
    59 end;
    59 
    60 
    60 
    61 procedure setAILandMarks;
    61 procedure initModule;
       
    62 begin
    62 begin
    63     WIDTH:= LAND_WIDTH shr gr;
    63     WIDTH:= LAND_WIDTH shr gr;
    64     HEIGHT:= LAND_HEIGHT shr gr;
    64     HEIGHT:= LAND_HEIGHT shr gr;
    65     
    65     
    66     SetLength(marks, HEIGHT, WIDTH);
    66     SetLength(marks, HEIGHT, WIDTH);
       
    67 end;
       
    68 
       
    69 procedure initModule;
       
    70 begin
    67 end;
    71 end;
    68 
    72 
    69 procedure freeModule;
    73 procedure freeModule;
    70 begin
    74 begin
    71     SetLength(marks, 0, 0);
    75     SetLength(marks, 0, 0);