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

lmu2png: fix bad offset on right-edge of terrain autotiles #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scurest
Copy link

@scurest scurest commented Jan 9, 2025

This is a fix for lmu2png. The right edge of terrain autotiles are drawn wrong on one-tile-wide vertical strips.

Before/after this patch:

Comparison

This right half of the tile is drawn by this line

DrawTall(dest, x+HALF_TILE, y, sX+32, sY+32);

Note that this draws the left half of the chip into the right half of the destination.

Tile

I don't understand any of the Combination stuff, but I don't think that should ever happen, so I'm guessing this is a typo and it should be drawing the right half of the chip instead ie. the offset needs to move right 8 pixels.

@carstene1ns
Copy link
Member

Good find.

jenkins: ok to test

@Ghabry
Copy link
Member

Ghabry commented Jan 11, 2025

Thanks and 👍 for the detailed PR description.

You are probably right that this is a typo. In all other cases where x+HALF_TILE, y, sX is involved it is always +40.

The one you changed was the only outlier.

@fdelapena fdelapena added the bug label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants