hedgewars/uLand.pas
branchtransitional_engine
changeset 15933 33798b649d9c
parent 15930 f39f0f614dbf
child 15934 022ec6b916b7
equal deleted inserted replaced
15932:230dc46487ea 15933:33798b649d9c
   791         end
   791         end
   792     else
   792     else
   793         begin
   793         begin
   794         WriteLnToConsole('Generating land...');
   794         WriteLnToConsole('Generating land...');
   795         case cMapGen of
   795         case cMapGen of
   796             mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   796             mgRandom: CreateTemplatedLand(cFeatureSize, cSeed, PathPrefix, Theme);
   797             mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
   797             mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
   798             mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   798             mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   799             mgDrawn : GenDrawnMap;
   799             mgDrawn : GenDrawnMap;
   800             mgForts : begin GameFlags:= (GameFlags or gfDivideTeams); MakeFortsMap(); end;
   800             mgForts : begin GameFlags:= (GameFlags or gfDivideTeams); MakeFortsMap(); end;
   801         else
   801         else
   802             OutError('Unknown mapgen', true);
   802             OutError('Unknown mapgen', true);
   803         end;
   803         end;
   804         if cMapGen <> mgForts then
   804         if (cMapGen <> mgForts) and (cMapGen <> mgRandom) then
   805             GenLandSurface
   805             GenLandSurface
   806         end;
   806         end;
   807 
   807 
   808     AddProgress;
   808     AddProgress;
   809 
   809 
   946 procedure GenPreview(out Preview: TPreview);
   946 procedure GenPreview(out Preview: TPreview);
   947 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   947 var rh, rw, ox, oy, x, y, xx, yy, t, bit, cbit, lh, lw: LongInt;
   948 begin
   948 begin
   949     WriteLnToConsole('Generating preview...');
   949     WriteLnToConsole('Generating preview...');
   950     case cMapGen of
   950     case cMapGen of
   951         mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   951         mgRandom: CreateTemplatedLand(cFeatureSize, cSeed, PathPrefix, Theme);
   952         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
   952         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
   953         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   953         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   954         mgDrawn: begin GenDrawnMap; end;
   954         mgDrawn: begin GenDrawnMap; end;
   955         mgForts: MakeFortsPreview();
   955         mgForts: MakeFortsPreview();
   956     else
   956     else
  1005 procedure GenPreviewAlpha(out Preview: TPreviewAlpha);
  1005 procedure GenPreviewAlpha(out Preview: TPreviewAlpha);
  1006 var rh, rw, ox, oy, x, y, xx, yy, t, lh, lw: LongInt;
  1006 var rh, rw, ox, oy, x, y, xx, yy, t, lh, lw: LongInt;
  1007 begin
  1007 begin
  1008     WriteLnToConsole('Generating preview...');
  1008     WriteLnToConsole('Generating preview...');
  1009     case cMapGen of
  1009     case cMapGen of
  1010         mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
  1010         mgRandom: CreateTemplatedLand(cFeatureSize, cSeed, PathPrefix, Theme);
  1011         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
  1011         mgMaze: begin ResizeLand(4096,2048); GenMaze; end;
  1012         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
  1012         mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
  1013         mgDrawn: begin GenDrawnMap; end;
  1013         mgDrawn: begin GenDrawnMap; end;
  1014         mgForts: MakeFortsPreview;
  1014         mgForts: MakeFortsPreview;
  1015     else
  1015     else