struct WritingAdditions::Map::Seg

Overview

Structure of a seg.

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, 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)

def self.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 Method Detail

def initialize #