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 stairs rendering in Caves and Hell #7439

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

glebm
Copy link
Collaborator

@glebm glebm commented Sep 27, 2024

Stairs can have the same TileProperties as floors but do not always follor the same graphics layout as floors, so we shouldn't apply optimizations to them.

The only stairs that are affected seem to be:

  1. Hell: tile 46 sub-tile 141 frame 386 (TileProperties: BlocksMissile)
  2. Caves: tile 48 sub-tile 171 frame 461 (TileProperties: None)

Note that the few broken in pixels in caves are actually incorrectly attributed to the non-Solid tile, really they should be part of the solid tile 49.

As there doesn't seem to be a quick and easy way to check if a frame is part of Stairs, we add a check for BlocksMissile tile property instead.

This fixes Hell but isn't enough to fix Caves.
To fix Caves, we then add a BlocksMissile flag to the broken sub-tile.

Fixes #7420

Broken hell tile:
Screenshot from 2024-09-27 06-39-47

Broken caves tile:
image

Stairs can have the same `TileProperties` as floors but do not
always follor the same graphics layout as floors, so we shouldn't
apply optimizations to them.

The only floors affected seem to be:

1. Caves: tile 48 sub-tile 171 frame 461 (TileProperties: None)
2. Hell: tile 46 sub-tile 141 frame 386 (TileProperties: BlocksMissile)

Note that the few broken in pixels in caves are actually incorrectly
attributed to the non-Solid tile, really they should be part of the
solid tile 49.

As there doesn't seem to be a quick and easy way to check if a frame
is part of Stairs, we add a check for BlocksMissile tile property
instead.

This fixes Hell but isn't enough to fix Caves.
To fix Caves, we then add a `BlocksMissile` flag to the broken sub-tile.
@glebm glebm enabled auto-merge (rebase) September 27, 2024 07:17
Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

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

Nice solution. I'm assuming that the caves down stairs where already blocking missiles?

@AJenbo
Copy link
Member

AJenbo commented Sep 27, 2024

image

@AJenbo AJenbo added this to the 1.6.0 milestone Sep 27, 2024
@StephenCWills
Copy link
Member

Nice solution. I'm assuming that the caves down stairs where already blocking missiles?

Caves stairs are always up against a wall, right? Does it matter?

@AJenbo
Copy link
Member

AJenbo commented Sep 27, 2024

If it isn't we need to apply the property to it to also fix that case. I'm just wondering if there was an oversight and the PR is only fixing 2/3 cases.

@AJenbo
Copy link
Member

AJenbo commented Sep 27, 2024

Confirmed that all 3 cases are indeed fixed :)

@AJenbo AJenbo merged commit 92aeb01 into diasurgical:master Sep 27, 2024
22 of 23 checks passed
@glebm glebm deleted the fix-pixels branch September 27, 2024 20:01
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.

Part of stairs are not being rendered in Caves and Hell
3 participants