hedgewars/uLand.pas
changeset 1773 bc6ad6136675
parent 1772 0fe436fb5f81
child 1776 dd5648e250e4
equal deleted inserted replaced
1772:0fe436fb5f81 1773:bc6ad6136675
   492 with Template do
   492 with Template do
   493      for i:= 0 to pred(FillPointsCount) do
   493      for i:= 0 to pred(FillPointsCount) do
   494          with FillPoints^[i] do
   494          with FillPoints^[i] do
   495               FillLand(x, y);
   495               FillLand(x, y);
   496 
   496 
   497 DrawEdge(pa, COLOR_LAND)
   497 DrawEdge(pa, COLOR_LAND);
       
   498 
       
   499 if (Template.canInvert and (getrandom(2) = 0)) or
       
   500     (not Template.canInvert and Template.isNegative) then 
       
   501     for y:= 0 to LAND_HEIGHT - 1 do
       
   502         for x:= 0 to LAND_WIDTH - 1 do
       
   503             if Land[y, x] = 0 then
       
   504                 Land[y, x]:= COLOR_LAND
       
   505             else if Land[y, x] = COLOR_LAND then
       
   506                 Land[y, x]:= 0;
   498 end;
   507 end;
   499 
   508 
   500 function SelectTemplate: LongInt;
   509 function SelectTemplate: LongInt;
   501 begin
   510 begin
   502 SelectTemplate:= getrandom(Succ(High(EdgeTemplates)))
   511 SelectTemplate:= getrandom(Succ(High(EdgeTemplates)))