Class StrifeTextureList
java.lang.Object
net.mtrop.doom.texture.CommonTextureList<StrifeTextureList.Texture>
net.mtrop.doom.texture.StrifeTextureList
- All Implemented Interfaces:
Iterable<StrifeTextureList.Texture>,BinaryObject,Sizable
public class StrifeTextureList
extends CommonTextureList<StrifeTextureList.Texture>
implements BinaryObject
This is the lump that contains a collection of Strife-formatted textures.
All textures are stored in here, usually named TEXTURE1 or TEXTURE2 in the WAD.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents a single texture entry in a TEXTURE1/TEXTURE2 lump.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> -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TextureList with a default starting capacity.StrifeTextureList(int capacity) Creates a new TextureList with a specific starting capacity. -
Method Summary
Modifier and TypeMethodDescriptioncreateTexture(String texture) Creates a new texture in this list with no patches, at the end of the list.voidreadBytes(InputStream in) Reads from anInputStreamand sets this object's fields.Methods inherited from class net.mtrop.doom.texture.CommonTextureList
addCreatedTexture, clear, getTextureByIndex, getTextureByName, indexOf, isEmpty, iterator, remove, removeIndex, size, sort, sort, writeBytesMethods 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, writeBytes, writeFile, writeFileMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
StrifeTextureList
public StrifeTextureList()Creates a new TextureList with a default starting capacity. -
StrifeTextureList
public StrifeTextureList(int capacity) Creates a new TextureList with a specific starting capacity.- Parameters:
capacity- the starting capacity.
-
-
Method Details
-
createTexture
Description copied from class:CommonTextureListCreates a new texture in this list with no patches, at the end of the list.- Specified by:
createTexturein classCommonTextureList<StrifeTextureList.Texture>- Parameters:
texture- the name of the texture.- Returns:
- a new, empty texture object added to this list.
- See Also:
-
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!- Specified by:
readBytesin interfaceBinaryObject- Parameters:
in- theInputStreamto read from.- Throws:
IOException- if a read error occurs.
-