# HG changeset patch # User Matti Hamalainen # Date 1586571060 -10800 # Node ID b0decfe4d3e41c9644e154bd2ab26b780a384eda # Parent 3a67c8425d1b1a4e05b2d36b01a6ba8f8354a7a8 Delete trailing whitespace. diff -r 3a67c8425d1b -r b0decfe4d3e4 tools/makegmaps.php --- a/tools/makegmaps.php Sat Apr 11 05:02:20 2020 +0300 +++ b/tools/makegmaps.php Sat Apr 11 05:11:00 2020 +0300 @@ -134,7 +134,7 @@ function stGetWaypointCoords($waypoint, &$xc, &$yc) { global $tradelanePoints; - + if (!isset($tradelanePoints[$waypoint])) return FALSE; @@ -288,7 +288,7 @@ "\nNext up are some files and paths. All of them can be safely\n". "left to their default values (e.g. just press ) unless\n". "you know you want something set differently.\n\n"; - + stQueryConfigItems(1); stQueryConfigItems(2); @@ -301,7 +301,7 @@ stOutputToFile($gmapsConfig, ""); - stOutputToFile($cfg["pathGMap"]."config.inc.php", + stOutputToFile($cfg["pathGMap"]."config.inc.php", " $yc ]; } - + $qdata[] = $qline; } @@ -537,7 +537,7 @@ // Read input raw $y = 0; - while ($y < $height && ($data = fgets($file, 4096)) !== FALSE) + while ($y < $height && ($data = fgets($file, 4096)) !== FALSE) { for ($x = 0; $x < $width; $x++) { @@ -545,7 +545,7 @@ { imagesetpixel($im, $x, $y, $colors[$data[$x]]); } - else + else if ($zoom < 6) { imagefilledrectangle($im, $x*$zoom, $y*$zoom, ($x+1)*$zoom-1, ($y+1)*$zoom-1, $colors[$data[$x]]); @@ -593,7 +593,7 @@ die("Required file '".$cfg["pathRawMaps"].$cname."(".$rawSuffix."|".$rawAltSuffix.")' does not exist.\n"); } $inMtime = filemtime($inFilename); - + for ($zoom = 1; $zoom <= 5; $zoom++) { $outFilename = $cfg["pathImageCache"].$cname."_".($zoom + 4).".png"; @@ -671,18 +671,18 @@ { if (!$cdata[CTI_HAS_MAP] || !$cdata[CTI_REG_CONT]) continue; - + $cx = $cdata[CTI_XOFFS] + $worldMap["ox"]; $cy = $cdata[CTI_YOFFS] + $worldMap["oy"]; $cw = $cdata[CTI_WIDTH]; $ch = $cdata[CTI_HEIGHT]; - + $tx = -($cx*$scale - $x*$tileDim); $ty = -($cy*$scale - $y*$tileDim); - if (($cx + $cw)*$scale > $x*$tileDim && + if (($cx + $cw)*$scale > $x*$tileDim && ($cy + $ch)*$scale > $y*$tileDim && - ($cx * $scale) < ($x+1)*$tileDim && + ($cx * $scale) < ($x+1)*$tileDim && ($cy * $scale) < ($y+1)*$tileDim) { if (!$drawn) @@ -748,7 +748,7 @@ imagepng($im, $outFilename); imagedestroy($im); } -/* +/* else { if (file_exists($outFilename)) unlink($outFilename);