137 lines
3.2 KiB
Java
137 lines
3.2 KiB
Java
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("bn")
|
|
@Implements("GraphicsObject")
|
|
public class GraphicsObject extends Renderable {
|
|
@ObfuscatedName("v")
|
|
@ObfuscatedGetter(
|
|
intValue = 633552685
|
|
)
|
|
@Export("id")
|
|
int id;
|
|
@ObfuscatedName("c")
|
|
@ObfuscatedGetter(
|
|
intValue = -1513105003
|
|
)
|
|
@Export("cycleStart")
|
|
int cycleStart;
|
|
@ObfuscatedName("i")
|
|
@ObfuscatedGetter(
|
|
intValue = -809996185
|
|
)
|
|
@Export("plane")
|
|
int plane;
|
|
@ObfuscatedName("f")
|
|
@ObfuscatedGetter(
|
|
intValue = 1383105845
|
|
)
|
|
@Export("x")
|
|
int x;
|
|
@ObfuscatedName("b")
|
|
@ObfuscatedGetter(
|
|
intValue = -2057789727
|
|
)
|
|
@Export("y")
|
|
int y;
|
|
@ObfuscatedName("n")
|
|
@ObfuscatedGetter(
|
|
intValue = -1487431233
|
|
)
|
|
@Export("z")
|
|
int z;
|
|
@ObfuscatedName("s")
|
|
@ObfuscatedSignature(
|
|
descriptor = "Lgw;"
|
|
)
|
|
@Export("sequenceDefinition")
|
|
SequenceDefinition sequenceDefinition;
|
|
@ObfuscatedName("l")
|
|
@ObfuscatedGetter(
|
|
intValue = 1421112585
|
|
)
|
|
@Export("frame")
|
|
int frame;
|
|
@ObfuscatedName("q")
|
|
@ObfuscatedGetter(
|
|
intValue = -1965539669
|
|
)
|
|
@Export("frameCycle")
|
|
int frameCycle;
|
|
@ObfuscatedName("o")
|
|
@Export("isFinished")
|
|
boolean isFinished;
|
|
|
|
GraphicsObject(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
|
|
this.frame = 0; // L: 16
|
|
this.frameCycle = 0; // L: 17
|
|
this.isFinished = false; // L: 18
|
|
this.id = var1; // L: 21
|
|
this.plane = var2; // L: 22
|
|
this.x = var3; // L: 23
|
|
this.y = var4; // L: 24
|
|
this.z = var5; // L: 25
|
|
this.cycleStart = var7 + var6; // L: 26
|
|
int var8 = ClientPreferences.SpotAnimationDefinition_get(this.id).sequence; // L: 27
|
|
if (var8 != -1) { // L: 28
|
|
this.isFinished = false; // L: 29
|
|
this.sequenceDefinition = class163.SequenceDefinition_get(var8); // L: 30
|
|
} else {
|
|
this.isFinished = true; // L: 32
|
|
}
|
|
|
|
} // L: 33
|
|
|
|
@ObfuscatedName("v")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(IB)V",
|
|
garbageValue = "79"
|
|
)
|
|
@Export("advance")
|
|
final void advance(int var1) {
|
|
if (!this.isFinished) { // L: 36
|
|
this.frameCycle += var1; // L: 37
|
|
if (!this.sequenceDefinition.isCachedModelIdSet()) { // L: 38
|
|
while (this.frameCycle > this.sequenceDefinition.frameLengths[this.frame]) { // L: 39
|
|
this.frameCycle -= this.sequenceDefinition.frameLengths[this.frame]; // L: 40
|
|
++this.frame; // L: 41
|
|
if (this.frame >= this.sequenceDefinition.frameIds.length) { // L: 42
|
|
this.isFinished = true; // L: 43
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
this.frame += var1; // L: 49
|
|
if (this.frame >= this.sequenceDefinition.method3844()) { // L: 50
|
|
this.isFinished = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
} // L: 52
|
|
|
|
@ObfuscatedName("c")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(B)Liq;",
|
|
garbageValue = "103"
|
|
)
|
|
@Export("getModel")
|
|
protected final Model getModel() {
|
|
SpotAnimationDefinition var1 = ClientPreferences.SpotAnimationDefinition_get(this.id); // L: 55
|
|
Model var2;
|
|
if (!this.isFinished) { // L: 57
|
|
var2 = var1.getModel(this.frame);
|
|
} else {
|
|
var2 = var1.getModel(-1); // L: 58
|
|
}
|
|
|
|
return var2 == null ? null : var2; // L: 59
|
|
}
|
|
|
|
public GraphicsObject() {
|
|
}
|
|
}
|