Skip to content

Expose source Game2 frame-fit queries on the native viewport owner - #397

Closed
Roxas2712 wants to merge 60 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-frame-queries
Closed

Roxas2712 wants to merge 60 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-frame-queries

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 29, 2026 •

Copy link
Copy Markdown

Native Game lacks the source Game2 frameFit(w,h)/viewport(w,h) observations, so unchanged Gen2 scenes fall back instead of asking their source owner. Add passive queries using native chrome/viewport ownership and shared PixelFit arithmetic from the actual compositor. Actual drawable arguments use physical coordinates; they must not receive window DPI twice. No replacement renderer or mod changes.

This offer is based on PR #383's native viewport/touch stack and includes the complete already-offered PR #224 chrome prerequisite: native Gen2Chrome, alias, palette inversion companion and tests. Existing provenance and licence terms are preserved.

Independent validation of this older offered host: 4,454 frame-query checks through its real Renderer:endFrame compositor, plus 116 menu-chrome checks. This uses the host's existing renderer rather than inventing the newer fork's frameRects helper. Five GSC editions, six shapes, DPI 1/1.25/1.5/2/3, drawable inputs, odd physical dimensions, decorated fits and the observed Retina regression are covered. Preceding PR #383 source fails cleanly for the absent methods.

The newer fork's actual Metal follow-up with unchanged VASC confirms that 2048×1536 input in a 1024×768 DPI2 window returns scale 10/origin 224,48, matching its native compositor. Four inspected owned OS images cover both selected field camera flags; both use the same authored battle stage. This is shared-policy evidence, not GPU qualification of this older offered host. Bottom command artwork remains partly clipped. Complete combined-host tests, matched Gen1/full visual parity, Windows hardware and release acceptance remain open. See docs/native-gen2-frame-queries.md.

Integration and tests by Roxas2712 are offered under https://github.com/Roxas2712/Gen2Recomped/blob/main/LICENSE-ROXAS2712.md, including the specific Cedric / UNDERdecoded permission with visible credit. Existing engine authors' rights and earlier licence grants remain effective.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
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