module

WritingAdditions::Map

Map containing all directories of data lumps.

Instance methods

write(file : String | Path) : Array(::WAD::Directory)

Writes a map given an output io and returns the directories of the written lumps

Writes a map in my_wad to a file:

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

Writes a map given an output io and returns the directories of the written lumps

Writes a map in my_wad to a file:

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

Nested types