Class Texture

java.lang.Object
zombie.core.textures.Texture
All Implemented Interfaces:
java.io.Serializable, IDestroyable, IMaskerable, ITexture

public class Texture
extends java.lang.Object
implements IDestroyable, ITexture, java.io.Serializable
See Also:
Serialized Form
  • Field Details

    • autoCreateMask

      public static boolean autoCreateMask
    • BindCount

      public static int BindCount
    • renderQuadBatchCount

      public static int renderQuadBatchCount
    • startStack

      public static int startStack
    • bDoingQuad

      public static boolean bDoingQuad
    • lr

      public static float lr
    • lg

      public static float lg
    • lb

      public static float lb
    • la

      public static float la
    • lastlastTextureID

      public static int lastlastTextureID
    • totalTextureID

      public static int totalTextureID
    • flip

      public boolean flip
    • offsetX

      public float offsetX
    • offsetY

      public float offsetY
    • bindAlways

      public boolean bindAlways
    • xEnd

      public float xEnd
    • yEnd

      public float yEnd
    • xStart

      public float xStart
    • yStart

      public float yStart
    • dataid

      protected TextureID dataid
    • mask

      protected Mask mask
    • name

      protected java.lang.String name
    • solid

      protected boolean solid
    • width

      protected int width
    • height

      protected int height
    • heightOrig

      protected int heightOrig
    • widthOrig

      protected int widthOrig
    • lastTextureID

      public static int lastTextureID
    • WarnFailFindTexture

      public static boolean WarnFailFindTexture
    • bWallColors

      public static boolean bWallColors
  • Constructor Details

    • Texture

      public Texture​(TextureID data, java.lang.String name)
    • Texture

      public Texture​(java.awt.image.BufferedImage bImage, java.lang.String name)
    • Texture

      public Texture​(java.lang.String file)
    • Texture

      public Texture​(java.lang.String name, java.io.BufferedInputStream b, boolean bDoMask, Texture.PZFileformat format)
    • Texture

      public Texture​(java.lang.String name, java.io.BufferedInputStream b, boolean bDoMask)
    • Texture

      public Texture​(java.lang.String file, boolean bDelete, boolean bUseAlpha)
    • Texture

      public Texture​(java.lang.String name, java.lang.String palette)
    • Texture

      public Texture​(java.lang.String name, int[] palette)
    • Texture

      public Texture​(java.lang.String file, boolean useAlphaChannel)
    • Texture

      public Texture​(int width, int height, java.lang.String name)
    • Texture

      public Texture​(int width, int height)
    • Texture

      public Texture​(java.lang.String file, int red, int green, int blue)
    • Texture

      public Texture​(Texture t)
    • Texture

      public Texture()
  • Method Details

    • Load

      public void Load​(java.awt.image.BufferedImage image)
    • bindNone

      public static void bindNone()
    • clearTextures

      public static void clearTextures()
    • getSharedTexture

      public static Texture getSharedTexture​(java.lang.String name)
    • getSharedTexture

      public static Texture getSharedTexture​(java.lang.String name, boolean bDeleteData)
    • trygetTexture

      public static Texture trygetTexture​(java.lang.String name)
    • getSharedTexture

      public static Texture getSharedTexture​(java.lang.String name, java.lang.String palette)
    • getSharedTexture

      public static Texture getSharedTexture​(java.lang.String name, int[] palette, java.lang.String paletteName)
    • getTexture

      public static Texture getTexture​(java.lang.String name)
    • getSteamAvatar

      public static Texture getSteamAvatar​(long steamID)
    • steamAvatarChanged

      public static void steamAvatarChanged​(long steamID)
    • forgetTexture

      public static void forgetTexture​(java.lang.String name)
    • reload

      public static void reload​(java.lang.String name)
    • bind

      public void bind()
      Specified by:
      bind in interface ITexture
    • bind

      public void bind​(int unit)
      Specified by:
      bind in interface ITexture
    • bindstrip

      public void bindstrip​(float a, float r, float g, float b)
    • bindstrip

      public void bindstrip​(int unit, float a, float r, float g, float b)
    • copyMaskRegion

      public void copyMaskRegion​(Texture from, int x, int y, int width, int height)
    • createMask

      public void createMask()
    • createMask

      public void createMask​(boolean[] mask)
    • createMask

      public void createMask​(WrappedBuffer buf)
    • destroy

      public void destroy()
      Specified by:
      destroy in interface IDestroyable
    • equals

      public boolean equals​(Texture other)
    • getData

      public WrappedBuffer getData()
      Specified by:
      getData in interface ITexture
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface ITexture
    • getHeightHW

      public int getHeightHW()
      Specified by:
      getHeightHW in interface ITexture
    • getHeightOrig

      public int getHeightOrig()
    • getID

      public int getID()
      Specified by:
      getID in interface ITexture
    • getMask

      public Mask getMask()
      Specified by:
      getMask in interface IMaskerable
    • getName

      public java.lang.String getName()
    • getTextureId

      public TextureID getTextureId()
    • getUseAlphaChannel

      public boolean getUseAlphaChannel()
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface ITexture
    • getWidthHW

      public int getWidthHW()
      Specified by:
      getWidthHW in interface ITexture
    • getWidthOrig

      public int getWidthOrig()
    • getXEnd

      public float getXEnd()
      Specified by:
      getXEnd in interface ITexture
    • getXStart

      public float getXStart()
      Specified by:
      getXStart in interface ITexture
    • getYEnd

      public float getYEnd()
      Specified by:
      getYEnd in interface ITexture
    • getYStart

      public float getYStart()
      Specified by:
      getYStart in interface ITexture
    • getOffsetX

      public float getOffsetX()
    • getOffsetY

      public float getOffsetY()
    • isCollisionable

      public boolean isCollisionable()
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface IDestroyable
    • isSolid

      public boolean isSolid()
      Specified by:
      isSolid in interface ITexture
    • isValid

      public boolean isValid()
    • makeTransp

      public void makeTransp​(int red, int green, int blue)
      Specified by:
      makeTransp in interface ITexture
    • render

      public void render​(int x, int y, int width, int height)
    • render

      public void render​(int x, int y)
    • render

      public void render​(int x, int y, int width, int height, float r, float g, float b, float a)
    • rendershader

      public void rendershader​(int x, int y, int width, int height, float r, float g, float b, float a)
    • rendershader2

      public void rendershader2​(int x, int y, int width, int height, int texx, int texy, int texWidth, int texHeight, float r, float g, float b, float a)
    • renderdiamond

      public void renderdiamond​(int x, int y, int width, int height, float u, float d, float l, float r, float a)
    • renderdiamond

      public void renderdiamond​(int x, int y, int width, int height, float ru, float gu, float bu, float au, float rd, float gd, float bd, float ad, float rl, float gl, float bl, float al, float rr, float gr, float br, float ar)
    • renderdiamond

      public void renderdiamond​(int x, int y, int width, int height, int u, int d, int l, int r)
    • renderwallw

      public void renderwallw​(int x, int y, int width, int height, float ru, float gu, float bu, float au, float rd, float gd, float bd, float ad, float ru2, float gu2, float bu2, float au2, float rd2, float gd2, float bd2, float ad2)
    • renderwallw

      public void renderwallw​(int x, int y, int width, int height, int u, int d, int u2, int d2)
    • renderwallnw

      public void renderwallnw​(int x, int y, int width, int height, int u, int d, int u2, int d2, int r, int r2)
    • renderroofw

      public void renderroofw​(int x, int y, int width, int height, float ru, float gu, float bu, float au, float rd, float gd, float bd, float ad, float ru2, float gu2, float bu2, float au2, float rd2, float gd2, float bd2, float ad2)
    • renderwalln

      public void renderwalln​(int x, int y, int width, int height, float ru, float gu, float bu, float au, float rd, float gd, float bd, float ad, float ru2, float gu2, float bu2, float au2, float rd2, float gd2, float bd2, float ad2)
    • renderwalln

      public void renderwalln​(int x, int y, int width, int height, int u, int d, int u2, int d2)
    • renderwallncutoff

      public void renderwallncutoff​(int x, int y, int width, int height)
    • renderstrip

      public void renderstrip​(int x, int y, int width, int height, float r, float g, float b, float a)
    • setAlphaForeach

      public void setAlphaForeach​(int red, int green, int blue, int alpha)
      Specified by:
      setAlphaForeach in interface ITexture
    • setCustomizedTexture

      public void setCustomizedTexture()
    • setData

      public void setData​(java.nio.ByteBuffer data)
      Specified by:
      setData in interface ITexture
    • setMask

      public void setMask​(Mask mask)
      Specified by:
      setMask in interface ITexture
    • setName

      public void setName​(java.lang.String name)
    • setRegion

      public void setRegion​(int x, int y, int width, int height)
      Specified by:
      setRegion in interface ITexture
    • setUseAlphaChannel

      public void setUseAlphaChannel​(boolean value)
    • splitIcon

      public Texture splitIcon()
    • split

      public Texture split​(int xOffset, int yOffset, int width, int height)
    • split

      public Texture[] split​(int xOffset, int yOffset, int row, int coloumn, int width, int height, int spaceX, int spaceY)
    • split2D

      public Texture[][] split2D​(int[] xstep, int[] ystep)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • saveMask

      public void saveMask​(java.lang.String name)
    • loadMaskRegion

      public void loadMaskRegion​(java.nio.ByteBuffer cache)
    • saveMaskRegion

      public void saveMaskRegion​(java.nio.ByteBuffer cache)
    • setWidth

      public void setWidth​(int width)
    • setHeight

      public void setHeight​(int height)
    • getRealWidth

      public int getRealWidth()
    • setRealWidth

      public void setRealWidth​(int realWidth)
    • getRealHeight

      public int getRealHeight()
    • setRealHeight

      public void setRealHeight​(int realHeight)
    • setOffsetX

      public void setOffsetX​(int offset)
    • setOffsetY

      public void setOffsetY​(int offset)