Class IsoMetaGrid

java.lang.Object
zombie.iso.IsoMetaGrid

public final class IsoMetaGrid extends Object
  • Field Details

    • clipperOffset

      public static ClipperOffset clipperOffset
    • clipperBuffer

      public static ByteBuffer clipperBuffer
    • TL_Location

      public static final ThreadLocal<IsoGameCharacter.Location> TL_Location
    • minX

      public int minX
    • minY

      public int minY
    • maxX

      public int maxX
    • maxY

      public int maxY
    • minNonProceduralX

      public int minNonProceduralX
    • minNonProceduralY

      public int minNonProceduralY
    • maxNonProceduralX

      public int maxNonProceduralX
    • maxNonProceduralY

      public int maxNonProceduralY
    • zones

      public final ArrayList<Zone> zones
    • buildings

      public final ArrayList<BuildingDef> buildings
    • vehiclesZones

      public final ArrayList<VehicleZone> vehiclesZones
    • animalZoneHandler

      public final ZoneHandler<AnimalZone> animalZoneHandler
    • metaCharacters

      public final ArrayList<IsoGameCharacter> metaCharacters
  • Constructor Details

    • IsoMetaGrid

      public IsoMetaGrid()
  • Method Details

    • getCell

      public IsoMetaCell getCell(int x, int y)
    • getCellOrCreate

      public IsoMetaCell getCellOrCreate(int x, int y)
    • setCell

      public void setCell(int x, int y, IsoMetaCell cell)
    • hasCell

      public boolean hasCell(int x, int y)
    • gridX

      public int gridX()
    • gridY

      public int gridY()
    • AddToMeta

      public void AddToMeta(IsoGameCharacter isoPlayer)
    • RemoveFromMeta

      public void RemoveFromMeta(IsoPlayer isoPlayer)
    • getMinX

      public int getMinX()
    • getMinY

      public int getMinY()
    • getMaxX

      public int getMaxX()
    • getMaxY

      public int getMaxY()
    • getZoneAt

      public Zone getZoneAt(int x, int y, int z)
    • getZonesAt

      public ArrayList<Zone> getZonesAt(int x, int y, int z)
    • getZonesAt

      public ArrayList<Zone> getZonesAt(int x, int y, int z, ArrayList<Zone> result)
    • getZonesIntersecting

      public ArrayList<Zone> getZonesIntersecting(int x, int y, int z, int w, int h)
    • getZonesIntersecting

      public ArrayList<Zone> getZonesIntersecting(int x, int y, int z, int w, int h, ArrayList<Zone> result)
    • getZoneWithBoundsAndType

      public Zone getZoneWithBoundsAndType(int x, int y, int z, int w, int h, String type)
    • getVehicleZoneAt

      public VehicleZone getVehicleZoneAt(int x, int y, int z)
    • getBuildingAt

      public BuildingDef getBuildingAt(int x, int y)
    • getBuildingAt

      public BuildingDef getBuildingAt(int x, int y, int z)
    • getBuildings

      public ArrayList<BuildingDef> getBuildings()
    • getRemovedBuildings

      public ArrayList<RemovedBuilding> getRemovedBuildings()
    • getAssociatedBuildingAt

      public BuildingDef getAssociatedBuildingAt(int x, int y)
    • getBuildingAtRelax

      public BuildingDef getBuildingAtRelax(int x, int y)
    • getRoomAt

      public RoomDef getRoomAt(int x, int y, int z)
    • getEmptyOutsideAt

      public RoomDef getEmptyOutsideAt(int x, int y, int z)
    • getRoomDefByID

      public RoomDef getRoomDefByID(long roomID)
    • getRoomByID

      public IsoRoom getRoomByID(long roomID)
    • getBuildingsIntersecting

      public void getBuildingsIntersecting(int x, int y, int w, int h, ArrayList<BuildingDef> result)
    • getRoomsIntersecting

      public void getRoomsIntersecting(int x, int y, int w, int h, ArrayList<RoomDef> roomDefs)
    • countRoomsIntersecting

      public int countRoomsIntersecting(int x, int y, int w, int h)
    • countNearbyBuildingsRooms

      public int countNearbyBuildingsRooms(IsoPlayer isoPlayer)
    • registerZone

      public Zone registerZone(String name, String type, int x, int y, int z, int width, int height)
    • registerZone

      public Zone registerZone(String name, String type, int x, int y, int z, int width, int height, ZoneGeometryType geometryType, gnu.trove.list.array.TIntArrayList points, int polylineWidth)
    • registerZone

      public Zone registerZone(Zone zone)
    • registerGeometryZone

      public Zone registerGeometryZone(String name, String type, int z, String geometry, se.krka.kahlua.vm.KahluaTable pointsTable, se.krka.kahlua.vm.KahluaTable properties)
    • registerZoneNoOverlap

      @Deprecated public Zone registerZoneNoOverlap(String name, String type, int x, int y, int z, int width, int height)
      Deprecated.
    • addZone

      public void addZone(Zone zone)
    • removeZone

      public void removeZone(Zone zone)
    • removeZonesForCell

      public void removeZonesForCell(int cellX, int cellY)
    • removeZonesForLotDirectory

      public void removeZonesForLotDirectory(String lotDir)
    • processZones

      public void processZones()
    • registerVehiclesZone

      public Zone registerVehiclesZone(String name, String type, int x, int y, int z, int width, int height, se.krka.kahlua.vm.KahluaTable properties)
    • registerWorldGenZone

      public Zone registerWorldGenZone(String name, String type, int x, int y, int z, int width, int height, se.krka.kahlua.vm.KahluaTable properties)
    • checkVehiclesZones

      public void checkVehiclesZones()
    • registerAnimalZone

      public Zone registerAnimalZone(String name, String type, int x, int y, int z, int width, int height, se.krka.kahlua.vm.KahluaTable properties)
    • registerAnimalZone

      public Zone registerAnimalZone(AnimalZone animalZone)
    • registerAnimalZone

      public Zone registerAnimalZone(AnimalZone animalZone, boolean bHotSave)
    • registerMannequinZone

      public Zone registerMannequinZone(String name, String type, int x, int y, int z, int width, int height, se.krka.kahlua.vm.KahluaTable properties)
    • registerRoomTone

      public void registerRoomTone(String name, String type, int x, int y, int z, int width, int height, se.krka.kahlua.vm.KahluaTable properties)
    • isZoneAbove

      public boolean isZoneAbove(Zone zone1, Zone zone2, int x, int y, int z)
    • save

      public void save(ByteBuffer output)
    • savePart

      public void savePart(ByteBuffer output, int part, boolean fromServer)
    • load

      public void load()
    • load

      public void load(ByteBuffer input)
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • wasLoaded

      public boolean wasLoaded()
    • getCellData

      public IsoMetaCell getCellData(int x, int y)
    • hasCellData

      public MetaCellPresence hasCellData(int x, int y)
    • setCellData

      public void setCellData(int x, int y, IsoMetaCell cell)
    • getCellDataAbs

      public IsoMetaCell getCellDataAbs(int x, int y)
    • getCurrentCellData

      public IsoMetaCell getCurrentCellData()
    • getMetaGridFromTile

      public IsoMetaCell getMetaGridFromTile(int wx, int wy)
    • getCurrentChunkData

      public IsoMetaChunk getCurrentChunkData()
    • getChunkData

      public IsoMetaChunk getChunkData(int chunkX, int chunkY)
    • getChunkDataFromTile

      public IsoMetaChunk getChunkDataFromTile(int x, int y)
    • isValidSquare

      public boolean isValidSquare(int x, int y)
    • isValidChunk

      public boolean isValidChunk(int wx, int wy)
    • Create

      public void Create()
    • CreateStep1

      public void CreateStep1()
    • CreateStep2

      public void CreateStep2()
    • isChunkLoaded

      public boolean isChunkLoaded(int wx, int wy)
    • Dispose

      public void Dispose()
    • getRandomIndoorCoord

      public Vector2 getRandomIndoorCoord()
    • getRandomRoomBetweenRange

      public RoomDef getRandomRoomBetweenRange(float x, float y, float min, float max)
    • getRandomRoomNotInRange

      public RoomDef getRandomRoomNotInRange(float x, float y, int range)
    • save

      public void save()
    • addCellToSave

      public void addCellToSave(IsoMetaCell cell)
    • saveToBufferMap

      public void saveToBufferMap(SaveBufferMap bufferMap)
    • saveToSaveBufferMap

      public void saveToSaveBufferMap(SaveBufferMap bufferMap, String fileName, Consumer<ByteBuffer> saveMethod)
    • saveCellsToSaveBufferMap

      public void saveCellsToSaveBufferMap(SaveBufferMap bufferMap, String path, String filter, BiConsumer<IsoMetaCell, ByteBuffer> saveMethod)
    • load

      public void load(String inFilePath, BiConsumer<ByteBuffer, Integer> loadMethod)
    • loadCells

      public void loadCells(String path, String filter, QuadConsumer<IsoMetaCell, IsoMetaGrid, ByteBuffer, Integer> loadMethod)
    • loadZone

      public void loadZone(ByteBuffer input, int WorldVersion)
    • loadAnimalZones

      public void loadAnimalZones(ByteBuffer input, int WorldVersion)
    • saveZone

      public void saveZone(ByteBuffer output)
    • saveAnimalZones

      public void saveAnimalZones(ByteBuffer output)
    • getLotDirectories

      public ArrayList<String> getLotDirectories()
    • addRoomsToAdjacentCells

      public void addRoomsToAdjacentCells(BuildingDef buildingDef)
    • addRoomsToAdjacentCells

      public void addRoomsToAdjacentCells(BuildingDef buildingDef, ArrayList<RoomDef> roomDefs)
    • removeRoomsFromAdjacentCells

      public void removeRoomsFromAdjacentCells(BuildingDef buildingDef)
    • removeRoomsFromAdjacentCells

      public void removeRoomsFromAdjacentCells(ArrayList<RoomDef> rooms, int cellX1, int cellY1, int cellX2, int cellY2, int userDefined)