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

Use memedit to improve code relying on highlighted tile #204

Open
Lemonymous opened this issue Apr 14, 2023 · 0 comments
Open

Use memedit to improve code relying on highlighted tile #204

Lemonymous opened this issue Apr 14, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Lemonymous
Copy link
Contributor

Functions mouseTile and mouseTileAndEdge which convert mouse position to tile position, is approximating which tile is being highlighted. While this approximation is good, it is not 100% between tiles. Memedit is used for Board.GetHighlighted and Board.IsHighlighted to make them perfectly accurate, matching when the game considers a tile highlighted by the mouse cursor.

Default mod loader functions:

Modified memedit functions:

Memedit does not change mouseTile or mouseTileAndEdge, so everything that uses these functions instead of Board.GetHighlighted or Board.IsHighlighted will not use memedit, and will therefor remain inaccurate, even when memedit is enabled.

mouseTile is used in:

mouseTileAndEdge is used in:

  • modApiExt
    • modApiExtHooks:updateTiles for dispatching events:
      • modapiext.events.onTileDirectionChanged
      • modapiext.events.onTileUnhighlighted
      • modapiext.events.onTileHighlighted
@Lemonymous Lemonymous added enhancement New feature or request help wanted Extra attention is needed labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant