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,93 +1,96 @@
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.Iterator;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("kb")
@ObfuscatedName("ef")
@Implements("SpotAnimationDefinition")
public class SpotAnimationDefinition extends DualNode {
@ObfuscatedName("f")
@ObfuscatedName("h")
@ObfuscatedSignature(
descriptor = "Lir;"
descriptor = "Ljp;"
)
@Export("SpotAnimationDefinition_archive")
public static AbstractArchive SpotAnimationDefinition_archive;
@ObfuscatedName("o")
static AbstractArchive SpotAnimationDefinition_archive;
@ObfuscatedName("c")
@ObfuscatedSignature(
descriptor = "Lir;"
descriptor = "Ljp;"
)
@Export("SpotAnimationDefinition_modelArchive")
public static AbstractArchive SpotAnimationDefinition_modelArchive;
@ObfuscatedName("u")
static AbstractArchive SpotAnimationDefinition_modelArchive;
@ObfuscatedName("o")
@ObfuscatedSignature(
descriptor = "Lgf;"
descriptor = "Lho;"
)
@Export("SpotAnimationDefinition_cached")
public static EvictingDualNodeHashTable SpotAnimationDefinition_cached;
@ObfuscatedName("p")
static EvictingDualNodeHashTable SpotAnimationDefinition_cached;
@ObfuscatedName("g")
@ObfuscatedSignature(
descriptor = "Lgf;"
descriptor = "Lho;"
)
@Export("SpotAnimationDefinition_cachedModels")
public static EvictingDualNodeHashTable SpotAnimationDefinition_cachedModels;
@ObfuscatedName("b")
static EvictingDualNodeHashTable SpotAnimationDefinition_cachedModels;
@ObfuscatedName("l")
@ObfuscatedGetter(
intValue = -1763837413
intValue = 380385743
)
@Export("id")
int id;
@ObfuscatedName("e")
@ObfuscatedName("z")
@ObfuscatedGetter(
intValue = -680345807
intValue = 130190351
)
@Export("archive")
int archive;
@ObfuscatedName("k")
@ObfuscatedName("t")
@ObfuscatedGetter(
intValue = -1398815435
intValue = 507083685
)
@Export("sequence")
public int sequence;
@ObfuscatedName("g")
@ObfuscatedName("v")
@Export("recolorFrom")
short[] recolorFrom;
@ObfuscatedName("h")
@ObfuscatedName("b")
@Export("recolorTo")
short[] recolorTo;
@ObfuscatedName("n")
@ObfuscatedName("q")
@Export("retextureFrom")
short[] retextureFrom;
@ObfuscatedName("l")
@ObfuscatedName("i")
@Export("retextureTo")
short[] retextureTo;
@ObfuscatedName("m")
@ObfuscatedName("x")
@ObfuscatedGetter(
intValue = 91063733
intValue = -118030919
)
@Export("widthScale")
int widthScale;
@ObfuscatedName("d")
@ObfuscatedName("k")
@ObfuscatedGetter(
intValue = -1248170611
intValue = 1475991545
)
@Export("heightScale")
int heightScale;
@ObfuscatedName("c")
@ObfuscatedName("r")
@ObfuscatedGetter(
intValue = -211246217
intValue = -170389419
)
@Export("orientation")
int orientation;
@ObfuscatedName("j")
@ObfuscatedName("p")
@ObfuscatedGetter(
intValue = 87174687
intValue = 97378291
)
@Export("ambient")
int ambient;
@ObfuscatedName("r")
@ObfuscatedName("a")
@ObfuscatedGetter(
intValue = -477885717
intValue = 1756548977
)
@Export("contrast")
int contrast;
@@ -108,159 +111,169 @@ public class SpotAnimationDefinition extends DualNode {
@ObfuscatedName("o")
@ObfuscatedSignature(
descriptor = "(Lnu;B)V",
garbageValue = "29"
descriptor = "(Lnk;B)V",
garbageValue = "-108"
)
@Export("decode")
void decode(Buffer var1) {
while (true) {
int var2 = var1.readUnsignedByte(); // L: 44
if (var2 == 0) { // L: 45
return; // L: 48
int var2 = var1.readUnsignedByte(); // L: 49
if (var2 == 0) { // L: 50
return; // L: 53
}
this.decodeNext(var1, var2); // L: 46
this.decodeNext(var1, var2); // L: 51
}
}
@ObfuscatedName("u")
@ObfuscatedName("g")
@ObfuscatedSignature(
descriptor = "(Lnu;II)V",
garbageValue = "1730148365"
descriptor = "(Lnk;II)V",
garbageValue = "-113504660"
)
@Export("decodeNext")
void decodeNext(Buffer var1, int var2) {
if (var2 == 1) { // L: 51
if (var2 == 1) { // L: 56
this.archive = var1.readUnsignedShort();
} else if (var2 == 2) { // L: 52
} else if (var2 == 2) { // L: 57
this.sequence = var1.readUnsignedShort();
} else if (var2 == 4) { // L: 53
} else if (var2 == 4) { // L: 58
this.widthScale = var1.readUnsignedShort();
} else if (var2 == 5) { // L: 54
} else if (var2 == 5) { // L: 59
this.heightScale = var1.readUnsignedShort();
} else if (var2 == 6) { // L: 55
} else if (var2 == 6) { // L: 60
this.orientation = var1.readUnsignedShort();
} else if (var2 == 7) { // L: 56
} else if (var2 == 7) { // L: 61
this.ambient = var1.readUnsignedByte();
} else if (var2 == 8) { // L: 57
} else if (var2 == 8) { // L: 62
this.contrast = var1.readUnsignedByte();
} else {
int var3;
int var4;
if (var2 == 40) { // L: 58
var3 = var1.readUnsignedByte(); // L: 59
this.recolorFrom = new short[var3]; // L: 60
this.recolorTo = new short[var3]; // L: 61
if (var2 == 40) { // L: 63
var3 = var1.readUnsignedByte(); // L: 64
this.recolorFrom = new short[var3]; // L: 65
this.recolorTo = new short[var3]; // L: 66
for (var4 = 0; var4 < var3; ++var4) { // L: 62
this.recolorFrom[var4] = (short)var1.readUnsignedShort(); // L: 63
this.recolorTo[var4] = (short)var1.readUnsignedShort(); // L: 64
for (var4 = 0; var4 < var3; ++var4) { // L: 67
this.recolorFrom[var4] = (short)var1.readUnsignedShort(); // L: 68
this.recolorTo[var4] = (short)var1.readUnsignedShort(); // L: 69
}
} else if (var2 == 41) { // L: 67
var3 = var1.readUnsignedByte(); // L: 68
this.retextureFrom = new short[var3]; // L: 69
this.retextureTo = new short[var3]; // L: 70
} else if (var2 == 41) { // L: 72
var3 = var1.readUnsignedByte(); // L: 73
this.retextureFrom = new short[var3]; // L: 74
this.retextureTo = new short[var3]; // L: 75
for (var4 = 0; var4 < var3; ++var4) { // L: 71
this.retextureFrom[var4] = (short)var1.readUnsignedShort(); // L: 72
this.retextureTo[var4] = (short)var1.readUnsignedShort(); // L: 73
for (var4 = 0; var4 < var3; ++var4) { // L: 76
this.retextureFrom[var4] = (short)var1.readUnsignedShort(); // L: 77
this.retextureTo[var4] = (short)var1.readUnsignedShort(); // L: 78
}
}
}
} // L: 77
} // L: 82
@ObfuscatedName("p")
@ObfuscatedName("l")
@ObfuscatedSignature(
descriptor = "(II)Lgv;",
garbageValue = "-1890190190"
descriptor = "(IB)Lgj;",
garbageValue = "11"
)
@Export("getModel")
public final Model getModel(int var1) {
Model var2 = (Model)SpotAnimationDefinition_cachedModels.get((long)this.id); // L: 80
if (var2 == null) { // L: 81
ModelData var3 = ModelData.ModelData_get(SpotAnimationDefinition_modelArchive, this.archive, 0); // L: 82
if (var3 == null) { // L: 83
Model var2 = (Model)SpotAnimationDefinition_cachedModels.get((long)this.id); // L: 85
if (var2 == null) { // L: 86
ModelData var3 = ModelData.ModelData_get(SpotAnimationDefinition_modelArchive, this.archive, 0); // L: 87
if (var3 == null) { // L: 88
return null;
}
int var4;
if (this.recolorFrom != null) { // L: 84
for (var4 = 0; var4 < this.recolorFrom.length; ++var4) { // L: 85
var3.recolor(this.recolorFrom[var4], this.recolorTo[var4]); // L: 86
if (this.recolorFrom != null) { // L: 89
for (var4 = 0; var4 < this.recolorFrom.length; ++var4) { // L: 90
var3.recolor(this.recolorFrom[var4], this.recolorTo[var4]); // L: 91
}
}
if (this.retextureFrom != null) { // L: 89
for (var4 = 0; var4 < this.retextureFrom.length; ++var4) { // L: 90
var3.retexture(this.retextureFrom[var4], this.retextureTo[var4]); // L: 91
if (this.retextureFrom != null) { // L: 94
for (var4 = 0; var4 < this.retextureFrom.length; ++var4) { // L: 95
var3.retexture(this.retextureFrom[var4], this.retextureTo[var4]); // L: 96
}
}
var2 = var3.toModel(this.ambient + 64, this.contrast + 850, -30, -50, -30); // L: 94
SpotAnimationDefinition_cachedModels.put(var2, (long)this.id); // L: 95
var2 = var3.toModel(this.ambient + 64, this.contrast + 850, -30, -50, -30); // L: 99
SpotAnimationDefinition_cachedModels.put(var2, (long)this.id); // L: 100
}
Model var5;
if (this.sequence != -1 && var1 != -1) { // L: 98
var5 = class225.SequenceDefinition_get(this.sequence).transformSpotAnimationModel(var2, var1);
if (this.sequence != -1 && var1 != -1) { // L: 103
var5 = Player.SequenceDefinition_get(this.sequence).transformSpotAnimationModel(var2, var1);
} else {
var5 = var2.toSharedSpotAnimationModel(true); // L: 99
var5 = var2.toSharedSpotAnimationModel(true); // L: 104
}
if (this.widthScale != 128 || this.heightScale != 128) { // L: 100
if (this.widthScale != 128 || this.heightScale != 128) { // L: 105
var5.scale(this.widthScale, this.heightScale, this.widthScale);
}
if (this.orientation != 0) { // L: 101
if (this.orientation == 90) { // L: 102
if (this.orientation != 0) { // L: 106
if (this.orientation == 90) { // L: 107
var5.rotateY90Ccw();
}
if (this.orientation == 180) { // L: 103
var5.rotateY90Ccw(); // L: 104
var5.rotateY90Ccw(); // L: 105
}
if (this.orientation == 270) { // L: 107
var5.rotateY90Ccw(); // L: 108
if (this.orientation == 180) { // L: 108
var5.rotateY90Ccw(); // L: 109
var5.rotateY90Ccw(); // L: 110
}
if (this.orientation == 270) { // L: 112
var5.rotateY90Ccw(); // L: 113
var5.rotateY90Ccw(); // L: 114
var5.rotateY90Ccw(); // L: 115
}
}
return var5; // L: 113
return var5; // L: 118
}
@ObfuscatedName("al")
@ObfuscatedName("az")
@ObfuscatedSignature(
descriptor = "(ILcc;ZB)I",
garbageValue = "3"
descriptor = "(B)I",
garbageValue = "18"
)
static int method5048(int var0, Script var1, boolean var2) {
if (var0 >= 7200 && var0 < 7204) { // L: 4240
class16.Interpreter_intStackSize -= 5; // L: 4241
Interpreter.Interpreter_intStack[++class16.Interpreter_intStackSize - 1] = -1; // L: 4242
return 1; // L: 4243
} else if (var0 == 7204) { // L: 4245
class16.Interpreter_intStackSize -= 6; // L: 4246
Interpreter.Interpreter_intStack[++class16.Interpreter_intStackSize - 1] = -1; // L: 4247
return 1; // L: 4248
} else if (var0 >= 7205 && var0 < 7209) { // L: 4250
Interpreter.Interpreter_intStack[class16.Interpreter_intStackSize - 1] = -1; // L: 4251
return 1; // L: 4252
} else if (var0 == 7209) { // L: 4254
class16.Interpreter_intStackSize -= 2; // L: 4255
Interpreter.Interpreter_intStack[++class16.Interpreter_intStackSize - 1] = -1; // L: 4256
return 1; // L: 4257
} else if (var0 >= 7210 && var0 < 7214) { // L: 4259
--class16.Interpreter_intStackSize; // L: 4260
return 1; // L: 4261
} else if (var0 == 7214) { // L: 4263
class16.Interpreter_intStackSize -= 2; // L: 4264
return 1; // L: 4265
} else {
return 2; // L: 4267
@Export("getGcDuration")
protected static int getGcDuration() {
int var0 = 0; // L: 539
if (class266.garbageCollector == null || !class266.garbageCollector.isValid()) { // L: 540
try {
Iterator var1 = ManagementFactory.getGarbageCollectorMXBeans().iterator(); // L: 542
while (var1.hasNext()) {
GarbageCollectorMXBean var2 = (GarbageCollectorMXBean)var1.next(); // L: 543
if (var2.isValid()) { // L: 545
class266.garbageCollector = var2; // L: 546
GameEngine.garbageCollectorLastCheckTimeMs = -1L; // L: 547
GameEngine.garbageCollectorLastCollectionTime = -1L; // L: 548
}
}
} catch (Throwable var11) { // L: 553
}
}
if (class266.garbageCollector != null) { // L: 555
long var9 = Archive.currentTimeMillis(); // L: 556
long var3 = class266.garbageCollector.getCollectionTime(); // L: 557
if (GameEngine.garbageCollectorLastCollectionTime != -1L) { // L: 558
long var5 = var3 - GameEngine.garbageCollectorLastCollectionTime; // L: 559
long var7 = var9 - GameEngine.garbageCollectorLastCheckTimeMs; // L: 560
if (0L != var7) { // L: 561
var0 = (int)(100L * var5 / var7);
}
}
GameEngine.garbageCollectorLastCollectionTime = var3; // L: 563
GameEngine.garbageCollectorLastCheckTimeMs = var9; // L: 564
}
return var0; // L: 566
}
}