class WAD::TextureX

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.cr
write.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module WritingAdditions::TextureX

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

Constructor Detail

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

Parses a texture map file given the filename

Opens a texture map file and parses it:

my_texturemap = WAD::TextureX.parse("Path/To/TextureMap")

def self.parse(io : IO) : TextureX #

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

Instance Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def mtextures : Array(TextureMap) #

def mtextures=(mtextures : Array(TextureMap)) #

def numtextures : Int32 #

def numtextures=(numtextures : Int32) #

def offsets : Array(Int32) #

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