Class Animated.Entry
java.lang.Object
net.mtrop.doom.texture.Animated.Entry
- All Implemented Interfaces:
 BinaryObject
- Enclosing class:
 Animated
Flat entry for ANIMATED.
- Author:
 - Matthew Tropiano
 
- 
Nested Class Summary
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
FieldsModifier and TypeFieldDescriptionprotected booleanAllows decals.protected StringThe first texture name.protected StringThe last texture name.static final intLength of a single entry in bytes.protected intThe amount of ticks between each frame.protected Animated.TextureTypeIs this a texture entry? If not, it's a flat. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if this texture allows decals on it, despite it being animated.intgetTicks()getType()booleanIs this a texture entry?voidreadBytes(InputStream in) Reads from anInputStreamand sets this object's fields.toString()voidwriteBytes(OutputStream out) Writes this object to anOutputStream. 
- 
Field Details
- 
LENGTH
public static final int LENGTHLength of a single entry in bytes.- See Also:
 
 - 
type
Is this a texture entry? If not, it's a flat. - 
lastName
The last texture name. - 
firstName
The first texture name. - 
allowsDecals
protected boolean allowsDecalsAllows decals. - 
ticks
protected int ticksThe amount of ticks between each frame. 
 - 
 - 
Method Details
- 
isTexture
public boolean isTexture()Is this a texture entry?- Returns:
 - true if it is, false if not (it's a flat, then).
 
 - 
getType
- Returns:
 - the texture type of the entry (for FLAT or TEXTURE? null if terminal entry).
 
 - 
getAllowsDecals
public boolean getAllowsDecals()Returns if this texture allows decals on it, despite it being animated.- Returns:
 - true if so, false if not.
 
 - 
getLastName
- Returns:
 - the last texture/flat name in the animation sequence.
 
 - 
getFirstName
- Returns:
 - the first texture/flat name in the animation sequence.
 
 - 
getTicks
public int getTicks()- Returns:
 - the amount of ticks between each frame.
 
 - 
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.
 - 
writeBytes
Description copied from interface:BinaryObjectWrites this object to anOutputStream.- Specified by:
 writeBytesin interfaceBinaryObject- Parameters:
 out- theOutputStreamto write to.- Throws:
 IOException- if a write error occurs.
 - 
toString
 
 -