Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative #8588

Merged
merged 1 commit into from Feb 13, 2021

Conversation

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Jan 18, 2021

Motivation / Problem

The data that is used for generating desert or rainforest in sub-tropical is a list of TileIndexDiffC offsets, and visually look like a circumference.

screenshot-6
The half towards NE looks misaligned.
It is similar to a bug that was uncovered back in 4846c7e for oil rig layout, in which it looked like this:
screenshot44 (2)
And once fixed, it looked like this:
screenshot55

This PR fixes the offset layout in the same manner as the oil rig layout.

Description

Make it aligned.
screenshot444

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
@LordAro
Copy link
Member

@LordAro LordAro commented Jan 18, 2021

Can you explain why you've changed the signs of the values, rather than just incrementing them like in the commit you linked?

@SamuXarick SamuXarick force-pushed the SamuXarick:genland.h-data-was-off-by-1 branch from d0aae43 to 109b733 Jan 18, 2021
… coordinate is negative
@SamuXarick SamuXarick force-pushed the SamuXarick:genland.h-data-was-off-by-1 branch from 109b733 to 32b270e Jan 18, 2021
@SamuXarick SamuXarick changed the title Fix: Desert/rainforest data is off by 1 for negative 'y' values Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative Jan 18, 2021
@SamuXarick
Copy link
Contributor Author

@SamuXarick SamuXarick commented Jan 18, 2021

Can you explain why you've changed the signs of the values, rather than just incrementing them like in the commit you linked?

I was lazy, now it's incremented.

Copy link
Member

@LordAro LordAro left a comment

Sure, why not

@glx22 glx22 merged commit 36ab9c6 into OpenTTD:master Feb 13, 2021
8 checks passed
8 checks passed
Emscripten
Details
Commit checker
Details
Check preview needs update Check preview needs update
Details
Linux (clang, clang++)
Details
Linux (gcc, g++)
Details
Mac OS (x64, x86_64)
Details
Windows (x86)
Details
Windows (x64)
Details
@SamuXarick SamuXarick deleted the SamuXarick:genland.h-data-was-off-by-1 branch Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants