class WAD::Map::Blockmap
- WAD::Map::Blockmap
- Reference
- Object
Overview
Class of a blockmap.
Included Modules
Defined in:
wa-cr/wad/wad-data/map.crwrite.cr
Constructors
-
.parse(io : IO, lump_size : Int) : Blockmap
Parses a blockmap list given the io and the size
Instance Method Summary
- #blocklists : Array(Blocklist)
- #blocklists=(blocklists : Array(Blocklist))
-
#clone
Returns a copy of
self
with all instance variables cloned. - #header : Header
- #header=(header : Header)
-
#num_of_blocks
There are N blocks, which is equal to columns × rows (from the header).
- #offsets : Array(Int16)
- #offsets=(offsets : Array(Int16))
Instance methods inherited from module WritingAdditions::Map::Blockmap
write(file : String | Path) : ::WAD::Directorywrite(io : IO) : ::WAD::Directory write
Constructor Detail
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