Skip to content

Widescreen: dialogs centred at 4:3, HUD at the 16:9 edges - #114

Merged
boubou666 merged 2 commits into
mainfrom
claude/widescreen-hud
Nov 27, 2026
Merged

boubou666 merged 2 commits into
mainfrom
claude/widescreen-hud

Conversation

@boubou666

Copy link
Copy Markdown
Collaborator

Two widescreen fixes from playing it (runtime/tmb_widescreen.cpp):

Dialogs over a match are centred.

  • Cause: the pause menu (and the results, won and lost dialogs) lays out its text for a 640-wide view, centred at x 320 from the left edge. With one player the pause kept the match's widened view, so its menu sat left of centre.
  • Fix: 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.
    • Every widened viewport is remembered, not only those on screen: the pause's full-screen viewport was handed out again while still 853 wide from earlier in the match.

The HUD sits at the 16:9 edges.

  • How the HUD is placed: its two clusters are hier meshes at camera-space offsets in front of the camera: Hud+0x810 for the radar, +0x820 for the weapons.
  • Fix:
    • Each cluster's x moves out by (w − 640) / 2 · y / D for the call to Hud::updateHUDPosition, then is put back afterwards.
    • The game reaches that function by a jump from TheGame::HudUpdateHUDPosition (0x15BD20), so the override sits there.
    • The ammo count, KILLS and DEMO text, drawn from a 640 layout, moves with its cluster.
    • The radar's centre and blips follow, and the markers over cars stay on the cars.

Checked:

  • All 11 native suites pass.
  • The 1P and 4P replays match main on every recorded field, the RAM image and the sound.
  • The pinned boot and match1p checks match.
  • Hidden window runs with widescreen on:
    • The pause menu and its PC SETTINGS pages are centred at 4:3, and the match returns to 16:9.
    • The HUD is at the edges, in the single view and in the rear-view layout.

🤖 Generated with Claude Code

boubou666 and others added 2 commits November 27, 2026 01:40
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>
@boubou666
boubou666 merged commit 6043791 into main Nov 27, 2026
8 checks passed
@boubou666
boubou666 deleted the claude/widescreen-hud branch November 27, 2026 01:17
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