zombie.iso
Class IsoObject

java.lang.Object
  extended by zombie.iso.IsoObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
IsoBarricade, IsoCrate, IsoCurtain, IsoDoor, IsoFire, IsoJukebox, IsoLightSwitch, IsoMovingObject, IsoRadio, IsoRaindrop, IsoRainSplash, IsoStove, IsoThumpable, IsoTree, IsoWindow, IsoWoodenWall, IsoWorldInventoryObject

public class IsoObject
extends java.lang.Object
implements java.io.Serializable

Author:
LEMMY
See Also:
Serialized Form

Nested Class Summary
static class IsoObject.VisionResult
           
 
Field Summary
 float[] alpha
           
static float alphaStep
           
 java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite
           
 java.util.ArrayList<IsoSprite> AttachedAnimSpriteActual
           
 ItemContainer container
           
 short Damage
           
 IsoDirections dir
           
static IsoObject lastRendered
           
static IsoObject lastRenderedRendered
           
 java.lang.String name
           
 boolean NoPicking
           
 float offsetX
           
 float offsetY
           
 boolean OutlineOnMouseover
           
 IsoObject rerouteCollide
           
 IsoObject rerouteMask
           
 IsoSprite sprite
           
 IsoGridSquare square
           
static ColorInfo stCol
           
 se.krka.kahlua.vm.KahluaTable table
           
 float[] targetAlpha
           
 float tintb
           
 float tintg
           
 float tintr
           
 
Constructor Summary
IsoObject()
           
IsoObject(IsoCell cell)
           
IsoObject(IsoCell cell, IsoGridSquare square, IsoSprite spr)
           
IsoObject(IsoCell cell, IsoGridSquare square, java.lang.String gid)
           
IsoObject(IsoGridSquare square, java.lang.String tile)
           
IsoObject(IsoGridSquare square, java.lang.String tile, boolean bShareTilesWithMap)
           
IsoObject(IsoGridSquare square, java.lang.String tile, java.lang.String name)
           
IsoObject(IsoGridSquare square, java.lang.String tile, java.lang.String name, boolean bShareTilesWithMap)
           
 
Method Summary
 void addChild(IsoObject child)
           
 void AttachAnim(java.lang.String ObjectName, java.lang.String AnimName, int NumFrames, float frameIncrease, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias, ColorInfo TintMod)
           
 void AttachExistingAnim(IsoSprite spr, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias)
           
 void AttachExistingAnim(IsoSprite spr, int OffsetX, int OffsetY, boolean Looping, int FinishHoldFrameIndex, boolean DeleteWhenFinished, float zBias, ColorInfo TintMod)
           
 void AttackObject(IsoGameCharacter owner)
           
static byte[] createChecksum(java.lang.String filename)
           
 void DirtySlice()
           
static boolean DoChecksumCheck()
           
static boolean DoChecksumCheck(java.lang.String str, java.lang.String expected)
           
 void DoTooltip(ObjectTooltip tooltipUI)
           
static java.lang.Class factoryClassFromFileInput(IsoCell cell, int classID)
           
static IsoObject factoryFromFileInput(IsoCell cell, java.nio.ByteBuffer b)
           
static IsoObject factoryFromFileInput(IsoCell cell, int classID)
           
 float getAlpha()
           
 float getAlphaStep()
           
 java.util.ArrayList<IsoSpriteInstance> getAttachedAnimSprite()
           
 IsoCell getCell()
           
 java.util.ArrayList<IsoSpriteInstance> getChildSprites()
           
 ItemContainer getContainer()
           
 short getDamage()
           
 IsoDirections getDir()
           
 ItemContainer getItemContainer()
           
static IsoObject getLastRendered()
           
static IsoObject getLastRenderedRendered()
           
 float getMaskClickedY(int x, int y, boolean flip)
           
static java.lang.String getMD5Checksum(java.lang.String filename)
           
 se.krka.kahlua.vm.KahluaTable getModData()
           
 java.lang.String getName()
           
 java.lang.String getObjectName()
           
 float getOffsetX()
           
 float getOffsetY()
           
 PropertyContainer getProperties()
           
 IsoObject getRerouteCollide()
           
 IsoObject getRerouteMask()
           
 IsoObject getRerouteMaskObject()
           
 java.lang.String getScriptName()
           
 IsoSprite getSprite()
           
 IsoGridSquare getSquare()
           
 se.krka.kahlua.vm.KahluaTable getTable()
           
 float getTargetAlpha()
           
 java.lang.String getTextureName()
           
 IsoObjectType getType()
           
 float getX()
           
 float getY()
           
 float getZ()
           
 boolean HasTooltip()
           
 boolean hasWater()
           
 boolean isCharacter()
           
 boolean isMaskClicked(int x, int y)
           
 boolean isMaskClicked(int x, int y, boolean flip)
           
 boolean isNoPicking()
           
 boolean isOutlineOnMouseover()
           
 boolean isZombie()
           
 void load(java.nio.ByteBuffer input)
           
 boolean onMouseLeftClick(int x, int y)
           
 void onMouseRightClick(int lx, int ly)
           
 void onMouseRightReleased()
           
 void RemoveAttachedAnims()
           
 void render(float x, float y, float z, ColorInfo col, boolean bDoAttached)
           
 void renderlast()
           
 void renderObjectPicker(float x, float y, float z, ColorInfo lightInfo)
           
 InventoryItem replaceItem(InventoryItem item)
           
 void reset()
           
 void save(java.nio.ByteBuffer output)
           
 boolean Serialize()
           
 void setAlpha(float alpha)
           
 void setAlphaStep(float alphaStep)
           
 void setAttachedAnimSprite(java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite)
           
 void setChildSprites(java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite)
           
 void setContainer(ItemContainer container)
           
 void setDamage(short Damage)
           
static void setDefaultCondition(int i)
           
 void setDir(int dir)
           
 void setDir(IsoDirections dir)
           
static void setLastRendered(IsoObject aLastRendered)
           
static void setLastRenderedRendered(IsoObject aLastRenderedRendered)
           
 void setName(java.lang.String name)
           
 void SetName(java.lang.String name)
           
 void setNoPicking(boolean NoPicking)
           
 void setOffsetX(float offsetX)
           
 void setOffsetY(float offsetY)
           
 void setOutlineOnMouseover(boolean OutlineOnMouseover)
           
 void setRerouteCollide(IsoObject rerouteCollide)
           
 void setRerouteMask(IsoObject rerouteMask)
           
 void setSprite(IsoSprite sprite)
           
 void setSquare(IsoGridSquare square)
           
 void setTable(se.krka.kahlua.vm.KahluaTable table)
           
 void setTargetAlpha(float targetAlpha)
           
 void setType(IsoObjectType type)
           
 boolean TestCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
           
 boolean TestPathfindCollide(IsoMovingObject obj, IsoGridSquare from, IsoGridSquare to)
           
 IsoObject.VisionResult TestVision(IsoGridSquare from, IsoGridSquare to)
           
 void update()
           
 void useItemOn(InventoryItem item)
           
 boolean useWater(int i)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alpha

public float[] alpha

alphaStep

public static float alphaStep

AttachedAnimSprite

public java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite

AttachedAnimSpriteActual

public java.util.ArrayList<IsoSprite> AttachedAnimSpriteActual

container

public ItemContainer container

dir

public IsoDirections dir

Damage

public short Damage

NoPicking

public boolean NoPicking

offsetX

public float offsetX

offsetY

public float offsetY

OutlineOnMouseover

public boolean OutlineOnMouseover

rerouteMask

public IsoObject rerouteMask

sprite

public IsoSprite sprite

square

public IsoGridSquare square

targetAlpha

public float[] targetAlpha

rerouteCollide

public IsoObject rerouteCollide

table

public se.krka.kahlua.vm.KahluaTable table

name

public java.lang.String name

lastRendered

public static IsoObject lastRendered

lastRenderedRendered

public static IsoObject lastRenderedRendered

tintr

public float tintr

tintg

public float tintg

tintb

public float tintb

stCol

public static ColorInfo stCol
Constructor Detail

IsoObject

public IsoObject(IsoCell cell)

IsoObject

public IsoObject()

IsoObject

public IsoObject(IsoCell cell,
                 IsoGridSquare square,
                 IsoSprite spr)

IsoObject

public IsoObject(IsoCell cell,
                 IsoGridSquare square,
                 java.lang.String gid)

IsoObject

public IsoObject(IsoGridSquare square,
                 java.lang.String tile,
                 java.lang.String name)

IsoObject

public IsoObject(IsoGridSquare square,
                 java.lang.String tile,
                 java.lang.String name,
                 boolean bShareTilesWithMap)

IsoObject

public IsoObject(IsoGridSquare square,
                 java.lang.String tile,
                 boolean bShareTilesWithMap)

IsoObject

public IsoObject(IsoGridSquare square,
                 java.lang.String tile)
Method Detail

DoChecksumCheck

public static boolean DoChecksumCheck(java.lang.String str,
                                      java.lang.String expected)

getTextureName

public java.lang.String getTextureName()

DoChecksumCheck

public static boolean DoChecksumCheck()

createChecksum

public static byte[] createChecksum(java.lang.String filename)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getMD5Checksum

public static java.lang.String getMD5Checksum(java.lang.String filename)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getLastRendered

public static IsoObject getLastRendered()
Returns:
the lastRendered

setLastRendered

public static void setLastRendered(IsoObject aLastRendered)
Parameters:
aLastRendered - the lastRendered to set

getLastRenderedRendered

public static IsoObject getLastRenderedRendered()
Returns:
the lastRenderedRendered

setLastRenderedRendered

public static void setLastRenderedRendered(IsoObject aLastRenderedRendered)
Parameters:
aLastRenderedRendered - the lastRenderedRendered to set

setDefaultCondition

public static void setDefaultCondition(int i)

Serialize

public boolean Serialize()

getModData

public se.krka.kahlua.vm.KahluaTable getModData()

factoryFromFileInput

public static IsoObject factoryFromFileInput(IsoCell cell,
                                             int classID)

factoryClassFromFileInput

public static java.lang.Class factoryClassFromFileInput(IsoCell cell,
                                                        int classID)

factoryFromFileInput

public static IsoObject factoryFromFileInput(IsoCell cell,
                                             java.nio.ByteBuffer b)
                                      throws java.io.IOException
Throws:
java.io.IOException

getSquare

public IsoGridSquare getSquare()

update

public void update()

renderlast

public void renderlast()

DirtySlice

public void DirtySlice()

getObjectName

public java.lang.String getObjectName()

load

public void load(java.nio.ByteBuffer input)
          throws java.io.IOException
Throws:
java.io.IOException

save

public void save(java.nio.ByteBuffer output)
          throws java.io.IOException
Throws:
java.io.IOException

AttackObject

public void AttackObject(IsoGameCharacter owner)

onMouseRightClick

public void onMouseRightClick(int lx,
                              int ly)

onMouseRightReleased

public void onMouseRightReleased()

getRerouteCollide

public IsoObject getRerouteCollide()
Returns:
the rerouteCollide

setRerouteCollide

public void setRerouteCollide(IsoObject rerouteCollide)
Parameters:
rerouteCollide - the rerouteCollide to set

getTable

public se.krka.kahlua.vm.KahluaTable getTable()
Returns:
the table

setTable

public void setTable(se.krka.kahlua.vm.KahluaTable table)
Parameters:
table - the table to set

getAlpha

public float getAlpha()
Returns:
the alpha

setAlpha

public void setAlpha(float alpha)
Parameters:
alpha - the alpha to set

getAlphaStep

public float getAlphaStep()
Returns:
the alphaStep

setAlphaStep

public void setAlphaStep(float alphaStep)
Parameters:
alphaStep - the alphaStep to set

getAttachedAnimSprite

public java.util.ArrayList<IsoSpriteInstance> getAttachedAnimSprite()
Returns:
the AttachedAnimSprite

setAttachedAnimSprite

public void setAttachedAnimSprite(java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite)
Parameters:
AttachedAnimSprite - the AttachedAnimSprite to set

getCell

public IsoCell getCell()
Returns:
the cell

getChildSprites

public java.util.ArrayList<IsoSpriteInstance> getChildSprites()
Returns:
the AttachedAnimSprite

setChildSprites

public void setChildSprites(java.util.ArrayList<IsoSpriteInstance> AttachedAnimSprite)
Parameters:
AttachedAnimSprite - the AttachedAnimSprite to set

getContainer

public ItemContainer getContainer()
Returns:
the container

setContainer

public void setContainer(ItemContainer container)
Parameters:
container - the container to set

getDir

public IsoDirections getDir()
Returns:
the dir

setDir

public void setDir(IsoDirections dir)
Parameters:
dir - the dir to set

setDir

public void setDir(int dir)
Parameters:
dir - the dir to set

getDamage

public short getDamage()
Returns:
the Damage

setDamage

public void setDamage(short Damage)
Parameters:
Damage - the Damage to set

isNoPicking

public boolean isNoPicking()
Returns:
the NoPicking

setNoPicking

public void setNoPicking(boolean NoPicking)
Parameters:
NoPicking - the NoPicking to set

setOffsetX

public void setOffsetX(float offsetX)
Parameters:
offsetX - the offsetX to set

setOffsetY

public void setOffsetY(float offsetY)
Parameters:
offsetY - the offsetY to set

isOutlineOnMouseover

public boolean isOutlineOnMouseover()
Returns:
the OutlineOnMouseover

setOutlineOnMouseover

public void setOutlineOnMouseover(boolean OutlineOnMouseover)
Parameters:
OutlineOnMouseover - the OutlineOnMouseover to set

getRerouteMask

public IsoObject getRerouteMask()
Returns:
the rerouteMask

setRerouteMask

public void setRerouteMask(IsoObject rerouteMask)
Parameters:
rerouteMask - the rerouteMask to set

getSprite

public IsoSprite getSprite()
Returns:
the sprite

setSprite

public void setSprite(IsoSprite sprite)
Parameters:
sprite - the sprite to set

setSquare

public void setSquare(IsoGridSquare square)
Parameters:
square - the square to set

getTargetAlpha

public float getTargetAlpha()
Returns:
the targetAlpha

setTargetAlpha

public void setTargetAlpha(float targetAlpha)
Parameters:
targetAlpha - the targetAlpha to set

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getType

public IsoObjectType getType()
Returns:
the type

setType

public void setType(IsoObjectType type)

addChild

public void addChild(IsoObject child)

reset

public void reset()

SetName

public void SetName(java.lang.String name)

getName

public java.lang.String getName()

isCharacter

public boolean isCharacter()

isZombie

public boolean isZombie()

getScriptName

public java.lang.String getScriptName()

AttachAnim

public void AttachAnim(java.lang.String ObjectName,
                       java.lang.String AnimName,
                       int NumFrames,
                       float frameIncrease,
                       int OffsetX,
                       int OffsetY,
                       boolean Looping,
                       int FinishHoldFrameIndex,
                       boolean DeleteWhenFinished,
                       float zBias,
                       ColorInfo TintMod)

AttachExistingAnim

public void AttachExistingAnim(IsoSprite spr,
                               int OffsetX,
                               int OffsetY,
                               boolean Looping,
                               int FinishHoldFrameIndex,
                               boolean DeleteWhenFinished,
                               float zBias,
                               ColorInfo TintMod)

AttachExistingAnim

public void AttachExistingAnim(IsoSprite spr,
                               int OffsetX,
                               int OffsetY,
                               boolean Looping,
                               int FinishHoldFrameIndex,
                               boolean DeleteWhenFinished,
                               float zBias)

DoTooltip

public void DoTooltip(ObjectTooltip tooltipUI)

getItemContainer

public ItemContainer getItemContainer()

getOffsetX

public float getOffsetX()

getOffsetY

public float getOffsetY()

getRerouteMaskObject

public IsoObject getRerouteMaskObject()

HasTooltip

public boolean HasTooltip()

useWater

public boolean useWater(int i)

hasWater

public boolean hasWater()

replaceItem

public InventoryItem replaceItem(InventoryItem item)

useItemOn

public void useItemOn(InventoryItem item)

getX

public float getX()

getY

public float getY()

getZ

public float getZ()

onMouseLeftClick

public boolean onMouseLeftClick(int x,
                                int y)

getProperties

public PropertyContainer getProperties()

RemoveAttachedAnims

public void RemoveAttachedAnims()

render

public void render(float x,
                   float y,
                   float z,
                   ColorInfo col,
                   boolean bDoAttached)

renderObjectPicker

public void renderObjectPicker(float x,
                               float y,
                               float z,
                               ColorInfo lightInfo)

TestPathfindCollide

public boolean TestPathfindCollide(IsoMovingObject obj,
                                   IsoGridSquare from,
                                   IsoGridSquare to)

TestCollide

public boolean TestCollide(IsoMovingObject obj,
                           IsoGridSquare from,
                           IsoGridSquare to)

TestVision

public IsoObject.VisionResult TestVision(IsoGridSquare from,
                                         IsoGridSquare to)

isMaskClicked

public boolean isMaskClicked(int x,
                             int y)

isMaskClicked

public boolean isMaskClicked(int x,
                             int y,
                             boolean flip)

getMaskClickedY

public float getMaskClickedY(int x,
                             int y,
                             boolean flip)