A Doom WAD file: its lumps by name and in order.
{:ok, wad} = ElixirDoom.Wad.open("DOOM1.WAD")
ElixirDoom.Wad.lump(wad, "PLAYPAL")
ElixirDoom.Wad.between(wad, "S_START", "S_END")The whole file is read into memory once. Names are upper case, at most eight
characters. Where several lumps share a name — a level's THINGS, say — lump/2 gives
the last, and level/2 gives a level's own lumps after its marker.
Summary
Functions
The lumps strictly between the markers first and last, in order. Markers that
repeat with a doubled letter (FF_START, PP_START) are matched too.
Whether the WAD has a lump called name.
The lumps of level name by lump name: THINGS, LINEDEFS and the rest.
The names of the levels in the WAD, E1M1 or MAP01 style, in order.
The last lump called name, or nil.
The last lump called name; raises KeyError where there is none.
Read the WAD at path.
Read a WAD from its bytes.
Types
@type t() :: %ElixirDoom.Wad{ kind: :iwad | :pwad, lumps: tuple(), names: %{required(String.t()) => non_neg_integer()} }
Functions
The lumps strictly between the markers first and last, in order. Markers that
repeat with a doubled letter (FF_START, PP_START) are matched too.
Whether the WAD has a lump called name.
@spec level(t(), String.t()) :: {:ok, %{required(String.t()) => binary()}} | {:error, :no_such_level}
The lumps of level name by lump name: THINGS, LINEDEFS and the rest.
The names of the levels in the WAD, E1M1 or MAP01 style, in order.
The last lump called name, or nil.
The last lump called name; raises KeyError where there is none.
Read the WAD at path.
Read a WAD from its bytes.