hedgewars/uLand.pas
changeset 5775 49c5a490f230
parent 5770 022a18320f01
child 5824 2e5835130d9a
child 5832 f730c8a9777b
equal deleted inserted replaced
5774:8512b9758f67 5775:49c5a490f230
  1137 if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps);
  1137 if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps);
  1138 if tmpsurf = nil then
  1138 if tmpsurf = nil then
  1139     begin
  1139     begin
  1140     mapName:= ExtractFileName(Pathz[ptMapCurrent]);
  1140     mapName:= ExtractFileName(Pathz[ptMapCurrent]);
  1141     tmpsurf:= LoadImage(UserPathz[ptMissionMaps] + '/' + mapName + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps);
  1141     tmpsurf:= LoadImage(UserPathz[ptMissionMaps] + '/' + mapName + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps);
  1142     if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName + '/mask', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps);
  1142     if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps);
  1143     end;
  1143     end;
  1144 
  1144 
  1145     if (tmpsurf <> nil) and (tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT) and (tmpsurf^.format^.BytesPerPixel = 4) then
  1145     if (tmpsurf <> nil) and (tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT) and (tmpsurf^.format^.BytesPerPixel = 4) then
  1146     begin
  1146     begin
  1147         cpX:= (LAND_WIDTH - tmpsurf^.w) div 2;
  1147         cpX:= (LAND_WIDTH - tmpsurf^.w) div 2;