Learn R Programming

⚠️There's a newer version (0.1.1) of this package.Take me there.

wal (version 0.1.0)

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

151

Version

0.1.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Last Published

January 17th, 2021

Functions in wal (0.1.0)

half.image

Reduce image size by 2 along both axes by dropping pixels.
get.wadentry.type.strings

Translate wad directory entry types from the integer to the string representation.
img.to.wal

Convert image to WAL instance.
wal.export.to.jpeg

Export wal instance to JPEG format image file.
plotwal.mipmap

Plot a mipmap level from a WAL image.
plotwal.rawdata

Plot raw pixel index data as image.
wal.export.to.png

Export wal instance to PNG format image file.
get.wal.mipmap.data

Retrieve raw data for given mipmap level from WAL instance.
quakemodel.to.fs.surface

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

Determine archive type from file name extension.
save.filepart

Read part of binary file and save as new file.
unpack.vertex.coords

Unpack vertex coords from Q1 0-255 representation.
wad_dir.types.int

Get integers representing WAD dir entry types.
wad_dir.types.string

Get strings describing WAD dir entry types.
expand.rawdata.to.mipmaps

Given the pixel data for the largest image, generate the full data for all mipmaps.
closest.color.from.palette

Find closest color from palette for each RGB color.
pal_q1

Get Q1 palette.
qarchive.extract

Extract any of the supported Quake archives.
print.wad

S3 print function for WAD
pak.extract

Extract PAK contents into existing directory.
read.quake1miptex

Read a Quake mipmap texture from a WAD2 file.
read.wad

Read Quake WAD file.
wal.template

Generate a WAL structure template.
writeWAL

Write WAL instance to bitmap file in WAL format.
get.mipmap.data.lengths

Compute length of mipmaps in bytes from width and height of largest image (mipmap0).
lookup.q1.normals

Lookup Quake I normals by index.
is.quakemodel_mdl

Check whether object is Quake 1 MDL model
read.lmp

Read binary lump, or 'lmp' files.
get.mipmap.data.offsets

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

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

Check palette, stop on invalid data.
is.quakemodel_md2

Check whether object is Quake 2 MD2 model
is.quakemodel

Check whether object is a Quake 1 or 2 alias model.
predefined.md2.normals

Predefined MD2 normals from Quake 2.
predefined.mdl.normals

Return list of pre-defined Quake I normals.
wad.extract

Extract WAD contents into existing directory.
wad.contents

List WAD file contents.
wad_dir.fileext.mapping

Get file extensions for WAD dir entry type strings.
read.pak

Read Quake PAK archive.
wad.texname.clean

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

Read bitmap file in WAL format.
readWAL

Read bitmap image in WAL format, returning image data only.
get.wal.mipmap.widths

Compute widths of the 4 mipimap levels from base width.
get.wal.mipmap.heights

Compute widths of the 4 mipimap levels from base width.
pal_q2

Get Q2 palette.
plot.wal

S3 plot function for wal image.
read.quake.mdl

Read Quake model in MDL format.
read.quake.md2

Read Quake II model in MD2 format.