module

WritingAdditions::Colormap

Writes out a colormap

Instance methods

write(file : String | Path) : UInt32

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

Writes a colormap in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
my_wad.colormap.write("Path/To/my_colormap.lmp")
write(io : IO) : UInt32

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

Writes a colormap in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
File.open("Path/To/colormap.lmp", "w+") do |file|
  my_wad.colormap.write(file)
end