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

Automatic bidirectional alignment in x and y direction #1788

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

ralfgerlich
Copy link

This addresses bidirectional alignment as mentioned in #400 and y-alignment as mentioned in #486. These are the aspects implemented:

Aspects not implemented:

This supersedes my previous pull request #1780 as I restructured the alignment implementation to minimize code duplication and extensive parameter passing, and extended the scope to generalized auto-alignment.

As this is limited to the single y-offset from vanilla DOOM, vertical alignment cannot be applied so that the whole wall is properly aligned, but instead only to part of a wall. The wall part selected when activating the alignment hotkey is taken as an indicator of user intent, i.e.

  • If the upper part of a wall is selected, the intent is taken to be aligning upper parts of two-sided walls to each other.
  • If the lower part of a wall is selected, the intent is taken to be aligning lower parts of two-sided walls to each other.
  • If the midde part of a wall is selected, the intent is taken to be aligning middle parts of walls to each other.

When a one-sided wall is encountered while aligning with "upper wall" or "lower wall" intent, the middle section of the one-sided wall is aligned appropriately. Thus, taking the intent into consideration, this should mostly "just work as expected" (tm).

However, a wall is taken into consideration for alignment if any of its upper, middle or lower texture match the texture of the initial wall segment selected. If, for example, a one-sided wall is selected as initial wall by the user, alignment applies to the middle texture of two-sided walls, even if only the upper or lower wall texture matches that of the initial wall. In that case the non-matching middle texture of the two-sided wall would be aligned to the single middle texture of the one-sided wall.

This could be "fixed" by being more strict about the inclusion of walls into the alignment, but I have shied away from that as it would be a significant change away from the old behavior. However, if that is desired, I can amend this pull request appropriately.

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.

1 participant