struct WAD::Map::Seg

Overview

Structure of a seg.

Defined in:

wa-cr/wad/wad-data/map.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

Class Method Detail

def self.parse(io : IO, lump_size : Int) : Array(Seg) #

Parses a segs list given the io and the size

Opens a segs lump and parses it:

File.open("Path/To/Seg") do |file|
  my_segs = WAD::Map::Seg.parse(file, file.size)
end

def self.parse(filename : String | Path) : Array(Seg) #

Parses a segs list given the filename

Opens a segs lump and parses it:

my_segs = WAD::Map::Seg.parse("Path/To/Seg")

Instance Method Detail

def angle : Int16 #

Angle, full circle is -32768 to 32767.


def angle=(angle : Int16) #

Angle, full circle is -32768 to 32767.


def clone #

Returns a copy of self with all instance variables cloned.


def direction : Int16 #

Direction, 0 (same as linedef) or 1 (opposite of linedef).


def direction=(direction : Int16) #

Direction, 0 (same as linedef) or 1 (opposite of linedef).


def end_vertex_num : Int16 #

def end_vertex_num=(end_vertex_num : Int16) #

def initialize #

def linedef_num : Int16 #

def linedef_num=(linedef_num : Int16) #

def offset : Int16 #

Offset, distance along linedef to start of seg.


def offset=(offset : Int16) #

Offset, distance along linedef to start of seg.


def start_vertex_num : Int16 #

def start_vertex_num=(start_vertex_num : Int16) #