struct

WritingAdditions::Map::Seg

Inherits Struct < Value < Object

Structure of a seg.

Constructors

new

Class methods

write(file : String | Path, segs : Array(::WAD::Map::Seg)) : ::WAD::Directory

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

Writes segs in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
WAD::Map::Seg.write("Path/To/segs.lmp", my_wad.maps["MyMap"].segs)
write(io : IO, segs : Array(::WAD::Map::Seg)) : ::WAD::Directory

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

Writes segs in my_wad to a file:

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

Instance methods

initialize