hedgewars/uLand.pas
changeset 13272 5984e8c6cbeb
parent 12758 49c31d8cc740
child 13499 c41b16ac2e05
equal deleted inserted replaced
13271:4b9c5cf49c9f 13272:5984e8c6cbeb
   715     hasBorder:= false;
   715     hasBorder:= false;
   716     maskOnly:= false;
   716     maskOnly:= false;
   717 
   717 
   718     LoadThemeConfig;
   718     LoadThemeConfig;
   719 
   719 
   720     // is this not needed any more? lets hope setlength sets also 0s
       
   721     //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then
       
   722     //    FillChar(Land,SizeOf(TCollisionArray),0);*)
       
   723 
       
   724     if cPathz[ptMapCurrent] <> '' then
   720     if cPathz[ptMapCurrent] <> '' then
   725         begin
   721         begin
   726         map:= cPathz[ptMapCurrent] + '/map.png';
   722         map:= cPathz[ptMapCurrent] + '/map.png';
   727         mask:= cPathz[ptMapCurrent] + '/mask.png';
   723         mask:= cPathz[ptMapCurrent] + '/mask.png';
   728         if (not(pfsExists(map)) and pfsExists(mask)) then
   724         if (not(pfsExists(map)) and pfsExists(mask)) then
   739         case cMapGen of
   735         case cMapGen of
   740             mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   736             mgRandom: GenTemplated(EdgeTemplates[SelectTemplate]);
   741             mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
   737             mgMaze  : begin ResizeLand(4096,2048); GenMaze; end;
   742             mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   738             mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end;
   743             mgDrawn : GenDrawnMap;
   739             mgDrawn : GenDrawnMap;
   744             mgForts : begin GameFlags:= (GameFlags or gfForts or gfDivideTeams); MakeFortsMap(); end;
   740             mgForts : begin GameFlags:= (GameFlags or gfDivideTeams); MakeFortsMap(); end;
   745         else
   741         else
   746             OutError('Unknown mapgen', true);
   742             OutError('Unknown mapgen', true);
   747         end;
   743         end;
   748         if cMapGen <> mgForts then
   744         if cMapGen <> mgForts then
   749             GenLandSurface
   745             GenLandSurface
   833     DrawBottomBorder;
   829     DrawBottomBorder;
   834 
   830 
   835 if (GameFlags and gfDisableGirders) <> 0 then
   831 if (GameFlags and gfDisableGirders) <> 0 then
   836     hasGirders:= false;
   832     hasGirders:= false;
   837 
   833 
   838 if (GameFlags and gfForts = 0) and (maskOnly or (cPathz[ptMapCurrent] = '')) then
   834 if (cMapGen <> mgForts) and (maskOnly or (cPathz[ptMapCurrent] = '')) then
   839     AddObjects
   835     AddObjects
   840 
   836 
   841 else
   837 else
   842     AddProgress();
   838     AddProgress();
   843 
   839