struct WritingAdditions::Map::Sector

Overview

Structure of a sector.

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, sectors : Array(::WAD::Map::Sector)) : ::WAD::Directory #

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

Writes sectors in my_wad to a file:

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

def self.write(io : IO, sectors : Array(::WAD::Map::Sector)) : ::WAD::Directory #

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

Writes sectors in my_wad to a file:

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

Instance Method Detail

def initialize #