Class IsoCell
java.lang.Object
zombie.iso.IsoCell
Loaded area 'reality bubble' around the player(s). Don't confuse this with map cells - the name is a relic from when it did actually represent these. Only one instance should ever exist. Instantiating this class during gameplay will likely immediately crash.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ArrayList<BaseVehicle> final ArrayList<IsoBuilding> static final intstatic final intfinal IsoChunkMap[]intstatic final booleanstatic Shaderfinal ArrayList<IsoGridSquare> final ArrayList<IsoGridSquare> static ArrayList<IsoGridSquare> final boolean[]intstatic final intintintfinal Vector2[]final IsoDirections[]final IsoGridSquare[]final boolean[]final IsoGridSquare[]final boolean[]intstatic intintintintintstatic final ArrayList<IsoGridSquare> intintintfinal IsoZombie[]final float[]static final floatbooleanfinal ArrayList<ArrayList<IsoBuilding>> final IsoBuilding[][]static final IsoCell.PerPlayerRender[]final boolean[]final boolean[]final ArrayList<ArrayList<IsoBuilding>> final IsoBuilding[][]longfinal long[]final Set<IsoWorldInventoryObject> booleanintbooleanfinal ArrayList<IsoRoomLight> static final intstatic final intstatic final intstatic final intstatic final intstatic final ArrayList<IsoGridSquare> static final ArrayList<IsoGridSquare> static final ArrayList<IsoGridSquare> intintintintfinal int[]static final ArrayList<IsoGridSquare> final ArrayList<BaseVehicle> static Shaderfinal ArrayList<ArrayList<IsoBuilding>> final IsoBuilding[][]static final intint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHeatSource(IsoHeatSource heatSource) addLamppost(int x, int y, int z, float r, float g, float b, int rad) voidaddLamppost(IsoLightSource light) voidaddTileObject(IsoGridSquare sq, String spriteName) voidaddToProcessIsoObject(IsoObject object) voidaddToProcessIsoObjectRemove(IsoObject object) voidaddToProcessItems(ArrayList<InventoryItem> items) voidvoidvoidvoidaddToProcessWorldItems(IsoWorldInventoryObject worldItem) voidvoidvoidaddToWindowList(IsoWindow window) voidAddUniqueToBuildingList(ArrayList<IsoBuilding> buildings, IsoBuilding inBuilding) booleanvoidCalculateVertColoursForTile(IsoGridSquare sqThis, int x, int y, int zz, int playerIndex) booleanCanBuildingSquareOccludePlayer(IsoGridSquare square, int playerIndex) voidcheckHaveRoof(int x, int y) voidclearCacheGridSquare(int playerIndex) booleanConnectNewSquare(IsoGridSquare newSquare, boolean bDoSurrounds) createNewGridSquare(int x, int y, int z, boolean recalcAll) voidvoidDispose()floatDistanceFromSupport(int x, int y, int z) booleanDoBuilding(int player, boolean bRender) booleanDoesSquareHaveValidCutaways(IsoGridSquare playerSquare, IsoGridSquare square, int playerIndex, long currentTimeMillis) voidDoGridNav(IsoGridSquare newSquare, IsoGridSquare.GetSquare getter) voidvoidEnsureSurroundNotNull(int xx, int yy, int zz) voidflattenAnyFoliage(IsoCell.PerPlayerRender perPlayerRender, int playerIndex) static IsoDirectionsstatic intgetBComponent(int col) getBestBuildings(IsoCell.BuildingSearchCriteria criteria, int count) Deprecated.static Stack<BuildingScore> voidGetBuildingsInFrontOfCharacter(ArrayList<IsoBuilding> buildings, IsoGridSquare square, boolean bRightOfSquare) GetBuildingsInFrontOfMustSeeSquare(IsoGridSquare square, IsoGridOcclusionData.OcclusionFilter filter) static intstatic intgetChunk(int wx, int wy) getChunkForGridSquare(int x, int y, int z) getChunkMap(int pl) getClosestBuildingExcept(IsoGameCharacter chr, IsoRoom except) intintintintgetDangerScore(int x, int y) se.krka.kahlua.vm.KahluaTablegetDrag(int player) longgetFreeTile(RoomDef def) static intgetGComponent(int col) getGridSquare(double x, double y, double z) getGridSquare(int x, int y, int z) getGridSquare(Double x, Double y, Double z) getGridSquareDirect(int x, int y, int z, int playerIndex) floatgetHeatSourceHighestTemperature(float surroundingAirTemperature, int x, int y, int z) intgetHeatSourceTemperature(int x, int y, int z) intintstatic IsoCellgetLightSourceAt(int x, int y, int z) se.krka.kahlua.vm.KahluaTableintstatic intintgetMaxX()intgetMaxY()intgetMaxZ()intgetMinX()intgetMinY()intgetMinZ()getNearestVisibleZombie(int playerIndex) getNetworkPlayer(int RemoteID) getOrCreateGridSquare(double x, double y, double z) GetPeekedInBuilding(IsoGridSquare square, IsoDirections lookDir) getPerPlayerRenderAt(int playerIndex) intstatic intgetRComponent(int col) getRelativeGridSquare(int x, int y, int z) Deprecated.getRoom(int ID) intvoidGetSquaresAroundPlayerSquare(IsoPlayer player, IsoGridSquare square, ArrayList<IsoGridSquare> outGridSquaresToLeft, ArrayList<IsoGridSquare> outGridSquaresToRight) intgetWidth()intintintList of every zombie currently in the world.booleangridSquareIsSnow(int x, int y, int z) voidvoidinvalidatePeekedRoom(int playerIndex) booleanbooleanbooleanIsCutawaySquare(IsoGridSquare square, long currentTimeMillis) booleanisInChunkMap(int x, int y) booleanisNull(int x, int y, int z) booleanIsPlayerWindowPeeking(int playerIndex) booleanbooleanLoadPlayer(int WorldVersion) voidvoidintvoidvoidvoidvoidRemove(IsoMovingObject obj) voidremoveFromWindowList(IsoWindow window) voidremoveHeatSource(IsoHeatSource heatSource) voidremoveLamppost(int x, int y, int z) voidremoveLamppost(IsoLightSource light) voidrender()voidrenderDebugLighting(IsoCell.PerPlayerRender perPlayerRender, int MaxHeight) voidrenderDebugPhysics(int playerIndex) voidRenderFloorShading(int zza) voidvoidvoidRenderSnow(int zza) voidRenderTiles(int MaxHeight) voidDeprecated.voidroomSpotted(IsoRoom room) voidsave(DataOutputStream output, boolean bDoChars) static voidsetBuildings(Stack<BuildingScore> scores) voidsetCacheChunk(IsoChunk chunk) voidsetCacheChunk(IsoChunk chunk, int playerIndex) voidsetCacheGridSquare(int x, int y, int z, IsoGridSquare square) voidsetCacheGridSquareLocal(int x, int y, int z, IsoGridSquare square, int playerIndex) voidsetCurrentLightX(int currentLX) voidsetCurrentLightY(int currentLY) voidsetCurrentLightZ(int currentLZ) booleanvoidsetDangerUpdate(OnceEvery dangerUpdate) voidsetDrag(se.krka.kahlua.vm.KahluaTable item, int player) voidsetHeight(int height) voidsetLightInfoUpdate(Thread LightInfoUpdate) voidsetMaxX(int maxX) voidsetMaxY(int maxY) voidsetMaxZ(int maxZ) voidsetMinX(int minX) voidsetMinY(int minY) voidsetMinZ(int minZ) voidsetRainAlpha(int alpha) voidsetRainIntensity(int intensity) voidsetRainSpeed(int speed) voidsetSafeToAdd(boolean safeToAdd) voidsetSnowTarget(int target) voidsetWidth(int width) voidsetWorldX(int worldX) voidsetWorldY(int worldY) static inttoIntColor(float r, float g, float b, float a) voidupdate()void
-
Field Details
-
CELL_SIZE_IN_CHUNKS
public static final int CELL_SIZE_IN_CHUNKS- See Also:
-
CELL_SIZE_IN_SQUARES
public static final int CELL_SIZE_IN_SQUARES- See Also:
-
maxHeight
public static int maxHeight -
floorRenderShader
-
wallRenderShader
-
trees
-
minHeight
public int minHeight -
chunkMap
-
buildingList
-
processWorldItemsRemove
-
ENABLE_SQUARE_CACHE
public static final boolean ENABLE_SQUARE_CACHE- See Also:
-
dangerScore
-
roomLights
-
addVehicles
-
vehicles
-
ISOANGLEFACTOR
public static final int ISOANGLEFACTOR- See Also:
-
ZOMBIESCANBUDGET
public static final int ZOMBIESCANBUDGET- See Also:
-
NEARESTZOMBIEDISTSQRMAX
public static final float NEARESTZOMBIEDISTSQRMAX- See Also:
-
zombieScanCursor
public int zombieScanCursor -
nearestVisibleZombie
-
nearestVisibleZombieDistSqr
public final float[] nearestVisibleZombieDistSqr -
gridStack
-
RTF_SolidFloor
public static final int RTF_SolidFloor- See Also:
-
RTF_VegetationCorpses
public static final int RTF_VegetationCorpses- See Also:
-
RTF_MinusFloorCharacters
public static final int RTF_MinusFloorCharacters- See Also:
-
RTF_ShadedFloor
public static final int RTF_ShadedFloor- See Also:
-
RTF_Shadows
public static final int RTF_Shadows- See Also:
-
ShadowSquares
-
MinusFloorCharacters
-
SolidFloor
-
ShadedFloor
-
VegetationCorpses
-
perPlayerRender
-
stencilX1
public int stencilX1 -
stencilY1
public int stencilY1 -
stencilX2
public int stencilX2 -
stencilY2
public int stencilY2 -
deferredCharacterTick
public int deferredCharacterTick -
recalcFloors
public boolean recalcFloors -
recalcShading
public int recalcShading -
lastMinX
public int lastMinX -
lastMinY
public int lastMinY -
lightUpdateCount
public int lightUpdateCount -
rendering
public boolean rendering -
hideFloors
public final boolean[] hideFloors -
unhideFloorsCounter
public final int[] unhideFloorsCounter -
occludedByOrphanStructureFlag
public boolean occludedByOrphanStructureFlag -
playerPeekedRoomId
public long playerPeekedRoomId -
playerOccluderBuildings
-
playerOccluderBuildingsArr
-
playerWindowPeekingRoomId
public final long[] playerWindowPeekingRoomId -
playerHidesOrphanStructures
public final boolean[] playerHidesOrphanStructures -
playerCutawaysDirty
public final boolean[] playerCutawaysDirty -
tempPlayerCutawayRoomIds
-
lastPlayerSquare
-
lastPlayerSquareHalf
public final boolean[] lastPlayerSquareHalf -
lastPlayerDir
-
lastPlayerAngle
-
hidesOrphanStructuresAbove
public int hidesOrphanStructuresAbove -
zombieOccluderBuildings
-
zombieOccluderBuildingsArr
-
lastZombieSquare
-
lastZombieSquareHalf
public final boolean[] lastZombieSquareHalf -
otherOccluderBuildings
-
otherOccluderBuildingsArr
-
gridSquaresTempLeft
-
gridSquaresTempRight
-
minX
public int minX -
maxX
public int maxX -
minY
public int minY -
maxY
public int maxY -
minZ
public int minZ -
maxZ
public int maxZ
-
-
Constructor Details
-
IsoCell
public IsoCell(int width, int height)
-
-
Method Details
-
getMaxHeight
public static int getMaxHeight()- Returns:
- the MaxHeight
-
getCellSizeInChunks
public static int getCellSizeInChunks() -
getCellSizeInSquares
public static int getCellSizeInSquares() -
getCurrentLotHeader
-
getChunkMap
-
getFreeTile
-
getBuildings
- Returns:
- the getBuildings
-
setBuildings
-
getNearestVisibleZombie
-
getChunkForGridSquare
-
getChunk
-
CalculateVertColoursForTile
public void CalculateVertColoursForTile(IsoGridSquare sqThis, int x, int y, int zz, int playerIndex) -
DrawStencilMask
public void DrawStencilMask() -
RenderTiles
public void RenderTiles(int MaxHeight) -
initTileShaders
public void initTileShaders() -
getPerPlayerRenderAt
-
flattenAnyFoliage
-
renderShadows
public void renderShadows() -
renderDebugPhysics
public void renderDebugPhysics(int playerIndex) -
renderDebugLighting
-
RenderFloorShading
public void RenderFloorShading(int zza) -
IsPlayerWindowPeeking
public boolean IsPlayerWindowPeeking(int playerIndex) -
CanBuildingSquareOccludePlayer
-
GetEffectivePlayerRoomId
public long GetEffectivePlayerRoomId() -
SetCutawayRoomsForPlayer
public boolean SetCutawayRoomsForPlayer() -
IsCutawaySquare
-
DoesSquareHaveValidCutaways
public boolean DoesSquareHaveValidCutaways(IsoGridSquare playerSquare, IsoGridSquare square, int playerIndex, long currentTimeMillis) -
IsCollapsibleBuildingSquare
-
collapsibleBuildingSquareAlgorithm
public boolean collapsibleBuildingSquareAlgorithm(BuildingDef def, IsoGridSquare sq, IsoGridSquare pl) -
setSnowTarget
public void setSnowTarget(int target) -
getSnowTarget
public int getSnowTarget() -
gridSquareIsSnow
public boolean gridSquareIsSnow(int x, int y, int z) -
RenderSnow
public void RenderSnow(int zza) -
getClosestBuildingExcept
-
getDangerScore
public int getDangerScore(int x, int y) -
addToProcessIsoObject
-
addToProcessIsoObjectRemove
-
addToStaticUpdaterObjectList
-
addToProcessItems
-
addToProcessItems
-
addToProcessItemsRemove
-
addToProcessItemsRemove
-
addToProcessWorldItems
-
addToProcessWorldItemsRemove
-
getNetworkPlayer
-
ConnectNewSquare
-
PlaceLot
-
PlaceLot
-
PlaceLot
-
setDrag
public void setDrag(se.krka.kahlua.vm.KahluaTable item, int player) -
getDrag
public se.krka.kahlua.vm.KahluaTable getDrag(int player) -
DoBuilding
public boolean DoBuilding(int player, boolean bRender) -
DistanceFromSupport
public float DistanceFromSupport(int x, int y, int z) -
getBuildingList
-
getWindowList
-
addToWindowList
-
removeFromWindowList
-
getObjectList
- Returns:
- the ObjectList
-
getRoom
-
getPushableObjectList
- Returns:
- the PushableObjectList
-
getBuildingScores
- Returns:
- the BuildingScores
-
getRoomList
-
getStaticUpdaterObjectList
-
getZombieList
-
getRemoteSurvivorList
Deprecated.- Returns:
- the RemoteSurvivorList
-
getRemoveList
- Returns:
- the removeList
-
getAddList
- Returns:
- the addList
-
addMovingObject
-
getProcessItems
- Returns:
- the ProcessItems
-
getProcessWorldItems
-
getProcessIsoObjects
-
getProcessItemsRemove
-
getVehicles
-
getHeight
public int getHeight()- Returns:
- the height
-
setHeight
public void setHeight(int height) - Parameters:
height- the height to set
-
getWidth
public int getWidth()- Returns:
- the width
-
setWidth
public void setWidth(int width) - Parameters:
width- the width to set
-
getWorldX
public int getWorldX()- Returns:
- the worldX
-
setWorldX
public void setWorldX(int worldX) - Parameters:
worldX- the worldX to set
-
getWorldY
public int getWorldY()- Returns:
- the worldY
-
setWorldY
public void setWorldY(int worldY) - Parameters:
worldY- the worldY to set
-
isSafeToAdd
public boolean isSafeToAdd()- Returns:
- the safeToAdd
-
setSafeToAdd
public void setSafeToAdd(boolean safeToAdd) - Parameters:
safeToAdd- the safeToAdd to set
-
getLamppostPositions
- Returns:
- the LamppostPositions
-
getLightSourceAt
-
addLamppost
-
addLamppost
-
removeLamppost
public void removeLamppost(int x, int y, int z) -
removeLamppost
-
getCurrentLightX
public int getCurrentLightX()- Returns:
- the currentLX
-
setCurrentLightX
public void setCurrentLightX(int currentLX) - Parameters:
currentLX- the currentLX to set
-
getCurrentLightY
public int getCurrentLightY()- Returns:
- the currentLY
-
setCurrentLightY
public void setCurrentLightY(int currentLY) - Parameters:
currentLY- the currentLY to set
-
getCurrentLightZ
public int getCurrentLightZ()- Returns:
- the currentLZ
-
setCurrentLightZ
public void setCurrentLightZ(int currentLZ) - Parameters:
currentLZ- the currentLZ to set
-
getMinX
public int getMinX()- Returns:
- the minX
-
setMinX
public void setMinX(int minX) - Parameters:
minX- the minX to set
-
getMaxX
public int getMaxX()- Returns:
- the maxX
-
setMaxX
public void setMaxX(int maxX) - Parameters:
maxX- the maxX to set
-
getMinY
public int getMinY()- Returns:
- the minY
-
setMinY
public void setMinY(int minY) - Parameters:
minY- the minY to set
-
getMaxY
public int getMaxY()- Returns:
- the maxY
-
setMaxY
public void setMaxY(int maxY) - Parameters:
maxY- the maxY to set
-
getMinZ
public int getMinZ()- Returns:
- the minZ
-
setMinZ
public void setMinZ(int minZ) - Parameters:
minZ- the minZ to set
-
getMaxZ
public int getMaxZ()- Returns:
- the maxZ
-
setMaxZ
public void setMaxZ(int maxZ) - Parameters:
maxZ- the maxZ to set
-
getDangerUpdate
- Returns:
- the dangerUpdate
-
setDangerUpdate
- Parameters:
dangerUpdate- the dangerUpdate to set
-
getLightInfoUpdate
- Returns:
- the LightInfoUpdate
-
setLightInfoUpdate
- Parameters:
LightInfoUpdate- the LightInfoUpdate to set
-
getSurvivorList
-
getRComponent
public static int getRComponent(int col) -
getGComponent
public static int getGComponent(int col) -
getBComponent
public static int getBComponent(int col) -
toIntColor
public static int toIntColor(float r, float g, float b, float a) -
getRandomOutdoorTile
-
getBestBuildings
-
blocked
-
Dispose
public void Dispose() -
getGridSquare
-
getOrCreateGridSquare
-
setCacheGridSquare
-
setCacheChunk
-
setCacheChunk
-
clearCacheGridSquare
public void clearCacheGridSquare(int playerIndex) -
setCacheGridSquareLocal
-
getGridSquare
-
getGridSquare
-
EnsureSurroundNotNull
public void EnsureSurroundNotNull(int xx, int yy, int zz) -
DeleteAllMovingObjects
public void DeleteAllMovingObjects() -
getMaxFloors
public int getMaxFloors() -
getLuaObjectList
public se.krka.kahlua.vm.KahluaTable getLuaObjectList() -
getHeightInTiles
public int getHeightInTiles() -
getWidthInTiles
public int getWidthInTiles() -
isNull
public boolean isNull(int x, int y, int z) -
Remove
-
getInstance
-
render
public void render() -
invalidatePeekedRoom
public void invalidatePeekedRoom(int playerIndex) -
getWeatherFX
-
renderRain
public void renderRain() -
setRainAlpha
public void setRainAlpha(int alpha) -
setRainIntensity
public void setRainIntensity(int intensity) -
getRainIntensity
public int getRainIntensity() -
setRainSpeed
public void setRainSpeed(int speed) -
reloadRainTextures
public void reloadRainTextures() -
GetBuildingsInFrontOfCharacter
public void GetBuildingsInFrontOfCharacter(ArrayList<IsoBuilding> buildings, IsoGridSquare square, boolean bRightOfSquare) -
GetBuildingsInFrontOfMustSeeSquare
public ArrayList<IsoBuilding> GetBuildingsInFrontOfMustSeeSquare(IsoGridSquare square, IsoGridOcclusionData.OcclusionFilter filter) -
GetPeekedInBuilding
-
GetSquaresAroundPlayerSquare
public void GetSquaresAroundPlayerSquare(IsoPlayer player, IsoGridSquare square, ArrayList<IsoGridSquare> outGridSquaresToLeft, ArrayList<IsoGridSquare> outGridSquaresToRight) -
IsBehindStuff
-
FromMouseTile
-
update
public void update() -
getRandomFreeTileInRoom
-
roomSpotted
-
ProcessSpottedRooms
public void ProcessSpottedRooms() -
addTileObject
-
save
- Throws:
IOException
-
LoadPlayer
- Throws:
FileNotFoundExceptionIOException
-
getRelativeGridSquare
-
createNewGridSquare
-
getGridSquareDirect
-
isInChunkMap
public boolean isInChunkMap(int x, int y) -
getProcessIsoObjectRemove
-
checkHaveRoof
public void checkHaveRoof(int x, int y) -
getFakeZombieForHit
-
addHeatSource
-
removeHeatSource
-
updateHeatSources
public void updateHeatSources() -
getHeatSourceTemperature
public int getHeatSourceTemperature(int x, int y, int z) -
getHeatSourceHighestTemperature
public float getHeatSourceHighestTemperature(float surroundingAirTemperature, int x, int y, int z) -
putInVehicle
-
resumeVehicleSounds
Deprecated. -
AddUniqueToBuildingList
-
getSpriteManager
-