equal
deleted
inserted
replaced
283 end; |
283 end; |
284 |
284 |
285 |
285 |
286 procedure GenDrawnMap; |
286 procedure GenDrawnMap; |
287 begin |
287 begin |
288 ResizeLand(4096, 2048); |
288 ResizeLand((4096 * max(min(cFeatureSize,24),3)) div 12, (2048 * max(min(cFeatureSize,24),3)) div 12); |
289 uLandPainted.Draw; |
289 uLandPainted.Draw; |
290 |
290 |
291 MaxHedgehogs:= 48; |
291 MaxHedgehogs:= 64; |
292 hasGirders:= true; |
292 hasGirders:= true; |
293 playHeight:= 2048; |
293 playHeight:= LAND_HEIGHT; |
294 playWidth:= 4096; |
294 playWidth:= LAND_WIDTH; |
295 leftX:= ((LAND_WIDTH - playWidth) div 2); |
295 leftX:= ((LAND_WIDTH - playWidth) div 2); |
296 rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1; |
296 rightX:= (playWidth + ((LAND_WIDTH - playWidth) div 2)) - 1; |
297 topY:= LAND_HEIGHT - playHeight; |
297 topY:= LAND_HEIGHT - playHeight; |
298 end; |
298 end; |
299 |
299 |
884 WriteLnToConsole('Generating preview...'); |
884 WriteLnToConsole('Generating preview...'); |
885 case cMapGen of |
885 case cMapGen of |
886 mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]); |
886 mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]); |
887 mgMaze: begin ResizeLand(4096,2048); GenMaze; end; |
887 mgMaze: begin ResizeLand(4096,2048); GenMaze; end; |
888 mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; |
888 mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; |
889 mgDrawn: GenDrawnMap; |
889 mgDrawn: begin cFeatureSize:= 12;GenDrawnMap; end; |
890 mgForts: MakeFortsPreview(); |
890 mgForts: MakeFortsPreview(); |
891 else |
891 else |
892 OutError('Unknown mapgen', true); |
892 OutError('Unknown mapgen', true); |
893 end; |
893 end; |
894 |
894 |
935 WriteLnToConsole('Generating preview...'); |
935 WriteLnToConsole('Generating preview...'); |
936 case cMapGen of |
936 case cMapGen of |
937 mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]); |
937 mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]); |
938 mgMaze: begin ResizeLand(4096,2048); GenMaze; end; |
938 mgMaze: begin ResizeLand(4096,2048); GenMaze; end; |
939 mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; |
939 mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; |
940 mgDrawn: GenDrawnMap; |
940 mgDrawn: begin cFeatureSize:= 12;GenDrawnMap; end; |
941 mgForts: MakeFortsPreview; |
941 mgForts: MakeFortsPreview; |
942 else |
942 else |
943 OutError('Unknown mapgen', true); |
943 OutError('Unknown mapgen', true); |
944 end; |
944 end; |
945 |
945 |