479 lines
16 KiB
Java
479 lines
16 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;
|
|
import net.runelite.rs.ScriptOpcodes;
|
|
|
|
@ObfuscatedName("af")
|
|
@Implements("WorldMapData_1")
|
|
public class WorldMapData_1 extends AbstractWorldMapData {
|
|
@ObfuscatedName("f")
|
|
@ObfuscatedGetter(
|
|
intValue = -1324815795
|
|
)
|
|
@Export("chunkXLow")
|
|
int chunkXLow;
|
|
@ObfuscatedName("a")
|
|
@ObfuscatedGetter(
|
|
intValue = 1581992363
|
|
)
|
|
@Export("chunkYLow")
|
|
int chunkYLow;
|
|
@ObfuscatedName("b")
|
|
@ObfuscatedGetter(
|
|
intValue = 1550350231
|
|
)
|
|
@Export("chunkX")
|
|
int chunkX;
|
|
@ObfuscatedName("y")
|
|
@ObfuscatedGetter(
|
|
intValue = -706955927
|
|
)
|
|
@Export("chunkY")
|
|
int chunkY;
|
|
|
|
WorldMapData_1() {
|
|
}
|
|
|
|
@ObfuscatedName("h")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(Lkj;I)V",
|
|
garbageValue = "-804130257"
|
|
)
|
|
@Export("init")
|
|
void init(Buffer var1) {
|
|
int var2 = var1.readUnsignedByte();
|
|
if (var2 != WorldMapID.field296.value) {
|
|
throw new IllegalStateException("");
|
|
} else {
|
|
super.minPlane = var1.readUnsignedByte();
|
|
super.planes = var1.readUnsignedByte();
|
|
super.regionXLow = var1.readUnsignedShort() * 4096;
|
|
super.regionYLow = var1.readUnsignedShort() * 64;
|
|
this.chunkXLow = var1.readUnsignedByte();
|
|
this.chunkYLow = var1.readUnsignedByte();
|
|
super.regionX = var1.readUnsignedShort();
|
|
super.regionY = var1.readUnsignedShort();
|
|
this.chunkX = var1.readUnsignedByte();
|
|
this.chunkY = var1.readUnsignedByte();
|
|
super.groupId = var1.method5559();
|
|
super.fileId = var1.method5559();
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("v")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(Lkj;I)V",
|
|
garbageValue = "1878970684"
|
|
)
|
|
@Export("readGeography")
|
|
void readGeography(Buffer var1) {
|
|
super.planes = Math.min(super.planes, 4);
|
|
super.floorUnderlayIds = new short[1][64][64];
|
|
super.floorOverlayIds = new short[super.planes][64][64];
|
|
super.field178 = new byte[super.planes][64][64];
|
|
super.field177 = new byte[super.planes][64][64];
|
|
super.decorations = new WorldMapDecoration[super.planes][64][64][];
|
|
int var2 = var1.readUnsignedByte();
|
|
if (var2 != class39.field277.value) {
|
|
throw new IllegalStateException("");
|
|
} else {
|
|
int var3 = var1.readUnsignedByte();
|
|
int var4 = var1.readUnsignedByte();
|
|
int var5 = var1.readUnsignedByte();
|
|
int var6 = var1.readUnsignedByte();
|
|
if (var3 == super.regionX && var4 == super.regionY && var5 == this.chunkX && var6 == this.chunkY) {
|
|
for (int var7 = 0; var7 < 8; ++var7) {
|
|
for (int var8 = 0; var8 < 8; ++var8) {
|
|
this.readTile(var7 + this.chunkX * 8, var8 + this.chunkY * 8, var1);
|
|
}
|
|
}
|
|
|
|
} else {
|
|
throw new IllegalStateException("");
|
|
}
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("x")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(I)I",
|
|
garbageValue = "-915979405"
|
|
)
|
|
@Export("getChunkXLow")
|
|
int getChunkXLow() {
|
|
return this.chunkXLow;
|
|
}
|
|
|
|
@ObfuscatedName("w")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(I)I",
|
|
garbageValue = "-1034896406"
|
|
)
|
|
@Export("getChunkYLow")
|
|
int getChunkYLow() {
|
|
return this.chunkYLow;
|
|
}
|
|
|
|
@ObfuscatedName("t")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(B)I",
|
|
garbageValue = "3"
|
|
)
|
|
@Export("getChunkX")
|
|
int getChunkX() {
|
|
return this.chunkX;
|
|
}
|
|
|
|
@ObfuscatedName("j")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(I)I",
|
|
garbageValue = "1372566315"
|
|
)
|
|
@Export("getChunkY")
|
|
int getChunkY() {
|
|
return this.chunkY;
|
|
}
|
|
|
|
public boolean equals(Object var1) {
|
|
if (!(var1 instanceof WorldMapData_1)) {
|
|
return false;
|
|
} else {
|
|
WorldMapData_1 var2 = (WorldMapData_1)var1;
|
|
if (var2.regionX == super.regionX && var2.regionY == super.regionY) {
|
|
return var2.chunkX == this.chunkX && this.chunkY == var2.chunkY;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
public int hashCode() {
|
|
return super.regionX | super.regionY << 8 | this.chunkX << 16 | this.chunkY << 24;
|
|
}
|
|
|
|
@ObfuscatedName("h")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(II)Lif;",
|
|
garbageValue = "1792117497"
|
|
)
|
|
@Export("KitDefinition_get")
|
|
public static KitDefinition KitDefinition_get(int var0) {
|
|
KitDefinition var1 = (KitDefinition)KitDefinition.KitDefinition_cached.get((long)var0);
|
|
if (var1 != null) {
|
|
return var1;
|
|
} else {
|
|
byte[] var2 = KitDefinition.KitDefinition_archive.takeFile(3, var0);
|
|
var1 = new KitDefinition();
|
|
if (var2 != null) {
|
|
var1.decode(new Buffer(var2));
|
|
}
|
|
|
|
KitDefinition.KitDefinition_cached.put(var1, (long)var0);
|
|
return var1;
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("j")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(ILcs;ZB)I",
|
|
garbageValue = "6"
|
|
)
|
|
static int method736(int var0, Script var1, boolean var2) {
|
|
int var4 = -1;
|
|
Widget var3;
|
|
if (var0 >= 2000) {
|
|
var0 -= 1000;
|
|
var4 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
var3 = CollisionMap.getWidget(var4);
|
|
} else {
|
|
var3 = var2 ? PlayerAppearance.field2561 : VarcInt.field3264;
|
|
}
|
|
|
|
if (var0 == ScriptOpcodes.CC_SETSCROLLPOS) {
|
|
VarcInt.Interpreter_intStackSize -= 2;
|
|
var3.scrollX = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize];
|
|
if (var3.scrollX > var3.scrollWidth - var3.width) {
|
|
var3.scrollX = var3.scrollWidth - var3.width;
|
|
}
|
|
|
|
if (var3.scrollX < 0) {
|
|
var3.scrollX = 0;
|
|
}
|
|
|
|
var3.scrollY = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1];
|
|
if (var3.scrollY > var3.scrollHeight - var3.height) {
|
|
var3.scrollY = var3.scrollHeight - var3.height;
|
|
}
|
|
|
|
if (var3.scrollY < 0) {
|
|
var3.scrollY = 0;
|
|
}
|
|
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETCOLOUR) {
|
|
var3.color = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETFILL) {
|
|
var3.fill = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTRANS) {
|
|
var3.transparencyTop = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETLINEWID) {
|
|
var3.lineWid = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETGRAPHIC) {
|
|
var3.spriteId2 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SET2DANGLE) {
|
|
var3.spriteAngle = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTILING) {
|
|
var3.spriteTiling = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETMODEL) {
|
|
var3.modelType = 1;
|
|
var3.modelId = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETMODELANGLE) {
|
|
VarcInt.Interpreter_intStackSize -= 6;
|
|
var3.modelOffsetX = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize];
|
|
var3.modelOffsetY = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1];
|
|
var3.modelAngleX = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 2];
|
|
var3.modelAngleY = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 3];
|
|
var3.modelAngleZ = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 4];
|
|
var3.modelZoom = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 5];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else {
|
|
int var8;
|
|
if (var0 == ScriptOpcodes.CC_SETMODELANIM) {
|
|
var8 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
if (var8 != var3.sequenceId) {
|
|
var3.sequenceId = var8;
|
|
var3.modelFrame = 0;
|
|
var3.modelFrameCycle = 0;
|
|
CollisionMap.invalidateWidget(var3);
|
|
}
|
|
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETMODELORTHOG) {
|
|
var3.modelOrthog = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTEXT) {
|
|
String var7 = Interpreter.Interpreter_stringStack[--Interpreter.Interpreter_stringStackSize];
|
|
if (!var7.equals(var3.text)) {
|
|
var3.text = var7;
|
|
CollisionMap.invalidateWidget(var3);
|
|
}
|
|
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTEXTFONT) {
|
|
var3.fontId = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTEXTALIGN) {
|
|
VarcInt.Interpreter_intStackSize -= 3;
|
|
var3.textXAlignment = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize];
|
|
var3.textYAlignment = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1];
|
|
var3.textLineHeight = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 2];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETTEXTSHADOW) {
|
|
var3.textShadowed = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETOUTLINE) {
|
|
var3.outline = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETGRAPHICSHADOW) {
|
|
var3.spriteShadow = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETVFLIP) {
|
|
var3.spriteFlipV = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETHFLIP) {
|
|
var3.spriteFlipH = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETSCROLLSIZE) {
|
|
VarcInt.Interpreter_intStackSize -= 2;
|
|
var3.scrollWidth = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize];
|
|
var3.scrollHeight = Interpreter.Interpreter_intStack[VarcInt.Interpreter_intStackSize + 1];
|
|
CollisionMap.invalidateWidget(var3);
|
|
if (var4 != -1 && var3.type == 0) {
|
|
PendingSpawn.revalidateWidgetScroll(class9.Widget_interfaceComponents[var4 >> 16], var3, false);
|
|
}
|
|
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_RESUME_PAUSEBUTTON) {
|
|
DynamicObject.resumePauseWidget(var3.id, var3.childIndex);
|
|
Client.meslayerContinueWidget = var3;
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == 1122) {
|
|
var3.spriteId = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETFILLCOLOUR) {
|
|
var3.color2 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == 1124) {
|
|
var3.transparencyBot = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
CollisionMap.invalidateWidget(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETFILLMODE) {
|
|
var8 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize];
|
|
class333 var6 = (class333)UrlRequester.findEnumerated(NetSocket.FillMode_values(), var8);
|
|
if (var6 != null) {
|
|
var3.fillMode = var6;
|
|
CollisionMap.invalidateWidget(var3);
|
|
}
|
|
|
|
return 1;
|
|
} else {
|
|
boolean var5;
|
|
if (var0 == ScriptOpcodes.CC_SETLINEDIRECTION) {
|
|
var5 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
var3.field2620 = var5;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CC_SETMODELTRANSPARENT) {
|
|
var5 = Interpreter.Interpreter_intStack[--VarcInt.Interpreter_intStackSize] == 1;
|
|
var3.modelTransparency = var5;
|
|
return 1;
|
|
} else {
|
|
return 2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("hb")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(IIIIIIII)V",
|
|
garbageValue = "1785957932"
|
|
)
|
|
@Export("addPendingSpawnToScene")
|
|
static final void addPendingSpawnToScene(int var0, int var1, int var2, int var3, int var4, int var5, int var6) {
|
|
if (var2 >= 1 && var3 >= 1 && var2 <= 102 && var3 <= 102) {
|
|
if (Client.isLowDetail && var0 != GameObject.Client_plane) {
|
|
return;
|
|
}
|
|
|
|
long var7 = 0L;
|
|
boolean var9 = true;
|
|
boolean var10 = false;
|
|
boolean var11 = false;
|
|
if (var1 == 0) {
|
|
var7 = ArchiveLoader.scene.getBoundaryObjectTag(var0, var2, var3);
|
|
}
|
|
|
|
if (var1 == 1) {
|
|
var7 = ArchiveLoader.scene.getWallDecorationTag(var0, var2, var3);
|
|
}
|
|
|
|
if (var1 == 2) {
|
|
var7 = ArchiveLoader.scene.getGameObjectTag(var0, var2, var3);
|
|
}
|
|
|
|
if (var1 == 3) {
|
|
var7 = ArchiveLoader.scene.getFloorDecorationTag(var0, var2, var3);
|
|
}
|
|
|
|
int var12;
|
|
if (var7 != 0L) {
|
|
var12 = ArchiveLoader.scene.getObjectFlags(var0, var2, var3, var7);
|
|
int var14 = Occluder.Entity_unpackID(var7);
|
|
int var15 = var12 & 31;
|
|
int var16 = var12 >> 6 & 3;
|
|
ObjectDefinition var13;
|
|
if (var1 == 0) {
|
|
ArchiveLoader.scene.removeBoundaryObject(var0, var2, var3);
|
|
var13 = WorldMapDecoration.getObjectDefinition(var14);
|
|
if (var13.interactType != 0) {
|
|
Client.collisionMaps[var0].method3616(var2, var3, var15, var16, var13.boolean1);
|
|
}
|
|
}
|
|
|
|
if (var1 == 1) {
|
|
ArchiveLoader.scene.removeWallDecoration(var0, var2, var3);
|
|
}
|
|
|
|
if (var1 == 2) {
|
|
ArchiveLoader.scene.removeGameObject(var0, var2, var3);
|
|
var13 = WorldMapDecoration.getObjectDefinition(var14);
|
|
if (var2 + var13.sizeX > 103 || var3 + var13.sizeX > 103 || var2 + var13.sizeY > 103 || var3 + var13.sizeY > 103) {
|
|
return;
|
|
}
|
|
|
|
if (var13.interactType != 0) {
|
|
Client.collisionMaps[var0].setFlagOffNonSquare(var2, var3, var13.sizeX, var13.sizeY, var16, var13.boolean1);
|
|
}
|
|
}
|
|
|
|
if (var1 == 3) {
|
|
ArchiveLoader.scene.removeFloorDecoration(var0, var2, var3);
|
|
var13 = WorldMapDecoration.getObjectDefinition(var14);
|
|
if (var13.interactType == 1) {
|
|
Client.collisionMaps[var0].method3619(var2, var3);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (var4 >= 0) {
|
|
var12 = var0;
|
|
if (var0 < 3 && (Tiles.Tiles_renderFlags[1][var2][var3] & 2) == 2) {
|
|
var12 = var0 + 1;
|
|
}
|
|
|
|
ScriptEvent.method1259(var0, var12, var2, var3, var4, var5, var6, ArchiveLoader.scene, Client.collisionMaps[var0]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
@ObfuscatedName("if")
|
|
@ObfuscatedSignature(
|
|
descriptor = "(I)V",
|
|
garbageValue = "155276335"
|
|
)
|
|
static void method767() {
|
|
for (int var0 = 0; var0 < Client.menuOptionsCount; ++var0) {
|
|
if (WorldMapSection1.method624(Client.menuOpcodes[var0])) {
|
|
if (var0 < Client.menuOptionsCount - 1) {
|
|
for (int var1 = var0; var1 < Client.menuOptionsCount - 1; ++var1) {
|
|
Client.menuActions[var1] = Client.menuActions[var1 + 1];
|
|
Client.menuTargets[var1] = Client.menuTargets[var1 + 1];
|
|
Client.menuOpcodes[var1] = Client.menuOpcodes[var1 + 1];
|
|
Client.menuIdentifiers[var1] = Client.menuIdentifiers[var1 + 1];
|
|
Client.menuArguments1[var1] = Client.menuArguments1[var1 + 1];
|
|
Client.menuArguments2[var1] = Client.menuArguments2[var1 + 1];
|
|
Client.menuShiftClick[var1] = Client.menuShiftClick[var1 + 1];
|
|
}
|
|
}
|
|
|
|
--var0;
|
|
--Client.menuOptionsCount;
|
|
}
|
|
}
|
|
|
|
BuddyRankComparator.method3522(Occluder.menuWidth / 2 + AbstractUserComparator.menuX, DynamicObject.menuY);
|
|
}
|
|
}
|