Skip to content

Conversation

@realSquidCoder
Copy link
Collaborator

Fixes #195

Makes it easier to tell where the cursor is.
Makes it use this top half cursor:
image

@realSquidCoder
Copy link
Collaborator Author

realSquidCoder commented Feb 6, 2025

merge after #187 (because this branch is a sub branch of that PR)

@realSquidCoder realSquidCoder marked this pull request as ready for review February 6, 2025 18:22

// Check the tiles in front of the cursor
bool occludeCursor = false;
for (int i : {3, 4, 5}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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]) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

@realSquidCoder
Copy link
Collaborator Author

Honestly, we should scrap this PR in favor of doing #202

@realSquidCoder realSquidCoder marked this pull request as draft February 17, 2025 02:25
@myk002 myk002 removed this from 51.06-r2 Mar 8, 2025
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.

Selection cursor occlusion

2 participants