struct WritingAdditions::Map::Linedef

Overview

Structure of a linedef.

Defined in:

write/write_map.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

Class Method Detail

def self.write(file : String | Path, linedefs : Array(::WAD::Map::Linedef)) : ::WAD::Directory #

Writes a list of linedefs given an output io and the linedefs to write and returns the written directory

Writes linedefs in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
WAD::Map::Linedef.write("Path/To/linedefs.lmp", my_wad.maps["MyMap"].linedefs)

def self.write(io : IO, linedefs : Array(::WAD::Map::Linedef)) : ::WAD::Directory #

Writes a list of linedefs given an output io and the linedefs to write and returns the written directory

Writes linedefs in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
File.open("Path/To/linedefs.lmp", "w+") do |file|
  WAD::Map::Linedef.write(my_wad.maps["MyMap"].linedefs)
end

Instance Method Detail

def initialize #