class WAD::TextureX
- WAD::TextureX
- Reference
- Object
Overview
Defines how wall patches from the WAD file should combine to form wall textures.
Included Modules
Defined in:
wa-cr/wad/wad-data/texture.crwrite.cr
Constructors
-
.parse(filename : String | Path) : TextureX
Parses a texture map file given the filename
-
.parse(io : IO) : TextureX
Parses a texture map file given the io
Class Method Summary
-
.is_texturex?(name : String)
Checks to see if name is "TEXTUREx"
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned. - #mtextures : Array(TextureMap)
- #mtextures=(mtextures : Array(TextureMap))
- #numtextures : Int32
- #numtextures=(numtextures : Int32)
- #offsets : Array(Int32)
- #offsets=(offsets : Array(Int32))
Instance methods inherited from module WritingAdditions::TextureX
write(file : String | Path) : UInt32write(io : IO) : UInt32 write
Constructor Detail
Parses a texture map file given the filename
Opens a texture map file and parses it:
my_texturemap = WAD::TextureX.parse("Path/To/TextureMap")
Parses a texture map file given the io
Opens a texture map io and parses it:
File.open("Path/To/TextureMap") do |file|
my_texturemap = WAD::TextureX.parse(file)
end
Class Method Detail
def self.is_texturex?(name : String)
#
Checks to see if name is "TEXTUREx"
Returns true if the name is a texture map:
texturemap_name = "TEXTURE1"
if WAD::TextureX.is_texturex?(texturemap_name)
puts "Is a Texture Map"
else
puts "Is not a Texture Map"
end