Cauldron3D.Formats.Wad2 (Cauldron3D.Formats v0.3.3)

Copy Markdown View Source

WAD2 picture collections and loose .lmp pictures, read into Cauldron3D.Textures of palette indices.

Cauldron3D.Formats.Wad2.pictures(File.read!("gfx.wad"), raw: %{"conchars" => {128, 128}})["num_0"]

A picture lump holds its width and height before its pixels; :raw names lumps that are bare pixels and gives their {width, height}.

Summary

Functions

A loose .lmp picture: width, height and its pixels; nil when it is not one.

Every picture in a WAD2, by lower-case name.

Functions

lmp(arg1)

@spec lmp(binary() | nil) :: Cauldron3D.Texture.t() | nil

A loose .lmp picture: width, height and its pixels; nil when it is not one.

pictures(data, opts \\ [])

@spec pictures(binary() | nil, keyword()) :: %{
  required(String.t()) => Cauldron3D.Texture.t()
}

Every picture in a WAD2, by lower-case name.