Skip to content

Draw ridges for border tiles#12

Open
elsid wants to merge 1 commit intodolda2000:masterfrom
elsid:border_ridges
Open

Draw ridges for border tiles#12
elsid wants to merge 1 commit intodolda2000:masterfrom
elsid:border_ridges

Conversation

@elsid
Copy link
Contributor

@elsid elsid commented Nov 2, 2020

Before you may see little holes in the ridge that are aligned with map grid image:
before_border_ridges

After there are none:
after_border_ridges

Fix is to check all tiles including 0 and sz - 1. Tile is considered to be absent if gettile returns a negative number.

@dolda2000
Copy link
Owner

Sorry, I only just now noticed this pull request. It's generally a nice fix, but I'm not sure I like the whole thing about considering Z==0 as a missing grid. I'll have to think for a bit about how that should be flagged.

@elsid
Copy link
Contributor Author

elsid commented Nov 17, 2020

I had my own implementation for this feature. That's why I noticed this bug. I store it in my private repo but don't use it anymore. There I used a flag in TileInfo to say does it have valid height map and saved it into a map file. But I wasn't sure about bringing it here. I agree, zero height can be a problem. If there is a ridge in a tile with height zero it will not be shown on the map. Either a flag should point that grid height map is not filled or a specific default value. Also the flag can be implicitly stored via map file version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants