hedgewars/uLand.pas
changeset 8011 ffd5eba8f7c2
parent 8010 195677b0d06b
child 8025 07862ab415c8
child 8026 4a4f21070479
equal deleted inserted replaced
8010:195677b0d06b 8011:ffd5eba8f7c2
   580 end;
   580 end;
   581 
   581 
   582 procedure GenMap;
   582 procedure GenMap;
   583 var x, y, w, c: Longword;
   583 var x, y, w, c: Longword;
   584     usermap, usermask, map, mask: shortstring;
   584     usermap, usermask, map, mask: shortstring;
       
   585     maskOnly: boolean;
   585 begin
   586 begin
   586     hasBorder:= false;
   587     hasBorder:= false;
       
   588     maskOnly:= false;
   587 
   589 
   588     LoadThemeConfig;
   590     LoadThemeConfig;
   589 
   591 
   590     // is this not needed any more? lets hope setlength sets also 0s
   592     // is this not needed any more? lets hope setlength sets also 0s
   591     //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then
   593     //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then
   599             map:= Pathz[ptMapCurrent] + '/map.png';
   601             map:= Pathz[ptMapCurrent] + '/map.png';
   600             mask:= Pathz[ptMapCurrent] + '/mask.png';
   602             mask:= Pathz[ptMapCurrent] + '/mask.png';
   601             if (not(FileExists(usermap)) and FileExists(usermask)) or
   603             if (not(FileExists(usermap)) and FileExists(usermask)) or
   602                (not(FileExists(map)) and FileExists(mask)) then
   604                (not(FileExists(map)) and FileExists(mask)) then
   603                 begin
   605                 begin
       
   606                 maskOnly:= true;
   604                 LoadMask;
   607                 LoadMask;
   605                 GenLandSurface
   608                 GenLandSurface
   606                 end
   609                 end
   607             else LoadMap;
   610             else LoadMap;
   608             end
   611             end
   691     DrawBottomBorder;
   694     DrawBottomBorder;
   692 
   695 
   693 if (GameFlags and gfDisableGirders) <> 0 then
   696 if (GameFlags and gfDisableGirders) <> 0 then
   694     hasGirders:= false;
   697     hasGirders:= false;
   695 
   698 
   696 if ((GameFlags and gfForts) = 0) and (Pathz[ptMapCurrent] = '') then
   699 if (GameFlags and gfForts = 0) and (maskOnly or (Pathz[ptMapCurrent] = '')) then
   697     AddObjects
   700     AddObjects
   698     
   701     
   699 else
   702 else
   700     AddProgress();
   703     AddProgress();
   701 
   704