hedgewars/uLandGenTemplateBased.pas
changeset 10562 3388822b3914
parent 10510 9329dab04490
child 10564 0cb20aa8877a
equal deleted inserted replaced
10560:9f09196d92a6 10562:3388822b3914
    16 var i: LongInt;
    16 var i: LongInt;
    17 begin
    17 begin
    18     with Template do
    18     with Template do
    19         begin
    19         begin
    20         pa.Count:= BasePointsCount;
    20         pa.Count:= BasePointsCount;
    21         for i:= 0 to pred(pa.Count) do
    21         for i:= 0 to LongInt(pred(pa.Count)) do
    22             begin
    22             begin
    23             pa.ar[i].x:= BasePoints^[i].x + LongInt(GetRandom(BasePoints^[i].w));
    23             pa.ar[i].x:= BasePoints^[i].x + LongInt(GetRandom(BasePoints^[i].w));
    24             if pa.ar[i].x <> NTPX then
    24             if pa.ar[i].x <> NTPX then
    25                 pa.ar[i].x:= pa.ar[i].x + ((LAND_WIDTH - Template.TemplateWidth) div 2);
    25                 pa.ar[i].x:= pa.ar[i].x + ((LAND_WIDTH - Template.TemplateWidth) div 2);
    26             pa.ar[i].y:= BasePoints^[i].y + LongInt(GetRandom(BasePoints^[i].h)) + LAND_HEIGHT - LongInt(Template.TemplateHeight)
    26             pa.ar[i].y:= BasePoints^[i].y + LongInt(GetRandom(BasePoints^[i].h)) + LAND_HEIGHT - LongInt(Template.TemplateHeight)