hedgewars/uLand.pas
changeset 7051 db17476d7a37
parent 7028 0f60591f3a16
child 7063 a0326412e96a
equal deleted inserted replaced
7050:91199321e916 7051:db17476d7a37
    24 
    24 
    25 procedure initModule;
    25 procedure initModule;
    26 procedure freeModule;
    26 procedure freeModule;
    27 procedure DrawBottomBorder;
    27 procedure DrawBottomBorder;
    28 procedure GenMap;
    28 procedure GenMap;
    29 function  GenPreview: TPreview;
    29 procedure GenPreview(var Preview: TPreview);
    30 
    30 
    31 implementation
    31 implementation
    32 uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, sysutils,
    32 uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, sysutils,
    33      uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures,
    33      uVariables, uUtils, uCommands, adler32, uDebug, uLandPainted, uTextures,
    34      uLandGenMaze, uLandOutline;
    34      uLandGenMaze, uLandOutline;
   675     end;
   675     end;
   676 
   676 
   677 UpdateLandTexture(0, LAND_WIDTH, 0, LAND_HEIGHT);
   677 UpdateLandTexture(0, LAND_WIDTH, 0, LAND_HEIGHT);
   678 end;
   678 end;
   679 
   679 
   680 function GenPreview: TPreview;
   680 procedure GenPreview(var Preview: TPreview);
   681 var x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   681 var x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   682     Preview: TPreview;
       
   683 begin
   682 begin
   684     WriteLnToConsole('Generating preview...');
   683     WriteLnToConsole('Generating preview...');
   685     case cMapGen of
   684     case cMapGen of
   686         0: GenBlank(EdgeTemplates[SelectTemplate]);
   685         0: GenBlank(EdgeTemplates[SelectTemplate]);
   687         1: GenMaze;
   686         1: GenMaze;
   706                             inc(t);
   705                             inc(t);
   707                 if t > 8 then
   706                 if t > 8 then
   708                     Preview[y, x]:= Preview[y, x] or ($80 shr bit);
   707                     Preview[y, x]:= Preview[y, x] or ($80 shr bit);
   709             end;
   708             end;
   710         end;
   709         end;
   711 
       
   712     GenPreview:= Preview
       
   713 end;
   710 end;
   714 
   711 
   715 
   712 
   716 procedure chLandCheck(var s: shortstring);
   713 procedure chLandCheck(var s: shortstring);
   717 begin
   714 begin