Repository navigation
Widescreen: dialogs centred at 4:3, HUD at the 16:9 edges - #114
Merged
Merged
Conversation
The dialogs over a match (displayDialog 0x163500: the pause, the results, won and lost) lay their text and darkening out for a 640-wide view (centred at x 320 from the view's left edge, the darkening band 640 wide). With one player the pause kept the match's widened view, so its menu sat left of centre in a 16:9 picture. displayDialog's override now narrows every widened viewport back to 640 and rebuilds the views (viewTweakSetFov) before the game's dialog; the picture is 4:3 while it shows, and the match's next frame end widens the views again. Every widened viewport is remembered, not only those shown: the pause's full-screen view (viewport 0x4DEF80) is handed out again by viewCreate while still 853 wide from earlier in the match. Checked in hidden window runs with widescreen on: the 1P pause menu and its PC SETTINGS pages centred at 4:3, the match back at 16:9 after Start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The match HUD's two clusters are hier meshes on coordinate systems the game hangs in front of the camera each frame (Hud::updateHUDPosition 0x13CC90: the view's matrix, its translation plus the cluster's camera-space offset, Hud + 0x810 the radar's, + 0x820 the weapon's; x right, y the depth). Seen through the same focal length they kept their 4:3 places. With the views wide, each cluster's x goes out by the width gained on its side, (w - 640) / 2 * y / D (D the views' focal length, viewFovH), for the call, and is put back after it, so a narrowed view finds the game's values. The radar's centre and blips follow (computed in the same call); the markers and bars over the cars are the world's. The game reaches Hud::updateHUDPosition and Hud::Update by a jump from TheGame::HudUpdateHUDPosition (0x15BD20) and TheGame::HudUpdate (0x15BD40), so those are the ones overridden (a jump does not reach an override). The HUD text Hud::Update draws from a 640 layout through fontSpritePrintXY / CenteredXY (the ammo count and KILLS on the right, DEMO in the middle) goes with its cluster: x past 400 by the width gained, past 240 by half of it. Checked: the 11 native suites pass; the 1P and 4P replays match main on every recorded field, RAM image and sound; the pinned boot and match1p checks match. Hidden window runs with widescreen on: the radar, name and health at the top left, the weapon panel, its ammo count, energy and lives at the bottom right, in the single view and the rear-view layout; the markers over the cars on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two widescreen fixes from playing it (
runtime/tmb_widescreen.cpp):Dialogs over a match are centred.
displayDialog(0x163500) now narrows every widened viewport back to 640 and rebuilds the views before the dialog runs. The dialog shows at 4:3, and the next match frame widens the views again.The HUD sits at the 16:9 edges.
(w − 640) / 2 · y / Dfor the call toHud::updateHUDPosition, then is put back afterwards.TheGame::HudUpdateHUDPosition(0x15BD20), so the override sits there.Checked:
🤖 Generated with Claude Code