module

WritingAdditions::Graphic

A WAD graphic

Instance methods

write(file : String | Path) : UInt32

Writes a graphic given an output io and returns the size of the written lump

Writes a graphic in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
my_wad.graphic["MyGraphic"].write("Path/To/Graphic.lmp")
write(io : IO) : UInt32

Writes a graphic given an output io and returns the size of the written lump

Writes a graphic in my_wad to a file:

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