Commit Graph

6 Commits

Author SHA1 Message Date
Ludovic Marie 6ab958a423 Crosshair through the inverting CROSSHAIR pipeline, with the attack indicator
Hud.extractCrosshair draws every crosshair sprite with
RenderPipelines.CROSSHAIR, whose BlendFunction.INVERT (ONE_MINUS_DST_COLOR,
ONE_MINUS_SRC_COLOR, ONE, ZERO) inverts the colour under it; Horizon drew it
alpha-blended white. GuiDraw sprites now carry their pipeline, the HUD batch
records the vertex ranges that invert and the HUD renderer draws them with a
second pipeline.

The attack indicator (crosshair or hotbar, per the Attack Indicator option)
now shows Player.getAttackStrengthScale(0) from the attack strength ticker
instead of a constant full strength, and the full indicator shows at full
strength on a living entity under the crosshair with a weapon slower than
MIN_CROSSHAIR_ATTACK_SPEED.

The HUD harness records every sprite's pipeline on both sides and gives the
crosshair a stand-in crosshairPickEntity (alive or not) and attack delay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:32:36 +02:00
Ludovic Marie 75336660bb Compare the focused chat with vanilla
The HUD harness's chat cases now also draw the chat as the open chat
screen does: foreground, at the focused height, scrolled, with the scroll
bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:42:57 +02:00
Ludovic Marie 5b201965af Compare the chat with vanilla's ChatComponent
The chat cases add messages (with the system and error tags) at given Hud
ticks and draw ChatComponent in background mode: wrapping, the 200-tick
fade, scale, width, height, spacing and opacity options. Horizon's chat now
wraps like StringSplitter.splitLines and ComponentRenderUtils.wrapComponents
(the indent on wrapped lines, breaks at the last space, a dropped newline
or space), keeps the options as doubles and draws through a layout with
vanilla's fills and text offsets. A component list whose first part has
empty text now still passes its style to the rest. The harness runs 200
cases per kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:28:05 +02:00
Ludovic Marie ef0c6604a5 Compare camera overlays and the sleep overlay with vanilla's Hud
The overlays cases run Hud.extractCameraOverlays and extractSleepOverlay:
the vignette with its brightness and world border warning, the spyglass
scope and its scopeScale easing (read back and compared), equipment
camera overlays, powder snow, the nether portal sprite and the nausea
swirl. The game feeds its full-screen camera overlays from the same
layout (the vignette option and first person now count), draws the
spyglass with vanilla's unclamped easing and the sleep fade at vanilla's
opacity under the sidebar, titles and chat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:19:38 +02:00
Ludovic Marie 6e9f218a14 WIP: unfinished rendering-hud parity work, stopped for the night
Uncommitted changes the agent had in progress when it was stopped; may not
build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:24:03 +02:00
Ludovic Marie 268babc257 Lay out the HUD decorations exactly as vanilla Hud does
Add horizon_client::hud_layout (crosshair and attack indicator, hotbar
with selection, off hand by main arm, item slots with the pop squeeze,
armour, hearts including frozen and absorbing kinds, food, air bubbles,
mount hearts capped at 30, experience bar and level) and the
test_hud_parity harness whose oracle runs vanilla Hud methods on a
stand-in client. The game now draws these through hud_layout; the
experience level is centred with integer division like vanilla,
spectators get no crosshair and mount hearts show in creative too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:56:23 +02:00