data sources HUD rendering reads the post-update gameplay snapshot.
app->bonus.stats Ammo · HP · Armor · Score gameplay values after pickups, damage, and actions app->bonus.hud face · weapon · timers transient animation and reaction state The bonus HUD is a screen-space overlay rendered above the world view. It gives
the player immediate feedback for Ammo, HP, Armor, Score, face state,
weapon animation, and framed status panels.
Bonus HUD
The HUD is fed by bonus gameplay state and rendered last, so stats, face reactions, weapon frames, and panels stay readable above world shading, sprites, minimap, and retro output.
data sources HUD rendering reads the post-update gameplay snapshot.
app->bonus.stats Ammo · HP · Armor · Score gameplay values after pickups, damage, and actions app->bonus.hud face · weapon · timers transient animation and reaction state frame position HUD is intentionally the last screen-space draw stage.
interactive HUD simulator Trigger common gameplay events and watch the overlay update from the same stat and HUD state model.
Use the controls to simulate HUD state changes.
render responsibilities Layout, text, panels, face state, and weapon frames stay separated.
runtime invariant HUD uses updated values, draws last, and is not darkened by world effects.
HUD state is updated before the final draw stage:
bonus_hud_update(...) advances timers and animation stateThis keeps numeric values and animated elements synchronized with gameplay.
In draw_frame(...), the HUD is intentionally rendered last:
mlx_put_image_to_windowDrawing the HUD last keeps it readable and prevents world post-processing from darkening or overwriting interface elements.
HUD rendering is split by responsibility:
This separation keeps UI layout and state logic independent from raycasting.
Runtime state is stored in:
app->bonus.stats for values displayed by the HUDapp->bonus.hud for animation, timers, face, and weapon stateHUD assets are loaded during bonus initialization and released by the HUD shutdown path.
srcs_bonus/hud/hud_draw.csrcs_bonus/hud/hud_state.csrcs_bonus/hud/hud_status.csrcs_bonus/hud/hud_fire.csrcs_bonus/hud/hud_frames.csrcs_bonus/hud/hud_text.csrcs/render/render_frame.c