Skip to content

Commit

Permalink
Fixed Placeholder tile generation indexes for any path, while hopeful…
Browse files Browse the repository at this point in the history
…ly retaining the more manual centered approach.

Fixed old debug output res bugs.
  • Loading branch information
Pysis868 committed Apr 18, 2023
1 parent 1efcf42 commit e8691aa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
39 changes: 33 additions & 6 deletions dev/assets/tiles/generatePHTiles/2-generateTiles.fish
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,22 @@ end

set scriptGT (readlink -f "$SDIR/3-generateTile.fish");

if test \
-n "$xStart" \
-a -n "$xEnd" \
-a -n "$yStart" \
-a -n "$yEnd"
set xStartOrig "$xStart" ;
set xEndOrig "$xEnd" ;
set yStartOrig "$yStart" ;
set yEndOrig "$yEnd" ;
end
set -e xStart xEnd yStart yEnd;

pushd "$outDir";

# debugPrint "zStart: $zStart";
# debugPrint "zEnd: $zEnd";
for z in (seq "$zStart" "$zEnd")
# debugPrint "z: $z";

Expand All @@ -37,17 +51,28 @@ for z in (seq "$zStart" "$zEnd")
end

if test \
-z "$xStart" \
-o -z "$xEnd" \
-o -z "$yStart" \
-o -z "$yEnd"
-n "$xStartOrig" \
-a -n "$xEndOrig" \
-a -n "$yStartOrig" \
-a -n "$yEndOrig"
set xStart "$xStartOrig" ;
set xEnd "$xEndOrig" ;
set yStart "$yStartOrig" ;
set yEnd "$yEndOrig" ;
else
set numAxisTiles (echo "2 ^ $z" | bc);
# debugPrint "numAxisTiles: $numAxisTiles";
set axisEndIndex (echo "$numAxisTiles" - 1 | bc);
# debugPrint "axisEndIndex: $axisEndIndex";

set xStart '0';
set xEnd "$numAxisTiles";
set xEnd "$axisEndIndex";
set yStart '0';
set yEnd "$numAxisTiles";
set yEnd "$axisEndIndex";
# debugPrint "xStart: $xStart";
# debugPrint "xEnd: $xEnd";
# debugPrint "yStart: $yStart";
# debugPrint "yEnd: $yEnd";
end

for x in (seq "$xStart" "$xEnd")
Expand Down Expand Up @@ -84,6 +109,8 @@ for z in (seq "$zStart" "$zEnd")
end
# break;
end

set -e xStart xEnd yStart yEnd;
end

popd;
Expand Down
3 changes: 1 addition & 2 deletions res.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
## Library Functions

function checkIfUpdateNecessaryBySourceFiles($cacheRegistryData) {
global $debugOutput;
global $commentRegex;

// debug_log('checkIfUpdateNecessaryBySourceFiles START');
Expand Down Expand Up @@ -252,6 +251,6 @@ function inifyFileToFile($fromFile, $toFile) {
$output .= file_get_contents("$cacheDestFile");
$output .= "\n";
header("X-Updated: ".(($update) ? 'true' : 'false'));
if(strlen($debugOutput) === 0) header("Content-Length: ".strlen($output));
header("Content-Length: ".strlen($output));
print($output);
?>

0 comments on commit e8691aa

Please sign in to comment.