Class Animated.Entry

java.lang.Object
net.mtrop.doom.texture.Animated.Entry
All Implemented Interfaces:
BinaryObject
Enclosing class:
Animated

public static class Animated.Entry extends Object implements BinaryObject
Flat entry for ANIMATED.
  • Field Details

    • LENGTH

      public static final int LENGTH
      Length of a single entry in bytes.
      See Also:
    • type

      protected Animated.TextureType type
      Is this a texture entry? If not, it's a flat.
    • lastName

      protected String lastName
      The last texture name.
    • firstName

      protected String firstName
      The first texture name.
    • allowsDecals

      protected boolean allowsDecals
      Allows decals.
    • ticks

      protected int ticks
      The 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

      public Animated.TextureType 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

      public String getLastName()
      Returns:
      the last texture/flat name in the animation sequence.
    • getFirstName

      public String getFirstName()
      Returns:
      the first texture/flat name in the animation sequence.
    • getTicks

      public int getTicks()
      Returns:
      the amount of ticks between each frame.
    • readBytes

      public void readBytes(InputStream in) throws IOException
      Description copied from interface: BinaryObject
      Reads from an InputStream 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 interface BinaryObject
      Parameters:
      in - the InputStream to read from.
      Throws:
      IOException - if a read error occurs.
    • writeBytes

      public void writeBytes(OutputStream out) throws IOException
      Description copied from interface: BinaryObject
      Writes this object to an OutputStream.
      Specified by:
      writeBytes in interface BinaryObject
      Parameters:
      out - the OutputStream to write to.
      Throws:
      IOException - if a write error occurs.
    • toString

      public String toString()
      Overrides:
      toString in class Object