module

WritingAdditions::Demo

A doom demo which saves player input states

Instance methods

write(file : String | Path) : UInt32

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

Writes a demo in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
my_wad.demos["MyDemo"].write("Path/To/demo.lmp")
write(io : IO) : UInt32

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

Writes a demo in my_wad to a file:

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