Package net.mtrop.doom.texture
Class StrifeTextureList.Texture
java.lang.Object
net.mtrop.doom.texture.CommonTexture<StrifeTextureList.Texture.Patch>
net.mtrop.doom.texture.StrifeTextureList.Texture
- All Implemented Interfaces:
Comparable<CommonTexture<?>>
,Iterable<StrifeTextureList.Texture.Patch>
,BinaryObject
- Enclosing class:
- StrifeTextureList
public static class StrifeTextureList.Texture
extends CommonTexture<StrifeTextureList.Texture.Patch>
This class represents a single texture entry in a TEXTURE1/TEXTURE2 lump.
Strife Textures use Strife's texture representation.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Singular patch entry for a texture.Nested classes/interfaces inherited from interface net.mtrop.doom.object.BinaryObject
BinaryObject.InlineScanner<BO extends BinaryObject>, BinaryObject.Reflect, BinaryObject.Scanner<BO extends BinaryObject>, BinaryObject.Shared, BinaryObject.Transformer<BO extends BinaryObject>
-
Field Summary
Fields inherited from class net.mtrop.doom.texture.CommonTexture
height, name, patches, width
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new patch entry on this texture, at the end of the list.void
readBytes
(InputStream in) Reads from anInputStream
and sets this object's fields.void
writeBytes
(OutputStream out) Writes this object to anOutputStream
.Methods inherited from class net.mtrop.doom.texture.CommonTexture
compareTo, getHeight, getName, getPatch, getPatchCount, getWidth, iterator, removePatch, setHeight, setWidth, shiftPatch
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.mtrop.doom.object.BinaryObject
fromBytes, readFile, toBytes, writeFile, writeFile
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createPatch
Description copied from class:CommonTexture
Creates a new patch entry on this texture, at the end of the list. The patch has no information set on it, including its name index value and offsets.- Specified by:
createPatch
in classCommonTexture<StrifeTextureList.Texture.Patch>
- Returns:
- a newly-added Patch object.
-
readBytes
Description copied from interface:BinaryObject
Reads from anInputStream
and sets this object's fields. Only reads the amount of bytes that it takes to read a single instance of the object. Note that not every object may have a consistent length!- Parameters:
in
- theInputStream
to read from.- Throws:
IOException
- if a read error occurs.
-
writeBytes
Description copied from interface:BinaryObject
Writes this object to anOutputStream
.- Parameters:
out
- theOutputStream
to write to.- Throws:
IOException
- if a write error occurs.
-