WAD3 collections: wall textures with their mips and their own palettes, and pictures
with their own palettes.
textures = Cauldron3D.Formats.Wad3.textures(File.read!("halflife.wad"))
textures["c1a0_labflrd"]
#=> [%Cauldron3D.Texture{palette: <<...>>}, ...]
Cauldron3D.Formats.Wad3.pictures(File.read!("gfx.wad"))["crosshairs"]Names are lower case. In a texture whose name begins {, colour 255 is see-through.
Summary
Functions
A font lump: %{texture:, height:, glyphs:}, texture the 256-pixel-wide sheet of
characters with its palette (colour 255 see-through), height a character's height in
pixels, and glyphs a tuple of 256 {x, y, width} places on the sheet. nil when it
is not one.
Every font in the collection, by name, as font/1 reads it.
The lumps of a WAD3 as {type, name, bytes}.
A picture with its palette: width, height, pixels, then 256 colours; nil when it is not one.
Every picture in the collection, by name.
Every texture in the collection: its four mips, by name.
Functions
A font lump: %{texture:, height:, glyphs:}, texture the 256-pixel-wide sheet of
characters with its palette (colour 255 see-through), height a character's height in
pixels, and glyphs a tuple of 256 {x, y, width} places on the sheet. nil when it
is not one.
Every font in the collection, by name, as font/1 reads it.
The lumps of a WAD3 as {type, name, bytes}.
@spec picture(binary()) :: Cauldron3D.Texture.t() | nil
A picture with its palette: width, height, pixels, then 256 colours; nil when it is not one.
@spec pictures(binary() | nil) :: %{required(String.t()) => Cauldron3D.Texture.t()}
Every picture in the collection, by name.
@spec textures(binary() | nil) :: %{required(String.t()) => [Cauldron3D.Texture.t()]}
Every texture in the collection: its four mips, by name.