rs-client: Cleanup (#1087)
* rs-client: name SpriteBuffer * rs-client: (re)name spritebuffer methods * rs-client/deob: Add missed @Export's, make updatemappings fix this next time * rs-client: run intellij redundant else inspection * rs-client: invert some script interpreter if's * deob: checkstyle fixes * rs-client: SpriteBuffer_loadSprite -> SpriteBuffer_bufferFile
This commit is contained in:
@@ -76,6 +76,7 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(Lal;B)V",
|
||||
garbageValue = "-53"
|
||||
)
|
||||
@Export("expandBounds")
|
||||
public void expandBounds(WorldMapArea var1) {
|
||||
if (var1.regionLowX > this.field366) {
|
||||
var1.regionLowX = this.field366;
|
||||
@@ -100,12 +101,12 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(IIII)Z",
|
||||
garbageValue = "59484528"
|
||||
)
|
||||
@Export("containsCoord")
|
||||
public boolean containsCoord(int var1, int var2, int var3) {
|
||||
if (var1 >= this.field368 && var1 < this.field368 + this.field363) {
|
||||
return var2 >= (this.field364 << 6) + (this.field376 << 3) && var2 <= (this.field364 << 6) + (this.field376 << 3) + 7 && var3 >= (this.field365 << 6) + (this.field369 << 3) && var3 <= (this.field365 << 6) + (this.field369 << 3) + 7;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ObfuscatedName("e")
|
||||
@@ -113,6 +114,7 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(IIB)Z",
|
||||
garbageValue = "56"
|
||||
)
|
||||
@Export("containsPosition")
|
||||
public boolean containsPosition(int var1, int var2) {
|
||||
return var1 >= (this.field366 << 6) + (this.field370 << 3) && var1 <= (this.field366 << 6) + (this.field370 << 3) + 7 && var2 >= (this.field375 << 6) + (this.field371 << 3) && var2 <= (this.field375 << 6) + (this.field371 << 3) + 7;
|
||||
}
|
||||
@@ -122,13 +124,13 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(IIIB)[I",
|
||||
garbageValue = "12"
|
||||
)
|
||||
@Export("getBorderTileLengths")
|
||||
public int[] getBorderTileLengths(int var1, int var2, int var3) {
|
||||
if (!this.containsCoord(var1, var2, var3)) {
|
||||
return null;
|
||||
} else {
|
||||
int[] var4 = new int[]{this.field366 * 64 - this.field364 * 64 + var2 + (this.field370 * 8 - this.field376 * 8), var3 + (this.field375 * 64 - this.field365 * 64) + (this.field371 * 8 - this.field369 * 8)};
|
||||
return var4;
|
||||
}
|
||||
int[] var4 = new int[]{this.field366 * 64 - this.field364 * 64 + var2 + (this.field370 * 8 - this.field376 * 8), var3 + (this.field375 * 64 - this.field365 * 64) + (this.field371 * 8 - this.field369 * 8)};
|
||||
return var4;
|
||||
}
|
||||
|
||||
@ObfuscatedName("k")
|
||||
@@ -136,14 +138,14 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(IIB)Lhv;",
|
||||
garbageValue = "-13"
|
||||
)
|
||||
@Export("coord")
|
||||
public Coord coord(int var1, int var2) {
|
||||
if (!this.containsPosition(var1, var2)) {
|
||||
return null;
|
||||
} else {
|
||||
int var3 = this.field364 * 64 - this.field366 * 64 + (this.field376 * 8 - this.field370 * 8) + var1;
|
||||
int var4 = this.field365 * 64 - this.field375 * 64 + var2 + (this.field369 * 8 - this.field371 * 8);
|
||||
return new Coord(this.field368, var3, var4);
|
||||
}
|
||||
int var3 = this.field364 * 64 - this.field366 * 64 + (this.field376 * 8 - this.field370 * 8) + var1;
|
||||
int var4 = this.field365 * 64 - this.field375 * 64 + var2 + (this.field369 * 8 - this.field371 * 8);
|
||||
return new Coord(this.field368, var3, var4);
|
||||
}
|
||||
|
||||
@ObfuscatedName("l")
|
||||
@@ -151,6 +153,7 @@ public class class42 implements WorldMapSection {
|
||||
signature = "(Lkf;I)V",
|
||||
garbageValue = "1767519038"
|
||||
)
|
||||
@Export("read")
|
||||
public void read(Buffer var1) {
|
||||
this.field368 = var1.readUnsignedByte();
|
||||
this.field363 = var1.readUnsignedByte();
|
||||
|
||||
Reference in New Issue
Block a user