Skip to content

Commit

Permalink
fix: iterateMapSheets() returns too many tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtnz committed Dec 9, 2024
1 parent df37e4a commit a7a28c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/tileindex-validate/tileindex.validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ export function* iterateMapSheets(bounds: BBox, gridSize: GridSize): Generator<s

const tileWidth = Math.floor(MapSheet.width / tilesPerMapSheet);
const tileHeight = Math.floor(MapSheet.height / tilesPerMapSheet);
for (let x = minX; x <= maxX + tileWidth - 1; x += tileWidth) {
for (let y = maxY; y >= minY - tileHeight - 1; y -= tileHeight) {
for (let x = minX; x < maxX; x += tileWidth) {
for (let y = maxY; y > minY; y -= tileHeight) {
yield getTileName(x, y, gridSize);
}
}
Expand Down

0 comments on commit a7a28c7

Please sign in to comment.