Package net.mtrop.doom.texture
Class Animated.Entry
java.lang.Object
net.mtrop.doom.texture.Animated.Entry
- All Implemented Interfaces:
BinaryObject
- Enclosing class:
- Animated
Flat entry for ANIMATED.
-
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
Modifier and TypeFieldDescriptionprotected boolean
Allows decals.protected String
The first texture name.protected String
The last texture name.static final int
Length of a single entry in bytes.protected int
The amount of ticks between each frame.protected Animated.TextureType
Is this a texture entry? If not, it's a flat. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns if this texture allows decals on it, despite it being animated.int
getTicks()
getType()
boolean
Is this a texture entry?void
readBytes
(InputStream in) Reads from anInputStream
and sets this object's fields.toString()
void
writeBytes
(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: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!- Specified by:
readBytes
in interfaceBinaryObject
- Parameters:
in
- theInputStream
to read from.- Throws:
IOException
- if a read error occurs.
-
writeBytes
Description copied from interface:BinaryObject
Writes this object to anOutputStream
.- Specified by:
writeBytes
in interfaceBinaryObject
- Parameters:
out
- theOutputStream
to write to.- Throws:
IOException
- if a write error occurs.
-
toString
-