Expose Noesis visual coordinate conversion and hit testing to Lua - #592
Open
nnn149 wants to merge 1 commit into
Open
Expose Noesis visual coordinate conversion and hit testing to Lua#592nnn149 wants to merge 1 commit into
nnn149 wants to merge 1 commit into
Conversation
nnn149
marked this pull request as ready for review
July 27, 2026 17:52
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.
Summary
Expose three Noesis visual-coordinate operations to Client Lua:
The methods are registered on
Noesis::Visual, so registered derived types inherit them.HitTest()returns the topmost hitVisual, ornilwhen there is no hit.Implementation
Noesis::Visual::PointFromScreenNoesis::Visual::PointToScreenNoesis::VisualTreeHelper::HitTest{ X, Y }serialization forNoesis::Point.HitTestwith its realHitTestResultreturn type and expose onlyvisualHitto Lua.The mapped "screen" coordinate space is the game client/SDL logical coordinate space, with the origin at the client area's top-left.
Binary mapping evidence
Validated against game version
4.1.1.7209685.3D3C703C4B94596876697C709C42024F2ADA5CCE4AF88F11D3B6408D61930D0F8A9D7A37844D294F7C55476D0EF02C4F033F41666F8FA1F4DA12DB1A41EFBD55Visual::PointFromScreen0x45E07000x45FA500Visual::PointToScreen0x45E0A200x45FA820VisualTreeHelper::HitTest0x46190A00x4632EA0The production
PointToScreenentry signature and the sharedPointFromScreen -> HitTestsemantic call-site signature each match exactlyonce in both executables. The shared call sites are at DX11 RVA
0x465C9FBand Vulkan RVA
0x46767FB.An independent 60-byte
PointFromScreenentry signature also matches exactlyonce in each executable and resolves to the same target as the semantic call
site. The independent entry signature is retained as a regression check rather
than duplicated in the production mappings.
DX11 function-body checks:
PointFromScreen: 789 bytes,7A15A7AAE7CD0843FD1249C104CBB3BF1C8E0A45B616D03328F2E5ECE08B6DA8PointToScreen: 309 bytes,FBC1DBE8DBA93ABE475428EE0FE984668B09402025AA79D65033AB9212210182VisualTreeHelper::HitTest: 41 bytes,20700C73D891F268DEA9D8054AB09F266A6538AE063F6A4496FD782A2A677576All three mappings use
AllowFail. Missing mappings produce a descriptive Luaerror instead of invoking a null address.
Validation
Game Debug|x64.Game Release|x64.git diff --checkpasses.and Vulkan.
corners, and an outside control point.
0.000224517.0.000062914.outside point did not.
slot at every tested resolution and DPI.
failed with
lifetime has expired; reacquired proxies succeeded.observed.