hedgewars/uLand.pas
changeset 10603 bda5c7caf396
parent 10490 b30b8d39d662
child 10626 2562797ab3cf
equal deleted inserted replaced
10602:1ec0268f28af 10603:bda5c7caf396
   670 procedure GenPreview(out Preview: TPreview);
   670 procedure GenPreview(out Preview: TPreview);
   671 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   671 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   672 begin
   672 begin
   673     WriteLnToConsole('Generating preview...');
   673     WriteLnToConsole('Generating preview...');
   674     case cMapGen of
   674     case cMapGen of
   675         0: GenTemplated(EdgeTemplates[SelectTemplate]);
   675         mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   676         1: begin ResizeLand(4096,2048); GenMaze; end;
   676         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
   677         2: begin ResizeLand(4096,2048); GenPerlin; end;
   677         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   678         3: GenDrawnMap;
   678         mgDrawn: GenDrawnMap;
   679     else
   679     else
   680         OutError('Unknown mapgen', true);
   680         OutError('Unknown mapgen', true);
   681     end;
   681     end;
   682 
   682 
   683     // strict scaling needed here since preview assumes a rectangle
   683     // strict scaling needed here since preview assumes a rectangle
   718 procedure GenPreviewAlpha(out Preview: TPreviewAlpha);
   718 procedure GenPreviewAlpha(out Preview: TPreviewAlpha);
   719 var rh, rw, ox, oy, x, y, xx, yy, t, lh, lw: LongInt;
   719 var rh, rw, ox, oy, x, y, xx, yy, t, lh, lw: LongInt;
   720 begin
   720 begin
   721     WriteLnToConsole('Generating preview...');
   721     WriteLnToConsole('Generating preview...');
   722     case cMapGen of
   722     case cMapGen of
   723         0: GenTemplated(EdgeTemplates[SelectTemplate]);
   723         mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   724         1: begin ResizeLand(4096,2048); GenMaze; end;
   724         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
   725         2: begin ResizeLand(4096,2048); GenPerlin; end;
   725         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   726         3: GenDrawnMap;
   726         mgDrawn: GenDrawnMap;
   727     else
   727     else
   728         OutError('Unknown mapgen', true);
   728         OutError('Unknown mapgen', true);
   729     end;
   729     end;
   730 
   730 
   731     // strict scaling needed here since preview assumes a rectangle
   731     // strict scaling needed here since preview assumes a rectangle