class WAD::Map::Blockmap

Overview

Class of a blockmap.

Included Modules

Defined in:

wa-cr/wad/wad-data/map.cr
write.cr

Constructors

Instance Method Summary

Instance methods inherited from module WritingAdditions::Map::Blockmap

write(file : String | Path) : ::WAD::Directory
write(io : IO) : ::WAD::Directory
write

Constructor Detail

def self.parse(io : IO, lump_size : Int) : Blockmap #

Parses a blockmap list given the io and the size

Opens a blockmap lump and parses it:

File.open("Path/To/Blockmap") do |file|
  my_blockmap = WAD::Map::Blockmap.parse(file, file.size)
end

Instance Method Detail

def blocklists : Array(Blocklist) #

def blocklists=(blocklists : Array(Blocklist)) #

def clone #

Returns a copy of self with all instance variables cloned.


def header : Header #

def header=(header : Header) #

def num_of_blocks #

There are N blocks, which is equal to columns × rows (from the header).


def offsets : Array(Int16) #

def offsets=(offsets : Array(Int16)) #