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 classTexture.PZFileformat -
Field Summary
Fields Modifier and Type Field Description static booleanautoCreateMaskstatic booleanbDoingQuadbooleanbindAlwaysstatic intBindCountstatic booleanbWallColorsprotected TextureIDdataidbooleanflipprotected intheightprotected intheightOrigstatic floatlastatic intlastlastTextureIDstatic intlastTextureIDstatic floatlbstatic floatlgstatic floatlrprotected Maskmaskprotected java.lang.StringnamefloatoffsetXfloatoffsetYstatic intrenderQuadBatchCountprotected booleansolidstatic intstartStackstatic inttotalTextureIDstatic booleanWarnFailFindTextureprotected intwidthprotected intwidthOrigfloatxEndfloatxStartfloatyEndfloatyStart -
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 voidbind()voidbind(int unit)static voidbindNone()voidbindstrip(float a, float r, float g, float b)voidbindstrip(int unit, float a, float r, float g, float b)static voidclearTextures()voidcopyMaskRegion(Texture from, int x, int y, int width, int height)voidcreateMask()voidcreateMask(boolean[] mask)voidcreateMask(WrappedBuffer buf)voiddestroy()booleanequals(Texture other)static voidforgetTexture(java.lang.String name)WrappedBuffergetData()intgetHeight()intgetHeightHW()intgetHeightOrig()intgetID()MaskgetMask()java.lang.StringgetName()floatgetOffsetX()floatgetOffsetY()intgetRealHeight()intgetRealWidth()static TexturegetSharedTexture(java.lang.String name)static TexturegetSharedTexture(java.lang.String name, boolean bDeleteData)static TexturegetSharedTexture(java.lang.String name, int[] palette, java.lang.String paletteName)static TexturegetSharedTexture(java.lang.String name, java.lang.String palette)static TexturegetSteamAvatar(long steamID)static TexturegetTexture(java.lang.String name)TextureIDgetTextureId()booleangetUseAlphaChannel()intgetWidth()intgetWidthHW()intgetWidthOrig()floatgetXEnd()floatgetXStart()floatgetYEnd()floatgetYStart()booleanisCollisionable()booleanisDestroyed()booleanisSolid()booleanisValid()voidLoad(java.awt.image.BufferedImage image)voidloadMaskRegion(java.nio.ByteBuffer cache)voidmakeTransp(int red, int green, int blue)static voidreload(java.lang.String name)voidrender(int x, int y)voidrender(int x, int y, int width, int height)voidrender(int x, int y, int width, int height, float r, float g, float b, float a)voidrenderdiamond(int x, int y, int width, int height, float u, float d, float l, float r, float a)voidrenderdiamond(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)voidrenderdiamond(int x, int y, int width, int height, int u, int d, int l, int r)voidrenderroofw(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)voidrendershader(int x, int y, int width, int height, float r, float g, float b, float a)voidrendershader2(int x, int y, int width, int height, int texx, int texy, int texWidth, int texHeight, float r, float g, float b, float a)voidrenderstrip(int x, int y, int width, int height, float r, float g, float b, float a)voidrenderwalln(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)voidrenderwalln(int x, int y, int width, int height, int u, int d, int u2, int d2)voidrenderwallncutoff(int x, int y, int width, int height)voidrenderwallnw(int x, int y, int width, int height, int u, int d, int u2, int d2, int r, int r2)voidrenderwallw(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)voidrenderwallw(int x, int y, int width, int height, int u, int d, int u2, int d2)voidsaveMask(java.lang.String name)voidsaveMaskRegion(java.nio.ByteBuffer cache)voidsetAlphaForeach(int red, int green, int blue, int alpha)voidsetCustomizedTexture()voidsetData(java.nio.ByteBuffer data)voidsetHeight(int height)voidsetMask(Mask mask)voidsetName(java.lang.String name)voidsetOffsetX(int offset)voidsetOffsetY(int offset)voidsetRealHeight(int realHeight)voidsetRealWidth(int realWidth)voidsetRegion(int x, int y, int width, int height)voidsetUseAlphaChannel(boolean value)voidsetWidth(int width)Texturesplit(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)TexturesplitIcon()static voidsteamAvatarChanged(long steamID)java.lang.StringtoString()static TexturetrygetTexture(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 -
bindAlways
public boolean bindAlways -
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) -
reload
public static void reload(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:
destroyin interfaceIDestroyable
-
equals
-
getData
-
getHeight
public int getHeight() -
getHeightHW
public int getHeightHW()- Specified by:
getHeightHWin interfaceITexture
-
getHeightOrig
public int getHeightOrig() -
getID
public int getID() -
getMask
- Specified by:
getMaskin interfaceIMaskerable
-
getName
public java.lang.String getName() -
getTextureId
-
getUseAlphaChannel
public boolean getUseAlphaChannel() -
getWidth
public int getWidth() -
getWidthHW
public int getWidthHW()- Specified by:
getWidthHWin 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:
isDestroyedin interfaceIDestroyable
-
isSolid
public boolean isSolid() -
isValid
public boolean isValid() -
makeTransp
public void makeTransp(int red, int green, int blue)- Specified by:
makeTranspin 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:
setAlphaForeachin 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:
toStringin 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)
-