class WAD::Pnames
- WAD::Pnames
- Reference
- Object
Overview
Includes all the names for wall patches.
Included Modules
Defined in:
wa-cr/wad/wad-data/texture.crwrite.cr
Constructors
-
.parse(filename : String | Path) : Pnames
Parses a pnames file given the filename
-
.parse(io : IO) : Pnames
Parses a pnames file given the io
Class Method Summary
-
.is_pnames?(name : String)
Checks to see if name is "PNAMES"
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned. - #num_patches : Int32
- #num_patches=(num_patches : Int32)
- #patches : Array(String)
- #patches=(patches : Array(String))
Instance methods inherited from module WritingAdditions::Pnames
write(file : String | Path) : UInt32write(io : IO) : UInt32 write
Constructor Detail
Parses a pnames file given the filename
Example: Opens a pnames file and parses it
my_pnames = WAD::Pnames.parse("Path/To/Pnames")
Parses a pnames file given the io
Example: Opens a pnames io and parses it
File.open("Path/To/Pnames") do |file|
my_pnames = WAD::Pnames.parse(file)
end
Class Method Detail
def self.is_pnames?(name : String)
#
Checks to see if name is "PNAMES"
Example: Returns true if the name is a pnames
pnames_name = "PNAMES"
if WAD::Pnames.is_pnames?(pnames_name)
puts "Is a Pnames"
else
puts "Is not a Pnames"
end