client: rev 198 (#3014)

* client: rev 198

* client: checkstyle

Co-authored-by: therealnull <therealnull@gmail.com>
This commit is contained in:
Tyler Bochard
2021-07-28 07:24:38 -04:00
committed by GitHub
parent c2af17f765
commit 56ae122b89
466 changed files with 65937 additions and 65851 deletions

View File

@@ -4,239 +4,233 @@ import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("cp")
@ObfuscatedName("bv")
@Implements("Projectile")
public final class Projectile extends Renderable {
@ObfuscatedName("oq")
@ObfuscatedSignature(
descriptor = "Lei;"
)
@Export("mouseWheel")
static MouseWheel mouseWheel;
@ObfuscatedName("f")
@ObfuscatedName("s")
@ObfuscatedGetter(
intValue = -620929205
intValue = -1111424395
)
@Export("id")
int id;
@ObfuscatedName("e")
@ObfuscatedName("t")
@ObfuscatedGetter(
intValue = 1503104185
intValue = -1253498993
)
@Export("plane")
int plane;
@ObfuscatedName("v")
@ObfuscatedGetter(
intValue = 1281749377
intValue = 255024795
)
@Export("sourceX")
int sourceX;
@ObfuscatedName("y")
@ObfuscatedName("j")
@ObfuscatedGetter(
intValue = -856181149
intValue = 1599918591
)
@Export("sourceY")
int sourceY;
@ObfuscatedName("j")
@ObfuscatedName("l")
@ObfuscatedGetter(
intValue = -2061408833
intValue = 1504804357
)
@Export("sourceZ")
int sourceZ;
@ObfuscatedName("o")
@ObfuscatedName("n")
@ObfuscatedGetter(
intValue = -722624469
intValue = 991764239
)
@Export("endHeight")
int endHeight;
@ObfuscatedName("m")
@ObfuscatedName("w")
@ObfuscatedGetter(
intValue = -578493745
intValue = -367161897
)
@Export("cycleStart")
int cycleStart;
@ObfuscatedName("r")
@ObfuscatedName("f")
@ObfuscatedGetter(
intValue = -1349240519
intValue = -915919331
)
@Export("cycleEnd")
int cycleEnd;
@ObfuscatedName("h")
@ObfuscatedName("o")
@ObfuscatedGetter(
intValue = 383721093
intValue = 1457010005
)
@Export("slope")
int slope;
@ObfuscatedName("d")
@ObfuscatedName("x")
@ObfuscatedGetter(
intValue = -1902000949
intValue = 754451797
)
@Export("startHeight")
int startHeight;
@ObfuscatedName("z")
@ObfuscatedName("r")
@ObfuscatedGetter(
intValue = -770535721
intValue = 1233798491
)
@Export("targetIndex")
int targetIndex;
@ObfuscatedName("b")
@ObfuscatedName("p")
@Export("isMoving")
boolean isMoving;
@ObfuscatedName("i")
@ObfuscatedName("h")
@Export("x")
double x;
@ObfuscatedName("k")
@Export("y")
double y;
@ObfuscatedName("g")
@ObfuscatedName("a")
@Export("z")
double z;
@ObfuscatedName("t")
@ObfuscatedName("q")
@Export("speedX")
double speedX;
@ObfuscatedName("x")
@ObfuscatedName("u")
@Export("speedY")
double speedY;
@ObfuscatedName("u")
@ObfuscatedName("e")
@Export("speed")
double speed;
@ObfuscatedName("q")
@ObfuscatedName("c")
@Export("speedZ")
double speedZ;
@ObfuscatedName("s")
@ObfuscatedName("i")
@Export("accelerationZ")
double accelerationZ;
@ObfuscatedName("p")
@ObfuscatedName("m")
@ObfuscatedGetter(
intValue = -9873959
intValue = 124208403
)
@Export("yaw")
int yaw;
@ObfuscatedName("c")
@ObfuscatedName("b")
@ObfuscatedGetter(
intValue = -909606039
intValue = -1460402629
)
@Export("pitch")
int pitch;
@ObfuscatedName("n")
@ObfuscatedName("z")
@ObfuscatedSignature(
descriptor = "Lfm;"
descriptor = "Lfz;"
)
@Export("sequenceDefinition")
SequenceDefinition sequenceDefinition;
@ObfuscatedName("l")
@ObfuscatedName("d")
@ObfuscatedGetter(
intValue = -2026775219
intValue = 25550675
)
@Export("frame")
int frame;
@ObfuscatedName("w")
@ObfuscatedName("y")
@ObfuscatedGetter(
intValue = -472667051
intValue = 1297468435
)
@Export("frameCycle")
int frameCycle;
Projectile(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
this.isMoving = false; // L: 20
this.frame = 0; // L: 32
this.frameCycle = 0; // L: 33
this.id = var1; // L: 36
this.plane = var2; // L: 37
this.sourceX = var3; // L: 38
this.sourceY = var4; // L: 39
this.sourceZ = var5; // L: 40
this.cycleStart = var6; // L: 41
this.cycleEnd = var7; // L: 42
this.slope = var8; // L: 43
this.startHeight = var9; // L: 44
this.targetIndex = var10; // L: 45
this.endHeight = var11; // L: 46
this.isMoving = false; // L: 47
int var12 = Tiles.SpotAnimationDefinition_get(this.id).sequence; // L: 48
if (var12 != -1) { // L: 49
this.sequenceDefinition = WorldMapScaleHandler.SequenceDefinition_get(var12);
this.isMoving = false;
this.frame = 0;
this.frameCycle = 0;
this.id = var1;
this.plane = var2;
this.sourceX = var3;
this.sourceY = var4;
this.sourceZ = var5;
this.cycleStart = var6;
this.cycleEnd = var7;
this.slope = var8;
this.startHeight = var9;
this.targetIndex = var10;
this.endHeight = var11;
this.isMoving = false;
int var12 = PcmPlayer.SpotAnimationDefinition_get(this.id).sequence;
if (var12 != -1) {
this.sequenceDefinition = World.SequenceDefinition_get(var12);
} else {
this.sequenceDefinition = null; // L: 50
this.sequenceDefinition = null;
}
} // L: 51
}
@ObfuscatedName("f")
@ObfuscatedName("s")
@ObfuscatedSignature(
descriptor = "(IIIIB)V",
garbageValue = "-4"
descriptor = "(IIIII)V",
garbageValue = "-1925687009"
)
@Export("setDestination")
final void setDestination(int var1, int var2, int var3, int var4) {
double var5;
if (!this.isMoving) { // L: 54
var5 = (double)(var1 - this.sourceX); // L: 55
double var7 = (double)(var2 - this.sourceY); // L: 56
double var9 = Math.sqrt(var5 * var5 + var7 * var7); // L: 57
this.x = (double)this.startHeight * var5 / var9 + (double)this.sourceX; // L: 58
this.y = (double)this.sourceY + (double)this.startHeight * var7 / var9; // L: 59
this.z = (double)this.sourceZ; // L: 60
if (!this.isMoving) {
var5 = (double)(var1 - this.sourceX);
double var7 = (double)(var2 - this.sourceY);
double var9 = Math.sqrt(var7 * var7 + var5 * var5);
this.x = (double)this.sourceX + (double)this.startHeight * var5 / var9;
this.y = (double)this.startHeight * var7 / var9 + (double)this.sourceY;
this.z = (double)this.sourceZ;
}
var5 = (double)(this.cycleEnd + 1 - var4); // L: 62
this.speedX = ((double)var1 - this.x) / var5; // L: 63
this.speedY = ((double)var2 - this.y) / var5; // L: 64
this.speed = Math.sqrt(this.speedY * this.speedY + this.speedX * this.speedX); // L: 65
if (!this.isMoving) { // L: 66
var5 = (double)(this.cycleEnd + 1 - var4);
this.speedX = ((double)var1 - this.x) / var5;
this.speedY = ((double)var2 - this.y) / var5;
this.speed = Math.sqrt(this.speedX * this.speedX + this.speedY * this.speedY);
if (!this.isMoving) {
this.speedZ = -this.speed * Math.tan(0.02454369D * (double)this.slope);
}
this.accelerationZ = ((double)var3 - this.z - this.speedZ * var5) * 2.0D / (var5 * var5); // L: 67
} // L: 68
this.accelerationZ = 2.0D * ((double)var3 - this.z - var5 * this.speedZ) / (var5 * var5);
}
@ObfuscatedName("e")
@ObfuscatedName("t")
@ObfuscatedSignature(
descriptor = "(I)Lgd;",
garbageValue = "326918784"
descriptor = "(I)Lgl;",
garbageValue = "1291603774"
)
@Export("getModel")
protected final Model getModel() {
SpotAnimationDefinition var1 = Tiles.SpotAnimationDefinition_get(this.id); // L: 92
Model var2 = var1.getModel(this.frame); // L: 93
if (var2 == null) { // L: 94
SpotAnimationDefinition var1 = PcmPlayer.SpotAnimationDefinition_get(this.id);
Model var2 = var1.getModel(this.frame);
if (var2 == null) {
return null;
} else {
var2.rotateZ(this.pitch); // L: 95
return var2; // L: 96
var2.rotateZ(this.pitch);
return var2;
}
}
@ObfuscatedName("v")
@ObfuscatedSignature(
descriptor = "(II)V",
garbageValue = "-1411274037"
garbageValue = "-893243986"
)
@Export("advance")
final void advance(int var1) {
this.isMoving = true; // L: 71
this.x += (double)var1 * this.speedX; // L: 72
this.y += this.speedY * (double)var1; // L: 73
this.z += this.speedZ * (double)var1 + 0.5D * this.accelerationZ * (double)var1 * (double)var1; // L: 74
this.speedZ += (double)var1 * this.accelerationZ; // L: 75
this.yaw = (int)(Math.atan2(this.speedX, this.speedY) * 325.949D) + 1024 & 2047; // L: 76
this.pitch = (int)(Math.atan2(this.speedZ, this.speed) * 325.949D) & 2047; // L: 77
if (this.sequenceDefinition != null) { // L: 78
this.frameCycle += var1; // L: 79
this.isMoving = true;
this.x += this.speedX * (double)var1;
this.y += this.speedY * (double)var1;
this.z += (double)var1 * this.speedZ + (double)var1 * 0.5D * this.accelerationZ * (double)var1;
this.speedZ += this.accelerationZ * (double)var1;
this.yaw = (int)(Math.atan2(this.speedX, this.speedY) * 325.949D) + 1024 & 2047;
this.pitch = (int)(Math.atan2(this.speedZ, this.speed) * 325.949D) & 2047;
if (this.sequenceDefinition != null) {
this.frameCycle += var1;
while (true) {
do {
do {
if (this.frameCycle <= this.sequenceDefinition.frameLengths[this.frame]) { // L: 80
return; // L: 89
if (this.frameCycle <= this.sequenceDefinition.frameLengths[this.frame]) {
return;
}
this.frameCycle -= this.sequenceDefinition.frameLengths[this.frame]; // L: 81
++this.frame; // L: 82
} while(this.frame < this.sequenceDefinition.frameIds.length); // L: 83
this.frameCycle -= this.sequenceDefinition.frameLengths[this.frame];
++this.frame;
} while(this.frame < this.sequenceDefinition.frameIds.length);
this.frame -= this.sequenceDefinition.frameCount; // L: 84
} while(this.frame >= 0 && this.frame < this.sequenceDefinition.frameIds.length); // L: 85
this.frame -= this.sequenceDefinition.frameCount;
} while(this.frame >= 0 && this.frame < this.sequenceDefinition.frameIds.length);
this.frame = 0;
}
@@ -245,80 +239,41 @@ public final class Projectile extends Renderable {
@ObfuscatedName("s")
@ObfuscatedSignature(
descriptor = "(I)V",
garbageValue = "-530547820"
descriptor = "(Ljy;I)V",
garbageValue = "-1667200203"
)
public static void method2075() {
ItemComposition.ItemDefinition_cached.clear(); // L: 555
ItemComposition.ItemDefinition_cachedModels.clear(); // L: 556
ItemComposition.ItemDefinition_cachedSprites.clear(); // L: 557
} // L: 558
public static void method1702(AbstractArchive var0) {
FloorUnderlayDefinition.FloorUnderlayDefinition_archive = var0;
}
@ObfuscatedName("fq")
@ObfuscatedName("t")
@ObfuscatedSignature(
descriptor = "(IB)V",
garbageValue = "-114"
descriptor = "([BIIII[Lfy;I)V",
garbageValue = "-1319516605"
)
@Export("updateGameState")
static void updateGameState(int var0) {
if (var0 != Client.gameState) { // L: 1388
if (Client.gameState == 0) { // L: 1389
class1.client.method672();
}
if (var0 == 20 || var0 == 40 || var0 == 45) { // L: 1390
Client.loginState = 0; // L: 1391
Client.field811 = 0; // L: 1392
Client.field654 = 0; // L: 1393
Client.timer.method5675(var0); // L: 1394
if (var0 != 20) { // L: 1395
class19.method281(false);
static final void method1700(byte[] var0, int var1, int var2, int var3, int var4, CollisionMap[] var5) {
int var7;
int var8;
for (int var6 = 0; var6 < 4; ++var6) {
for (var7 = 0; var7 < 64; ++var7) {
for (var8 = 0; var8 < 64; ++var8) {
if (var7 + var1 > 0 && var7 + var1 < 103 && var8 + var2 > 0 && var8 + var2 < 103) {
int[] var10000 = var5[var6].flags[var7 + var1];
var10000[var8 + var2] &= -16777217;
}
}
}
if (var0 != 20 && var0 != 40 && DefaultsGroup.field3887 != null) { // L: 1397 1398
DefaultsGroup.field3887.close(); // L: 1399
DefaultsGroup.field3887 = null; // L: 1400
}
if (Client.gameState == 25) { // L: 1403
Client.field678 = 0; // L: 1404
Client.field618 = 0; // L: 1405
Client.field789 = 1; // L: 1406
Client.field742 = 0; // L: 1407
Client.field677 = 1; // L: 1408
}
if (var0 != 5 && var0 != 10) { // L: 1410
if (var0 == 20) { // L: 1413
DesktopPlatformInfoProvider.method6109(JagexCache.archive10, ModeWhere.archive8, true, Client.gameState == 11 ? 4 : 0); // L: 1414
} else if (var0 == 11) { // L: 1416
DesktopPlatformInfoProvider.method6109(JagexCache.archive10, ModeWhere.archive8, false, 4); // L: 1417
} else if (class377.clearLoginScreen) { // L: 1420
Coord.titleboxSprite = null; // L: 1421
class289.titlebuttonSprite = null; // L: 1422
Login.runesSprite = null; // L: 1423
class339.leftTitleSprite = null; // L: 1424
class377.rightTitleSprite = null; // L: 1425
Messages.logoSprite = null; // L: 1426
GrandExchangeEvents.title_muteSprite = null; // L: 1427
Login.options_buttons_0Sprite = null; // L: 1428
WorldMapCacheName.options_buttons_2Sprite = null; // L: 1429
Varcs.worldSelectBackSprites = null; // L: 1430
class364.worldSelectFlagSprites = null; // L: 1431
class10.worldSelectArrows = null; // L: 1432
Huffman.worldSelectStars = null; // L: 1433
class35.field244 = null; // L: 1434
PendingSpawn.loginScreenRunesAnimation.method2296(); // L: 1435
PcmPlayer.method856(2); // L: 1436
class105.method2358(true); // L: 1437
class377.clearLoginScreen = false; // L: 1438
}
} else {
DesktopPlatformInfoProvider.method6109(JagexCache.archive10, ModeWhere.archive8, true, 0); // L: 1411
}
Client.gameState = var0; // L: 1440
}
} // L: 1441
Buffer var10 = new Buffer(var0);
for (var7 = 0; var7 < 4; ++var7) {
for (var8 = 0; var8 < 64; ++var8) {
for (int var9 = 0; var9 < 64; ++var9) {
class125.loadTerrain(var10, var7, var8 + var1, var9 + var2, var3, var4, 0);
}
}
}
}
}