From ZDoom Wiki
Jump to navigation Jump to search

PNAMES is a lump which corresponds with TEXTUREx lumps to define a texture. Patch entries in TEXTUREx entries point to a PNAMES entry by a zero-based index number.

Vanilla Doom only loads one PNAMES, one TEXTURE1 and one TEXTURE2 lumps. ZDoom allows cumulative loading; however only one PNAMES lump per archive will be read. Each TEXTUREx lump will refer to the latest PNAMES lump in the same archive, or an archive loaded previously in the loading order. (So for example, loading a single archive containing only a PNAMES lump will not affect the IWAD textures, although it would in a port keeping the vanilla model of texture loading.)


The lump starts with an integer header declaring the number of patches that follow. Each patch is simply declared as a string of eight characters. Shorter names are zero-terminated. The total lump size is therefore equal to (num_patches * 8) + 4.

Bytes Data type Description
0-3 Unsigned 32-bit integer Number of entries
Bytes Data type Description
x+0-x+8 Char[8] Patch name

Beware that certain tools not written in a MiniWikipediaLogoIcon.pngC family of computer languages, such as XWE, do not understand MiniWikipediaLogoIcon.pngnull-termination and can corrupt the PNAMES lump if there are garbage characters after the null byte, as could happen (and be normally allowed by Doom) with tools written in a C-style language such as SLumpEd.

For this reason, it is advised to make sure that all bytes not used for a short patch name be nulled. Modern editors, such as SLADE 3, make sure to avoid the problem.

See also