MiniDoom

src/f_finale.ml

Implements finale sequencing, text pages, and ending presentation.

Package
(global)
Reachable
Yes

Imports

Declarations

_F_AnyPlayerButtons

function _F_AnyPlayerButtons()

Reports whether any valid player command currently carries a button press used to skip a commercial finale.

View source

_F_DrawTiledFlat

function _F_DrawTiledFlat(name)

Fills the logical screen with a repeating 64x64 flat, marks it dirty, and submits the matching HD overlay when available.

ParameterTypeDefaultDescription
namedynamic—Resource or object name to resolve.

View source

_F_EndPatchName

inline function _F_EndPatchName(stage)

Maps a clamped bunny-ending animation stage to its END0-through-END6 patch name.

ParameterTypeDefaultDescription
stagedynamic—Stage value supplied to `_F_EndPatchName`.

View source

_F_IDiv

inline function _F_IDiv(a, b)

Returns a signed quotient truncated toward zero, or zero for invalid operands and a zero divisor in `_F_IDiv`

ParameterTypeDefaultDescription
adynamic—First input operand.
bdynamic—Second input operand.

View source

_F_PatchWidth

inline function _F_PatchWidth(patch)

Reads a Doom patch width, returning zero for missing or truncated patch data.

ParameterTypeDefaultDescription
patchdynamic—Patch value supplied to `_F_PatchWidth`.

View source

_F_Substr

inline function _F_Substr(s, n)

Returns at most the first n encoded bytes of a string, clamping n to the available data.

ParameterTypeDefaultDescription
sdynamic—S value supplied to `_F_Substr`.
ndynamic—Number of values to process.

View source

_F_u16le

inline function _F_u16le(b, off)

Decodes an unsigned 16-bit little-endian value from a patch header.

ParameterTypeDefaultDescription
bdynamic—Second input operand.
offdynamic—Zero-based byte or element offset.

View source

_F_u32le

inline function _F_u32le(b, off)

Decodes an unsigned 32-bit little-endian value from a patch column table.

ParameterTypeDefaultDescription
bdynamic—Second input operand.
offdynamic—Zero-based byte or element offset.

View source

_F_UpperAscii

inline function _F_UpperAscii(c)

Normalizes lowercase ASCII character codes before indexing the uppercase HUD font.

ParameterTypeDefaultDescription
cdynamic—C value supplied to `_F_UpperAscii`.

View source

bunny_laststage

bunny_laststage

Tracks the mutable bunny laststage value used by the f finale subsystem.

View source

cast_active

cast_active

Tracks whether cast active is active in the f finale subsystem.

View source

cast_name

cast_name

Stores the mutable cast name text used by the f finale subsystem.

View source

cast_tics

cast_tics

Tracks the mutable cast tics value used by the f finale subsystem.

View source

F_BunnyScroll

function F_BunnyScroll()

Composes the episode-three PFUB panorama, then advances and sounds the centered END0-through-END6 animation.

View source

F_CastDrawer

function F_CastDrawer()

Draws the cast-stage backdrop and centered actor name while cast presentation is active.

View source

F_CastPrint

function F_CastPrint(text)

Measures and renders a cast name centered at y=180, falling back to the menu text renderer when the HUD font is unavailable.

ParameterTypeDefaultDescription
textdynamic—Text to process.

View source

F_CastResponder

function F_CastResponder(ev)

Consumes key-down events during the cast stage and advances its input-driven counter.

ParameterTypeDefaultDescription
evdynamic—Input event to process.

View source

F_CastTicker

function F_CastTicker()

Advances the cast-stage elapsed-tic counter while that stage is active.

View source

F_Drawer

function F_Drawer()

Dispatches finale rendering between story text, cast presentation, and the episode-specific ending artwork.

View source

F_DrawPatchCol

function F_DrawPatchCol(x, patch, col)

Decodes one post-compressed Doom patch column into the logical framebuffer with horizontal and vertical bounds checks.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
patchdynamic—Patch value supplied to `F_DrawPatchCol`.
coldynamic—Col value supplied to `F_DrawPatchCol`.

View source

F_Responder

function F_Responder(ev)

Routes input only to the cast stage; text and art stages deliberately leave events unconsumed.

ParameterTypeDefaultDescription
evdynamic—Input event to process.

View source

F_StartCast

function F_StartCast()

Switches the finale into its cast stage, initializes its placeholder actor state, and starts the evil music track.

View source

F_StartFinale

function F_StartFinale()

Enters GS_FINALE, selects the episode/map text and background, and starts the appropriate finale music.

View source

F_TextWrite

function F_TextWrite()

Draws the tiled finale background and reveals the selected story text at TEXTSPEED using the HUD font.

View source

F_Ticker

function F_Ticker()

Advances finale time, handles commercial skip/world completion, and transitions non-commercial text into its art stage.

View source

finale_count

finale_count

Tracks the mutable finale count value used by the f finale subsystem.

View source

finale_flat

finale_flat

Stores the mutable finale flat text used by the f finale subsystem.

View source

finale_stage

finale_stage

Tracks the mutable finale stage value used by the f finale subsystem.

View source

finale_started

finale_started

Tracks whether finale started is active in the f finale subsystem.

View source

finale_text

finale_text

Stores the mutable finale text text used by the f finale subsystem.

View source

TEXTSPEED

const TEXTSPEED = 3

Defines textspeed for the f finale subsystem.

View source

TEXTWAIT

const TEXTWAIT = 250

Defines textwait for the f finale subsystem.

View source