class WAD::Pnames

Overview

Includes all the names for wall patches.

Included Modules

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module WritingAdditions::Pnames

write(file : String | Path) : UInt32
write(io : IO) : UInt32
write

Constructor Detail

def self.parse(filename : String | Path) : Pnames #

Parses a pnames file given the filename

Example: Opens a pnames file and parses it

my_pnames = WAD::Pnames.parse("Path/To/Pnames")

def self.parse(io : IO) : 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

Instance Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def num_patches : Int32 #

def num_patches=(num_patches : Int32) #

def patches : Array(String) #

def patches=(patches : Array(String)) #