Vertex

From DoomWiki.org

(Redirected from Vertices)
Doom level format

Source Port Extensions:

A vertex is a location on the map. Vertices are referenced by linedefs and segs for their start-point and end-point.

The vertices for a map are stored in the VERTEXES lump, which consists of a raw sequence of x, y coordinates as pairs of 16-bit signed integers, where the value of either coordinate ranges from -32768 to +32767, due to the 16-bit signed two's complement format. The bytes are in little-endian order (least significant byte first).

Vertex structure[edit]

Offset Size (bytes) C99 type Description
0 2 int16_t x position
2 2 int16_t y position

Lump size[edit]

The number of vertices displayed in an editing utility is less than the size of the VERTEXES lump in bits divided by 32. This is because the node builder generates additional vertices, which are required for all segs to have endpoints, and are concealed by nearly all mapping utilities.

PlayStation / Doom 64 format[edit]

Midway's ports of Doom to the Sony PlayStation, as well as Doom 64 for the Nintendo 64, feature additional precision by storing vertex coordinates as fixed_t (32-bit integers where 16 bits are used for the integral part and 16 for the fractional part). The range is therefore the same as in the original format, but fractional coordinates are possible.

Offset Size (bytes) C99 type Description
0 4 int32_t x position
4 4 int32_t y position

Sources[edit]