The WAD a game is played from, read once and shared by every process: its pictures, levels, sounds and music, and the tables derived from them.
ElixirDoom.Assets.load("DOOM1.WAD")
ElixirDoom.Assets.get().graphics
ElixirDoom.Assets.level("E1M1")load/1 reads the WAD, builds the pictures and installs everything under a
:persistent_term key; get/0 reads it back from any process. Levels are read the
first time they are asked for and kept.
Summary
Functions
The picture each animated picture shows at tic tic, for those that have moved on.
The installed assets; raises when none are.
Level name, read on first use and kept.
Read the WAD at path and install it. Gives the assets, or the reason it could not.
Whether a WAD is loaded.
Types
@type t() :: %ElixirDoom.Assets{ animations: [tuple()], graphics: ElixirDoom.Graphics.t(), levels: [String.t()], path: Path.t(), switches: %{required(non_neg_integer()) => non_neg_integer()}, wad: ElixirDoom.Wad.t() }
Functions
@spec animation_frame(t(), non_neg_integer()) :: %{ required(non_neg_integer()) => non_neg_integer() }
The picture each animated picture shows at tic tic, for those that have moved on.
@spec get() :: t()
The installed assets; raises when none are.
@spec level(String.t()) :: {:ok, ElixirDoom.Level.t()} | {:error, term()}
Level name, read on first use and kept.
Read the WAD at path and install it. Gives the assets, or the reason it could not.
@spec loaded?() :: boolean()
Whether a WAD is loaded.