This commit is contained in:
ThatGamerBlue
2021-05-19 12:59:30 +01:00
parent 7eb96d606a
commit 29a3d313a4
438 changed files with 51991 additions and 51730 deletions

View File

@@ -1,32 +1,49 @@
import java.net.URL;
import java.awt.image.BufferedImage;
import java.awt.image.PixelGrabber;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import javax.imageio.ImageIO;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.ScriptOpcodes;
@ObfuscatedName("fr")
@ObfuscatedName("gc")
@Implements("WorldMapAreaData")
public class WorldMapAreaData extends WorldMapArea {
@ObfuscatedName("d")
@ObfuscatedName("rb")
@ObfuscatedSignature(
descriptor = "Lbd;"
)
@Export("pcmPlayer0")
static PcmPlayer pcmPlayer0;
@ObfuscatedName("ek")
@ObfuscatedSignature(
descriptor = "Lji;"
)
@Export("archive18")
static Archive archive18;
@ObfuscatedName("k")
@Export("worldMapData0Set")
HashSet worldMapData0Set;
@ObfuscatedName("c")
@ObfuscatedName("r")
@Export("worldMapData1Set")
HashSet worldMapData1Set;
@ObfuscatedName("j")
@ObfuscatedName("p")
@Export("iconList")
List iconList;
WorldMapAreaData() {
} // L: 14
@ObfuscatedName("bm")
@ObfuscatedName("bj")
@ObfuscatedSignature(
descriptor = "(Lnu;Lnu;IZI)V",
garbageValue = "-1186228166"
descriptor = "(Lnk;Lnk;IZI)V",
garbageValue = "1847840337"
)
@Export("init")
void init(Buffer var1, Buffer var2, int var3, boolean var4) {
@@ -35,150 +52,123 @@ public class WorldMapAreaData extends WorldMapArea {
this.worldMapData0Set = new HashSet(var5); // L: 19
int var6;
for (var6 = 0; var6 < var5; ++var6) { // L: 20
for (var6 = 0; var6 < var5; ++var6) {
WorldMapData_0 var7 = new WorldMapData_0(); // L: 21
try {
var7.init(var2); // L: 23
} catch (IllegalStateException var12) { // L: 25
continue; // L: 26
}
this.worldMapData0Set.add(var7); // L: 28
}
var6 = var2.readUnsignedShort(); // L: 30
this.worldMapData1Set = new HashSet(var6);
for (int var10 = 0; var10 < var6; ++var10) { // L: 32
WorldMapData_1 var8 = new WorldMapData_1();
try {
var8.init(var2);
} catch (IllegalStateException var11) {
var7.init(var2);
} catch (IllegalStateException var12) {
continue;
}
this.worldMapData1Set.add(var8);
this.worldMapData0Set.add(var7);
}
this.initIconsList(var2, var4);
}
var6 = var2.readUnsignedShort();
this.worldMapData1Set = new HashSet(var6);
@ObfuscatedName("bz")
for (int var10 = 0; var10 < var6; ++var10) {
WorldMapData_1 var8 = new WorldMapData_1(); // L: 33
try {
var8.init(var2); // L: 35
} catch (IllegalStateException var11) { // L: 37
continue; // L: 38
}
this.worldMapData1Set.add(var8); // L: 40
}
this.initIconsList(var2, var4); // L: 42
} // L: 43
@ObfuscatedName("be")
@ObfuscatedSignature(
descriptor = "(Lnu;ZI)V",
garbageValue = "-770265064"
descriptor = "(Lnk;ZI)V",
garbageValue = "-2146987999"
)
@Export("initIconsList")
void initIconsList(Buffer var1, boolean var2) {
this.iconList = new LinkedList();
int var3 = var1.readUnsignedShort();
this.iconList = new LinkedList(); // L: 46
int var3 = var1.readUnsignedShort(); // L: 47
for (int var4 = 0; var4 < var3; ++var4) { // L: 48
int var5 = var1.method6597();
Coord var6 = new Coord(var1.readInt());
boolean var7 = var1.readUnsignedByte() == 1;
int var5 = var1.method6464(); // L: 49
Coord var6 = new Coord(var1.readInt()); // L: 50
boolean var7 = var1.readUnsignedByte() == 1; // L: 51
if (var2 || !var7) { // L: 52
this.iconList.add(new WorldMapIcon_0((Coord)null, var6, var5, (WorldMapLabel)null)); // L: 53
}
}
} // L: 56
@ObfuscatedName("h")
@ObfuscatedSignature(
descriptor = "(IB)Let;",
garbageValue = "0"
)
@Export("WorldMapElement_get")
public static WorldMapElement WorldMapElement_get(int var0) {
return var0 >= 0 && var0 < WorldMapElement.WorldMapElement_cached.length && WorldMapElement.WorldMapElement_cached[var0] != null ? WorldMapElement.WorldMapElement_cached[var0] : new WorldMapElement(var0); // L: 44 45
}
@ObfuscatedName("f")
@ObfuscatedName("h")
@ObfuscatedSignature(
descriptor = "(B)Z",
garbageValue = "1"
descriptor = "([BI)Low;",
garbageValue = "633524890"
)
@Export("loadWorlds")
static boolean loadWorlds() {
@Export("convertJpgToSprite")
public static final SpritePixels convertJpgToSprite(byte[] var0) {
BufferedImage var1 = null; // L: 20
try {
if (World.World_request == null) { // L: 31
World.World_request = class32.urlRequester.request(new URL(class244.field2909));
} else if (World.World_request.isDone()) { // L: 33
byte[] var0 = World.World_request.getResponse(); // L: 34
Buffer var1 = new Buffer(var0); // L: 35
var1.readInt(); // L: 36
World.World_count = var1.readUnsignedShort(); // L: 37
class9.World_worlds = new World[World.World_count]; // L: 38
World var3;
for (int var2 = 0; var2 < World.World_count; var3.index = var2++) { // L: 39 47
var3 = class9.World_worlds[var2] = new World(); // L: 40
var3.id = var1.readUnsignedShort(); // L: 41
var3.properties = var1.readInt(); // L: 42
var3.host = var1.readStringCp1252NullTerminated();
var3.activity = var1.readStringCp1252NullTerminated();
var3.location = var1.readUnsignedByte(); // L: 45
var3.population = var1.readShort(); // L: 46
}
class208.sortWorlds(class9.World_worlds, 0, class9.World_worlds.length - 1, World.World_sortOption1, World.World_sortOption2); // L: 49
World.World_request = null; // L: 50
return true; // L: 51
}
} catch (Exception var4) { // L: 55
var4.printStackTrace(); // L: 56
World.World_request = null; // L: 57
var1 = ImageIO.read(new ByteArrayInputStream(var0)); // L: 22
int var2 = var1.getWidth(); // L: 23
int var3 = var1.getHeight(); // L: 24
int[] var4 = new int[var2 * var3]; // L: 25
PixelGrabber var5 = new PixelGrabber(var1, 0, 0, var2, var3, var4, 0, var2); // L: 26
var5.grabPixels(); // L: 27
return new SpritePixels(var4, var2, var3); // L: 28
} catch (IOException var7) { // L: 30
} catch (InterruptedException var8) { // L: 31
}
return false; // L: 59
return new SpritePixels(0, 0); // L: 32
}
@ObfuscatedName("u")
@ObfuscatedName("j")
@ObfuscatedSignature(
descriptor = "(I)V",
garbageValue = "-1371665339"
descriptor = "(ILci;ZI)I",
garbageValue = "995249134"
)
public static void method3212() {
VarbitComposition.VarbitDefinition_cached.clear(); // L: 43
} // L: 44
@ObfuscatedName("kr")
@ObfuscatedSignature(
descriptor = "(Ljava/lang/String;ZI)V",
garbageValue = "1280452567"
)
@Export("findItemDefinitions")
static void findItemDefinitions(String var0, boolean var1) {
var0 = var0.toLowerCase(); // L: 11633
short[] var2 = new short[16]; // L: 11634
int var3 = 0; // L: 11635
for (int var4 = 0; var4 < UserComparator8.ItemDefinition_fileCount; ++var4) { // L: 11636
ItemComposition var9 = class23.ItemDefinition_get(var4); // L: 11637
if ((!var1 || var9.isTradable) && var9.noteTemplate == -1 && var9.name.toLowerCase().indexOf(var0) != -1) { // L: 11638 11639 11640
if (var3 >= 250) { // L: 11641
ItemLayer.foundItemIdCount = -1; // L: 11642
class19.foundItemIds = null; // L: 11643
return; // L: 11644
static int method3668(int var0, Script var1, boolean var2) {
Widget var3 = DevicePcmPlayerProvider.getWidget(Interpreter.Interpreter_intStack[--WorldMapCacheName.Interpreter_intStackSize]); // L: 1376
if (var0 == ScriptOpcodes.IF_GETTARGETMASK) { // L: 1377
Interpreter.Interpreter_intStack[++WorldMapCacheName.Interpreter_intStackSize - 1] = AttackOption.Widget_unpackTargetMask(class26.getWidgetFlags(var3)); // L: 1378
return 1; // L: 1379
} else if (var0 != ScriptOpcodes.IF_GETOP) { // L: 1381
if (var0 == ScriptOpcodes.IF_GETOPBASE) { // L: 1388
if (var3.dataText == null) { // L: 1389
Interpreter.Interpreter_stringStack[++class13.Interpreter_stringStackSize - 1] = "";
} else {
Interpreter.Interpreter_stringStack[++class13.Interpreter_stringStackSize - 1] = var3.dataText; // L: 1390
}
if (var3 >= var2.length) { // L: 11646
short[] var6 = new short[var2.length * 2]; // L: 11647
for (int var7 = 0; var7 < var3; ++var7) { // L: 11648
var6[var7] = var2[var7];
}
var2 = var6; // L: 11649
}
var2[var3++] = (short)var4; // L: 11651
return 1; // L: 1391
} else {
return 2; // L: 1393
}
} else {
int var4 = Interpreter.Interpreter_intStack[--WorldMapCacheName.Interpreter_intStackSize]; // L: 1382
--var4; // L: 1383
if (var3.actions != null && var4 < var3.actions.length && var3.actions[var4] != null) { // L: 1384
Interpreter.Interpreter_stringStack[++class13.Interpreter_stringStackSize - 1] = var3.actions[var4]; // L: 1385
} else {
Interpreter.Interpreter_stringStack[++class13.Interpreter_stringStackSize - 1] = "";
}
return 1; // L: 1386
}
class19.foundItemIds = var2; // L: 11653
class203.foundItemIndex = 0; // L: 11654
ItemLayer.foundItemIdCount = var3; // L: 11655
String[] var8 = new String[ItemLayer.foundItemIdCount]; // L: 11656
for (int var5 = 0; var5 < ItemLayer.foundItemIdCount; ++var5) { // L: 11657
var8[var5] = class23.ItemDefinition_get(var2[var5]).name;
}
short[] var10 = class19.foundItemIds; // L: 11658
class283.sortItemsByName(var8, var10, 0, var8.length - 1); // L: 11660
} // L: 11662
}
}