ElixirDoom.Render.Wash (elixir_doom v0.2.0)

Copy Markdown View Source

How a player's state colours the whole picture: the palette it is drawn through (red when hurt or berserk, gold on a pickup, green in a radiation suit) and the light table that replaces lighting while invulnerable or wearing light amplification goggles.

ElixirDoom.Render.Wash.palette_index(player)
ElixirDoom.Render.Wash.fixed_table(player)

Summary

Functions

The light table everything is drawn through for player, or nil to light it as usual.

Which of the fourteen palettes player's screen is drawn through, 0 normal.

Whether a power with tics left shows: steadily, then blinking for its last four seconds.

Functions

fixed_table(player)

@spec fixed_table(map()) :: non_neg_integer() | nil

The light table everything is drawn through for player, or nil to light it as usual.

palette_index(player)

@spec palette_index(map()) :: 0..13

Which of the fourteen palettes player's screen is drawn through, 0 normal.

showing?(tics)

@spec showing?(integer()) :: boolean()

Whether a power with tics left shows: steadily, then blinking for its last four seconds.