|
RuneHive-Game
|
A class which parses static object definitions, which include tool.mapviewer tiles and landscapes. More...
Public Member Functions | |
| void | load (final Cache mapIndex, final RegionDefinition def) |
| RegionDecoder (FileSystem fs) | |
Creates the ObjectDefinitionDecoder. | |
| void | run () |
Private Member Functions | |
| void | parseGameObject (Region region, ByteBuffer buf, int x, int y, IntSet downHeights) |
Parses a GameObject on the specified coordinates. | |
| void | parseTerrain (Region region, ByteBuffer mapBuffer, IntSet downHeights) |
| Loads all of the tool.mapviewer indexes entries and decodes each. | |
Private Attributes | |
| final AtomicInteger | decoded = new AtomicInteger() |
| Amount of regions correctly decoded. | |
| final AtomicInteger | errors = new AtomicInteger() |
| Amount of regions incorrectly decoded. | |
| final FileSystem | fs |
| The FileSystem. | |
Static Private Attributes | |
| static final Logger | LOGGER = LogManager.getLogger(RegionDecoder.class) |
A class which parses static object definitions, which include tool.mapviewer tiles and landscapes.
Definition at line 29 of file RegionDecoder.java.
| com.runehive.fs.cache.decoder.RegionDecoder.RegionDecoder | ( | FileSystem | fs | ) |
Creates the ObjectDefinitionDecoder.
| fs | The FileSystem. |
Definition at line 53 of file RegionDecoder.java.
References fs.
| void com.runehive.fs.cache.decoder.RegionDecoder.load | ( | final Cache | mapIndex, |
| final RegionDefinition | def ) |
Definition at line 67 of file RegionDecoder.java.
References decoded, errors, com.runehive.fs.cache.Cache.get(), com.runehive.game.world.region.RegionManager.getRegion(), com.runehive.game.world.World.getRegions(), com.runehive.fs.util.CompressionUtil.gunzip(), parseGameObject(), and parseTerrain().
Referenced by run().
|
private |
Parses a GameObject on the specified coordinates.
| buf | The uncompressed game object data buffer. |
| x | The x coordinate this object is on. |
| y | The y coordinate this object is on. |
Definition at line 107 of file RegionDecoder.java.
References com.runehive.game.world.object.GameObjectDefinition.forId(), com.runehive.fs.util.ByteBufferUtil.getSmart(), com.runehive.game.world.position.Position.hash(), com.runehive.game.world.pathfinding.TraversalMap.markObject(), com.runehive.game.world.region.Region.SKIPPED_OBJECTS, com.runehive.game.world.object.ObjectDirection.valueOf(), and com.runehive.game.world.object.ObjectType.valueOf().
Referenced by load().
|
private |
Loads all of the tool.mapviewer indexes entries and decodes each.
| mapBuffer | The uncompressed tool.mapviewer entry data buffer. |
Definition at line 161 of file RegionDecoder.java.
References com.runehive.game.world.pathfinding.TraversalMap.block(), and com.runehive.game.world.position.Position.hash().
Referenced by load().
| void com.runehive.fs.cache.decoder.RegionDecoder.run | ( | ) |
Definition at line 58 of file RegionDecoder.java.
References decoded, errors, fs, com.runehive.game.world.region.RegionDefinition.getDefinitions(), load(), LOGGER, and com.runehive.fs.cache.FileSystem.MAP_INDEX.
Referenced by com.runehive.RuneHive.processSequentialStartupTasks().
|
private |
Amount of regions correctly decoded.
Definition at line 41 of file RegionDecoder.java.
|
private |
Amount of regions incorrectly decoded.
Definition at line 46 of file RegionDecoder.java.
|
private |
The FileSystem.
Definition at line 36 of file RegionDecoder.java.
Referenced by RegionDecoder(), and run().
|
staticprivate |
Definition at line 31 of file RegionDecoder.java.
Referenced by run().