Refactored Js5 class

This commit is contained in:
Pazaz 2022-06-15 13:41:21 -04:00
parent c5ef44dfcb
commit bcb88470f8
49 changed files with 423 additions and 423 deletions

View file

@ -18,7 +18,7 @@ public final class AnimFrameset extends SecondaryNode {
this.frames = new AnimFrame[capacity];
@Pc(19) int[] fileIds = animsArchive.getFileIds(id);
for (@Pc(21) int i = 0; i < fileIds.length; i++) {
@Pc(37) byte[] bytes = animsArchive.getFile(id, fileIds[i]);
@Pc(37) byte[] bytes = animsArchive.fetchFile(id, fileIds[i]);
@Pc(51) int baseId = bytes[1] & 0xFF | (bytes[0] & 0xFF) << 8;
@Pc(56) AnimBase b = (AnimBase) bases.head();
@Pc(58) AnimBase base = null;

View file

@ -21,7 +21,7 @@ public class BasTypeList {
if (local10 != null) {
return local10;
}
@Pc(21) byte[] local21 = archive.getFile(32, arg0);
@Pc(21) byte[] local21 = archive.fetchFile(32, arg0);
local10 = new BasType();
if (local21 != null) {
local10.decode(new Buffer(local21));

View file

@ -3,13 +3,57 @@ package rt4;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
@OriginalClass("client!u")
public abstract class ByteArray {
@OriginalMember(owner = "client!u", name = "a", descriptor = "(I)[B")
public abstract byte[] get();
@OriginalMember(owner = "client!gk", name = "g", descriptor = "Z")
public static boolean directBuffersUnsupported = false;
@OriginalMember(owner = "client!u", name = "a", descriptor = "(I[B)V")
public abstract void set(@OriginalArg(1) byte[] bytes);
@OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B")
public static byte[] unwrap(@OriginalArg(1) Object in, @OriginalArg(2) boolean copy) {
if (in == null) {
return null;
} else if (in instanceof byte[]) {
@Pc(14) byte[] bytes = (byte[]) in;
return copy ? copy(bytes) : bytes;
} else if (in instanceof ByteArray) {
@Pc(34) ByteArray array = (ByteArray) in;
return array.get();
} else {
throw new IllegalArgumentException();
}
}
@OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B")
public static byte[] copy(@OriginalArg(1) byte[] in) {
@Pc(6) int len = in.length;
@Pc(9) byte[] out = new byte[len];
JagString.copy(in, 0, out, 0, len);
return out;
}
@OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZI[B)Ljava/lang/Object;")
public static Object wrap(@OriginalArg(2) byte[] bytes) {
if (bytes == null) {
return null;
}
if (bytes.length > 136 && !directBuffersUnsupported) {
try {
@Pc(27) ByteArray array = new DirectByteArray();
array.set(bytes);
return array;
} catch (@Pc(34) Throwable ex) {
directBuffersUnsupported = true;
}
}
return bytes;
}
@OriginalMember(owner = "client!u", name = "a", descriptor = "(I)[B")
public abstract byte[] get();
@OriginalMember(owner = "client!u", name = "a", descriptor = "(I[B)V")
public abstract void set(@OriginalArg(1) byte[] bytes);
}

View file

@ -171,14 +171,14 @@ public class ClientProt {
@Pc(14) int id;
for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) {
if (LoginManager.mapFileIds[id] != -1 && LoginManager.mapFilesBuffer[id] == null) {
LoginManager.mapFilesBuffer[id] = client.js5Archive5.getFile(LoginManager.mapFileIds[id], 0);
LoginManager.mapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.mapFileIds[id], 0);
if (LoginManager.mapFilesBuffer[id] == null) {
Static175.mapFilesMissingCount++;
fileExists = false;
}
}
if (LoginManager.locationsMapFileIds[id] != -1 && LoginManager.locationMapFilesBuffer[id] == null) {
LoginManager.locationMapFilesBuffer[id] = client.js5Archive5.getFileXTEA(LoginManager.locationsMapFileIds[id], LoginManager.regionsXteaKeys[id], 0);
LoginManager.locationMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.locationsMapFileIds[id], LoginManager.regionsXteaKeys[id], 0);
if (LoginManager.locationMapFilesBuffer[id] == null) {
fileExists = false;
Static175.mapFilesMissingCount++;
@ -187,14 +187,14 @@ public class ClientProt {
if (GlRenderer.enabled) {
if (LoginManager.underWaterMapFileIds[id] != -1 && LoginManager.underWaterMapFilesBuffer[id] == null) {
LoginManager.underWaterMapFilesBuffer[id] = client.js5Archive5.getFile(LoginManager.underWaterMapFileIds[id], 0);
LoginManager.underWaterMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterMapFileIds[id], 0);
if (LoginManager.underWaterMapFilesBuffer[id] == null) {
fileExists = false;
Static175.mapFilesMissingCount++;
}
}
if (LoginManager.underWaterLocationsMapFileIds[id] != -1 && LoginManager.underWaterLocationsMapFilesBuffer[id] == null) {
LoginManager.underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.getFile(LoginManager.underWaterLocationsMapFileIds[id], 0);
LoginManager.underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterLocationsMapFileIds[id], 0);
if (LoginManager.underWaterLocationsMapFilesBuffer[id] == null) {
Static175.mapFilesMissingCount++;
fileExists = false;
@ -203,7 +203,7 @@ public class ClientProt {
}
if (LoginManager.npcSpawnsFileIds != null && LoginManager.npcSpawnsFilesBuffer[id] == null && LoginManager.npcSpawnsFileIds[id] != -1) {
LoginManager.npcSpawnsFilesBuffer[id] = client.js5Archive5.getFileXTEA(LoginManager.npcSpawnsFileIds[id], LoginManager.regionsXteaKeys[id], 0);
LoginManager.npcSpawnsFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.npcSpawnsFileIds[id], LoginManager.regionsXteaKeys[id], 0);
if (LoginManager.npcSpawnsFilesBuffer[id] == null) {
Static175.mapFilesMissingCount++;
fileExists = false;
@ -214,7 +214,7 @@ public class ClientProt {
if (LoginManager.mapElementList == null) {
if (LoginManager.map == null || !client.js5Archive23.isGroupNameValid(JagString.concatenate(new JagString[] { LoginManager.map.group, Static50.aClass100_363 }))) {
LoginManager.mapElementList = new MapElementList(0);
} else if (client.js5Archive23.allFilesComplete(JagString.concatenate(new JagString[] { LoginManager.map.group, Static50.aClass100_363 }))) {
} else if (client.js5Archive23.isGroupReady(JagString.concatenate(new JagString[] { LoginManager.map.group, Static50.aClass100_363 }))) {
LoginManager.mapElementList = MapElementList.create(JagString.concatenate(new JagString[] { LoginManager.map.group, Static50.aClass100_363 }), client.js5Archive23);
} else {
fileExists = false;
@ -397,8 +397,8 @@ public class ClientProt {
for (@Pc(837) int local837 = chunkX - 1; local837 <= chunkZ + 1; local837++) {
for (@Pc(850) int local850 = local821 - 1; local850 <= local815 + 1; local850++) {
if (local837 < chunkX || local837 > chunkZ || local850 < local821 || local850 > local815) {
client.js5Archive5.method4486(JagString.concatenate(new JagString[] { LoginManager.aClass100_558, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) }));
client.js5Archive5.method4486(JagString.concatenate(new JagString[] { LoginManager.aClass100_1090, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) }));
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[] { LoginManager.aClass100_558, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) }));
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[] { LoginManager.aClass100_1090, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850) }));
}
}
}

View file

@ -14,7 +14,7 @@ public class ClientScriptList {
if (local12 != null) {
return local12;
}
@Pc(22) byte[] local22 = client.js5Archive12.getFile(id, 0);
@Pc(22) byte[] local22 = client.js5Archive12.fetchFile(id, 0);
if (local22 == null) {
return null;
}

View file

@ -26,7 +26,7 @@ public class CursorTypeList {
if (local10 != null) {
return local10;
}
@Pc(20) byte[] local20 = archive.getFile(33, arg0);
@Pc(20) byte[] local20 = archive.fetchFile(33, arg0);
local10 = new CursorType();
if (local20 != null) {
local10.decode(new Buffer(local20), arg0);

View file

@ -21,7 +21,7 @@ public class EnumTypeList {
if (local10 != null) {
return local10;
}
@Pc(24) byte[] local24 = archive.getFile(Static97.method1959(arg0), Static103.method2236(arg0));
@Pc(24) byte[] local24 = archive.fetchFile(Static97.method1959(arg0), Static103.method2236(arg0));
local10 = new EnumType();
if (local24 != null) {
local10.decode(new Buffer(local24));

View file

@ -24,7 +24,7 @@ public class FloTypeList {
if (local6 != null) {
return local6;
}
@Pc(30) byte[] local30 = archive.getFile(4, arg0);
@Pc(30) byte[] local30 = archive.fetchFile(4, arg0);
local6 = new FloType();
if (local30 != null) {
local6.decode(new Buffer(local30), arg0);

View file

@ -16,7 +16,7 @@ public class FluTypeList {
if (local10 != null) {
return local10;
}
@Pc(27) byte[] local27 = archive.getFile(1, arg0);
@Pc(27) byte[] local27 = archive.fetchFile(1, arg0);
local10 = new FluType();
if (local27 != null) {
local10.decode(arg0, new Buffer(local27));

View file

@ -215,7 +215,7 @@ public abstract class Font extends SecondaryNode {
@OriginalMember(owner = "client!k", name = "a", descriptor = "(IIBLclient!ve;Lclient!ve;)Lclient!rk;")
public static Font method2462(@OriginalArg(1) int arg0, @OriginalArg(3) Js5 arg1, @OriginalArg(4) Js5 arg2) {
return SpriteLoader.decode(arg1, 0, arg0) ? method799(arg2.getFile(arg0, 0)) : null;
return SpriteLoader.decode(arg1, 0, arg0) ? method799(arg2.fetchFile(arg0, 0)) : null;
}
@OriginalMember(owner = "client!rk", name = "a", descriptor = "(Lclient!na;IIIIIIIII)I")

View file

@ -14,7 +14,7 @@ public class FontMetricsList {
if (local16 != null) {
return local16;
}
@Pc(26) byte[] local26 = client.js5Archive13.getFile(arg0, 0);
@Pc(26) byte[] local26 = client.js5Archive13.fetchFile(arg0, 0);
local16 = new SoftwareFont(local26);
local16.setNameIcons(Sprites.nameIcons, null);
fontMetrics.put(local16, (long) arg0);

View file

@ -27,7 +27,7 @@ public class IdkTypeList {
if (local10 != null) {
return local10;
}
@Pc(21) byte[] local21 = archive.getFile(3, arg0);
@Pc(21) byte[] local21 = archive.fetchFile(3, arg0);
local10 = new IdkType();
if (local21 != null) {
local10.decode(new Buffer(local21));

View file

@ -32,7 +32,7 @@ public final class IntHashTable {
}
@OriginalMember(owner = "client!jg", name = "a", descriptor = "(II)I")
public final int method2405(@OriginalArg(0) int arg0) {
public final int get(@OriginalArg(0) int arg0) {
@Pc(16) int local16 = (this.anIntArray285.length >> 1) - 1;
@Pc(20) int local20 = local16 & arg0;
while (true) {

View file

@ -54,8 +54,8 @@ public class InterfaceList {
aClass153_64 = arg0;
aClass153_84 = arg2;
aClass153_85 = arg3;
components = new Component[aClass153_84.method4483()][];
aBooleanArray115 = new boolean[aClass153_84.method4483()];
components = new Component[aClass153_84.capacity()][];
aBooleanArray115 = new boolean[aClass153_84.capacity()];
}
@OriginalMember(owner = "client!ig", name = "a", descriptor = "(BI)V")
@ -63,7 +63,7 @@ public class InterfaceList {
if (arg0 == -1 || !aBooleanArray115[arg0]) {
return;
}
aClass153_84.method4490(arg0);
aClass153_84.discardUnpacked(arg0);
if (components[arg0] == null) {
return;
}
@ -89,7 +89,7 @@ public class InterfaceList {
return true;
}
if (aClass153_84.method4479(arg0)) {
if (aClass153_84.isGroupReady(arg0)) {
@Pc(25) int local25 = aClass153_84.getGroupCapacity(arg0);
if (local25 == 0) {
aBooleanArray115[arg0] = true;
@ -100,7 +100,7 @@ public class InterfaceList {
}
for (@Pc(46) int local46 = 0; local46 < local25; local46++) {
if (components[arg0][local46] == null) {
@Pc(62) byte[] local62 = aClass153_84.getFile(arg0, local46);
@Pc(62) byte[] local62 = aClass153_84.fetchFile(arg0, local46);
if (local62 != null) {
@Pc(74) Component local74 = components[arg0][local46] = new Component();
local74.id = local46 + (arg0 << 16);
@ -121,8 +121,8 @@ public class InterfaceList {
@OriginalMember(owner = "client!eb", name = "d", descriptor = "(I)V")
public static void method1287() {
components = new Component[aClass153_84.method4483()][];
aBooleanArray115 = new boolean[aClass153_84.method4483()];
components = new Component[aClass153_84.capacity()][];
aBooleanArray115 = new boolean[aClass153_84.capacity()];
}
@OriginalMember(owner = "client!i", name = "i", descriptor = "(Z)V")

View file

@ -21,7 +21,7 @@ public class InvTypeList {
if (invType != null) {
return invType;
}
@Pc(27) byte[] data = archive.getFile(5, id);
@Pc(27) byte[] data = archive.fetchFile(5, id);
invType = new InvType();
if (data != null) {
invType.decode(new Buffer(data));

View file

@ -728,7 +728,7 @@ public final class JagString implements StringInterface {
@OriginalMember(owner = "client!na", name = "hashCode", descriptor = "()I")
@Override
public final int hashCode() {
return this.method3154();
return this.getHash();
}
@OriginalMember(owner = "client!na", name = "b", descriptor = "(IZ)Z")
@ -963,7 +963,7 @@ public final class JagString implements StringInterface {
}
@OriginalMember(owner = "client!na", name = "d", descriptor = "(Z)I")
public final int method3154() {
public final int getHash() {
@Pc(7) int hash = 0;
for (@Pc(14) int c = 0; c < this.length; c++) {
hash = (this.chars[c] & 0xFF) + (hash << 5) - hash;

View file

@ -5,17 +5,22 @@ import org.openrs2.deob.annotation.OriginalClass;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
import java.util.Arrays;
@OriginalClass("client!ve")
public final class Js5 {
@OriginalMember(owner = "client!sh", name = "k", descriptor = "Z")
public static final boolean RAISE_EXCEPTIONS = false;
@OriginalMember(owner = "client!ve", name = "A", descriptor = "[[Ljava/lang/Object;")
private Object[][] anObjectArrayArray1;
private Object[][] unpacked;
@OriginalMember(owner = "client!ve", name = "M", descriptor = "[Ljava/lang/Object;")
private Object[] anObjectArray32;
private Object[] packed;
@OriginalMember(owner = "client!ve", name = "o", descriptor = "Lclient!ii;")
private Js5Index aClass70_2 = null;
private Js5Index index = null;
@OriginalMember(owner = "client!ve", name = "i", descriptor = "Lclient!v;")
private final Js5ResourceProvider provider;
@ -27,102 +32,70 @@ public final class Js5 {
private final boolean discardUnpacked;
@OriginalMember(owner = "client!ve", name = "<init>", descriptor = "(Lclient!v;ZZ)V")
public Js5(@OriginalArg(0) Js5ResourceProvider provider, @OriginalArg(1) boolean arg1, @OriginalArg(2) boolean arg2) {
public Js5(@OriginalArg(0) Js5ResourceProvider provider, @OriginalArg(1) boolean discardPacked, @OriginalArg(2) boolean discardUnpacked) {
this.provider = provider;
this.discardPacked = arg1;
this.discardUnpacked = arg2;
this.discardPacked = discardPacked;
this.discardUnpacked = discardUnpacked;
}
@OriginalMember(owner = "client!km", name = "a", descriptor = "(ILjava/lang/Object;Z)[B")
public static byte[] method2696(@OriginalArg(1) Object arg0, @OriginalArg(2) boolean arg1) {
if (arg0 == null) {
return null;
} else if (arg0 instanceof byte[]) {
@Pc(14) byte[] local14 = (byte[]) arg0;
return arg1 ? Static23.method648(local14) : local14;
} else if (arg0 instanceof ByteArray) {
@Pc(34) ByteArray local34 = (ByteArray) arg0;
return local34.get();
} else {
throw new IllegalArgumentException();
}
}
@OriginalMember(owner = "client!cj", name = "a", descriptor = "(ZI[B)Ljava/lang/Object;")
public static Object method869(@OriginalArg(2) byte[] arg0) {
if (arg0 == null) {
return null;
}
if (arg0.length > 136 && !Static84.aBoolean127) {
try {
@Pc(27) ByteArray local27 = new DirectByteArray();
local27.set(arg0);
return local27;
} catch (@Pc(34) Throwable local34) {
Static84.aBoolean127 = true;
}
}
return arg0;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(B)Z")
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(B)Z")
public final boolean fetchAll() {
if (!this.method4484()) {
if (!this.isIndexReady()) {
return false;
}
@Pc(20) boolean local20 = true;
for (@Pc(22) int local22 = 0; local22 < this.aClass70_2.anIntArray269.length; local22++) {
@Pc(38) int local38 = this.aClass70_2.anIntArray269[local22];
if (this.anObjectArray32[local38] == null) {
this.method4496(local38);
if (this.anObjectArray32[local38] == null) {
local20 = false;
@Pc(20) boolean success = true;
for (@Pc(22) int i = 0; i < this.index.anIntArray269.length; i++) {
@Pc(38) int groupId = this.index.anIntArray269[i];
if (this.packed[groupId] == null) {
this.fetchGroup(groupId);
if (this.packed[groupId] == null) {
success = false;
}
}
}
return local20;
return success;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(II)I")
private int method4476(@OriginalArg(0) int arg0) {
if (this.method4492(arg0)) {
return this.anObjectArray32[arg0] == null ? this.provider.method524(arg0) : 100;
private int getPercentageComplete(@OriginalArg(0) int group) {
if (this.isGroupValid(group)) {
return this.packed[group] == null ? this.provider.getPercentageComplete(group) : 100;
} else {
return 0;
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(IZZ)V")
public final void discardNames(@OriginalArg(1) boolean arg0) {
if (!this.method4484()) {
public final void discardNames(@OriginalArg(1) boolean groups) {
if (!this.isIndexReady()) {
return;
}
if (arg0) {
this.aClass70_2.anIntArray271 = null;
this.aClass70_2.aClass76_1 = null;
if (groups) {
this.index.groupNameHashes = null;
this.index.groupNameHashTable = null;
}
this.aClass70_2.aClass76Array1 = null;
this.aClass70_2.anIntArrayArray21 = null;
this.index.fileNameHashTables = null;
this.index.fileNameHashes = null;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(ILclient!na;)I")
public final int getPercentageComplete(@OriginalArg(1) JagString arg0) {
if (this.method4484()) {
@Pc(15) JagString local15 = arg0.toLowerCase();
@Pc(29) int local29 = this.aClass70_2.aClass76_1.method2405(local15.method3154());
return this.method4476(local29);
public final int getPercentageComplete(@OriginalArg(1) JagString group) {
if (this.isIndexReady()) {
@Pc(15) JagString lower = group.toLowerCase();
@Pc(29) int groupId = this.index.groupNameHashTable.get(lower.getHash());
return this.getPercentageComplete(groupId);
} else {
return 0;
}
}
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(II)Z")
public final boolean method4479(@OriginalArg(1) int arg0) {
if (!this.method4492(arg0)) {
public final boolean isGroupReady(@OriginalArg(1) int group) {
if (!this.isGroupValid(group)) {
return false;
} else if (this.anObjectArray32[arg0] == null) {
this.method4496(arg0);
return this.anObjectArray32[arg0] != null;
} else if (this.packed[group] == null) {
this.fetchGroup(group);
return this.packed[group] != null;
} else {
return true;
}
@ -130,263 +103,261 @@ public final class Js5 {
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(B)I")
public final int getChecksum() {
if (!this.method4484()) {
if (!this.isIndexReady()) {
throw new IllegalStateException("");
}
return this.aClass70_2.anInt2911;
return this.index.checksum;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(Lclient!na;B)I")
public final int getGroupId(@OriginalArg(0) JagString name) {
if (this.method4484()) {
@Pc(16) JagString local16 = name.toLowerCase();
@Pc(27) int local27 = this.aClass70_2.aClass76_1.method2405(local16.method3154());
return this.method4492(local27) ? local27 : -1;
public final int getGroupId(@OriginalArg(0) JagString group) {
if (this.isIndexReady()) {
@Pc(16) JagString lower = group.toLowerCase();
@Pc(27) int groupId = this.index.groupNameHashTable.get(lower.getHash());
return this.isGroupValid(groupId) ? groupId : -1;
} else {
return -1;
}
}
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(I)I")
public final int method4483() {
return this.method4484() ? this.aClass70_2.anIntArray270.length : -1;
public final int capacity() {
return this.isIndexReady() ? this.index.groupCapacities.length : -1;
}
@OriginalMember(owner = "client!ve", name = "c", descriptor = "(I)Z")
private boolean method4484() {
if (this.aClass70_2 == null) {
this.aClass70_2 = this.provider.method521();
if (this.aClass70_2 == null) {
private boolean isIndexReady() {
if (this.index == null) {
this.index = this.provider.fetchIndex();
if (this.index == null) {
return false;
}
this.anObjectArrayArray1 = new Object[this.aClass70_2.anInt2907][];
this.anObjectArray32 = new Object[this.aClass70_2.anInt2907];
this.unpacked = new Object[this.index.capacity][];
this.packed = new Object[this.index.capacity];
}
return true;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(ILclient!na;Lclient!na;)[B")
public final byte[] fetchFile(@OriginalArg(1) JagString arg0, @OriginalArg(2) JagString arg1) {
if (!this.method4484()) {
public final byte[] fetchFile(@OriginalArg(1) JagString file, @OriginalArg(2) JagString group) {
if (!this.isIndexReady()) {
return null;
}
@Pc(15) JagString local15 = arg1.toLowerCase();
@Pc(19) JagString local19 = arg0.toLowerCase();
@Pc(28) int local28 = this.aClass70_2.aClass76_1.method2405(local15.method3154());
if (this.method4492(local28)) {
@Pc(53) int local53 = this.aClass70_2.aClass76Array1[local28].method2405(local19.method3154());
return this.getFile(local28, local53);
@Pc(15) JagString groupLower = group.toLowerCase();
@Pc(19) JagString fileLower = file.toLowerCase();
@Pc(28) int groupId = this.index.groupNameHashTable.get(groupLower.getHash());
if (this.isGroupValid(groupId)) {
@Pc(53) int fileId = this.index.fileNameHashTables[groupId].get(fileLower.getHash());
return this.fetchFile(groupId, fileId);
} else {
return null;
}
}
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(ILclient!na;)V")
public final void method4486(@OriginalArg(1) JagString arg0) {
if (this.method4484()) {
@Pc(13) JagString local13 = arg0.toLowerCase();
@Pc(22) int local22 = this.aClass70_2.aClass76_1.method2405(local13.method3154());
this.method4493(local22);
public final void prefetchGroup(@OriginalArg(1) JagString group) {
if (this.isIndexReady()) {
@Pc(13) JagString lower = group.toLowerCase();
@Pc(22) int groupId = this.index.groupNameHashTable.get(lower.getHash());
this.prefetchGroup(groupId);
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(Lclient!na;BLclient!na;)Z")
public final boolean isFileReady(@OriginalArg(0) JagString arg0, @OriginalArg(2) JagString arg1) {
if (!this.method4484()) {
public final boolean isFileReady(@OriginalArg(0) JagString file, @OriginalArg(2) JagString group) {
if (!this.isIndexReady()) {
return false;
}
@Pc(17) JagString local17 = arg1.toLowerCase();
@Pc(21) JagString local21 = arg0.toLowerCase();
@Pc(30) int local30 = this.aClass70_2.aClass76_1.method2405(local17.method3154());
if (this.method4492(local30)) {
@Pc(49) int local49 = this.aClass70_2.aClass76Array1[local30].method2405(local21.method3154());
return this.isFileReady(local49, local30);
@Pc(17) JagString groupLower = group.toLowerCase();
@Pc(21) JagString fileLower = file.toLowerCase();
@Pc(30) int groupId = this.index.groupNameHashTable.get(groupLower.getHash());
if (this.isGroupValid(groupId)) {
@Pc(49) int fileId = this.index.fileNameHashTables[groupId].get(fileLower.getHash());
return this.isFileReady(fileId, groupId);
} else {
return false;
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(I[III)[B")
public final byte[] getFileXTEA(@OriginalArg(0) int arg0, @OriginalArg(1) int[] arg1, @OriginalArg(3) int arg2) {
if (!this.method4501(arg0, arg2)) {
public final byte[] fetchFile(@OriginalArg(0) int group, @OriginalArg(1) int[] key, @OriginalArg(3) int file) {
if (!this.isFileValid(group, file)) {
return null;
}
if (this.anObjectArrayArray1[arg0] == null || this.anObjectArrayArray1[arg0][arg2] == null) {
@Pc(30) boolean local30 = this.method4494(arg0, arg1);
if (!local30) {
this.method4496(arg0);
local30 = this.method4494(arg0, arg1);
if (!local30) {
if (this.unpacked[group] == null || this.unpacked[group][file] == null) {
@Pc(30) boolean success = this.unpackGroup(group, key);
if (!success) {
this.fetchGroup(group);
success = this.unpackGroup(group, key);
if (!success) {
return null;
}
}
}
@Pc(64) byte[] local64 = method2696(this.anObjectArrayArray1[arg0][arg2], false);
@Pc(64) byte[] bytes = ByteArray.unwrap(this.unpacked[group][file], false);
if (this.discardUnpacked) {
this.anObjectArrayArray1[arg0][arg2] = null;
if (this.aClass70_2.anIntArray270[arg0] == 1) {
this.anObjectArrayArray1[arg0] = null;
this.unpacked[group][file] = null;
if (this.index.groupCapacities[group] == 1) {
this.unpacked[group] = null;
}
}
return local64;
return bytes;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(BLclient!na;)Z")
public final boolean allFilesComplete(@OriginalArg(1) JagString arg0) {
if (this.method4484()) {
@Pc(14) JagString local14 = arg0.toLowerCase();
@Pc(25) int local25 = this.aClass70_2.aClass76_1.method2405(local14.method3154());
return this.method4479(local25);
public final boolean isGroupReady(@OriginalArg(1) JagString group) {
if (this.isIndexReady()) {
@Pc(14) JagString lower = group.toLowerCase();
@Pc(25) int groupId = this.index.groupNameHashTable.get(lower.getHash());
return this.isGroupReady(groupId);
} else {
return false;
}
}
@OriginalMember(owner = "client!ve", name = "c", descriptor = "(II)V")
public final void method4490(@OriginalArg(1) int arg0) {
if (this.method4492(arg0) && this.anObjectArrayArray1 != null) {
this.anObjectArrayArray1[arg0] = null;
public final void discardUnpacked(@OriginalArg(1) int group) {
if (this.isGroupValid(group) && this.unpacked != null) {
this.unpacked[group] = null;
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(BII)Z")
public final boolean isFileReady(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1) {
if (!this.method4501(arg1, arg0)) {
public final boolean isFileReady(@OriginalArg(1) int file, @OriginalArg(2) int group) {
if (!this.isFileValid(group, file)) {
return false;
} else if (this.anObjectArrayArray1[arg1] != null && this.anObjectArrayArray1[arg1][arg0] != null) {
} else if (this.unpacked[group] != null && this.unpacked[group][file] != null) {
return true;
} else if (this.anObjectArray32[arg1] == null) {
this.method4496(arg1);
return this.anObjectArray32[arg1] != null;
} else if (this.packed[group] == null) {
this.fetchGroup(group);
return this.packed[group] != null;
} else {
return true;
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(ZI)Z")
private boolean method4492(@OriginalArg(1) int arg0) {
if (!this.method4484()) {
private boolean isGroupValid(@OriginalArg(1) int group) {
if (!this.isIndexReady()) {
return false;
} else if (arg0 >= 0 && this.aClass70_2.anIntArray270.length > arg0 && this.aClass70_2.anIntArray270[arg0] != 0) {
} else if (group >= 0 && this.index.groupCapacities.length > group && this.index.groupCapacities[group] != 0) {
return true;
} else if (Static228.aBoolean248) {
throw new IllegalArgumentException(Integer.toString(arg0));
} else if (RAISE_EXCEPTIONS) {
throw new IllegalArgumentException(Integer.toString(group));
} else {
return false;
}
}
@OriginalMember(owner = "client!ve", name = "d", descriptor = "(II)V")
private void method4493(@OriginalArg(1) int arg0) {
this.provider.method522(arg0);
private void prefetchGroup(@OriginalArg(1) int group) {
this.provider.prefetchGroup(group);
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(IZ[I)Z")
private boolean method4494(@OriginalArg(0) int arg0, @OriginalArg(2) int[] arg1) {
if (!this.method4492(arg0)) {
private boolean unpackGroup(@OriginalArg(0) int group, @OriginalArg(2) int[] key) {
if (!this.isGroupValid(group)) {
return false;
} else if (this.anObjectArray32[arg0] == null) {
} else if (this.packed[group] == null) {
return false;
} else {
@Pc(25) int[] local25 = this.aClass70_2.anIntArrayArray22[arg0];
@Pc(31) int local31 = this.aClass70_2.anIntArray272[arg0];
if (this.anObjectArrayArray1[arg0] == null) {
this.anObjectArrayArray1[arg0] = new Object[this.aClass70_2.anIntArray270[arg0]];
@Pc(25) int[] fileIds = this.index.fileIds[group];
@Pc(31) int groupSize = this.index.groupSizes[group];
if (this.unpacked[group] == null) {
this.unpacked[group] = new Object[this.index.groupCapacities[group]];
}
@Pc(48) boolean local48 = true;
@Pc(53) Object[] local53 = this.anObjectArrayArray1[arg0];
for (@Pc(55) int local55 = 0; local55 < local31; local55++) {
@Pc(62) int local62;
if (local25 == null) {
local62 = local55;
@Pc(48) boolean valid = true;
@Pc(53) Object[] unpacked = this.unpacked[group];
for (@Pc(55) int i = 0; i < groupSize; i++) {
@Pc(62) int fileId;
if (fileIds == null) {
fileId = i;
} else {
local62 = local25[local55];
fileId = fileIds[i];
}
if (local53[local62] == null) {
local48 = false;
if (unpacked[fileId] == null) {
valid = false;
break;
}
}
if (local48) {
if (valid) {
return true;
}
@Pc(114) byte[] local114;
if (arg1 == null || arg1[0] == 0 && arg1[1] == 0 && arg1[2] == 0 && arg1[3] == 0) {
local114 = method2696(this.anObjectArray32[arg0], false);
@Pc(114) byte[] compressed;
if (key == null || key[0] == 0 && key[1] == 0 && key[2] == 0 && key[3] == 0) {
compressed = ByteArray.unwrap(this.packed[group], false);
} else {
local114 = method2696(this.anObjectArray32[arg0], true);
@Pc(128) Buffer local128 = new Buffer(local114);
local128.tinydec(arg1, local128.data.length);
compressed = ByteArray.unwrap(this.packed[group], true);
@Pc(128) Buffer buffer = new Buffer(compressed);
buffer.tinydec(key, buffer.data.length);
}
@Pc(140) byte[] local140;
@Pc(140) byte[] uncompressed;
try {
local140 = Js5Compression.uncompress(local114);
} catch (@Pc(142) RuntimeException local142) {
System.out.println("T3 - " + (arg1 != null) + "," + arg0 + "," + local114.length + "," + Buffer.crc32(local114, local114.length) + "," + Buffer.crc32(local114, local114.length - 2) + "," + this.aClass70_2.anIntArray268[arg0] + "," + this.aClass70_2.anInt2911);
local140 = new byte[] { 0 };
uncompressed = Js5Compression.uncompress(compressed);
} catch (@Pc(142) RuntimeException ex) {
System.out.println("T3 - " + (key != null) + "," + group + "," + compressed.length + "," + Buffer.crc32(compressed, compressed.length) + "," + Buffer.crc32(compressed, compressed.length - 2) + "," + this.index.groupChecksums[group] + "," + this.index.checksum);
uncompressed = new byte[] { 0 };
}
if (this.discardPacked) {
this.anObjectArray32[arg0] = null;
this.packed[group] = null;
}
@Pc(213) int local213;
if (local31 > 1) {
local213 = local140.length;
@Pc(216) int local216 = local213 - 1;
@Pc(220) int local220 = local140[local216] & 0xFF;
@Pc(228) int local228 = local216 - local31 * local220 * 4;
@Pc(233) Buffer local233 = new Buffer(local140);
local233.offset = local228;
@Pc(239) int[] local239 = new int[local31];
@Pc(250) int local250;
@Pc(252) int local252;
for (@Pc(241) int local241 = 0; local241 < local220; local241++) {
local250 = 0;
for (local252 = 0; local252 < local31; local252++) {
local250 += local233.g4();
if (local25 == null) {
}
local239[local252] += local250;
@Pc(213) int start;
if (groupSize > 1) {
start = uncompressed.length;
@Pc(216) int position = start - 1;
@Pc(220) int stripes = uncompressed[position] & 0xFF;
@Pc(228) int bufferPosition = position - groupSize * stripes * 4;
@Pc(233) Buffer buffer = new Buffer(uncompressed);
buffer.offset = bufferPosition;
@Pc(239) int[] lens = new int[groupSize];
@Pc(250) int len;
@Pc(252) int j;
for (@Pc(241) int i = 0; i < stripes; i++) {
len = 0;
for (j = 0; j < groupSize; j++) {
len += buffer.g4();
lens[j] += len;
}
}
@Pc(282) byte[][] local282 = new byte[local31][];
for (local250 = 0; local250 < local31; local250++) {
local282[local250] = new byte[local239[local250]];
local239[local250] = 0;
@Pc(282) byte[][] extracted = new byte[groupSize][];
for (len = 0; len < groupSize; len++) {
extracted[len] = new byte[lens[len]];
lens[len] = 0;
}
local233.offset = local228;
local250 = 0;
@Pc(320) int local320;
for (local252 = 0; local252 < local220; local252++) {
local320 = 0;
for (@Pc(322) int local322 = 0; local322 < local31; local322++) {
local320 += local233.g4();
JagString.copy(local140, local250, local282[local322], local239[local322], local320);
local250 += local320;
local239[local322] += local320;
buffer.offset = bufferPosition;
len = 0;
@Pc(320) int off;
for (j = 0; j < stripes; j++) {
off = 0;
for (@Pc(322) int k = 0; k < groupSize; k++) {
off += buffer.g4();
JagString.copy(uncompressed, len, extracted[k], lens[k], off);
len += off;
lens[k] += off;
}
}
for (local252 = 0; local252 < local31; local252++) {
if (local25 == null) {
local320 = local252;
for (j = 0; j < groupSize; j++) {
if (fileIds == null) {
off = j;
} else {
local320 = local25[local252];
off = fileIds[j];
}
if (this.discardUnpacked) {
local53[local320] = local282[local252];
unpacked[off] = extracted[j];
} else {
local53[local320] = method869(local282[local252]);
unpacked[off] = ByteArray.wrap(extracted[j]);
}
}
} else {
if (local25 == null) {
local213 = 0;
if (fileIds == null) {
start = 0;
} else {
local213 = local25[0];
start = fileIds[0];
}
if (this.discardUnpacked) {
local53[local213] = local140;
unpacked[start] = uncompressed;
} else {
local53[local213] = method869(local140);
unpacked[start] = ByteArray.wrap(uncompressed);
}
}
return true;
@ -394,25 +365,25 @@ public final class Js5 {
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(IBI)[B")
public final byte[] getFile(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {
return this.getFileXTEA(arg0, null, arg1);
public final byte[] fetchFile(@OriginalArg(0) int group, @OriginalArg(2) int file) {
return this.fetchFile(group, null, file);
}
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(ZI)V")
private void method4496(@OriginalArg(1) int arg0) {
private void fetchGroup(@OriginalArg(1) int group) {
if (this.discardPacked) {
this.anObjectArray32[arg0] = this.provider.method525(arg0);
this.packed[group] = this.provider.fetchGroup(group);
} else {
this.anObjectArray32[arg0] = method869(this.provider.method525(arg0));
this.packed[group] = ByteArray.wrap(this.provider.fetchGroup(group));
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(Lclient!na;I)Z")
public final boolean isGroupNameValid(@OriginalArg(0) JagString arg0) {
if (this.method4484()) {
@Pc(19) JagString local19 = arg0.toLowerCase();
@Pc(28) int local28 = this.aClass70_2.aClass76_1.method2405(local19.method3154());
return local28 >= 0;
public final boolean isGroupNameValid(@OriginalArg(0) JagString group) {
if (this.isIndexReady()) {
@Pc(19) JagString lower = group.toLowerCase();
@Pc(28) int groupId = this.index.groupNameHashTable.get(lower.getHash());
return groupId >= 0;
} else {
return false;
}
@ -420,110 +391,108 @@ public final class Js5 {
@OriginalMember(owner = "client!ve", name = "c", descriptor = "(B)I")
public final int getPercentageComplete() {
if (!this.method4484()) {
if (!this.isIndexReady()) {
return 0;
}
@Pc(18) int local18 = 0;
@Pc(20) int local20 = 0;
for (@Pc(22) int local22 = 0; local22 < this.anObjectArray32.length; local22++) {
if (this.aClass70_2.anIntArray272[local22] > 0) {
local18 += 100;
local20 += this.method4476(local22);
@Pc(18) int total = 0;
@Pc(20) int complete = 0;
for (@Pc(22) int i = 0; i < this.packed.length; i++) {
if (this.index.groupSizes[i] > 0) {
total += 100;
complete += this.getPercentageComplete(i);
}
}
if (local18 == 0) {
if (total == 0) {
return 100;
} else {
return local20 * 100 / local18;
return complete * 100 / total;
}
}
@OriginalMember(owner = "client!ve", name = "d", descriptor = "(B)V")
public final void method4499() {
if (this.anObjectArrayArray1 != null) {
for (@Pc(17) int local17 = 0; local17 < this.anObjectArrayArray1.length; local17++) {
this.anObjectArrayArray1[local17] = null;
}
public final void discardUnpacked() {
if (this.unpacked != null) {
Arrays.fill(this.unpacked, null);
}
}
@OriginalMember(owner = "client!ve", name = "e", descriptor = "(II)[B")
public final byte[] method4500(@OriginalArg(0) int arg0) {
if (!this.method4484()) {
public final byte[] fetchFile(@OriginalArg(0) int id) {
if (!this.isIndexReady()) {
return null;
} else if (this.aClass70_2.anIntArray270.length == 1) {
return this.getFile(0, arg0);
} else if (!this.method4492(arg0)) {
} else if (this.index.groupCapacities.length == 1) {
return this.fetchFile(0, id);
} else if (!this.isGroupValid(id)) {
return null;
} else if (this.aClass70_2.anIntArray270[arg0] == 1) {
return this.getFile(arg0, 0);
} else if (this.index.groupCapacities[id] == 1) {
return this.fetchFile(id, 0);
} else {
throw new RuntimeException();
}
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(III)Z")
private boolean method4501(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {
if (!this.method4484()) {
private boolean isFileValid(@OriginalArg(0) int group, @OriginalArg(2) int file) {
if (!this.isIndexReady()) {
return false;
} else if (arg0 >= 0 && arg1 >= 0 && this.aClass70_2.anIntArray270.length > arg0 && this.aClass70_2.anIntArray270[arg0] > arg1) {
} else if (group >= 0 && file >= 0 && this.index.groupCapacities.length > group && this.index.groupCapacities[group] > file) {
return true;
} else if (Static228.aBoolean248) {
throw new IllegalArgumentException(arg0 + "," + arg1);
} else if (RAISE_EXCEPTIONS) {
throw new IllegalArgumentException(group + "," + file);
} else {
return false;
}
}
@OriginalMember(owner = "client!ve", name = "b", descriptor = "(III)[B")
public final byte[] fetchFileNoDiscard(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1) {
if (!this.method4501(arg1, arg0)) {
public final byte[] fetchFileNoDiscard(@OriginalArg(0) int file, @OriginalArg(1) int group) {
if (!this.isFileValid(group, file)) {
return null;
}
if (this.anObjectArrayArray1[arg1] == null || this.anObjectArrayArray1[arg1][arg0] == null) {
@Pc(34) boolean local34 = this.method4494(arg1, null);
if (!local34) {
this.method4496(arg1);
local34 = this.method4494(arg1, null);
if (!local34) {
if (this.unpacked[group] == null || this.unpacked[group][file] == null) {
@Pc(34) boolean success = this.unpackGroup(group, null);
if (!success) {
this.fetchGroup(group);
success = this.unpackGroup(group, null);
if (!success) {
return null;
}
}
}
return method2696(this.anObjectArrayArray1[arg1][arg0], false);
return ByteArray.unwrap(this.unpacked[group][file], false);
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(BI)[I")
public final int[] getFileIds(@OriginalArg(1) int arg0) {
if (!this.method4492(arg0)) {
public final int[] getFileIds(@OriginalArg(1) int group) {
if (!this.isGroupValid(group)) {
return null;
}
@Pc(22) int[] local22 = this.aClass70_2.anIntArrayArray22[arg0];
if (local22 == null) {
local22 = new int[this.aClass70_2.anIntArray272[arg0]];
@Pc(34) int local34 = 0;
while (local22.length > local34) {
local22[local34] = local34++;
@Pc(22) int[] fileIds = this.index.fileIds[group];
if (fileIds == null) {
fileIds = new int[this.index.groupSizes[group]];
@Pc(34) int i = 0;
while (fileIds.length > i) {
fileIds[i] = i++;
}
}
return local22;
return fileIds;
}
@OriginalMember(owner = "client!ve", name = "a", descriptor = "(IB)I")
public final int getGroupCapacity(@OriginalArg(0) int arg0) {
return this.method4492(arg0) ? this.aClass70_2.anIntArray270[arg0] : 0;
public final int getGroupCapacity(@OriginalArg(0) int group) {
return this.isGroupValid(group) ? this.index.groupCapacities[group] : 0;
}
@OriginalMember(owner = "client!ve", name = "f", descriptor = "(II)Z")
public final boolean isFileReady(@OriginalArg(1) int arg0) {
if (!this.method4484()) {
public final boolean isFileReady(@OriginalArg(1) int id) {
if (!this.isIndexReady()) {
return false;
} else if (this.aClass70_2.anIntArray270.length == 1) {
return this.isFileReady(arg0, 0);
} else if (!this.method4492(arg0)) {
} else if (this.index.groupCapacities.length == 1) {
return this.isFileReady(id, 0);
} else if (!this.isGroupValid(id)) {
return false;
} else if (this.aClass70_2.anIntArray270[arg0] == 1) {
return this.isFileReady(0, arg0);
} else if (this.index.groupCapacities[id] == 1) {
return this.isFileReady(0, id);
} else {
throw new RuntimeException();
}

View file

@ -93,7 +93,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "a", descriptor = "(II)V")
@Override
public final void method522(@OriginalArg(0) int arg0) {
public final void prefetchGroup(@OriginalArg(0) int arg0) {
if (this.aClass49_2 == null) {
return;
}
@ -110,7 +110,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "b", descriptor = "(I)Lclient!ii;")
@Override
public final Js5Index method521() {
public final Js5Index fetchIndex() {
if (this.aClass70_1 != null) {
return this.aClass70_1;
}
@ -163,7 +163,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
}
}
if (this.aClass49_2 != null) {
this.aByteArray9 = new byte[this.aClass70_1.anInt2907];
this.aByteArray9 = new byte[this.aClass70_1.capacity];
this.anInt567 = 0;
}
this.aClass3_Sub2_Sub5_1 = null;
@ -200,7 +200,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "c", descriptor = "(Z)V")
public final void method534() {
if (this.aClass69_17 != null) {
if (this.method521() == null) {
if (this.fetchIndex() == null) {
return;
}
@Pc(32) boolean local32;
@ -219,8 +219,8 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
local37.unlink();
}
}
while (this.aClass70_1.anIntArray272.length > this.anInt578) {
if (this.aClass70_1.anIntArray272[this.anInt578] == 0) {
while (this.aClass70_1.groupSizes.length > this.anInt578) {
if (this.aClass70_1.groupSizes[this.anInt578] == 0) {
this.anInt578++;
} else {
if (this.aClass80_2.anInt3131 >= 250) {
@ -256,8 +256,8 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
local32 = false;
}
}
while (this.aClass70_1.anIntArray272.length > this.anInt578) {
if (this.aClass70_1.anIntArray272[this.anInt578] == 0) {
while (this.aClass70_1.groupSizes.length > this.anInt578) {
if (this.aClass70_1.groupSizes[this.anInt578] == 0) {
this.anInt578++;
} else {
if (this.aClass73_2.method2316()) {
@ -304,7 +304,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "b", descriptor = "(II)I")
@Override
public final int method524(@OriginalArg(0) int arg0) {
public final int getPercentageComplete(@OriginalArg(0) int arg0) {
@Pc(15) Js5Request local15 = (Js5Request) this.aClass133_1.get((long) arg0);
return local15 == null ? 0 : local15.method3553();
}
@ -366,7 +366,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
aCRC32_1.reset();
aCRC32_1.update(local161, 0, local161.length - 2);
local199 = (int) aCRC32_1.getValue();
if (this.aClass70_1.anIntArray268[arg1] != local199) {
if (this.aClass70_1.groupChecksums[arg1] != local199) {
throw new RuntimeException();
}
this.aClass73_2.errors = 0;
@ -401,7 +401,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
aCRC32_1.reset();
aCRC32_1.update(local161, 0, local161.length - 2);
local199 = (int) aCRC32_1.getValue();
if (this.aClass70_1.anIntArray268[arg1] != local199) {
if (this.aClass70_1.groupChecksums[arg1] != local199) {
throw new RuntimeException();
}
@Pc(385) int local385 = ((local161[local161.length - 2] & 0xFF) << 8) + (local161[local161.length - 1] & 0xFF);
@ -431,12 +431,12 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "e", descriptor = "(I)V")
public final void method537() {
if (this.aClass69_17 == null || this.method521() == null) {
if (this.aClass69_17 == null || this.fetchIndex() == null) {
return;
}
for (@Pc(21) Node local21 = this.aClass69_16.head(); local21 != null; local21 = this.aClass69_16.next()) {
@Pc(28) int local28 = (int) local21.key;
if (local28 < 0 || this.aClass70_1.anInt2907 <= local28 || this.aClass70_1.anIntArray272[local28] == 0) {
if (local28 < 0 || this.aClass70_1.capacity <= local28 || this.aClass70_1.groupSizes[local28] == 0) {
local21.unlink();
} else {
if (this.aByteArray9[local28] == 0) {
@ -454,7 +454,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "f", descriptor = "(I)I")
public final int getIndexPercentageComplete() {
if (this.method521() == null) {
if (this.fetchIndex() == null) {
return this.aClass3_Sub2_Sub5_1 == null ? 0 : this.aClass3_Sub2_Sub5_1.method3553();
} else {
return 100;
@ -463,7 +463,7 @@ public final class Js5CachedResourceProvider extends Js5ResourceProvider {
@OriginalMember(owner = "client!bg", name = "c", descriptor = "(II)[B")
@Override
public final byte[] method525(@OriginalArg(0) int arg0) {
public final byte[] fetchGroup(@OriginalArg(0) int arg0) {
@Pc(9) Js5Request local9 = this.method536(0, arg0);
if (local9 == null) {
return null;

View file

@ -68,7 +68,7 @@ public final class Js5GlTextureProvider implements TextureProvider {
} else {
this.aClass54_11 = null;
}
@Pc(51) Buffer local51 = new Buffer(arg1.getFile(0, 0));
@Pc(51) Buffer local51 = new Buffer(arg1.fetchFile(0, 0));
@Pc(55) int local55 = local51.g2();
this.aByteArray61 = new byte[local55];
this.aByteArray60 = new byte[local55];
@ -169,7 +169,7 @@ public final class Js5GlTextureProvider implements TextureProvider {
if (local14 != null) {
return local14;
}
@Pc(30) byte[] local30 = this.aClass153_73.getFile(arg0, 0);
@Pc(30) byte[] local30 = this.aClass153_73.fetchFile(arg0, 0);
if (local30 == null) {
return null;
} else {

View file

@ -9,51 +9,51 @@ import org.openrs2.deob.annotation.Pc;
public final class Js5Index {
@OriginalMember(owner = "client!ii", name = "b", descriptor = "[[I")
public int[][] anIntArrayArray21;
public int[][] fileNameHashes;
@OriginalMember(owner = "client!ii", name = "d", descriptor = "[I")
public int[] anIntArray268;
public int[] groupChecksums;
@OriginalMember(owner = "client!ii", name = "f", descriptor = "I")
public int anInt2902;
@OriginalMember(owner = "client!ii", name = "h", descriptor = "Lclient!jg;")
public IntHashTable aClass76_1;
public IntHashTable groupNameHashTable;
@OriginalMember(owner = "client!ii", name = "m", descriptor = "[I")
public int[] anIntArray269;
@OriginalMember(owner = "client!ii", name = "n", descriptor = "[I")
public int[] anIntArray270;
public int[] groupCapacities;
@OriginalMember(owner = "client!ii", name = "o", descriptor = "[I")
public int[] anIntArray271;
public int[] groupNameHashes;
@OriginalMember(owner = "client!ii", name = "p", descriptor = "[I")
public int[] anIntArray272;
public int[] groupSizes;
@OriginalMember(owner = "client!ii", name = "r", descriptor = "[I")
public int[] anIntArray273;
@OriginalMember(owner = "client!ii", name = "s", descriptor = "[[I")
public int[][] anIntArrayArray22;
public int[][] fileIds;
@OriginalMember(owner = "client!ii", name = "u", descriptor = "I")
public int anInt2907;
public int capacity;
@OriginalMember(owner = "client!ii", name = "v", descriptor = "I")
public int anInt2908;
@OriginalMember(owner = "client!ii", name = "x", descriptor = "[Lclient!jg;")
public IntHashTable[] aClass76Array1;
public IntHashTable[] fileNameHashTables;
@OriginalMember(owner = "client!ii", name = "z", descriptor = "I")
public final int anInt2911;
public final int checksum;
@OriginalMember(owner = "client!ii", name = "<init>", descriptor = "([BI)V")
public Js5Index(@OriginalArg(0) byte[] arg0, @OriginalArg(1) int arg1) {
this.anInt2911 = Buffer.crc32(arg0, arg0.length);
if (arg1 != this.anInt2911) {
this.checksum = Buffer.crc32(arg0, arg0.length);
if (arg1 != this.checksum) {
throw new RuntimeException();
}
this.method2293(arg0);
@ -83,30 +83,30 @@ public final class Js5Index {
local59 = this.anIntArray269[local66];
}
}
this.anInt2907 = local59 + 1;
this.anIntArray273 = new int[this.anInt2907];
this.anIntArrayArray22 = new int[this.anInt2907][];
this.anIntArray268 = new int[this.anInt2907];
this.anIntArray270 = new int[this.anInt2907];
this.anIntArray272 = new int[this.anInt2907];
this.capacity = local59 + 1;
this.anIntArray273 = new int[this.capacity];
this.fileIds = new int[this.capacity][];
this.groupChecksums = new int[this.capacity];
this.groupCapacities = new int[this.capacity];
this.groupSizes = new int[this.capacity];
if (local48 != 0) {
this.anIntArray271 = new int[this.anInt2907];
for (local66 = 0; local66 < this.anInt2907; local66++) {
this.anIntArray271[local66] = -1;
this.groupNameHashes = new int[this.capacity];
for (local66 = 0; local66 < this.capacity; local66++) {
this.groupNameHashes[local66] = -1;
}
for (local66 = 0; local66 < this.anInt2902; local66++) {
this.anIntArray271[this.anIntArray269[local66]] = local12.g4();
this.groupNameHashes[this.anIntArray269[local66]] = local12.g4();
}
this.aClass76_1 = new IntHashTable(this.anIntArray271);
this.groupNameHashTable = new IntHashTable(this.groupNameHashes);
}
for (local66 = 0; local66 < this.anInt2902; local66++) {
this.anIntArray268[this.anIntArray269[local66]] = local12.g4();
this.groupChecksums[this.anIntArray269[local66]] = local12.g4();
}
for (local66 = 0; local66 < this.anInt2902; local66++) {
this.anIntArray273[this.anIntArray269[local66]] = local12.g4();
}
for (local66 = 0; local66 < this.anInt2902; local66++) {
this.anIntArray272[this.anIntArray269[local66]] = local12.g2();
this.groupSizes[this.anIntArray269[local66]] = local12.g2();
}
@Pc(273) int local273;
@Pc(278) int local278;
@ -115,41 +115,41 @@ public final class Js5Index {
for (local66 = 0; local66 < this.anInt2902; local66++) {
local50 = 0;
local273 = this.anIntArray269[local66];
local278 = this.anIntArray272[local273];
local278 = this.groupSizes[local273];
local280 = -1;
this.anIntArrayArray22[local273] = new int[local278];
this.fileIds[local273] = new int[local278];
for (local288 = 0; local288 < local278; local288++) {
@Pc(306) int local306 = this.anIntArrayArray22[local273][local288] = local50 += local12.g2();
@Pc(306) int local306 = this.fileIds[local273][local288] = local50 += local12.g2();
if (local306 > local280) {
local280 = local306;
}
}
this.anIntArray270[local273] = local280 + 1;
this.groupCapacities[local273] = local280 + 1;
if (local280 + 1 == local278) {
this.anIntArrayArray22[local273] = null;
this.fileIds[local273] = null;
}
}
if (local48 == 0) {
return;
}
this.aClass76Array1 = new IntHashTable[local59 + 1];
this.anIntArrayArray21 = new int[local59 + 1][];
this.fileNameHashTables = new IntHashTable[local59 + 1];
this.fileNameHashes = new int[local59 + 1][];
for (local66 = 0; local66 < this.anInt2902; local66++) {
local273 = this.anIntArray269[local66];
local278 = this.anIntArray272[local273];
this.anIntArrayArray21[local273] = new int[this.anIntArray270[local273]];
for (local280 = 0; local280 < this.anIntArray270[local273]; local280++) {
this.anIntArrayArray21[local273][local280] = -1;
local278 = this.groupSizes[local273];
this.fileNameHashes[local273] = new int[this.groupCapacities[local273]];
for (local280 = 0; local280 < this.groupCapacities[local273]; local280++) {
this.fileNameHashes[local273][local280] = -1;
}
for (local280 = 0; local280 < local278; local280++) {
if (this.anIntArrayArray22[local273] == null) {
if (this.fileIds[local273] == null) {
local288 = local280;
} else {
local288 = this.anIntArrayArray22[local273][local280];
local288 = this.fileIds[local273][local280];
}
this.anIntArrayArray21[local273][local288] = local12.g4();
this.fileNameHashes[local273][local288] = local12.g4();
}
this.aClass76Array1[local273] = new IntHashTable(this.anIntArrayArray21[local273]);
this.fileNameHashTables[local273] = new IntHashTable(this.fileNameHashes[local273]);
}
}
}

View file

@ -12,14 +12,14 @@ public abstract class Js5ResourceProvider {
}
@OriginalMember(owner = "client!v", name = "b", descriptor = "(I)Lclient!ii;")
public abstract Js5Index method521();
public abstract Js5Index fetchIndex();
@OriginalMember(owner = "client!v", name = "a", descriptor = "(II)V")
public abstract void method522(@OriginalArg(0) int arg0);
public abstract void prefetchGroup(@OriginalArg(0) int arg0);
@OriginalMember(owner = "client!v", name = "b", descriptor = "(II)I")
public abstract int method524(@OriginalArg(0) int arg0);
public abstract int getPercentageComplete(@OriginalArg(0) int arg0);
@OriginalMember(owner = "client!v", name = "c", descriptor = "(II)[B")
public abstract byte[] method525(@OriginalArg(0) int arg0);
public abstract byte[] fetchGroup(@OriginalArg(0) int arg0);
}

View file

@ -21,7 +21,7 @@ public class LightTypeList {
if (local10 != null) {
return local10;
}
@Pc(26) byte[] local26 = archive.getFile(31, arg0);
@Pc(26) byte[] local26 = archive.fetchFile(31, arg0);
local10 = new LightType();
if (local26 != null) {
local10.decode(new Buffer(local26), arg0);

View file

@ -26,7 +26,7 @@ public class LocTypeList {
if (local15 != null) {
return local15;
}
@Pc(30) byte[] local30 = locsArchive.getFile(getGroupId(id), getFileId(id));
@Pc(30) byte[] local30 = locsArchive.fetchFile(getGroupId(id), getFileId(id));
local15 = new LocType();
local15.id = id;
if (local30 != null) {

View file

@ -45,7 +45,7 @@ public final class MapElementList {
@Pc(29) int[] local29 = arg1.getFileIds(local10);
@Pc(35) MapElementList local35 = new MapElementList(local29.length);
for (@Pc(37) int local37 = 0; local37 < local35.anInt5074; local37++) {
@Pc(56) Buffer local56 = new Buffer(arg1.getFile(local10, local29[local37]));
@Pc(56) Buffer local56 = new Buffer(arg1.fetchFile(local10, local29[local37]));
local35.aClass100Array153[local37] = local56.gjstr();
local35.aByteArray69[local37] = local56.g1b();
local35.aShortArray73[local37] = (short) local56.g2();

View file

@ -23,7 +23,7 @@ public class MapList {
@Pc(25) int local25 = archive.getGroupId(Static54.aClass100_374);
@Pc(30) int[] local30 = archive.getFileIds(local25);
for (@Pc(32) int local32 = 0; local32 < local30.length; local32++) {
aClass69_120.addTail(Map.create(new Buffer(archive.getFile(local25, local30[local32]))));
aClass69_120.addTail(Map.create(new Buffer(archive.fetchFile(local25, local30[local32]))));
}
}

View file

@ -393,7 +393,7 @@ public final class MidiInstrument extends Node {
@OriginalMember(owner = "client!jb", name = "a", descriptor = "(ILclient!ve;I)Lclient!jk;")
public static MidiInstrument method2320(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) {
@Pc(9) byte[] local9 = arg0.method4500(arg1);
@Pc(9) byte[] local9 = arg0.fetchFile(arg1);
return local9 == null ? null : new MidiInstrument(local9);
}

View file

@ -26,7 +26,7 @@ public class MsiTypeList {
if (local10 != null) {
return local10;
}
@Pc(20) byte[] local20 = archive.getFile(34, arg0);
@Pc(20) byte[] local20 = archive.fetchFile(34, arg0);
local10 = new MsiType();
if (local20 != null) {
local10.decode(new Buffer(local20), arg0);

View file

@ -28,7 +28,7 @@ public class NpcTypeList {
if (local10 != null) {
return local10;
}
@Pc(26) byte[] local26 = archive.getFile(method1447(arg0), method3322(arg0));
@Pc(26) byte[] local26 = archive.fetchFile(method1447(arg0), method3322(arg0));
local10 = new NpcType();
local10.id = arg0;
if (local26 != null) {

View file

@ -31,7 +31,7 @@ public class ObjTypeList {
aBoolean276 = true;
modelsArchive = arg2;
archive = arg0;
@Pc(23) int local23 = archive.method4483() - 1;
@Pc(23) int local23 = archive.capacity() - 1;
anInt3245 = archive.getGroupCapacity(local23) + local23 * 256;
aClass100Array104 = new JagString[] { null, null, null, null, LocalizedText.DROP};
aClass100Array87 = new JagString[] { null, null, LocalizedText.TAKE, null, null };
@ -44,7 +44,7 @@ public class ObjTypeList {
if (local6 != null) {
return local6;
}
@Pc(25) byte[] local25 = archive.getFile(Static18.method554(arg0), Static247.method4247(arg0));
@Pc(25) byte[] local25 = archive.fetchFile(Static18.method554(arg0), Static247.method4247(arg0));
local6 = new ObjType();
local6.anInt2354 = arg0;
if (local25 != null) {

View file

@ -21,7 +21,7 @@ public class ParamTypeList {
if (local6 != null) {
return local6;
}
@Pc(30) byte[] local30 = archive.getFile(11, arg0);
@Pc(30) byte[] local30 = archive.fetchFile(11, arg0);
local6 = new ParamType();
if (local30 != null) {
local6.decode(new Buffer(local30));

View file

@ -26,9 +26,9 @@ public class QuickChatCatTypeList {
}
@Pc(24) byte[] local24;
if (arg0 < 32768) {
local24 = archive1.getFile(0, arg0);
local24 = archive1.fetchFile(0, arg0);
} else {
local24 = archive2.getFile(0, arg0 & 0x7FFF);
local24 = archive2.fetchFile(0, arg0 & 0x7FFF);
}
local10 = new QuickChatCatType();
if (local24 != null) {

View file

@ -39,9 +39,9 @@ public class QuickChatPhraseTypeList {
}
@Pc(27) byte[] local27;
if (arg0 < 32768) {
local27 = archive1.getFile(1, arg0);
local27 = archive1.fetchFile(1, arg0);
} else {
local27 = archive2.getFile(1, arg0 & 0x7FFF);
local27 = archive2.fetchFile(1, arg0 & 0x7FFF);
}
local10 = new QuickChatPhraseType();
if (local27 != null) {

View file

@ -448,7 +448,7 @@ public final class RawModel extends Entity {
@OriginalMember(owner = "client!gb", name = "a", descriptor = "(Lclient!ve;II)Lclient!gb;")
public static RawModel create(@OriginalArg(0) Js5 archive, @OriginalArg(1) int id) {
@Pc(5) byte[] data = archive.getFile(id, 0);
@Pc(5) byte[] data = archive.fetchFile(id, 0);
return data == null ? null : new RawModel(data);
}

View file

@ -22,7 +22,7 @@ public class SeqTypeList {
if (local17 != null) {
return local17;
}
@Pc(32) byte[] local32 = archive.getFile(getGroupId(id), getFileId(id));
@Pc(32) byte[] local32 = archive.fetchFile(getGroupId(id), getFileId(id));
local17 = new SeqType();
local17.id = id;
if (local32 != null) {

View file

@ -128,7 +128,7 @@ public final class SoftwareFont extends Font {
@OriginalMember(owner = "client!jh", name = "a", descriptor = "(IILclient!ve;Lclient!ve;I)Lclient!dd;")
public static SoftwareFont method2412(@OriginalArg(0) int arg0, @OriginalArg(2) Js5 arg1, @OriginalArg(3) Js5 arg2) {
return SpriteLoader.decode(arg2, 0, arg0) ? method4635(arg1.getFile(arg0, 0)) : null;
return SpriteLoader.decode(arg2, 0, arg0) ? method4635(arg1.fetchFile(arg0, 0)) : null;
}
@OriginalMember(owner = "client!j", name = "a", descriptor = "([BI)Lclient!dd;")

View file

@ -301,7 +301,7 @@ public final class Song extends Node {
@OriginalMember(owner = "client!rf", name = "a", descriptor = "(Lclient!ve;II)Lclient!rf;")
public static Song create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
@Pc(5) byte[] local5 = arg0.getFile(arg1, arg2);
@Pc(5) byte[] local5 = arg0.fetchFile(arg1, arg2);
return local5 == null ? null : new Song(new Buffer(local5));
}

View file

@ -52,7 +52,7 @@ public final class SoundBank {
@OriginalMember(owner = "client!le", name = "a", descriptor = "(II[I)Lclient!kj;")
public final PcmSound method2738(@OriginalArg(0) int arg0, @OriginalArg(2) int[] arg1) {
if (this.aClass153_52.method4483() == 1) {
if (this.aClass153_52.capacity() == 1) {
return this.method2737(arg1, 0, arg0);
} else if (this.aClass153_52.getGroupCapacity(arg0) == 1) {
return this.method2737(arg1, arg0, 0);
@ -93,7 +93,7 @@ public final class SoundBank {
@OriginalMember(owner = "client!le", name = "b", descriptor = "(II[I)Lclient!kj;")
public final PcmSound method2741(@OriginalArg(1) int arg0, @OriginalArg(2) int[] arg1) {
if (this.aClass153_53.method4483() == 1) {
if (this.aClass153_53.capacity() == 1) {
return this.method2740(0, arg1, arg0);
} else if (this.aClass153_53.getGroupCapacity(arg0) == 1) {
return this.method2740(arg0, arg1, 0);

View file

@ -26,7 +26,7 @@ public class SpotAnimTypeList {
if (local10 != null) {
return local10;
}
@Pc(26) byte[] local26 = archive.getFile(method3681(arg0), method4010(arg0));
@Pc(26) byte[] local26 = archive.fetchFile(method3681(arg0), method4010(arg0));
local10 = new SpotAnimType();
local10.id = arg0;
if (local26 != null) {

View file

@ -35,7 +35,7 @@ public class SpriteLoader {
@OriginalMember(owner = "client!ta", name = "a", descriptor = "(Lclient!ve;III)Z")
public static boolean decode(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
@Pc(9) byte[] local9 = arg0.getFile(arg2, arg1);
@Pc(9) byte[] local9 = arg0.fetchFile(arg2, arg1);
if (local9 == null) {
return false;
} else {
@ -299,7 +299,7 @@ public class SpriteLoader {
@OriginalMember(owner = "client!uj", name = "a", descriptor = "(BLclient!ve;I)Z")
public static boolean decode(@OriginalArg(1) Js5 arg0, @OriginalArg(2) int arg1) {
@Pc(13) byte[] local13 = arg0.method4500(arg1);
@Pc(13) byte[] local13 = arg0.fetchFile(arg1);
if (local13 == null) {
return false;
} else {

View file

@ -15,9 +15,6 @@ public final class Static228 {
@OriginalMember(owner = "client!sh", name = "i", descriptor = "[[I")
public static final int[][] anIntArrayArray35 = new int[][] { { 0, 128, 0, 0, 128, 0, 128, 128 }, { 0, 128, 0, 0, 128, 0 }, { 0, 0, 64, 128, 0, 128 }, { 128, 128, 64, 128, 128, 0 }, { 0, 0, 128, 0, 128, 128, 64, 128 }, { 0, 128, 0, 0, 128, 0, 64, 128 }, { 64, 128, 0, 128, 0, 0, 64, 0 }, { 0, 0, 64, 0, 0, 64 }, { 128, 0, 128, 128, 0, 128, 0, 64, 64, 0 }, { 0, 128, 0, 0, 32, 64, 64, 96, 128, 128 }, { 0, 0, 128, 0, 128, 128, 64, 96, 32, 64 }, { 0, 0, 128, 0, 96, 32, 32, 32 } };
@OriginalMember(owner = "client!sh", name = "k", descriptor = "Z")
public static final boolean aBoolean248 = false;
@OriginalMember(owner = "client!sh", name = "a", descriptor = "(IZBIZ)V")
public static void sortWorldList(@OriginalArg(0) int arg0, @OriginalArg(1) boolean arg1, @OriginalArg(3) int arg2, @OriginalArg(4) boolean arg3) {
Static79.method1697(arg0, arg2, WorldList.sorted.length - 1, arg3, 0, arg1);

View file

@ -58,11 +58,4 @@ public final class Static23 {
}
}
@OriginalMember(owner = "client!bm", name = "a", descriptor = "(B[B)[B")
public static byte[] method648(@OriginalArg(1) byte[] arg0) {
@Pc(6) int local6 = arg0.length;
@Pc(9) byte[] local9 = new byte[local6];
JagString.copy(arg0, 0, local9, 0, local6);
return local9;
}
}

View file

@ -7,7 +7,4 @@ public final class Static84 {
@OriginalMember(owner = "client!gk", name = "d", descriptor = "F")
public static float aFloat10;
@OriginalMember(owner = "client!gk", name = "g", descriptor = "Z")
public static boolean aBoolean127 = false;
}

View file

@ -21,7 +21,7 @@ public class StructTypeList {
if (local10 != null) {
return local10;
}
@Pc(26) byte[] local26 = archive.getFile(26, arg0);
@Pc(26) byte[] local26 = archive.fetchFile(26, arg0);
local10 = new StructType();
if (local26 != null) {
local10.decode(new Buffer(local26));

View file

@ -33,7 +33,7 @@ public final class SynthSound {
@OriginalMember(owner = "client!sl", name = "a", descriptor = "(Lclient!ve;II)Lclient!sl;")
public static SynthSound create(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
@Pc(5) byte[] local5 = arg0.getFile(arg1, arg2);
@Pc(5) byte[] local5 = arg0.fetchFile(arg1, arg2);
return local5 == null ? null : new SynthSound(new Buffer(local5));
}

View file

@ -21,7 +21,7 @@ public class VarbitTypeList {
if (local10 != null) {
return local10;
}
@Pc(31) byte[] local31 = archive.getFile(method4349(arg0), method3845(arg0));
@Pc(31) byte[] local31 = archive.fetchFile(method4349(arg0), method3845(arg0));
local10 = new VarbitType();
if (local31 != null) {
local10.decode(new Buffer(local31));

View file

@ -24,7 +24,7 @@ public class VarpTypeList {
if (local10 != null) {
return local10;
}
@Pc(20) byte[] local20 = archive.getFile(16, arg0);
@Pc(20) byte[] local20 = archive.fetchFile(16, arg0);
local10 = new VarpType();
if (local20 != null) {
local10.decode(new Buffer(local20));

View file

@ -108,7 +108,7 @@ public final class VorbisSound extends Node {
@OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;)Z")
private static boolean method2344(@OriginalArg(0) Js5 arg0) {
if (!aBoolean149) {
@Pc(7) byte[] local7 = arg0.getFile(0, 0);
@Pc(7) byte[] local7 = arg0.fetchFile(0, 0);
if (local7 == null) {
return false;
}
@ -121,7 +121,7 @@ public final class VorbisSound extends Node {
@OriginalMember(owner = "client!jc", name = "a", descriptor = "(Lclient!ve;II)Lclient!jc;")
public static VorbisSound method2345(@OriginalArg(0) Js5 arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2) {
if (method2344(arg0)) {
@Pc(16) byte[] local16 = arg0.getFile(arg1, arg2);
@Pc(16) byte[] local16 = arg0.fetchFile(arg1, arg2);
return local16 == null ? null : new VorbisSound(local16);
} else {
arg0.isFileReady(arg2, arg1);

View file

@ -105,7 +105,7 @@ public class WorldMap {
}
if (loadPercentage < 10) {
if (!MapList.archive.allFilesComplete(currentMap.group)) {
if (!MapList.archive.isGroupReady(currentMap.group)) {
loadPercentage = client.js5Archive23.getPercentageComplete(currentMap.group) / 10;
return;
}
@ -187,7 +187,7 @@ public class WorldMap {
GameShell.resetTimer();
} else if (loadPercentage == 60) {
if (MapList.archive.isGroupNameValid(JagString.concatenate(new JagString[] { currentMap.group, LABELS}))) {
if (!MapList.archive.allFilesComplete(JagString.concatenate(new JagString[] { currentMap.group, LABELS}))) {
if (!MapList.archive.isGroupReady(JagString.concatenate(new JagString[] { currentMap.group, LABELS}))) {
return;
}
labels = MapElementList.create(JagString.concatenate(new JagString[] { currentMap.group, LABELS}), MapList.archive);

View file

@ -415,17 +415,17 @@ public final class client extends GameShell {
((Js5GlTextureProvider) Rasteriser.textureProvider).clear();
}
ClientScriptList.scripts.clear();
js5Archive0.method4499();
js5Archive1.method4499();
js5Archive3.method4499();
js5Archive4.method4499();
js5Archive5.method4499();
js5Archive6.method4499();
js5Archive7.method4499();
js5Archive8.method4499();
js5Archive10.method4499();
js5Archive11.method4499();
js5Archive12.method4499();
js5Archive0.discardUnpacked();
js5Archive1.discardUnpacked();
js5Archive3.discardUnpacked();
js5Archive4.discardUnpacked();
js5Archive5.discardUnpacked();
js5Archive6.discardUnpacked();
js5Archive7.discardUnpacked();
js5Archive8.discardUnpacked();
js5Archive10.discardUnpacked();
js5Archive11.discardUnpacked();
js5Archive12.discardUnpacked();
HitBarList.hitBars.clear();
}
@ -1482,7 +1482,7 @@ public final class client extends GameShell {
} else if (!js5Archive13.fetchAll()) {
mainLoadSecondaryText = JagString.concatenate(new JagString[] { LocalizedText.MAINLOAD130, JagString.parseInt(js5Archive13.getPercentageComplete() / 20 + 85), Static127.PERCENT_SIGN});
mainLoadPercentage = 85;
} else if (js5Archive23.allFilesComplete(Static165.DETAILS)) {
} else if (js5Archive23.isGroupReady(Static165.DETAILS)) {
MapList.init(Sprites.mapfunctions, js5Archive23);
mainLoadPercentage = 95;
mainLoadSecondaryText = LocalizedText.MAINLOAD130B;