44  Intermission & Finale Screens

This tour explores how the Doom engine handles intermission and finale screens through three modules: f_finale (end-of-game sequence), wi_stuff (intermission stats), and f_wipe (screen transitions).


44.1 f_finale.h – Finale Interface

File: linuxdoom-1.10/f_finale.h

These function prototypes allow the main loop to manage the finale state:

  • F_Responder – Handles input events during the finale
  • F_Ticker – Advances the finale state each tick
  • F_Drawer – Renders the finale screen
  • F_StartFinale – Triggers the finale sequence

44.2 f_finale.c – Finale Implementation

File: linuxdoom-1.10/f_finale.c

  • Lines 1–10: Standard includes for video, sound, and WAD handling
  • Lines 118–121: F_StartFinale chooses the background flat and text (e.g., finaleflat = "FLOOR4_8" and finaletext = E1TEXT for episode 1)
  • Lines 241–245: F_Ticker updates the finale logic. When finalecount surpasses a threshold, the text phase transitions to the art screen with a screen wipe (finalestage = 1)

44.3 wi_stuff.h – Intermission Stats Interface

File: linuxdoom-1.10/wi_stuff.h

Declared functions:

  • WI_Start – Sets up intermission using wbstartstruct_t
  • WI_Ticker – Updates the intermission screen each tick
  • WI_Drawer – Renders intermission content

44.4 wi_stuff.c – Intermission Stats Rendering

File: linuxdoom-1.10/wi_stuff.c

  • Lines 1450–1454: WI_drawStats draws the scoreboard for single-player intermission, showing kills and items using V_DrawPatch and WI_drawPercent.

44.5 f_wipe.h – Screen Wipe Interface

File: linuxdoom-1.10/f_wipe.h

Declared types and functions:

  • wipe_ColorXForm, wipe_Melt – Transition styles
  • wipe_StartScreen, wipe_EndScreen, wipe_ScreenWipe – Frame capturing and wipe rendering

44.6 f_wipe.c – Screen Wipe Animation

File: linuxdoom-1.10/f_wipe.c

  • Lines 237–256:
    • wipe_StartScreen captures the current frame in screens[2]
    • wipe_EndScreen stores the next frame in screens[3] and restores the initial buffer
    • wipe_ScreenWipe performs the interpolation between frames for transition effects

That completes the tour of intermission and finale screen handling.