1package com.runehive.fs.cache.decoder;
3import com.runehive.fs.cache.FileSystem;
4import com.runehive.fs.cache.archive.Archive;
5import com.runehive.game.world.region.RegionDefinition;
6import org.apache.logging.log4j.LogManager;
7import org.apache.logging.log4j.Logger;
9import java.nio.ByteBuffer;
36 LOGGER.info(
"Loading region definitions.");
38 ByteBuffer buffer =
archive.getData(
"map_index");
39 int count = (buffer.getShort() & 0xFFFF);
40 for (
int i = 0; i < count; i++) {
41 int hash = buffer.getShort() & 0xFFFF;
42 int terrainFile = buffer.getShort() & 0xFFFF;
43 int objectFile = buffer.getShort() & 0xFFFF;
46 LOGGER.info(
"Loaded " + count +
" region definitions.");
Represents a file system of Caches and Archives.
static final int MANIFEST_ARCHIVE
Represents the id of the manifest archive.
Represents an archive within the Cache.
final FileSystem fs
The IndexedFileSystem.
static final Logger LOGGER
The logger that will print important information.
MapDefinitionDecoder(FileSystem fs)
Creates the MapDefinitionDecoder.
Represents a single region definition.
static void set(RegionDefinition definition)
Adds a RegionDefinition.