struct WAD::Directory

Overview

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

Defined in:

wa-cr/wad/wad-data/directory.cr

Constant Summary

SIZE = 16

Constructors

Instance Method Summary

Constructor Detail

def self.new #

def self.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 Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def file_pos : UInt32 #

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


def file_pos=(file_pos : UInt32) #

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


def initialize #

def name : String #

An ASCII string defining the lump's name.


def name=(name : String) #

An ASCII string defining the lump's name.


def size : UInt32 #

An integer representing the size of the lump in bytes.


def size=(size : UInt32) #

An integer representing the size of the lump in bytes.