Class IsoRegions
java.lang.Object
zombie.iso.areas.isoregion.IsoRegions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final int
static final int
static final int
protected static final int
static final int
static final int
protected static boolean
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final String
static final String
static final String
static final String
protected static int
protected static int
static boolean
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte
calculateSquareFlags
(IsoGridSquare isoGridSquare) protected static void
static File
getChunkFile
(int chunkX, int chunkY) static IChunkRegion
getChunkRegion
(int x, int y, int z) Returns a IChunkRegion for the square.static DataChunk
getDataChunk
(int chunkx, int chunky) Returns a DataChunk for the square.protected static DataRoot
static File
static File
static IWorldRegion
getIsoWorldRegion
(int x, int y, int z) Returns a IWorldRegion for the square.static IsoRegionsLogger
static byte
GetOppositeDir
(byte dir) protected static IsoRegionWorker
static byte
getSquareFlags
(int x, int y, int z) static int
hash
(int x, int y) static void
init()
static boolean
static void
static void
static void
receiveClientRequestFullDataChunks
(ByteBuffer input, UdpConnection conn) static void
static void
reset()
static void
static void
setDebugLoadAllChunks
(boolean b) static void
Needs to be called before a player manipulates the grid.static void
Called after the grid has been manipulated by a player.static void
squareChanged
(IsoGridSquare gs, boolean isRemoval) Called after the grid has been manipulated by a player.static void
update()
static void
-
Field Details
-
SINGLE_CHUNK_PACKET_SIZE
public static final int SINGLE_CHUNK_PACKET_SIZE- See Also:
-
CHUNKS_DATA_PACKET_SIZE
public static final int CHUNKS_DATA_PACKET_SIZE- See Also:
-
PRINT_D
public static boolean PRINT_D -
CELL_DIM
public static final int CELL_DIM -
CELL_CHUNK_DIM
public static final int CELL_CHUNK_DIM -
CHUNK_DIM
public static final int CHUNK_DIM- See Also:
-
CHUNK_MAX_Z
public static final int CHUNK_MAX_Z- See Also:
-
BIT_EMPTY
public static final byte BIT_EMPTY- See Also:
-
BIT_WALL_N
public static final byte BIT_WALL_N- See Also:
-
BIT_WALL_W
public static final byte BIT_WALL_W- See Also:
-
BIT_PATH_WALL_N
public static final byte BIT_PATH_WALL_N- See Also:
-
BIT_PATH_WALL_W
public static final byte BIT_PATH_WALL_W- See Also:
-
BIT_HAS_FLOOR
public static final byte BIT_HAS_FLOOR- See Also:
-
BIT_STAIRCASE
public static final byte BIT_STAIRCASE- See Also:
-
BIT_HAS_ROOF
public static final byte BIT_HAS_ROOF- See Also:
-
DIR_NONE
public static final byte DIR_NONE- See Also:
-
DIR_N
public static final byte DIR_N- See Also:
-
DIR_W
public static final byte DIR_W- See Also:
-
DIR_2D_NW
public static final byte DIR_2D_NW- See Also:
-
DIR_S
public static final byte DIR_S- See Also:
-
DIR_E
public static final byte DIR_E- See Also:
-
DIR_2D_MAX
public static final byte DIR_2D_MAX- See Also:
-
DIR_TOP
public static final byte DIR_TOP- See Also:
-
DIR_BOT
public static final byte DIR_BOT- See Also:
-
DIR_MAX
public static final byte DIR_MAX- See Also:
-
CHUNK_LOAD_DIMENSIONS
protected static final int CHUNK_LOAD_DIMENSIONS- See Also:
-
DEBUG_LOAD_ALL_CHUNKS
protected static boolean DEBUG_LOAD_ALL_CHUNKS -
FILE_PRE
- See Also:
-
FILE_SEP
- See Also:
-
FILE_EXT
- See Also:
-
FILE_DIR
- See Also:
-
lastChunkX
protected static int lastChunkX -
lastChunkY
protected static int lastChunkY
-
-
Constructor Details
-
IsoRegions
public IsoRegions()
-
-
Method Details
-
getHeaderFile
-
getDirectory
-
getChunkFile
-
GetOppositeDir
public static byte GetOppositeDir(byte dir) -
setDebugLoadAllChunks
public static void setDebugLoadAllChunks(boolean b) -
isDebugLoadAllChunks
public static boolean isDebugLoadAllChunks() -
hash
public static int hash(int x, int y) -
getDataRoot
-
init
public static void init() -
getLogger
-
log
-
log
-
warn
-
reset
public static void reset() -
receiveServerUpdatePacket
-
receiveClientRequestFullDataChunks
-
update
public static void update() -
forceRecalcSurroundingChunks
protected static void forceRecalcSurroundingChunks() -
getSquareFlags
public static byte getSquareFlags(int x, int y, int z) -
getIsoWorldRegion
Returns a IWorldRegion for the square. Note: Returned objects from this function should not be retained as the DataRoot may get swapped. Note: The IWorldRegion does get cached in IsoGridSquare for optimizing purposes but this gets handled in 'clientResetCachedRegionReferences()'- Returns:
- can be null.
-
getDataChunk
Returns a DataChunk for the square. Note: Returned objects from this function should not be retained as the DataRoot may get swapped.- Returns:
- can be null.
-
getChunkRegion
Returns a IChunkRegion for the square. Note: Returned objects from this function should not be retained as the DataRoot may get swapped.- Returns:
- can be null.
-
ResetAllDataDebug
public static void ResetAllDataDebug() -
setPreviousFlags
Needs to be called before a player manipulates the grid. Records bitFlags for the state of the square that are compared to bitFlags for the state of the square after manipulation to detect relevant changes. -
squareChanged
Called after the grid has been manipulated by a player. NOTE: setPreviousFlags needs to be called prior to the grid being manipulated by a player. -
squareChanged
Called after the grid has been manipulated by a player. NOTE: setPreviousFlags needs to be called prior to the grid being manipulated by a player. -
calculateSquareFlags
-
getRegionWorker
-