struct WAD::Directory
- WAD::Directory
- Struct
- Value
- Object
Overview
A directory which points to a start of a lump with its size and name
Defined in:
wa-cr/wad/wad-data/directory.crConstant Summary
-
SIZE =
16
Constructors
- .new
-
.read(io : IO, file_offset : UInt32 = 0) : Directory
Read an io from the WAD and convert it into a Directory.
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned. -
#file_pos : UInt32
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 : String
An ASCII string defining the lump's name.
-
#name=(name : String)
An ASCII string defining the lump's name.
-
#size : UInt32
An integer representing the size of the lump in bytes.
-
#size=(size : UInt32)
An integer representing the size of the lump in bytes.
Constructor Detail
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 Method Detail
An integer holding a pointer to the start of the lump's data in the file.