Learn R Programming

wal (version 0.1.1)

Read and Write 'wal' Bitmap Image Files and Other 'Quake' Assets

Description

Read 'Quake' assets including bitmap images and textures in 'wal' file format. This package also provides support for extracting these assets from 'WAD' and 'PAK' file archives. It can also read models in 'MDL' and 'MD2' formats.

Copy Link

Version

Install

install.packages('wal')

Monthly Downloads

220

Version

0.1.1

License

GPL-2

Issues

Pull Requests

Stars

Forks

Last Published

February 2nd, 2024

Functions in wal (0.1.1)

read.lmp

Read binary lump, or 'lmp' files.
read.pak

Read Quake PAK archive.
is.quakemodel

Check whether object is a Quake 1 or 2 alias model.
unpack.vertex.coords

Unpack vertex coords from Q1 0-255 representation.
plotwal.rawdata

Plot raw pixel index data as image.
plotwal.mipmap

Plot a mipmap level from a WAL image.
is.quakemodel_md2

Check whether object is Quake 2 MD2 model
is.quakemodel_mdl

Check whether object is Quake 1 MDL model
wad.contents

List WAD file contents.
wad.extract

Extract WAD contents into existing directory.
wad_dir.fileext.mapping

Get file extensions for WAD dir entry type strings.
wad_dir.types.string

Get strings describing WAD dir entry types.
lookup.q1.normals

Lookup Quake I normals by index.
save.filepart

Read part of binary file and save as new file.
wal.export.to.jpeg

Export wal instance to JPEG format image file.
quakemodel.to.fs.surface

Convert Quake Model to 'fs.surface' instance.
qarchive.type.from.filename

Determine archive type from file name extension.
wad_dir.types.int

Get integers representing WAD dir entry types.
wad.texname.clean

Replace special chars in texture names to turn it into a valid filename.
read.quake1miptex

Read a Quake mipmap texture from a WAD2 file.
read.quake.md2

Read Quake II model in MD2 format.
read.wad

Read Quake WAD file.
wal.export.to.png

Export wal instance to PNG format image file.
read.quake.mdl

Read Quake model in MDL format.
half.image

Reduce image size by 2 along both axes by dropping pixels.
img.to.wal

Convert image to WAL instance.
predefined.md2.normals

Predefined MD2 normals from Quake 2.
wal.template

Generate a WAL structure template.
read.wal

Read bitmap file in WAL format.
readWAL

Read bitmap image in WAL format, returning image data only.
predefined.mdl.normals

Return list of pre-defined Quake I normals.
writeWAL

Write WAL instance to bitmap file in WAL format.
closest.color.from.palette

Find closest color from palette for each RGB color.
get.wadentry.type.strings

Translate wad directory entry types from the integer to the string representation.
get.mipmap.data.lengths

Compute length of mipmaps in bytes from width and height of largest image (mipmap0).
get.wal.mipmap.data

Retrieve raw data for given mipmap level from WAL instance.
get.wal.mipmap.heights

Compute widths of the 4 mipimap levels from base width.
get.mipmap.data.offsets

Get mipmap offsets for WAL header, based on mipmap sizes and start offset.
expand.rawdata.to.mipmaps

Given the pixel data for the largest image, generate the full data for all mipmaps.
get.wal.mipmap.widths

Compute widths of the 4 mipimap levels from base width.
check.palette

Check palette, stop on invalid data.
apply.palette.to.rawdata

Apply a palette to index data to create a 2D image.
pal_q2

Get Q2 palette.
plot.wal

S3 plot function for wal image.
pak.extract

Extract PAK contents into existing directory.
print.wad

S3 print function for WAD
qarchive.extract

Extract any of the supported Quake archives.
pal_q1

Get Q1 palette.