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

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 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 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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, why not

@glx22 glx22 merged commit 36ab9c6 into OpenTTD:master Feb 13, 2021
@SamuXarick SamuXarick deleted the genland.h-data-was-off-by-1 branch February 13, 2021 22:14
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.

None yet

3 participants