Format:WAL (Quake II)
| Developer | id Software |
|---|---|
| Magic | none |
| Extensions | .wal |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Paletted texture of Quake II (.wal, under textures/): a 100-byte header with a 32-byte name, width, height, four mip-level offsets, an animation-chain name and three surface fields, with no magic.
Wall texture of Software:Quake II. Format:BSP (Quake II) texinfo records name a texture such as e1u1/floor1_3, and the engine loads textures/<name>.wal.
Structure
miptex_t: char name[32]; unsigned width, height; unsigned offsets[4]; char animname[32]; int flags; int contents; int value; (32 + 8 + 16 + 32 + 12 = 100 bytes). offsets are from the start of the file to four mip levels of 8-bit palette indices (level 0 is width x height, each next level halves both). The palette is not in the file: it is the shared colormap (pics/colormap.pcx, Unverified: path from engine code not read here). animname names the next texture of an animation chain (empty if none); flags, contents and value repeat the surface and content flags of the BSP texinfo (see the Flags section of the BSP page).
Code & repositories
- https://github.com/id-Software/Quake-2 @
372afde46e7defc9dd2d719a1732b8ace1fa096e· license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize a license file)
GPL release of the Quake II source; qcommon/qfiles.h defines PAK, PCX, MD2, SP2, WAL and BSP structures.
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2023-12-05
Pitfalls
- There is no magic or version; identify by extension and by checking that
offsets[0]is 100 and the file size equals the sum of the mip sizes after it (Unverified: typical layout, not checked against retail files). - Quake 1's miptex in Format:BSP (Quake) and Format:WAD2 (Quake) has a 16-byte name and no animname or flags.
Evidence & references
- id-Software/Quake-2
qcommon/qfiles.h,miptex_s,MIPLEVELS4, at commit 372afde (GPL-2.0).