runescape-client: fix the thing

This commit is contained in:
ThatGamerBlue
2020-12-11 06:14:29 +00:00
parent f74baf08ce
commit 463bc42f5f
325 changed files with 35526 additions and 35531 deletions

View File

@@ -77,15 +77,15 @@ public class WorldMapArea {
LinkedList sections;
public WorldMapArea() {
this.id = -1;
this.backGroundColor = -1;
this.zoom = -1;
this.origin = null;
this.regionLowX = Integer.MAX_VALUE;
this.regionHighX = 0;
this.regionLowY = Integer.MAX_VALUE;
this.regionHighY = 0;
this.isMain = false;
this.id = -1; // L: 9
this.backGroundColor = -1; // L: 12
this.zoom = -1; // L: 13
this.origin = null; // L: 14
this.regionLowX = Integer.MAX_VALUE; // L: 15
this.regionHighX = 0; // L: 16
this.regionLowY = Integer.MAX_VALUE; // L: 17
this.regionHighY = 0; // L: 18
this.isMain = false; // L: 19
}
@ObfuscatedName("h")
@@ -95,23 +95,23 @@ public class WorldMapArea {
)
@Export("read")
public void read(Buffer var1, int var2) {
this.id = var2;
this.internalName = var1.readStringCp1252NullTerminated();
this.externalName = var1.readStringCp1252NullTerminated();
this.origin = new Coord(var1.readInt());
this.backGroundColor = var1.readInt();
var1.readUnsignedByte();
this.isMain = var1.readUnsignedByte() == 1;
this.zoom = var1.readUnsignedByte();
int var3 = var1.readUnsignedByte();
this.sections = new LinkedList();
this.id = var2; // L: 23
this.internalName = var1.readStringCp1252NullTerminated(); // L: 24
this.externalName = var1.readStringCp1252NullTerminated(); // L: 25
this.origin = new Coord(var1.readInt()); // L: 26
this.backGroundColor = var1.readInt(); // L: 27
var1.readUnsignedByte(); // L: 28
this.isMain = var1.readUnsignedByte() == 1; // L: 29
this.zoom = var1.readUnsignedByte(); // L: 30
int var3 = var1.readUnsignedByte(); // L: 31
this.sections = new LinkedList(); // L: 32
for (int var4 = 0; var4 < var3; ++var4) {
this.sections.add(this.readWorldMapSection(var1));
for (int var4 = 0; var4 < var3; ++var4) { // L: 33
this.sections.add(this.readWorldMapSection(var1)); // L: 34
}
this.setBounds();
}
this.setBounds(); // L: 36
} // L: 37
@ObfuscatedName("v")
@ObfuscatedSignature(
@@ -120,28 +120,28 @@ public class WorldMapArea {
)
@Export("readWorldMapSection")
WorldMapSection readWorldMapSection(Buffer var1) {
int var2 = var1.readUnsignedByte();
WorldMapSectionType var3 = (WorldMapSectionType)UrlRequester.findEnumerated(WorldMapSectionType.method295(), var2);
Object var4 = null;
switch(var3.type) {
int var2 = var1.readUnsignedByte(); // L: 40
WorldMapSectionType var3 = (WorldMapSectionType)UrlRequester.findEnumerated(WorldMapSectionType.method295(), var2); // L: 41
Object var4 = null; // L: 42
switch(var3.type) { // L: 43
case 0:
var4 = new WorldMapSection1();
break;
var4 = new WorldMapSection1(); // L: 53
break; // L: 54
case 1:
var4 = new WorldMapSection2();
var4 = new WorldMapSection2(); // L: 45
break;
case 2:
var4 = new class51();
break;
var4 = new class51(); // L: 48
break; // L: 49
case 3:
var4 = new WorldMapSection0();
var4 = new WorldMapSection0(); // L: 56
break;
default:
throw new IllegalStateException("");
throw new IllegalStateException(""); // L: 51
}
((WorldMapSection)var4).read(var1);
return (WorldMapSection)var4;
((WorldMapSection)var4).read(var1); // L: 59
return (WorldMapSection)var4; // L: 60
}
@ObfuscatedName("x")
@@ -151,18 +151,18 @@ public class WorldMapArea {
)
@Export("containsCoord")
public boolean containsCoord(int var1, int var2, int var3) {
Iterator var4 = this.sections.iterator();
Iterator var4 = this.sections.iterator(); // L: 64
WorldMapSection var5;
do {
if (!var4.hasNext()) {
return false;
return false; // L: 72
}
var5 = (WorldMapSection)var4.next();
} while(!var5.containsCoord(var1, var2, var3));
var5 = (WorldMapSection)var4.next(); // L: 65
} while(!var5.containsCoord(var1, var2, var3)); // L: 67
return true;
return true; // L: 68
}
@ObfuscatedName("w")
@@ -172,22 +172,22 @@ public class WorldMapArea {
)
@Export("containsPosition")
public boolean containsPosition(int var1, int var2) {
int var3 = var1 / 64;
int var4 = var2 / 64;
if (var3 >= this.regionLowX && var3 <= this.regionHighX) {
if (var4 >= this.regionLowY && var4 <= this.regionHighY) {
Iterator var5 = this.sections.iterator();
int var3 = var1 / 64; // L: 76
int var4 = var2 / 64; // L: 77
if (var3 >= this.regionLowX && var3 <= this.regionHighX) { // L: 78
if (var4 >= this.regionLowY && var4 <= this.regionHighY) { // L: 79
Iterator var5 = this.sections.iterator(); // L: 80
WorldMapSection var6;
do {
if (!var5.hasNext()) {
return false;
return false; // L: 88
}
var6 = (WorldMapSection)var5.next();
} while(!var6.containsPosition(var1, var2));
var6 = (WorldMapSection)var5.next(); // L: 81
} while(!var6.containsPosition(var1, var2)); // L: 83
return true;
return true; // L: 84
} else {
return false;
}
@@ -203,18 +203,18 @@ public class WorldMapArea {
)
@Export("position")
public int[] position(int var1, int var2, int var3) {
Iterator var4 = this.sections.iterator();
Iterator var4 = this.sections.iterator(); // L: 92
WorldMapSection var5;
do {
if (!var4.hasNext()) {
return null;
return null; // L: 100
}
var5 = (WorldMapSection)var4.next();
} while(!var5.containsCoord(var1, var2, var3));
var5 = (WorldMapSection)var4.next(); // L: 93
} while(!var5.containsCoord(var1, var2, var3)); // L: 95
return var5.getBorderTileLengths(var1, var2, var3);
return var5.getBorderTileLengths(var1, var2, var3); // L: 96
}
@ObfuscatedName("j")
@@ -224,18 +224,18 @@ public class WorldMapArea {
)
@Export("coord")
public Coord coord(int var1, int var2) {
Iterator var3 = this.sections.iterator();
Iterator var3 = this.sections.iterator(); // L: 104
WorldMapSection var4;
do {
if (!var3.hasNext()) {
return null;
return null; // L: 112
}
var4 = (WorldMapSection)var3.next();
} while(!var4.containsPosition(var1, var2));
var4 = (WorldMapSection)var3.next(); // L: 105
} while(!var4.containsPosition(var1, var2)); // L: 107
return var4.coord(var1, var2);
return var4.coord(var1, var2); // L: 108
}
@ObfuscatedName("n")
@@ -245,14 +245,14 @@ public class WorldMapArea {
)
@Export("setBounds")
void setBounds() {
Iterator var1 = this.sections.iterator();
Iterator var1 = this.sections.iterator(); // L: 116
while (var1.hasNext()) {
WorldMapSection var2 = (WorldMapSection)var1.next();
var2.expandBounds(this);
WorldMapSection var2 = (WorldMapSection)var1.next(); // L: 117
var2.expandBounds(this); // L: 119
}
}
} // L: 122
@ObfuscatedName("p")
@ObfuscatedSignature(
@@ -261,7 +261,7 @@ public class WorldMapArea {
)
@Export("getId")
public int getId() {
return this.id;
return this.id; // L: 125
}
@ObfuscatedName("l")
@@ -271,7 +271,7 @@ public class WorldMapArea {
)
@Export("getIsMain")
public boolean getIsMain() {
return this.isMain;
return this.isMain; // L: 129
}
@ObfuscatedName("z")
@@ -281,7 +281,7 @@ public class WorldMapArea {
)
@Export("getInternalName")
public String getInternalName() {
return this.internalName;
return this.internalName; // L: 133
}
@ObfuscatedName("u")
@@ -291,7 +291,7 @@ public class WorldMapArea {
)
@Export("getExternalName")
public String getExternalName() {
return this.externalName;
return this.externalName; // L: 137
}
@ObfuscatedName("e")
@@ -301,7 +301,7 @@ public class WorldMapArea {
)
@Export("getBackGroundColor")
int getBackGroundColor() {
return this.backGroundColor;
return this.backGroundColor; // L: 141
}
@ObfuscatedName("m")
@@ -311,7 +311,7 @@ public class WorldMapArea {
)
@Export("getZoom")
public int getZoom() {
return this.zoom;
return this.zoom; // L: 145
}
@ObfuscatedName("c")
@@ -321,7 +321,7 @@ public class WorldMapArea {
)
@Export("getRegionLowX")
public int getRegionLowX() {
return this.regionLowX;
return this.regionLowX; // L: 149
}
@ObfuscatedName("i")
@@ -331,7 +331,7 @@ public class WorldMapArea {
)
@Export("getRegionHighX")
public int getRegionHighX() {
return this.regionHighX;
return this.regionHighX; // L: 153
}
@ObfuscatedName("f")
@@ -341,7 +341,7 @@ public class WorldMapArea {
)
@Export("getRegionLowY")
public int getRegionLowY() {
return this.regionLowY;
return this.regionLowY; // L: 157
}
@ObfuscatedName("y")
@@ -351,7 +351,7 @@ public class WorldMapArea {
)
@Export("getRegionHighY")
public int getRegionHighY() {
return this.regionHighY;
return this.regionHighY; // L: 161
}
@ObfuscatedName("r")
@@ -361,7 +361,7 @@ public class WorldMapArea {
)
@Export("getOriginX")
public int getOriginX() {
return this.origin.x;
return this.origin.x; // L: 165
}
@ObfuscatedName("q")
@@ -371,7 +371,7 @@ public class WorldMapArea {
)
@Export("getOriginPlane")
public int getOriginPlane() {
return this.origin.plane;
return this.origin.plane; // L: 169
}
@ObfuscatedName("g")
@@ -381,7 +381,7 @@ public class WorldMapArea {
)
@Export("getOriginY")
public int getOriginY() {
return this.origin.y;
return this.origin.y; // L: 173
}
@ObfuscatedName("o")
@@ -391,6 +391,6 @@ public class WorldMapArea {
)
@Export("getOrigin")
public Coord getOrigin() {
return new Coord(this.origin);
return new Coord(this.origin); // L: 177
}
}