Package zombie.core.textures
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Texture.PZFileformat
-
Field Summary
Fields Modifier and Type Field Description static boolean
autoCreateMask
static boolean
bDoingQuad
static int
BindCount
static boolean
bWallColors
protected TextureID
dataid
boolean
flip
protected int
height
protected int
heightOrig
static float
la
static int
lastlastTextureID
static int
lastTextureID
static float
lb
static float
lg
static float
lr
protected Mask
mask
protected java.lang.String
name
float
offsetX
float
offsetY
static int
renderQuadBatchCount
protected boolean
solid
static int
startStack
static int
totalTextureID
static boolean
WarnFailFindTexture
protected int
width
protected int
widthOrig
float
xEnd
float
xStart
float
yEnd
float
yStart
-
Constructor Summary
Constructors Constructor Description Texture()
Texture(int width, int height)
Texture(int width, int height, java.lang.String name)
Texture(java.awt.image.BufferedImage bImage, java.lang.String name)
Texture(java.lang.String file)
Texture(java.lang.String file, boolean useAlphaChannel)
Texture(java.lang.String file, boolean bDelete, boolean bUseAlpha)
Texture(java.lang.String name, int[] palette)
Texture(java.lang.String file, int red, int green, int blue)
Texture(java.lang.String name, java.io.BufferedInputStream b, boolean bDoMask)
Texture(java.lang.String name, java.io.BufferedInputStream b, boolean bDoMask, Texture.PZFileformat format)
Texture(java.lang.String name, java.lang.String palette)
Texture(Texture t)
Texture(TextureID data, java.lang.String name)
-
Method Summary
Modifier and Type Method Description void
bind()
void
bind(int unit)
static void
bindNone()
void
bindstrip(float a, float r, float g, float b)
void
bindstrip(int unit, float a, float r, float g, float b)
static void
clearTextures()
void
copyMaskRegion(Texture from, int x, int y, int width, int height)
void
createMask()
void
createMask(boolean[] mask)
void
createMask(WrappedBuffer buf)
void
destroy()
boolean
equals(Texture other)
static void
forgetTexture(java.lang.String name)
WrappedBuffer
getData()
int
getHeight()
int
getHeightHW()
int
getHeightOrig()
int
getID()
Mask
getMask()
java.lang.String
getName()
float
getOffsetX()
float
getOffsetY()
int
getRealHeight()
int
getRealWidth()
static Texture
getSharedTexture(java.lang.String name)
static Texture
getSharedTexture(java.lang.String name, boolean bDeleteData)
static Texture
getSharedTexture(java.lang.String name, int[] palette, java.lang.String paletteName)
static Texture
getSharedTexture(java.lang.String name, java.lang.String palette)
static Texture
getSteamAvatar(long steamID)
static Texture
getTexture(java.lang.String name)
TextureID
getTextureId()
boolean
getUseAlphaChannel()
int
getWidth()
int
getWidthHW()
int
getWidthOrig()
float
getXEnd()
float
getXStart()
float
getYEnd()
float
getYStart()
boolean
isCollisionable()
boolean
isDestroyed()
boolean
isSolid()
boolean
isValid()
void
Load(java.awt.image.BufferedImage image)
void
loadMaskRegion(java.nio.ByteBuffer cache)
void
makeTransp(int red, int green, int blue)
void
render(int x, int y)
void
render(int x, int y, int width, int height)
void
render(int x, int y, int width, int height, float r, float g, float b, float a)
void
renderdiamond(int x, int y, int width, int height, float u, float d, float l, float r, float a)
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)
void
renderdiamond(int x, int y, int width, int height, int u, int d, int l, int r)
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)
void
rendershader(int x, int y, int width, int height, float r, float g, float b, float a)
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)
void
renderstrip(int x, int y, int width, int height, float r, float g, float b, float a)
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)
void
renderwalln(int x, int y, int width, int height, int u, int d, int u2, int d2)
void
renderwallncutoff(int x, int y, int width, int height)
void
renderwallnw(int x, int y, int width, int height, int u, int d, int u2, int d2, int r, int r2)
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)
void
renderwallw(int x, int y, int width, int height, int u, int d, int u2, int d2)
void
saveMask(java.lang.String name)
void
saveMaskRegion(java.nio.ByteBuffer cache)
void
setAlphaForeach(int red, int green, int blue, int alpha)
void
setCustomizedTexture()
void
setData(java.nio.ByteBuffer data)
void
setHeight(int height)
void
setMask(Mask mask)
void
setName(java.lang.String name)
void
setOffsetX(int offset)
void
setOffsetY(int offset)
void
setRealHeight(int realHeight)
void
setRealWidth(int realWidth)
void
setRegion(int x, int y, int width, int height)
void
setUseAlphaChannel(boolean value)
void
setWidth(int width)
Texture
split(int xOffset, int yOffset, int width, int height)
Texture[]
split(int xOffset, int yOffset, int row, int coloumn, int width, int height, int spaceX, int spaceY)
Texture[][]
split2D(int[] xstep, int[] ystep)
Texture
splitIcon()
static void
steamAvatarChanged(long steamID)
java.lang.String
toString()
static Texture
trygetTexture(java.lang.String name)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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 -
xEnd
public float xEnd -
yEnd
public float yEnd -
xStart
public float xStart -
yStart
public float yStart -
dataid
-
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
-
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
-
Texture
public Texture()
-
-
Method Details
-
Load
public void Load(java.awt.image.BufferedImage image) -
bindNone
public static void bindNone() -
clearTextures
public static void clearTextures() -
trygetTexture
-
getTexture
-
getSteamAvatar
-
steamAvatarChanged
public static void steamAvatarChanged(long steamID) -
forgetTexture
public static void forgetTexture(java.lang.String name) -
bind
public void bind() -
bind
public void bind(int unit) -
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
-
createMask
public void createMask() -
createMask
public void createMask(boolean[] mask) -
createMask
-
destroy
public void destroy()- Specified by:
destroy
in interfaceIDestroyable
-
equals
-
getData
-
getHeight
public int getHeight() -
getHeightHW
public int getHeightHW()- Specified by:
getHeightHW
in interfaceITexture
-
getHeightOrig
public int getHeightOrig() -
getID
public int getID() -
getMask
- Specified by:
getMask
in interfaceIMaskerable
-
getName
public java.lang.String getName() -
getTextureId
-
getUseAlphaChannel
public boolean getUseAlphaChannel() -
getWidth
public int getWidth() -
getWidthHW
public int getWidthHW()- Specified by:
getWidthHW
in interfaceITexture
-
getWidthOrig
public int getWidthOrig() -
getXEnd
public float getXEnd() -
getXStart
public float getXStart() -
getYEnd
public float getYEnd() -
getYStart
public float getYStart() -
getOffsetX
public float getOffsetX() -
getOffsetY
public float getOffsetY() -
isCollisionable
public boolean isCollisionable() -
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceIDestroyable
-
isSolid
public boolean isSolid() -
isValid
public boolean isValid() -
makeTransp
public void makeTransp(int red, int green, int blue)- Specified by:
makeTransp
in interfaceITexture
-
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 interfaceITexture
-
setCustomizedTexture
public void setCustomizedTexture() -
setData
public void setData(java.nio.ByteBuffer data) -
setMask
-
setName
public void setName(java.lang.String name) -
setRegion
public void setRegion(int x, int y, int width, int height) -
setUseAlphaChannel
public void setUseAlphaChannel(boolean value) -
splitIcon
-
split
-
split
public Texture[] split(int xOffset, int yOffset, int row, int coloumn, int width, int height, int spaceX, int spaceY) -
split2D
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.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)
-