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
Nested ClassesModifier and TypeClassDescriptionstatic classSingular 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.voidreadBytes(InputStream in) Reads from anInputStreamand sets this object's fields.voidwriteBytes(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, shiftPatchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.mtrop.doom.object.BinaryObject
fromBytes, readFile, toBytes, writeFile, writeFileMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createPatch
Description copied from class:CommonTextureCreates 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:
createPatchin classCommonTexture<StrifeTextureList.Texture.Patch>- Returns:
- a newly-added Patch object.
-
readBytes
Description copied from interface:BinaryObjectReads from anInputStreamand 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- theInputStreamto read from.- Throws:
IOException- if a read error occurs.
-
writeBytes
Description copied from interface:BinaryObjectWrites this object to anOutputStream.- Parameters:
out- theOutputStreamto write to.- Throws:
IOException- if a write error occurs.
-