FANDOM


m (clean up)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Linedef]]s are connected to '''vertices''', which are nothing more than coordinates in the map.
+
'''Vertices''' are nothing more than coordinates on the map. [[Linedefs]] and [[seg]]s reference vertices for their start-point and end-point.
   
The vertices for a map are stored in the <tt>VERTEXES</tt> [[lump]], which consists of a raw sequence of x, y coordinates as pairs of 16-bit signed integers. The bytes are in little-endian order (least significant byte first).
+
The vertices for a map are stored in the <tt>VERTEXES</tt> [[lump]], which consists of a raw sequence of x, y coordinates as pairs of 16-bit signed integers. The bytes are in [[Wikipedia:Endianness|little-endian]] order (least significant byte first).
   
Due to the 16-bit signed format, each coordinate can range from -32768 to +32767.
+
Due to the 16-bit signed [[Wikipedia:Two's complement|two's complement]] format, each coordinate can range from -32768 to +32767.
  +
  +
==Vertex structure==
  +
{| class="WikiaTable"
  +
! Offset
  +
! Size (bytes)
  +
! Description
  +
|-
  +
| align="center" | 0
  +
| align="center" | 2
  +
| ''x'' position
  +
|-
  +
| align="center" | 2
  +
| align="center" | 2
  +
| ''y'' position
  +
|}
  +
  +
===Doom 64 EX format===
  +
[[Doom 64 EX]] stores even 32 bit = 4 byte integers per direction, so each vertex uses 8 bytes. [[Doom Builder 64]] reads them as long integer and divides them by 65536; internally it uses float values.
  +
  +
{{Doom level format}}
   
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]
  +
[[Category:WAD lumps]]

Latest revision as of 05:05, August 23, 2019

Vertices are nothing more than coordinates on the map. Linedefs and segs reference vertices 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. The bytes are in little-endian order (least significant byte first).

Due to the 16-bit signed two's complement format, each coordinate can range from -32768 to +32767.

Vertex structureEdit

Offset Size (bytes) Description
0 2 x position
2 2 y position

Doom 64 EX formatEdit

Doom 64 EX stores even 32 bit = 4 byte integers per direction, so each vertex uses 8 bytes. Doom Builder 64 reads them as long integer and divides them by 65536; internally it uses float values.

Community content is available under CC-BY-SA unless otherwise noted.