MiniQuake

src/miniquake/wad.ml

Package
miniquake.wad
Reachable
Yes

Imports

Declarations

cleanupNameText

function cleanupNameText(input)

Implements the `cleanupNameText` operation for `miniquake.wad` (cleanup name text).

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `cleanupNameText`.

View source

CMP_LZSS

const CMP_LZSS = 1

Defines the cmp lzss value used by `miniquake.wad`.

View source

CMP_NONE

const CMP_NONE = 0

Defines the cmp none value used by `miniquake.wad`.

View source

find

function find(archive, name)

Implements the `find` operation for `miniquake.wad` (find).

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `find`.
namedynamic—Stable name that identifies the requested object or option.

View source

load

function load(filename)

Implements the `load` operation for `miniquake.wad` (load).

ParameterTypeDefaultDescription
filenamedynamic—Path of the file to process.

View source

parse

function parse(data, filename)

Existing idiomatic API retained for callers already ported to MiniLang.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
filenamedynamic—Path of the file to process.

View source

pictureDimensions

function pictureDimensions(archive, name)

Implements the `pictureDimensions` operation for `miniquake.wad` (picture dimensions).

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `pictureDimensions`.
namedynamic—Stable name that identifies the requested object or option.

View source

readLump

function readLump(archive, name)

Read and validate lump.

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `readLump`.
namedynamic—Stable name that identifies the requested object or option.

View source

SwapPic

function SwapPic(data, offset)

SwapPic performs the two LittleLong conversions from the original. The supported Windows x64 build is little-endian, but writing the decoded values back makes the operation explicit and keeps the observable in-place API.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset of the requested data.

View source

TYP_LABEL

const TYP_LABEL = 1

Defines the typ label value used by `miniquake.wad`.

View source

TYP_LUMPY

const TYP_LUMPY = 64

Defines the typ lumpy value used by `miniquake.wad`.

View source

TYP_MIPTEX

const TYP_MIPTEX = 68

Defines the typ miptex value used by `miniquake.wad`.

View source

TYP_NONE

const TYP_NONE = 0

Defines the typ none value used by `miniquake.wad`.

View source

TYP_PALETTE

const TYP_PALETTE = 64

Defines the typ palette value used by `miniquake.wad`.

View source

TYP_QPIC

const TYP_QPIC = 66

Defines the typ qpic value used by `miniquake.wad`.

View source

TYP_QTEX

const TYP_QTEX = 65

Defines the typ qtex value used by `miniquake.wad`.

View source

TYP_SOUND

const TYP_SOUND = 67

Defines the typ sound value used by `miniquake.wad`.

View source

W_CleanupName

function W_CleanupName(input)

W_CleanupName lowercases only ASCII A-Z, stops at the first NUL, truncates at 16 bytes, and NUL-pads the rest. Returning the fixed buffer preserves the exact lumpinfo_t name representation and is safe for in-place callers.

ParameterTypeDefaultDescription
inputdynamic—The input input consumed by `W_CleanupName`.

View source

W_GetLumpinfo

function W_GetLumpinfo(archive, name)

Mirror Quake's W_GetLumpinfo routine and its observable state changes.

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `W_GetLumpinfo`.
namedynamic—Stable name that identifies the requested object or option.

View source

W_GetLumpName

function W_GetLumpName(archive, name)

C returns an untyped pointer. MiniLang exposes the exact on-disk byte range instead; like the original this does not reject compressed lumps.

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `W_GetLumpName`.
namedynamic—Stable name that identifies the requested object or option.

View source

W_GetLumpNum

function W_GetLumpNum(archive, number)

Mirror Quake's W_GetLumpNum routine and its observable state changes.

ParameterTypeDefaultDescription
archivedynamic—The archive input consumed by `W_GetLumpNum`.
numberdynamic—The number input consumed by `W_GetLumpNum`.

View source

W_LoadWadData

function W_LoadWadData(data, filename)

Data-oriented counterpart used when gfx.wad came from a Quake search path (most retail installs keep it inside pak0.pak).

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
filenamedynamic—Path of the file to process.

View source

W_LoadWadFile

function W_LoadWadFile(filename)

Mirror Quake's W_LoadWadFile routine and its observable state changes.

ParameterTypeDefaultDescription
filenamedynamic—Path of the file to process.

View source

WAD_LUMPINFO_SIZE

const WAD_LUMPINFO_SIZE = 32

Defines the wad lumpinfo size value used by `miniquake.wad`.

View source

WAD_NAME_LENGTH

const WAD_NAME_LENGTH = 16

Defines the wad name length value used by `miniquake.wad`.

View source