Occlude the cursor when covered by tiles#198
Draft
realSquidCoder wants to merge 6 commits intoDFHack:masterfrom
Draft
Occlude the cursor when covered by tiles#198realSquidCoder wants to merge 6 commits intoDFHack:masterfrom
realSquidCoder wants to merge 6 commits intoDFHack:masterfrom
Conversation
Collaborator
Author
|
merge after #187 (because this branch is a sub branch of that PR) |
NicksWorld
reviewed
Feb 6, 2025
|
|
||
| // Check the tiles in front of the cursor | ||
| bool occludeCursor = false; | ||
| for (int i : {3, 4, 5}) { |
Contributor
There was a problem hiding this comment.
I would recommend against using a copy of the dirs array used in SegmentProcessing, as it stores more directions than needed as well as being specialized for border calculations. Instead I would recommend an implementation similar to the following:
Tile* temp;
for (const dirRelative& dir : {eRight, eDownRight, eDown}) {
temp = segment->getTileRelativeTo(cursor.x, cursor.y, cursor.z, dir);
if (!temp)
continue;
// Do whatever checks are needed
}| continue; | ||
| } | ||
| int shape = dirs[i]->tileShapeBasic(); | ||
| if (isObscuring(dirs[i]) || |
Contributor
There was a problem hiding this comment.
The checks on tileShapeBasic likely make sense to be moved into your isObscuring function.
Additionally, the name of the function may be misleading as the method doesn't check if the cursor is obscuring a tile, but rather if the tile is obscuring the cursor.
Collaborator
Author
|
Honestly, we should scrap this PR in favor of doing #202 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #195
Makes it easier to tell where the cursor is.

Makes it use this top half cursor: