struct

WAD::Directory

Inherits Struct < Value < Object

A directory which points to a start of a lump with its size and name

Constants

SIZE = 16

Constructors

new
read(io : IO, file_offset : UInt32 = 0) : Directory

Read an io from the WAD and convert it into a Directory.

Reads a directory from a WAD file with directory_start and Directory::SIZE:

file.read_at(directory_start, Directory::SIZE) do |io|
  directory = Directory.read(io)
end

NOTE: file_offset is used when the start of the WAD is offset in a file

Instance methods

clone

Returns a copy of self with all instance variables cloned.

file_pos

An integer holding a pointer to the start of the lump's data in the file.

file_pos=(file_pos : UInt32)

An integer holding a pointer to the start of the lump's data in the file.

initialize
name

An ASCII string defining the lump's name.

name=(name : String)

An ASCII string defining the lump's name.

size

An integer representing the size of the lump in bytes.

size=(size : UInt32)

An integer representing the size of the lump in bytes.