Merge remote-tracking branch 'runelite/master'
This commit is contained in:
@@ -72,8 +72,8 @@ public class FrameDumper
|
||||
store.load();
|
||||
|
||||
Storage storage = store.getStorage();
|
||||
Index frameIndex = store.getIndex(IndexType.FRAMES);
|
||||
Index framemapIndex = store.getIndex(IndexType.FRAMEMAPS);
|
||||
Index frameIndex = store.getIndex(IndexType.ANIMATIONS);
|
||||
Index framemapIndex = store.getIndex(IndexType.SKELETONS);
|
||||
|
||||
for (Archive archive : frameIndex.getArchives())
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public class FramemapDumper
|
||||
store.load();
|
||||
|
||||
Storage storage = store.getStorage();
|
||||
Index index = store.getIndex(IndexType.FRAMEMAPS);
|
||||
Index index = store.getIndex(IndexType.SKELETONS);
|
||||
|
||||
for (Archive archive : index.getArchives())
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class HeightMapDumperTest
|
||||
store.load();
|
||||
|
||||
HeightMapDumper dumper = new HeightMapDumper(store);
|
||||
dumper.load();
|
||||
dumper.load(null);
|
||||
|
||||
BufferedImage image = dumper.drawHeightMap(0);
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ public class MapDumperTest
|
||||
File base = StoreLocation.LOCATION,
|
||||
outDir = folder.newFolder();
|
||||
XteaKeyManager keyManager = new XteaKeyManager();
|
||||
keyManager.loadKeys();
|
||||
|
||||
try (Store store = new Store(base))
|
||||
{
|
||||
@@ -76,7 +75,7 @@ public class MapDumperTest
|
||||
|
||||
for (int i = 0; i < MAX_REGIONS; i++)
|
||||
{
|
||||
Integer[] keysTmp = keyManager.getKeys(i);
|
||||
int[] keys = keyManager.getKey(i);
|
||||
|
||||
int x = i >> 8;
|
||||
int y = i & 0xFF;
|
||||
@@ -95,9 +94,8 @@ public class MapDumperTest
|
||||
|
||||
Files.write(data, new File(outDir, "m" + x + "_" + y + ".dat"));
|
||||
|
||||
if (keysTmp != null)
|
||||
if (keys != null)
|
||||
{
|
||||
int[] keys = {keysTmp[0], keysTmp[1], keysTmp[2], keysTmp[3]};
|
||||
try
|
||||
{
|
||||
data = land.decompress(storage.loadArchive(land), keys);
|
||||
@@ -122,7 +120,6 @@ public class MapDumperTest
|
||||
Storage storage = store.getStorage();
|
||||
Index index = store.getIndex(IndexType.MAPS);
|
||||
XteaKeyManager keyManager = new XteaKeyManager();
|
||||
keyManager.loadKeys();
|
||||
|
||||
for (int i = 0; i < MAX_REGIONS; ++i)
|
||||
{
|
||||
@@ -143,10 +140,9 @@ public class MapDumperTest
|
||||
MapDefinition mapDef = new MapLoader().load(x, y, data);
|
||||
LocationsDefinition locDef = null;
|
||||
|
||||
Integer[] keysTmp = keyManager.getKeys(i);
|
||||
if (keysTmp != null)
|
||||
int[] keys = keyManager.getKey(i);
|
||||
if (keys != null)
|
||||
{
|
||||
int[] keys = {keysTmp[0], keysTmp[1], keysTmp[2], keysTmp[3]};
|
||||
try
|
||||
{
|
||||
data = land.decompress(storage.loadArchive(land), keys);
|
||||
|
||||
@@ -31,6 +31,7 @@ import javax.imageio.ImageIO;
|
||||
import net.runelite.cache.fs.Store;
|
||||
import net.runelite.cache.region.Region;
|
||||
import net.runelite.cache.region.RegionLoader;
|
||||
import net.runelite.cache.util.XteaKeyManager;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -56,7 +57,10 @@ public class MapImageDumperTest
|
||||
{
|
||||
store.load();
|
||||
|
||||
MapImageDumper dumper = new MapImageDumper(store);
|
||||
XteaKeyManager keyManager = new XteaKeyManager();
|
||||
keyManager.loadKeys(null);
|
||||
|
||||
MapImageDumper dumper = new MapImageDumper(store, keyManager);
|
||||
dumper.load();
|
||||
|
||||
for (int i = 0; i < Region.Z; ++i)
|
||||
@@ -82,10 +86,13 @@ public class MapImageDumperTest
|
||||
{
|
||||
store.load();
|
||||
|
||||
RegionLoader regionLoader = new RegionLoader(store);
|
||||
XteaKeyManager keyManager = new XteaKeyManager();
|
||||
keyManager.loadKeys(null);
|
||||
|
||||
RegionLoader regionLoader = new RegionLoader(store, keyManager);
|
||||
regionLoader.loadRegions();
|
||||
|
||||
MapImageDumper dumper = new MapImageDumper(store);
|
||||
MapImageDumper dumper = new MapImageDumper(store, regionLoader);
|
||||
dumper.load();
|
||||
|
||||
int z = 0;
|
||||
|
||||
@@ -67,8 +67,8 @@ public class TrackDumperTest
|
||||
store.load();
|
||||
|
||||
Storage storage = store.getStorage();
|
||||
Index index = store.getIndex(IndexType.TRACK1);
|
||||
Index index2 = store.getIndex(IndexType.TRACK2);
|
||||
Index index = store.getIndex(IndexType.MUSIC_TRACKS);
|
||||
Index index2 = store.getIndex(IndexType.MUSIC_JINGLES);
|
||||
|
||||
for (Archive archive : index.getArchives())
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public class WorldMapDumperTest
|
||||
store.load();
|
||||
|
||||
Storage storage = store.getStorage();
|
||||
Index index = store.getIndex(IndexType.WORLDMAP);
|
||||
Index index = store.getIndex(IndexType.WORLDMAP_OLD);
|
||||
Archive archive = index.getArchive(0); // there is also archive 1/2, but their data format is not this
|
||||
|
||||
byte[] archiveData = storage.loadArchive(archive);
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.junit.Test;
|
||||
public class JagexColorTest
|
||||
{
|
||||
private static final double[] BRIGHTNESS_LEVELS = {
|
||||
JagexColor.BRIGTHNESS_MIN,
|
||||
JagexColor.BRIGHTNESS_MIN,
|
||||
JagexColor.BRIGHTNESS_LOW,
|
||||
JagexColor.BRIGHTNESS_HIGH,
|
||||
JagexColor.BRIGHTNESS_MAX,
|
||||
|
||||
Reference in New Issue
Block a user