From 881175630170a91441bb7c70106598b2afd4438c Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 8 Feb 2022 11:14:11 -0500 Subject: [PATCH 01/29] gpu: replace count_prio_offset switch with loop Nvidia drivers seem to compile the switch with fallthrough as a 19 level nested if, and inlines the code from the fallthrough cases into each. The hd devs have identified this as a potential source of the artifacting that happens on some cards due to the number of nested branches. Replace the switch with a simple loop, which also is about 7% of the generated code size of the switch. --- .../client/plugins/gpu/priority_render.cl | 45 +++---------------- .../client/plugins/gpu/priority_render.glsl | 45 +++---------------- 2 files changed, 14 insertions(+), 76 deletions(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.cl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.cl index 6f1a04470c..4f3ecd4132 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.cl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.cl @@ -62,52 +62,21 @@ int priority_map(int p, int distance, int _min10, int avg1, int avg2, int avg3) return 17; } default: - return -1; + // this can't happen unless an invalid priority is sent. just assume 0. + return 0; } } // calculate the number of faces with a lower adjusted priority than // the given adjusted priority int count_prio_offset(__local struct shared_data *shared, int priority) { + // this shouldn't ever be outside of (0, 17) because it is the return value from priority_map + priority = clamp(priority, 0, 17); int total = 0; - switch (priority) { - case 17: - total += shared->totalMappedNum[16]; - case 16: - total += shared->totalMappedNum[15]; - case 15: - total += shared->totalMappedNum[14]; - case 14: - total += shared->totalMappedNum[13]; - case 13: - total += shared->totalMappedNum[12]; - case 12: - total += shared->totalMappedNum[11]; - case 11: - total += shared->totalMappedNum[10]; - case 10: - total += shared->totalMappedNum[9]; - case 9: - total += shared->totalMappedNum[8]; - case 8: - total += shared->totalMappedNum[7]; - case 7: - total += shared->totalMappedNum[6]; - case 6: - total += shared->totalMappedNum[5]; - case 5: - total += shared->totalMappedNum[4]; - case 4: - total += shared->totalMappedNum[3]; - case 3: - total += shared->totalMappedNum[2]; - case 2: - total += shared->totalMappedNum[1]; - case 1: - total += shared->totalMappedNum[0]; - case 0: - return total; + for (int i = 0; i < priority; i++) { + total += shared->totalMappedNum[i]; } + return total; } void get_face( diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl index 90af8d41f0..fc6f9ddfed 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/priority_render.glsl @@ -62,52 +62,21 @@ int priority_map(int p, int distance, int _min10, int avg1, int avg2, int avg3) return 17; } default: - return -1; + // this can't happen unless an invalid priority is sent. just assume 0. + return 0; } } // calculate the number of faces with a lower adjusted priority than // the given adjusted priority int count_prio_offset(int priority) { + // this shouldn't ever be outside of (0, 17) because it is the return value from priority_map + priority = clamp(priority, 0, 17); int total = 0; - switch (priority) { - case 17: - total += totalMappedNum[16]; - case 16: - total += totalMappedNum[15]; - case 15: - total += totalMappedNum[14]; - case 14: - total += totalMappedNum[13]; - case 13: - total += totalMappedNum[12]; - case 12: - total += totalMappedNum[11]; - case 11: - total += totalMappedNum[10]; - case 10: - total += totalMappedNum[9]; - case 9: - total += totalMappedNum[8]; - case 8: - total += totalMappedNum[7]; - case 7: - total += totalMappedNum[6]; - case 6: - total += totalMappedNum[5]; - case 5: - total += totalMappedNum[4]; - case 4: - total += totalMappedNum[3]; - case 3: - total += totalMappedNum[2]; - case 2: - total += totalMappedNum[1]; - case 1: - total += totalMappedNum[0]; - case 0: - return total; + for (int i = 0; i < priority; i++) { + total += totalMappedNum[i]; } + return total; } void get_face(uint localId, modelinfo minfo, int cameraYaw, int cameraPitch, From aff5d53ddbef67c2d3aa3c045442c6fbe6688d39 Mon Sep 17 00:00:00 2001 From: testing-ongithub <96100526+testing-ongithub@users.noreply.github.com> Date: Fri, 11 Feb 2022 13:30:39 -0600 Subject: [PATCH 02/29] fairy ring: add Yu'biusk --- .../java/net/runelite/client/plugins/fairyring/FairyRings.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java b/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java index 0f1db7d044..cf4f2456da 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/fairyring/FairyRings.java @@ -54,6 +54,7 @@ public enum FairyRings BKR("Mort Myre Swamp, south of Canifis"), BKS("Zanaris"), BLP("TzHaar area"), + BLQ("Yu'biusk"), BLR("Legends' Guild"), // C From e4edddffbe345d5e3098a8b3c6f08b5cd5850d2e Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 24 Aug 2021 10:43:37 -0700 Subject: [PATCH 03/29] widget overlay: Don't draw empty wilderness K/D box The Wilderness and PVP kill-death information box is created while in these areas regardless of whether the setting (configured via the notice board at the Edgeville bank) is enabled to show the text, meaning the widget contains only empty text widgets when the setting is disabled rather than being null, causing a bounding box to still be drawn and affecting other snapped widget layout. This commit adds a child class of WidgetOverlay specific to this widget and prevents it from being drawn when the setting to show this information is disabled. --- .../main/java/net/runelite/api/Varbits.java | 11 +++++++++- .../client/ui/overlay/WidgetOverlay.java | 22 ++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Varbits.java b/runelite-api/src/main/java/net/runelite/api/Varbits.java index 7c609f627d..4154e2dded 100644 --- a/runelite-api/src/main/java/net/runelite/api/Varbits.java +++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java @@ -639,7 +639,16 @@ public enum Varbits * 0 = on * 1 = off */ - BOSS_HEALTH_OVERLAY(12389); + BOSS_HEALTH_OVERLAY(12389), + + /** + * Whether the PVP kill-death stats widget should be drawn while in the wilderness or in PVP worlds. + * + * 0 = Disabled + * 1 = Enabled + */ + SHOW_PVP_KDR_STATS(4143), + ; /** * The raw varbit ID. diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java index 57834bd4f3..0d854ab91d 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java @@ -56,7 +56,7 @@ public class WidgetOverlay extends Overlay new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_KNIGHT_INFO_CONTAINER, OverlayPosition.TOP_LEFT), new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_ACTIVITY_SHIELD_INFO_CONTAINER, OverlayPosition.TOP_RIGHT), new WidgetOverlay(client, WidgetInfo.ZEAH_MESS_HALL_COOKING_DISPLAY, OverlayPosition.TOP_LEFT), - new WidgetOverlay(client, WidgetInfo.PVP_KILLDEATH_COUNTER, OverlayPosition.TOP_LEFT), + new PvpKDRWidgetOverlay(client, WidgetInfo.PVP_KILLDEATH_COUNTER, OverlayPosition.TOP_LEFT), new WidgetOverlay(client, WidgetInfo.SKOTIZO_CONTAINER, OverlayPosition.TOP_LEFT), new WidgetOverlay(client, WidgetInfo.KOUREND_FAVOUR_OVERLAY, OverlayPosition.TOP_CENTER), new WidgetOverlay(client, WidgetInfo.PYRAMID_PLUNDER_DATA, OverlayPosition.TOP_CENTER), @@ -257,4 +257,24 @@ public class WidgetOverlay extends Overlay return position; } } + + private static class PvpKDRWidgetOverlay extends WidgetOverlay + { + private PvpKDRWidgetOverlay(Client client, WidgetInfo widgetInfo, OverlayPosition overlayPosition) + { + super(client, widgetInfo, overlayPosition); + } + + @Override + public Dimension render(Graphics2D graphics) + { + // Don't draw widget overlay if the PVP KDR stats text will be empty + if (client.getVar(Varbits.SHOW_PVP_KDR_STATS) == 1) + { + return super.render(graphics); + } + + return null; + } + } } From f31a67bb2b0e2af2297f69748fc70a2bfefcbb89 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 11 Feb 2022 19:45:19 -0500 Subject: [PATCH 04/29] gpu: apply hsl override to flat shade faces The behavior of this was changed in 203 to include flat shade faces --- .../net/runelite/client/plugins/gpu/SceneUploader.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/SceneUploader.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/SceneUploader.java index 82f8676ce5..dd2e015eb1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/SceneUploader.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/SceneUploader.java @@ -434,8 +434,9 @@ class SceneUploader len += 3; continue; } - // HSL override is not applied to flat shade faces or to textured faces - else if (faceTextures == null || faceTextures[face] == -1) + + // HSL override is not applied to textured faces + if (faceTextures == null || faceTextures[face] == -1) { if (overrideAmount > 0) { @@ -525,8 +526,9 @@ class SceneUploader } return 3; } - // HSL override is not applied to flat shade faces or to textured faces - else if (faceTextures == null || faceTextures[face] == -1) + + // HSL override is not applied to textured faces + if (faceTextures == null || faceTextures[face] == -1) { if (overrideAmount > 0) { From c81528b55796ce03d711b59927f408dafd900480 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 12 Feb 2022 11:53:54 -0500 Subject: [PATCH 05/29] Update dnschange url The old url now tries to sell users a vpn --- .../src/main/resources/net/runelite/client/runelite.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/runelite.properties b/runelite-client/src/main/resources/net/runelite/client/runelite.properties index 049a6443fb..ae3ba68c2b 100644 --- a/runelite-client/src/main/resources/net/runelite/client/runelite.properties +++ b/runelite-client/src/main/resources/net/runelite/client/runelite.properties @@ -9,7 +9,7 @@ runelite.wiki.link=https://github.com/runelite/runelite/wiki runelite.patreon.link=https://www.patreon.com/runelite runelite.wiki.troubleshooting.link=https://github.com/runelite/runelite/wiki/Troubleshooting-problems-with-the-client runelite.wiki.building.link=https://github.com/runelite/runelite/wiki/Building-with-IntelliJ-IDEA#client-failing-to-start -runelite.dnschange.link=https://1.1.1.1/dns/ +runelite.dnschange.link=https://1.1.1.1/dns/#setup-instructions runelite.jav_config=https://oldschool.runescape.com/jav_config.ws runelite.jav_config_backup=https://static.runelite.net/jav_config.ws runelite.pluginhub.url=https://repo.runelite.net/plugins From 9019d0833b8512b1d046642b4ccc1be0d7e6bcc0 Mon Sep 17 00:00:00 2001 From: Jeremy Plsek Date: Sun, 13 Feb 2022 00:00:32 -0500 Subject: [PATCH 06/29] notifier: set app name when using notify-send If a notification is sent while the screen is locked, it says "notify-send" instead of "RuneLite". --- runelite-client/src/main/java/net/runelite/client/Notifier.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java index b6bbb51769..a0d6df8aeb 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -314,6 +314,8 @@ public class Notifier commands.add("notify-send"); commands.add(title); commands.add(message); + commands.add("-a"); + commands.add(SHELL_ESCAPE.escape(appName)); commands.add("-i"); commands.add(SHELL_ESCAPE.escape(notifyIconPath.toAbsolutePath().toString())); commands.add("-u"); From 720b0d0273ea9033f02e4ad6857e7f15fcc040c4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 13 Feb 2022 10:45:44 -0500 Subject: [PATCH 07/29] linkbrowser: prefer xdg-open over Desktop.open and browse Desktop.open/Desktop.browse doesn't work on Linux with gtk3 See JDK-8275494 --- .../net/runelite/client/util/LinkBrowser.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java b/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java index e8965029c1..07ac4a2d87 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java +++ b/runelite-client/src/main/java/net/runelite/client/util/LinkBrowser.java @@ -60,17 +60,17 @@ public class LinkBrowser return; } - if (attemptDesktopBrowse(url)) - { - log.debug("Opened url through Desktop#browse to {}", url); - return; - } - if (shouldAttemptXdg && attemptXdgOpen(url)) { log.debug("Opened url through xdg-open to {}", url); return; } + + if (attemptDesktopBrowse(url)) + { + log.debug("Opened url through Desktop#browse to {}", url); + return; + } log.warn("LinkBrowser.browse() could not open {}", url); showMessageBox("Unable to open link. Press 'OK' and the link will be copied to your clipboard.", url); @@ -91,18 +91,18 @@ public class LinkBrowser return; } + if (shouldAttemptXdg && attemptXdgOpen(directory)) + { + log.debug("Opened directory through xdg-open to {}", directory); + return; + } + if (attemptDesktopOpen(directory)) { log.debug("Opened directory through Desktop#open to {}", directory); return; } - if (shouldAttemptXdg && attemptXdgOpen(directory)) - { - log.debug("Opened directory through xdg-open to {}", directory); - return; - } - log.warn("LinkBrowser.open() could not open {}", directory); showMessageBox("Unable to open folder. Press 'OK' and the folder directory will be copied to your clipboard.", directory); }).start(); From bd1d97ecbe8000da95b81c90b435e37db22d9906 Mon Sep 17 00:00:00 2001 From: Christos-Apostolidis <72702348+Christos-Apostolidis@users.noreply.github.com> Date: Mon, 14 Feb 2022 20:42:54 +0200 Subject: [PATCH 08/29] loot tracker: add hallowed sack --- .../client/plugins/loottracker/LootTrackerPlugin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index e407644d89..b8c9f1a7b2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -205,6 +205,8 @@ public class LootTrackerPlugin extends Plugin private static final String HALLOWED_SEPULCHRE_COFFIN_EVENT = "Coffin (Hallowed Sepulchre)"; private static final Set HALLOWED_SEPULCHRE_MAP_REGIONS = ImmutableSet.of(8797, 10077, 9308, 10074, 9050); // one map region per floor + private static final String HALLOWED_SACK_EVENT = "Hallowed Sack"; + // Last man standing map regions private static final Set LAST_MAN_STANDING_REGIONS = ImmutableSet.of(13658, 13659, 13660, 13914, 13915, 13916, 13918, 13919, 13920, 14174, 14175, 14176, 14430, 14431, 14432); @@ -791,6 +793,7 @@ public class LootTrackerPlugin extends Plugin if (CHEST_EVENT_TYPES.containsValue(eventType) || SHADE_CHEST_OBJECTS.containsValue(eventType) || HALLOWED_SEPULCHRE_COFFIN_EVENT.equals(eventType) + || HALLOWED_SACK_EVENT.equals(eventType) || HERBIBOAR_EVENT.equals(eventType) || HESPORI_EVENT.equals(eventType) || WINTERTODT_SUPPLY_CRATE_EVENT.equals(eventType) @@ -876,6 +879,10 @@ public class LootTrackerPlugin extends Plugin setEvent(LootRecordType.EVENT, MAHOGANY_CRATE_EVENT, client.getBoostedSkillLevel(Skill.CONSTRUCTION)); takeInventorySnapshot(); break; + case ItemID.HALLOWED_SACK: + setEvent(LootRecordType.EVENT, HALLOWED_SACK_EVENT); + takeInventorySnapshot(); + break; } } } From d03421d2944eb7d634c626465c7cd869e97b0ccb Mon Sep 17 00:00:00 2001 From: Nakst <17091026+nakst@users.noreply.github.com> Date: Tue, 15 Feb 2022 18:49:03 +0000 Subject: [PATCH 09/29] cache: refactor ModelLoader.decodeOldFormat variable names --- .../definitions/loaders/ModelLoader.java | 379 +++++++++--------- 1 file changed, 184 insertions(+), 195 deletions(-) diff --git a/cache/src/main/java/net/runelite/cache/definitions/loaders/ModelLoader.java b/cache/src/main/java/net/runelite/cache/definitions/loaders/ModelLoader.java index 22226c3d8a..1d6be20e86 100644 --- a/cache/src/main/java/net/runelite/cache/definitions/loaders/ModelLoader.java +++ b/cache/src/main/java/net/runelite/cache/definitions/loaders/ModelLoader.java @@ -1088,325 +1088,314 @@ public class ModelLoader } - void decodeOldFormat(ModelDefinition def, byte[] var1) + void decodeOldFormat(ModelDefinition def, byte[] inputData) { - boolean var2 = false; - boolean var3 = false; - InputStream var4 = new InputStream(var1); - InputStream var5 = new InputStream(var1); - InputStream var6 = new InputStream(var1); - InputStream var7 = new InputStream(var1); - InputStream var8 = new InputStream(var1); - var4.setOffset(var1.length - 18); - int var9 = var4.readUnsignedShort(); - int var10 = var4.readUnsignedShort(); - int var11 = var4.readUnsignedByte(); - int var12 = var4.readUnsignedByte(); - int var13 = var4.readUnsignedByte(); - int var14 = var4.readUnsignedByte(); - int var15 = var4.readUnsignedByte(); - int var16 = var4.readUnsignedByte(); - int var17 = var4.readUnsignedShort(); - int var18 = var4.readUnsignedShort(); - int var19 = var4.readUnsignedShort(); - int var20 = var4.readUnsignedShort(); - byte var21 = 0; - int var22 = var21 + var9; - int var23 = var22; - var22 += var10; - int var24 = var22; - if (var13 == 255) + boolean usesFaceRenderTypes = false; + boolean usesFaceTextures = false; + InputStream stream1 = new InputStream(inputData); + InputStream stream2 = new InputStream(inputData); + InputStream stream3 = new InputStream(inputData); + InputStream stream4 = new InputStream(inputData); + InputStream stream5 = new InputStream(inputData); + stream1.setOffset(inputData.length - 18); + int vertexCount = stream1.readUnsignedShort(); + int faceCount = stream1.readUnsignedShort(); + int textureCount = stream1.readUnsignedByte(); + int isTextured = stream1.readUnsignedByte(); + int faceRenderPriority = stream1.readUnsignedByte(); + int hasFaceTransparencies = stream1.readUnsignedByte(); + int hasPackedTransparencyVertexGroups = stream1.readUnsignedByte(); + int hasPackedVertexGroups = stream1.readUnsignedByte(); + int vertexXDataByteCount = stream1.readUnsignedShort(); + int vertexYDataByteCount = stream1.readUnsignedShort(); + int vertezZDataByteCount = stream1.readUnsignedShort(); + int faceIndexDataByteCount = stream1.readUnsignedShort(); + byte offsetOfVertexFlags = 0; + int dataOffset = offsetOfVertexFlags + vertexCount; + int offsetOfFaceIndexCompressionTypes = dataOffset; + dataOffset += faceCount; + int offsetOfFaceRenderPriorities = dataOffset; + if (faceRenderPriority == 255) { - var22 += var10; + dataOffset += faceCount; } - int var25 = var22; - if (var15 == 1) + int offsetOfPackedTransparencyVertexGroups = dataOffset; + if (hasPackedTransparencyVertexGroups == 1) { - var22 += var10; + dataOffset += faceCount; } - int var26 = var22; - if (var12 == 1) + int offsetOfFaceTextureFlags = dataOffset; + if (isTextured == 1) { - var22 += var10; + dataOffset += faceCount; } - int var27 = var22; - if (var16 == 1) + int offsetOfPackedVertexGroups = dataOffset; + if (hasPackedVertexGroups == 1) { - var22 += var9; + dataOffset += vertexCount; } - int var28 = var22; - if (var14 == 1) + int offsetOfFaceTransparencies = dataOffset; + if (hasFaceTransparencies == 1) { - var22 += var10; + dataOffset += faceCount; } - int var29 = var22; - var22 += var20; - int var30 = var22; - var22 += var10 * 2; - int var31 = var22; - var22 += var11 * 6; - int var32 = var22; - var22 += var17; - int var33 = var22; - var22 += var18; - int var10000 = var22 + var19; - def.vertexCount = var9; - def.faceCount = var10; - def.numTextureFaces = var11; - def.vertexX = new int[var9]; - def.vertexY = new int[var9]; - def.vertexZ = new int[var9]; - def.faceIndices1 = new int[var10]; - def.faceIndices2 = new int[var10]; - def.faceIndices3 = new int[var10]; - if (var11 > 0) + int offsetOfFaceIndexData = dataOffset; + dataOffset += faceIndexDataByteCount; + int offsetOfFaceColorsOrFaceTextures = dataOffset; + dataOffset += faceCount * 2; + int offsetOfTextureIndices = dataOffset; + dataOffset += textureCount * 6; + int offsetOfVertexXData = dataOffset; + dataOffset += vertexXDataByteCount; + int offsetOfVertexYData = dataOffset; + dataOffset += vertexYDataByteCount; + int offsetOfVertexZData = dataOffset; + def.vertexCount = vertexCount; + def.faceCount = faceCount; + def.numTextureFaces = textureCount; + def.vertexX = new int[vertexCount]; + def.vertexY = new int[vertexCount]; + def.vertexZ = new int[vertexCount]; + def.faceIndices1 = new int[faceCount]; + def.faceIndices2 = new int[faceCount]; + def.faceIndices3 = new int[faceCount]; + if (textureCount > 0) { - def.textureRenderTypes = new byte[var11]; - def.texIndices1 = new short[var11]; - def.texIndices2 = new short[var11]; - def.texIndices3 = new short[var11]; + def.textureRenderTypes = new byte[textureCount]; + def.texIndices1 = new short[textureCount]; + def.texIndices2 = new short[textureCount]; + def.texIndices3 = new short[textureCount]; } - if (var16 == 1) + if (hasPackedVertexGroups == 1) { - def.packedVertexGroups = new int[var9]; + def.packedVertexGroups = new int[vertexCount]; } - if (var12 == 1) + if (isTextured == 1) { - def.faceRenderTypes = new byte[var10]; - def.textureCoords = new byte[var10]; - def.faceTextures = new short[var10]; + def.faceRenderTypes = new byte[faceCount]; + def.textureCoords = new byte[faceCount]; + def.faceTextures = new short[faceCount]; } - if (var13 == 255) + if (faceRenderPriority == 255) { - def.faceRenderPriorities = new byte[var10]; + def.faceRenderPriorities = new byte[faceCount]; } else { - def.priority = (byte) var13; + def.priority = (byte) faceRenderPriority; } - if (var14 == 1) + if (hasFaceTransparencies == 1) { - def.faceTransparencies = new byte[var10]; + def.faceTransparencies = new byte[faceCount]; } - if (var15 == 1) + if (hasPackedTransparencyVertexGroups == 1) { - def.packedTransparencyVertexGroups = new int[var10]; + def.packedTransparencyVertexGroups = new int[faceCount]; } - def.faceColors = new short[var10]; - var4.setOffset(var21); - var5.setOffset(var32); - var6.setOffset(var33); - var7.setOffset(var22); - var8.setOffset(var27); - int var35 = 0; - int var36 = 0; - int var37 = 0; + def.faceColors = new short[faceCount]; + stream1.setOffset(offsetOfVertexFlags); + stream2.setOffset(offsetOfVertexXData); + stream3.setOffset(offsetOfVertexYData); + stream4.setOffset(offsetOfVertexZData); + stream5.setOffset(offsetOfPackedVertexGroups); + int previousVertexX = 0; + int previousVertexY = 0; + int previousVertexZ = 0; - int var38; - int var39; - int var40; - int var41; - int var42; - for (var38 = 0; var38 < var9; ++var38) + for (int i = 0; i < vertexCount; ++i) { - var39 = var4.readUnsignedByte(); - var40 = 0; - if ((var39 & 1) != 0) + int vertexFlags = stream1.readUnsignedByte(); + int deltaX = 0; + if ((vertexFlags & 1) != 0) { - var40 = var5.readShortSmart(); + deltaX = stream2.readShortSmart(); } - var41 = 0; - if ((var39 & 2) != 0) + int deltaY = 0; + if ((vertexFlags & 2) != 0) { - var41 = var6.readShortSmart(); + deltaY = stream3.readShortSmart(); } - var42 = 0; - if ((var39 & 4) != 0) + int deltaZ = 0; + if ((vertexFlags & 4) != 0) { - var42 = var7.readShortSmart(); + deltaZ = stream4.readShortSmart(); } - def.vertexX[var38] = var35 + var40; - def.vertexY[var38] = var36 + var41; - def.vertexZ[var38] = var37 + var42; - var35 = def.vertexX[var38]; - var36 = def.vertexY[var38]; - var37 = def.vertexZ[var38]; - if (var16 == 1) + def.vertexX[i] = previousVertexX + deltaX; + def.vertexY[i] = previousVertexY + deltaY; + def.vertexZ[i] = previousVertexZ + deltaZ; + previousVertexX = def.vertexX[i]; + previousVertexY = def.vertexY[i]; + previousVertexZ = def.vertexZ[i]; + if (hasPackedVertexGroups == 1) { - def.packedVertexGroups[var38] = var8.readUnsignedByte(); + def.packedVertexGroups[i] = stream5.readUnsignedByte(); } } - var4.setOffset(var30); - var5.setOffset(var26); - var6.setOffset(var24); - var7.setOffset(var28); - var8.setOffset(var25); + stream1.setOffset(offsetOfFaceColorsOrFaceTextures); + stream2.setOffset(offsetOfFaceTextureFlags); + stream3.setOffset(offsetOfFaceRenderPriorities); + stream4.setOffset(offsetOfFaceTransparencies); + stream5.setOffset(offsetOfPackedTransparencyVertexGroups); - for (var38 = 0; var38 < var10; ++var38) + for (int i = 0; i < faceCount; ++i) { - def.faceColors[var38] = (short) var4.readUnsignedShort(); - if (var12 == 1) + def.faceColors[i] = (short) stream1.readUnsignedShort(); + if (isTextured == 1) { - var39 = var5.readUnsignedByte(); - if ((var39 & 1) == 1) + int faceTextureFlags = stream2.readUnsignedByte(); + if ((faceTextureFlags & 1) == 1) { - def.faceRenderTypes[var38] = 1; - var2 = true; + def.faceRenderTypes[i] = 1; + usesFaceRenderTypes = true; } else { - def.faceRenderTypes[var38] = 0; + def.faceRenderTypes[i] = 0; } - if ((var39 & 2) == 2) + if ((faceTextureFlags & 2) == 2) { - def.textureCoords[var38] = (byte) (var39 >> 2); - def.faceTextures[var38] = def.faceColors[var38]; - def.faceColors[var38] = 127; - if (def.faceTextures[var38] != -1) + def.textureCoords[i] = (byte) (faceTextureFlags >> 2); + def.faceTextures[i] = def.faceColors[i]; + def.faceColors[i] = 127; + if (def.faceTextures[i] != -1) { - var3 = true; + usesFaceTextures = true; } } else { - def.textureCoords[var38] = -1; - def.faceTextures[var38] = -1; + def.textureCoords[i] = -1; + def.faceTextures[i] = -1; } } - if (var13 == 255) + if (faceRenderPriority == 255) { - def.faceRenderPriorities[var38] = var6.readByte(); + def.faceRenderPriorities[i] = stream3.readByte(); } - if (var14 == 1) + if (hasFaceTransparencies == 1) { - def.faceTransparencies[var38] = var7.readByte(); + def.faceTransparencies[i] = stream4.readByte(); } - if (var15 == 1) + if (hasPackedTransparencyVertexGroups == 1) { - def.packedTransparencyVertexGroups[var38] = var8.readUnsignedByte(); + def.packedTransparencyVertexGroups[i] = stream5.readUnsignedByte(); } } - var4.setOffset(var29); - var5.setOffset(var23); - var38 = 0; - var39 = 0; - var40 = 0; - var41 = 0; + stream1.setOffset(offsetOfFaceIndexData); + stream2.setOffset(offsetOfFaceIndexCompressionTypes); + int previousIndex1 = 0; + int previousIndex2 = 0; + int previousIndex3 = 0; - int var43; - int var44; - for (var42 = 0; var42 < var10; ++var42) + for (int i = 0; i < faceCount; ++i) { - var43 = var5.readUnsignedByte(); - if (var43 == 1) + int faceIndexCompressionType = stream2.readUnsignedByte(); + if (faceIndexCompressionType == 1) { - var38 = var4.readShortSmart() + var41; - var39 = var4.readShortSmart() + var38; - var40 = var4.readShortSmart() + var39; - var41 = var40; - def.faceIndices1[var42] = var38; - def.faceIndices2[var42] = var39; - def.faceIndices3[var42] = var40; + previousIndex1 = stream1.readShortSmart() + previousIndex3; + previousIndex2 = stream1.readShortSmart() + previousIndex1; + previousIndex3 = stream1.readShortSmart() + previousIndex2; + def.faceIndices1[i] = previousIndex1; + def.faceIndices2[i] = previousIndex2; + def.faceIndices3[i] = previousIndex3; } - if (var43 == 2) + if (faceIndexCompressionType == 2) { - var39 = var40; - var40 = var4.readShortSmart() + var41; - var41 = var40; - def.faceIndices1[var42] = var38; - def.faceIndices2[var42] = var39; - def.faceIndices3[var42] = var40; + previousIndex2 = previousIndex3; + previousIndex3 = stream1.readShortSmart() + previousIndex3; + def.faceIndices1[i] = previousIndex1; + def.faceIndices2[i] = previousIndex2; + def.faceIndices3[i] = previousIndex3; } - if (var43 == 3) + if (faceIndexCompressionType == 3) { - var38 = var40; - var40 = var4.readShortSmart() + var41; - var41 = var40; - def.faceIndices1[var42] = var38; - def.faceIndices2[var42] = var39; - def.faceIndices3[var42] = var40; + previousIndex1 = previousIndex3; + previousIndex3 = stream1.readShortSmart() + previousIndex3; + def.faceIndices1[i] = previousIndex1; + def.faceIndices2[i] = previousIndex2; + def.faceIndices3[i] = previousIndex3; } - if (var43 == 4) + if (faceIndexCompressionType == 4) { - var44 = var38; - var38 = var39; - var39 = var44; - var40 = var4.readShortSmart() + var41; - var41 = var40; - def.faceIndices1[var42] = var38; - def.faceIndices2[var42] = var44; - def.faceIndices3[var42] = var40; + int swap = previousIndex1; + previousIndex1 = previousIndex2; + previousIndex2 = swap; + previousIndex3 = stream1.readShortSmart() + previousIndex3; + def.faceIndices1[i] = previousIndex1; + def.faceIndices2[i] = previousIndex2; + def.faceIndices3[i] = previousIndex3; } } - var4.setOffset(var31); + stream1.setOffset(offsetOfTextureIndices); - for (var42 = 0; var42 < var11; ++var42) + for (int i = 0; i < textureCount; ++i) { - def.textureRenderTypes[var42] = 0; - def.texIndices1[var42] = (short) var4.readUnsignedShort(); - def.texIndices2[var42] = (short) var4.readUnsignedShort(); - def.texIndices3[var42] = (short) var4.readUnsignedShort(); + def.textureRenderTypes[i] = 0; + def.texIndices1[i] = (short) stream1.readUnsignedShort(); + def.texIndices2[i] = (short) stream1.readUnsignedShort(); + def.texIndices3[i] = (short) stream1.readUnsignedShort(); } if (def.textureCoords != null) { - boolean var45 = false; + boolean usesTextureCoords = false; - for (var43 = 0; var43 < var10; ++var43) + for (int i = 0; i < faceCount; ++i) { - var44 = def.textureCoords[var43] & 255; - if (var44 != 255) + int coord = def.textureCoords[i] & 255; + if (coord != 255) { - if (def.faceIndices1[var43] == (def.texIndices1[var44] & '\uffff') && def.faceIndices2[var43] == (def.texIndices2[var44] & '\uffff') && def.faceIndices3[var43] == (def.texIndices3[var44] & '\uffff')) + if (def.faceIndices1[i] == (def.texIndices1[coord] & '\uffff') && def.faceIndices2[i] == (def.texIndices2[coord] & '\uffff') && def.faceIndices3[i] == (def.texIndices3[coord] & '\uffff')) { - def.textureCoords[var43] = -1; + def.textureCoords[i] = -1; } else { - var45 = true; + usesTextureCoords = true; } } } - if (!var45) + if (!usesTextureCoords) { def.textureCoords = null; } } - if (!var3) + if (!usesFaceTextures) { def.faceTextures = null; } - if (!var2) + if (!usesFaceRenderTypes) { def.faceRenderTypes = null; } } + } From 3ceb5d155226f1af1a2937df68859a81f53f7b2e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 18 Feb 2022 19:33:27 -0500 Subject: [PATCH 10/29] clues: add Jimmy Dazzler clue --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index fc64ab21ed..7f64f61ff2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -326,7 +326,8 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("A graceful man of many colours, his crates must be full of many delights.", "Hill Giant", CRATE_42067, new WorldPoint(1506, 3590, 2), "Kill any Hill Giant for a medium key. Then search the crate on the top floor of Osten's clothing shop in Shayzien."), new CrypticClue("Search the basket of apples in an orchard, south of the unknown grave surrounded by white roses.", APPLE_BASKET, new WorldPoint(1718, 3626, 0), "Search the middle apple basket in the apple orchard north of Hosidius."), new CrypticClue("Dig in the lair of red wings, within the temple of the Sun and Moon.", new WorldPoint(1820, 9935, 0), "Forthos Dungeon. In the center of the red dragons."), - new CrypticClue("Within the town of Lumbridge lives a man named Bob. He walks out of his door and takes 1 step east, 7 steps north, 5 steps west and 1 step south. Once he arrives, he digs a hole and buries his treasure.", new WorldPoint(3230, 3209, 0), "Just west of the bush outside Bob's axe shop in Lumbridge.") + new CrypticClue("Within the town of Lumbridge lives a man named Bob. He walks out of his door and takes 1 step east, 7 steps north, 5 steps west and 1 step south. Once he arrives, he digs a hole and buries his treasure.", new WorldPoint(3230, 3209, 0), "Just west of the bush outside Bob's axe shop in Lumbridge."), + new CrypticClue("Try not to let yourself be dazzled when you search these drawers.", DRAWERS_350, new WorldPoint(2561, 3323, 0), "Search the western drawers in Jimmy Dazzler's home near the East Ardougne Rat Pits.") ); private final String text; From c8ee8794072de174b16a0dea461e52900eb6d6e6 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 18 Feb 2022 19:39:39 -0500 Subject: [PATCH 11/29] clues: add Yu'biusk clue --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index 7f64f61ff2..19bbf55731 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -327,7 +327,8 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the basket of apples in an orchard, south of the unknown grave surrounded by white roses.", APPLE_BASKET, new WorldPoint(1718, 3626, 0), "Search the middle apple basket in the apple orchard north of Hosidius."), new CrypticClue("Dig in the lair of red wings, within the temple of the Sun and Moon.", new WorldPoint(1820, 9935, 0), "Forthos Dungeon. In the center of the red dragons."), new CrypticClue("Within the town of Lumbridge lives a man named Bob. He walks out of his door and takes 1 step east, 7 steps north, 5 steps west and 1 step south. Once he arrives, he digs a hole and buries his treasure.", new WorldPoint(3230, 3209, 0), "Just west of the bush outside Bob's axe shop in Lumbridge."), - new CrypticClue("Try not to let yourself be dazzled when you search these drawers.", DRAWERS_350, new WorldPoint(2561, 3323, 0), "Search the western drawers in Jimmy Dazzler's home near the East Ardougne Rat Pits.") + new CrypticClue("Try not to let yourself be dazzled when you search these drawers.", DRAWERS_350, new WorldPoint(2561, 3323, 0), "Search the western drawers in Jimmy Dazzler's home near the East Ardougne Rat Pits."), + new CrypticClue("The Big High War God left his mark on this place.", new WorldPoint(3572, 4372, 0), "Dig anywhere in Yu'biusk. Fairy ring BLQ.") ); private final String text; From 260c923abe10a8eda1ea51c8ef035397ababfa9a Mon Sep 17 00:00:00 2001 From: Skretzo <53493631+Skretzo@users.noreply.github.com> Date: Tue, 21 Dec 2021 16:27:30 +0100 Subject: [PATCH 12/29] screen markers: fix visibilityLabel tooltip The tooltip was not correctly toggling between show/hide when the visbility was toggled --- .../client/plugins/screenmarkers/ui/ScreenMarkerPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java index a9ad6e61e0..ffb685c346 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java @@ -374,7 +374,6 @@ class ScreenMarkerPanel extends JPanel JPanel rightActions = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 0)); rightActions.setBackground(ColorScheme.DARKER_GRAY_COLOR); - visibilityLabel.setToolTipText(visible ? "Hide screen marker" : "Show screen marker"); visibilityLabel.addMouseListener(new MouseAdapter() { @Override @@ -505,6 +504,7 @@ class ScreenMarkerPanel extends JPanel private void updateVisibility() { visibilityLabel.setIcon(visible ? VISIBLE_ICON : INVISIBLE_ICON); + visibilityLabel.setToolTipText(visible ? "Hide screen marker" : "Show screen marker"); } private void updateFill() From 5ddd089f3eb8ba4fe5e5a0185714535b48ffcbd5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 19 Feb 2022 18:04:20 -0500 Subject: [PATCH 13/29] screen markers: add a tooltip to border thickness spinner --- .../client/plugins/screenmarkers/ui/ScreenMarkerPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java index ffb685c346..76f6f2508e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java @@ -331,6 +331,7 @@ class ScreenMarkerPanel extends JPanel thicknessSpinner.setValue(marker.getMarker().getBorderThickness()); thicknessSpinner.setPreferredSize(new Dimension(50, 20)); thicknessSpinner.addChangeListener(ce -> updateThickness(true)); + thicknessSpinner.setToolTipText("Border thickness"); opacityIndicator.setToolTipText("Toggle background transparency"); opacityIndicator.addMouseListener(new MouseAdapter() From d661c47447a7e2fc868e18f620acce302583c77d Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 19 Feb 2022 18:24:51 -0500 Subject: [PATCH 14/29] screen markers: remove fill toggle This predates the alpha colorpicker, so it sort of made sense at the time, but currently the same effect can be achieved by just changing the fill color alpha. Additionally the toggle doesn't really toggle it but instead changes the alpha between 0 and 75 - and not the alpha that is chosen by the picker. --- .../screenmarkers/ui/ScreenMarkerPanel.java | 54 +----------------- .../plugins/screenmarkers/opacity_icon.png | Bin 257 -> 0 bytes 2 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/opacity_icon.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java index 76f6f2508e..06e1b5d3d8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java @@ -53,6 +53,7 @@ import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.FontManager; import net.runelite.client.ui.components.FlatTextField; import net.runelite.client.ui.components.colorpicker.RuneliteColorPicker; +import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ImageUtil; class ScreenMarkerPanel extends JPanel @@ -73,11 +74,6 @@ class ScreenMarkerPanel extends JPanel private static final ImageIcon NO_FILL_COLOR_ICON; private static final ImageIcon NO_FILL_COLOR_HOVER_ICON; - private static final ImageIcon FULL_OPACITY_ICON; - private static final ImageIcon FULL_OPACITY_HOVER_ICON; - private static final ImageIcon NO_OPACITY_ICON; - private static final ImageIcon NO_OPACITY_HOVER_ICON; - private static final ImageIcon VISIBLE_ICON; private static final ImageIcon VISIBLE_HOVER_ICON; private static final ImageIcon INVISIBLE_ICON; @@ -91,7 +87,6 @@ class ScreenMarkerPanel extends JPanel private final JLabel borderColorIndicator = new JLabel(); private final JLabel fillColorIndicator = new JLabel(); - private final JLabel opacityIndicator = new JLabel(); private final JLabel visibilityLabel = new JLabel(); private final JLabel deleteLabel = new JLabel(); @@ -123,14 +118,6 @@ class ScreenMarkerPanel extends JPanel NO_FILL_COLOR_ICON = new ImageIcon(fillImgHover); NO_FILL_COLOR_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(fillImgHover, -100)); - final BufferedImage opacityImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "opacity_icon.png"); - final BufferedImage opacityImgHover = ImageUtil.luminanceOffset(opacityImg, -150); - FULL_OPACITY_ICON = new ImageIcon(opacityImg); - FULL_OPACITY_HOVER_ICON = new ImageIcon(opacityImgHover); - - NO_OPACITY_ICON = new ImageIcon(opacityImgHover); - NO_OPACITY_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(opacityImgHover, -100)); - final BufferedImage visibleImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "visible_icon.png"); VISIBLE_ICON = new ImageIcon(visibleImg); VISIBLE_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(visibleImg, -100)); @@ -333,43 +320,8 @@ class ScreenMarkerPanel extends JPanel thicknessSpinner.addChangeListener(ce -> updateThickness(true)); thicknessSpinner.setToolTipText("Border thickness"); - opacityIndicator.setToolTipText("Toggle background transparency"); - opacityIndicator.addMouseListener(new MouseAdapter() - { - @Override - public void mousePressed(MouseEvent mouseEvent) - { - final Color fill = marker.getMarker().getFill(); - - if (fill.getAlpha() == 0) - { - marker.getMarker().setFill(new Color(fill.getRed(), fill.getGreen(), fill.getBlue(), DEFAULT_FILL_OPACITY)); - } - else - { - marker.getMarker().setFill(new Color(fill.getRed(), fill.getGreen(), fill.getBlue(), 0)); - } - - updateFill(); - plugin.updateConfig(); - } - - @Override - public void mouseEntered(MouseEvent mouseEvent) - { - opacityIndicator.setIcon(marker.getMarker().getFill().getAlpha() == 0 ? NO_OPACITY_HOVER_ICON : FULL_OPACITY_HOVER_ICON); - } - - @Override - public void mouseExited(MouseEvent mouseEvent) - { - opacityIndicator.setIcon(marker.getMarker().getFill().getAlpha() == 0 ? NO_OPACITY_ICON : FULL_OPACITY_ICON); - } - }); - leftActions.add(borderColorIndicator); leftActions.add(fillColorIndicator); - leftActions.add(opacityIndicator); leftActions.add(thicknessSpinner); JPanel rightActions = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 0)); @@ -524,7 +476,6 @@ class ScreenMarkerPanel extends JPanel } fillColorIndicator.setIcon(isFullyTransparent ? NO_FILL_COLOR_ICON : FILL_COLOR_ICON); - opacityIndicator.setIcon(isFullyTransparent ? NO_OPACITY_ICON : FULL_OPACITY_ICON); } private void updateBorder() @@ -544,9 +495,10 @@ class ScreenMarkerPanel extends JPanel private void openFillColorPicker() { + final Color fillColor = marker.getMarker().getFill(); RuneliteColorPicker colorPicker = plugin.getColorPickerManager().create( SwingUtilities.windowForComponent(this), - marker.getMarker().getFill(), + fillColor.getAlpha() == 0 ? ColorUtil.colorWithAlpha(fillColor, DEFAULT_FILL_OPACITY) : fillColor, marker.getMarker().getName() + " Fill", false); colorPicker.setLocation(getLocationOnScreen()); diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/opacity_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/opacity_icon.png deleted file mode 100644 index 89be73b7693411852f1d1a85354f63eac7be73a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|mI14-?iy0WWg+Z8+Vb&Z8px|at z7sn8diF40waYi03m-jVk?`Idrc7@tr>{@EIy39wrJzQ&XX~YNOLdo*_BGe~Oe!%kue6b_o>x(J zX2Kl>%f!=pH9}krTta`|AKCaIrg2I4=Zv#IR@;eJEmAxFAg>+hd Date: Sat, 19 Feb 2022 19:02:10 -0500 Subject: [PATCH 15/29] screen markers: make ScreenMarkerRenderable implement RenderableEntity This component is never added to the overlay componenet renderer so implementing LayoutableRenderableEntity was just unnecessary --- .../ScreenMarkerMouseListener.java | 2 +- .../screenmarkers/ScreenMarkerOverlay.java | 2 +- .../screenmarkers/ScreenMarkerRenderable.java | 33 +++++-------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerMouseListener.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerMouseListener.java index ace5980b42..cc98350ba0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerMouseListener.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerMouseListener.java @@ -29,7 +29,7 @@ import java.awt.event.MouseEvent; import javax.swing.SwingUtilities; import net.runelite.client.input.MouseAdapter; -public class ScreenMarkerMouseListener extends MouseAdapter +class ScreenMarkerMouseListener extends MouseAdapter { private final ScreenMarkerPlugin plugin; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java index 7741eaeffd..7a82e9997b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java @@ -78,7 +78,7 @@ public class ScreenMarkerOverlay extends Overlay screenMarkerRenderable.setColor(marker.getColor()); screenMarkerRenderable.setFill(marker.getFill()); screenMarkerRenderable.setStroke(new BasicStroke(marker.getBorderThickness())); - screenMarkerRenderable.setPreferredSize(preferredSize); + screenMarkerRenderable.setSize(preferredSize); return screenMarkerRenderable.render(graphics); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java index 95b2da1207..e374b323cc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java @@ -27,44 +27,28 @@ package net.runelite.client.plugins.screenmarkers; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; -import java.awt.Point; -import java.awt.Rectangle; import java.awt.Stroke; import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; -import net.runelite.client.ui.overlay.components.LayoutableRenderableEntity; +import net.runelite.client.ui.overlay.RenderableEntity; -public class ScreenMarkerRenderable implements LayoutableRenderableEntity +@Getter(AccessLevel.PACKAGE) +@Setter(AccessLevel.PACKAGE) +class ScreenMarkerRenderable implements RenderableEntity { - @Getter(AccessLevel.PACKAGE) - @Setter - private Point preferredLocation; - @Getter(AccessLevel.PACKAGE) - @Setter - private Dimension preferredSize; - @Getter(AccessLevel.PACKAGE) - @Setter(AccessLevel.PACKAGE) + private Dimension size; private int borderThickness; - @Getter(AccessLevel.PACKAGE) - @Setter(AccessLevel.PACKAGE) private Color color; - @Getter(AccessLevel.PACKAGE) - @Setter(AccessLevel.PACKAGE) private Color fill; - @Getter(AccessLevel.PACKAGE) - @Setter(AccessLevel.PACKAGE) private Stroke stroke; - @Getter - private final Rectangle bounds = new Rectangle(); - @Override public Dimension render(Graphics2D graphics) { int thickness = borderThickness; - int width = preferredSize.width; - int height = preferredSize.height; + int width = size.width; + int height = size.height; //draw the fill graphics.setColor(fill); @@ -76,7 +60,6 @@ public class ScreenMarkerRenderable implements LayoutableRenderableEntity graphics.setColor(color); graphics.setStroke(stroke); graphics.drawRect(offset, offset, width - thickness, height - thickness); - bounds.setSize(preferredSize); - return preferredSize; + return size; } } From 109ad81473be78fba1a7ca1ab49dc140f194413f Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 19 Feb 2022 19:13:10 -0500 Subject: [PATCH 16/29] screen markers: add marker labels This adds a toggle to display the marker name as a label above the marker Co-authored-by: Skretzo <53493631+Skretzo@users.noreply.github.com> --- .../plugins/screenmarkers/ScreenMarker.java | 1 + .../screenmarkers/ScreenMarkerOverlay.java | 1 + .../screenmarkers/ScreenMarkerPlugin.java | 3 +- .../screenmarkers/ScreenMarkerRenderable.java | 7 +++ .../screenmarkers/ui/ScreenMarkerPanel.java | 54 +++++++++++++++++- .../plugins/screenmarkers/label_icon.png | Bin 0 -> 243 bytes 6 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/label_icon.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarker.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarker.java index aa164d780c..81d10bc65d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarker.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarker.java @@ -41,4 +41,5 @@ public class ScreenMarker private Color color; private Color fill; private boolean visible; + private boolean labelled; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java index 7a82e9997b..c991f58f2e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerOverlay.java @@ -79,6 +79,7 @@ public class ScreenMarkerOverlay extends Overlay screenMarkerRenderable.setFill(marker.getFill()); screenMarkerRenderable.setStroke(new BasicStroke(marker.getBorderThickness())); screenMarkerRenderable.setSize(preferredSize); + screenMarkerRenderable.setLabel(marker.isLabelled() ? marker.getName() : ""); return screenMarkerRenderable.render(graphics); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerPlugin.java index 5ec747e3f5..ddee2f7e2c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerPlugin.java @@ -203,7 +203,8 @@ public class ScreenMarkerPlugin extends Plugin pluginPanel.getSelectedBorderThickness(), pluginPanel.getSelectedColor(), pluginPanel.getSelectedFillColor(), - true + true, + false ); // Set overlay creator bounds to current position and default size diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java index e374b323cc..3bddaeb8a7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ScreenMarkerRenderable.java @@ -42,6 +42,7 @@ class ScreenMarkerRenderable implements RenderableEntity private Color color; private Color fill; private Stroke stroke; + private String label; @Override public Dimension render(Graphics2D graphics) @@ -60,6 +61,12 @@ class ScreenMarkerRenderable implements RenderableEntity graphics.setColor(color); graphics.setStroke(stroke); graphics.drawRect(offset, offset, width - thickness, height - thickness); + + if (!label.isEmpty()) + { + graphics.drawString(label, 0, 0); + } + return size; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java index 06e1b5d3d8..65fd3f260d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenmarkers/ui/ScreenMarkerPanel.java @@ -74,6 +74,11 @@ class ScreenMarkerPanel extends JPanel private static final ImageIcon NO_FILL_COLOR_ICON; private static final ImageIcon NO_FILL_COLOR_HOVER_ICON; + private static final ImageIcon LABEL_ICON; + private static final ImageIcon LABEL_HOVER_ICON; + private static final ImageIcon NO_LABEL_ICON; + private static final ImageIcon NO_LABEL_HOVER_ICON; + private static final ImageIcon VISIBLE_ICON; private static final ImageIcon VISIBLE_HOVER_ICON; private static final ImageIcon INVISIBLE_ICON; @@ -87,6 +92,7 @@ class ScreenMarkerPanel extends JPanel private final JLabel borderColorIndicator = new JLabel(); private final JLabel fillColorIndicator = new JLabel(); + private final JLabel labelIndicator = new JLabel(); private final JLabel visibilityLabel = new JLabel(); private final JLabel deleteLabel = new JLabel(); @@ -99,6 +105,7 @@ class ScreenMarkerPanel extends JPanel private final JSpinner thicknessSpinner = new JSpinner(spinnerModel); private boolean visible; + private boolean showLabel; static { @@ -118,6 +125,14 @@ class ScreenMarkerPanel extends JPanel NO_FILL_COLOR_ICON = new ImageIcon(fillImgHover); NO_FILL_COLOR_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(fillImgHover, -100)); + final BufferedImage labelImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "label_icon.png"); + final BufferedImage labelImgHover = ImageUtil.luminanceOffset(labelImg, -150); + LABEL_ICON = new ImageIcon(labelImg); + LABEL_HOVER_ICON = new ImageIcon(labelImgHover); + + NO_LABEL_ICON = new ImageIcon(labelImgHover); + NO_LABEL_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(labelImgHover, -100)); + final BufferedImage visibleImg = ImageUtil.loadImageResource(ScreenMarkerPlugin.class, "visible_icon.png"); VISIBLE_ICON = new ImageIcon(visibleImg); VISIBLE_HOVER_ICON = new ImageIcon(ImageUtil.alphaOffset(visibleImg, -100)); @@ -136,6 +151,7 @@ class ScreenMarkerPanel extends JPanel this.plugin = plugin; this.marker = marker; this.visible = marker.getMarker().isVisible(); + this.showLabel = marker.getMarker().isLabelled(); setLayout(new BorderLayout()); setBackground(ColorScheme.DARKER_GRAY_COLOR); @@ -320,8 +336,30 @@ class ScreenMarkerPanel extends JPanel thicknessSpinner.addChangeListener(ce -> updateThickness(true)); thicknessSpinner.setToolTipText("Border thickness"); + labelIndicator.addMouseListener(new MouseAdapter() + { + @Override + public void mousePressed(MouseEvent mouseEvent) + { + toggleLabelling(!showLabel); + } + + @Override + public void mouseEntered(MouseEvent mouseEvent) + { + labelIndicator.setIcon(showLabel ? LABEL_HOVER_ICON : NO_LABEL_HOVER_ICON); + } + + @Override + public void mouseExited(MouseEvent mouseEvent) + { + labelIndicator.setIcon(showLabel ? LABEL_ICON : NO_LABEL_ICON); + } + }); + leftActions.add(borderColorIndicator); leftActions.add(fillColorIndicator); + leftActions.add(labelIndicator); leftActions.add(thicknessSpinner); JPanel rightActions = new JPanel(new FlowLayout(FlowLayout.RIGHT, 8, 0)); @@ -391,7 +429,7 @@ class ScreenMarkerPanel extends JPanel updateFill(); updateBorder(); updateBorder(); - + updateLabelling(); } private void preview(boolean on) @@ -412,6 +450,14 @@ class ScreenMarkerPanel extends JPanel updateVisibility(); } + private void toggleLabelling(boolean on) + { + showLabel = on; + marker.getMarker().setLabelled(showLabel); + plugin.updateConfig(); + updateLabelling(); + } + private void save() { marker.getMarker().setName(nameInput.getText()); @@ -460,6 +506,12 @@ class ScreenMarkerPanel extends JPanel visibilityLabel.setToolTipText(visible ? "Hide screen marker" : "Show screen marker"); } + private void updateLabelling() + { + labelIndicator.setIcon(showLabel ? LABEL_ICON : NO_LABEL_ICON); + labelIndicator.setToolTipText(showLabel ? "Hide label" : "Show label"); + } + private void updateFill() { final boolean isFullyTransparent = marker.getMarker().getFill().getAlpha() == 0; diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/label_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/screenmarkers/label_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..51fa789575592d672eb1675338d89eb22ef6cdce GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G`DAk4@xYmNj^u*1{EF~q|E?WBvm4GKIi-QGK!qC2B4nfyYd zZ3H?L1%w{A>u2^kRXa57<2H`wRKM7DEo#f;##MsJH(CYv{PJnIsJQWW=WNkkj?CRh zWO|eyO_mM47-P=hpUtP~8_+)^{ix}wTUS=>3F6+UF7 Date: Sun, 20 Feb 2022 17:00:04 +0100 Subject: [PATCH 17/29] injector: Silence the interface injector --- .../src/main/java/net/runelite/rs/api/RSOAuthApi.java | 4 ++++ .../src/main/java/net/runelite/rs/api/RSOAuthTokens.java | 3 --- .../main/java/net/runelite/rs/api/RSOtlTokenRequester.java | 4 ++++ .../src/main/java/net/runelite/rs/api/RSOtlTokenResponse.java | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSOAuthApi.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSOAuthTokens.java create mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenRequester.java create mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenResponse.java diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthApi.java b/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthApi.java new file mode 100644 index 0000000000..f578dc33b3 --- /dev/null +++ b/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthApi.java @@ -0,0 +1,4 @@ +package net.runelite.rs.api; + +public interface RSOAuthApi +{} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthTokens.java b/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthTokens.java deleted file mode 100644 index 6bb3b4aec9..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSOAuthTokens.java +++ /dev/null @@ -1,3 +0,0 @@ -package net.runelite.rs.api; - -public interface RSOAuthTokens {} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenRequester.java b/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenRequester.java new file mode 100644 index 0000000000..edc7b9ca9c --- /dev/null +++ b/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenRequester.java @@ -0,0 +1,4 @@ +package net.runelite.rs.api; + +public interface RSOtlTokenRequester +{} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenResponse.java b/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenResponse.java new file mode 100644 index 0000000000..aee3c963ff --- /dev/null +++ b/runescape-api/src/main/java/net/runelite/rs/api/RSOtlTokenResponse.java @@ -0,0 +1,4 @@ +package net.runelite.rs.api; + +public interface RSOtlTokenResponse +{} From 59feb7e438a589c0115c9b8b015bd4672ae71f1a Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Sun, 20 Feb 2022 17:00:40 +0100 Subject: [PATCH 18/29] project: Bump OpenOSRS version --- buildSrc/src/main/kotlin/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index f31d2de847..ce9ef9e57c 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -27,7 +27,7 @@ object ProjectVersions { const val launcherVersion = "2.2.0" const val rlVersion = "1.8.11" - const val openosrsVersion = "4.20.1" + const val openosrsVersion = "4.20.2" const val rsversion = 203 const val cacheversion = 165 From f96f80f2da6c70ce6a18ac5ca81d62e27dd0179a Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Feb 2022 21:21:48 -0500 Subject: [PATCH 19/29] jshell: fix run/clear tooltips --- .../src/main/java/net/runelite/jshell/ShellPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-jshell/src/main/java/net/runelite/jshell/ShellPanel.java b/runelite-jshell/src/main/java/net/runelite/jshell/ShellPanel.java index 8a5c07c1d1..6ed985b372 100644 --- a/runelite-jshell/src/main/java/net/runelite/jshell/ShellPanel.java +++ b/runelite-jshell/src/main/java/net/runelite/jshell/ShellPanel.java @@ -117,7 +117,7 @@ public abstract class ShellPanel extends JPanel topPanel.add(run); JButton clear = new JButton("🗑"); - run.setToolTipText("Clear console"); + clear.setToolTipText("Clear console"); clear.addActionListener(ev -> console.setText("")); topPanel.add(clear); From 816bb9e412baac5a6b7f411790b6e434d86736b3 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 22 Feb 2022 12:34:21 -0500 Subject: [PATCH 20/29] client: update archive-patcher to 1.2 --- runelite-client/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 2847fd6f70..a8c0353dd6 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -118,9 +118,9 @@ 1.4 - net.runelite - archive-patcher - 1.0 + net.runelite.archive-patcher + archive-patcher-applier + 1.2 net.java.dev.jna From 44c8c3e1e4d52d31270063bbf835160de7d130a6 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 22 Feb 2022 09:42:25 -0700 Subject: [PATCH 21/29] Update Item IDs to 2022-2-23 --- .../main/java/net/runelite/api/ItemID.java | 32 +++++++++++++++++++ .../java/net/runelite/api/NullItemID.java | 28 ++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/ItemID.java b/runelite-api/src/main/java/net/runelite/api/ItemID.java index 87a8035fc7..ff78a30dc2 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -12370,5 +12370,37 @@ public final class ItemID public static final int STRONGBONES_BONE = 26593; public static final int GRUBFOOT = 26594; public static final int ZANIK_26595 = 26595; + public static final int NOTES_26596 = 26596; + public static final int DESERT_BAIT = 26598; + public static final int TINY_FISH = 26600; + public static final int OSMANS_REPORT = 26602; + public static final int TREASURE_CLUE_ONE = 26605; + public static final int TREASURE_CLUE_TWO = 26607; + public static final int TREASURE_CLUE_THREE = 26609; + public static final int ZEKES_CHALLENGE_SCROLL = 26611; + public static final int CAPT_ARNAVS_CHEST = 26613; + public static final int BUCKET_COOKOUT = 26615; + public static final int BUCKET_OF_WATER_COOKOUT = 26617; + public static final int POT_COOKOUT = 26619; + public static final int POT_OF_FLOUR_COOKOUT = 26621; + public static final int TOMATO_COOKOUT = 26623; + public static final int CHEESE_COOKOUT = 26625; + public static final int BANANA_COOKOUT = 26627; + public static final int PIZZA_BASE_COOKOUT = 26629; + public static final int INCOMPLETE_PIZZA_COOKOUT = 26631; + public static final int UNCOOKED_PIZZA_COOKOUT = 26633; + public static final int PLAIN_PIZZA_COOKOUT = 26635; + public static final int BURNT_PIZZA_COOKOUT = 26637; + public static final int BREAD_DOUGH_COOKOUT = 26639; + public static final int BREAD_COOKOUT = 26641; + public static final int BURNT_BREAD_COOKOUT = 26643; + public static final int BANANA_PIZZA_COOKOUT = 26645; + public static final int BURNT_BANANA_PIZZA_COOKOUT = 26647; + public static final int SKIS = 26649; + public static final int LOOT_KEY = 26651; + public static final int LOOT_KEY_26652 = 26652; + public static final int LOOT_KEY_26653 = 26653; + public static final int LOOT_KEY_26654 = 26654; + public static final int LOOT_KEY_26655 = 26655; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullItemID.java b/runelite-api/src/main/java/net/runelite/api/NullItemID.java index 472a12a29b..4679c49e16 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -14015,5 +14015,33 @@ public final class NullItemID public static final int NULL_26584 = 26584; public static final int NULL_26586 = 26586; public static final int NULL_26588 = 26588; + public static final int NULL_26597 = 26597; + public static final int NULL_26599 = 26599; + public static final int NULL_26601 = 26601; + public static final int NULL_26603 = 26603; + public static final int NULL_26604 = 26604; + public static final int NULL_26606 = 26606; + public static final int NULL_26608 = 26608; + public static final int NULL_26610 = 26610; + public static final int NULL_26612 = 26612; + public static final int NULL_26614 = 26614; + public static final int NULL_26616 = 26616; + public static final int NULL_26618 = 26618; + public static final int NULL_26620 = 26620; + public static final int NULL_26622 = 26622; + public static final int NULL_26624 = 26624; + public static final int NULL_26626 = 26626; + public static final int NULL_26628 = 26628; + public static final int NULL_26630 = 26630; + public static final int NULL_26632 = 26632; + public static final int NULL_26634 = 26634; + public static final int NULL_26636 = 26636; + public static final int NULL_26638 = 26638; + public static final int NULL_26640 = 26640; + public static final int NULL_26642 = 26642; + public static final int NULL_26644 = 26644; + public static final int NULL_26646 = 26646; + public static final int NULL_26648 = 26648; + public static final int NULL_26650 = 26650; /* This file is automatically generated. Do not edit. */ } From f99232fc4f31972e2d5b67c09b4051a637986a37 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 22 Feb 2022 09:42:25 -0700 Subject: [PATCH 22/29] Update Item variations to 2022-2-23 --- .../src/main/resources/item_variations.json | 66 +++++++++++++++++-- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json index 20478a5d05..4d99b9390d 100644 --- a/runelite-client/src/main/resources/item_variations.json +++ b/runelite-client/src/main/resources/item_variations.json @@ -261,7 +261,8 @@ 21056, 21057, 21058, - 26276 + 26276, + 26596 ], "glarials urn": [ 296, @@ -2454,16 +2455,23 @@ "bucket": [ 1925, 8986, - 9660 + 9660, + 26615 ], "bucket of water": [ 1929, 6712, - 9659 + 9659, + 26617 + ], + "pot": [ + 1931, + 26619 ], "pot of flour": [ 1933, - 2516 + 2516, + 26621 ], "swamp paste": [ 1941, @@ -2490,6 +2498,10 @@ 11029, 11030 ], + "banana": [ + 1963, + 26627 + ], "cabbage": [ 1965, 1967, @@ -2508,6 +2520,14 @@ 1980, 7728 ], + "tomato": [ + 1982, + 26623 + ], + "cheese": [ + 1985, + 26625 + ], "jug of bad wine": [ 1991, 1992 @@ -2686,9 +2706,22 @@ 2281, 9533 ], + "pizza base": [ + 2283, + 26629 + ], + "incomplete pizza": [ + 2285, + 26631 + ], + "uncooked pizza": [ + 2287, + 26633 + ], "plain pizza": [ 2289, - 2291 + 2291, + 26635 ], "meat pizza": [ 2293, @@ -2702,6 +2735,22 @@ 2301, 2303 ], + "burnt pizza": [ + 2305, + 26637 + ], + "bread dough": [ + 2307, + 26639 + ], + "bread": [ + 2309, + 26641 + ], + "burnt bread": [ + 2311, + 26643 + ], "redberry pie": [ 2325, 2333 @@ -10341,5 +10390,12 @@ 26583, 26585, 26587 + ], + "loot key": [ + 26651, + 26652, + 26653, + 26654, + 26655 ] } \ No newline at end of file From 5f752957e44d10145c1d5ab3c09b591b007db18a Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 22 Feb 2022 09:42:25 -0700 Subject: [PATCH 23/29] Update Object IDs to 2022-2-23 --- .../java/net/runelite/api/NullObjectID.java | 1 + .../main/java/net/runelite/api/ObjectID.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java index 8f6c9c556b..dcb5736025 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -21428,5 +21428,6 @@ public final class NullObjectID public static final int NULL_43465 = 43465; public static final int NULL_43466 = 43466; public static final int NULL_43467 = 43467; + public static final int NULL_43486 = 43486; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/ObjectID.java b/runelite-api/src/main/java/net/runelite/api/ObjectID.java index 257d06bdf3..872014c641 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -22025,5 +22025,23 @@ public final class ObjectID public static final int LARGE_DOOR_43459 = 43459; public static final int LARGE_DOOR_43460 = 43460; public static final int CAVE_ENTRANCE_43462 = 43462; + public static final int BANNER_43468 = 43468; + public static final int BANNER_43469 = 43469; + public static final int BANNER_43470 = 43470; + public static final int BANNER_43471 = 43471; + public static final int PARTY_BALLOONS = 43472; + public static final int PARTY_BALLOONS_43473 = 43473; + public static final int PARTY_BALLOONS_43474 = 43474; + public static final int PARTY_BALLOONS_43475 = 43475; + public static final int PARTY_BALLOONS_43476 = 43476; + public static final int SINK_43477 = 43477; + public static final int BARREL_OF_FLOUR_43478 = 43478; + public static final int CLAY_OVEN_43479 = 43479; + public static final int COOKING_SHELF_UTENSILS = 43480; + public static final int JUDGES_TABLE = 43481; + public static final int TABLE_43482 = 43482; + public static final int CUPBOARD_43483 = 43483; + public static final int LOOT_CHEST = 43484; + public static final int LOOT_CHEST_43485 = 43485; /* This file is automatically generated. Do not edit. */ } From dcf1c579c0502443b0f7409d8a5f858b538651ea Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 22 Feb 2022 09:42:25 -0700 Subject: [PATCH 24/29] Update NPC IDs to 2022-2-23 --- .../src/main/java/net/runelite/api/NpcID.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/NpcID.java b/runelite-api/src/main/java/net/runelite/api/NpcID.java index 87ab0865c5..043207441e 100644 --- a/runelite-api/src/main/java/net/runelite/api/NpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java @@ -8747,8 +8747,8 @@ public final class NpcID public static final int ZAMORAKIAN_ACOLYTE = 10379; public static final int ZAMORAKIAN_ACOLYTE_10380 = 10380; public static final int ZAMORAKIAN_ACOLYTE_10381 = 10381; - public static final int REFUGEE = 10382; - public static final int REFUGEE_10383 = 10383; + public static final int SKULLY = 10382; + public static final int REFUGEE = 10383; public static final int REFUGEE_10384 = 10384; public static final int REFUGEE_10385 = 10385; public static final int PHABELLE_BILE = 10386; @@ -9620,5 +9620,15 @@ public final class NpcID public static final int DIPFLIP = 11383; public static final int OLDAK_11384 = 11384; public static final int OLDAK_11385 = 11385; + public static final int LARRY_LEPRECHAUN = 11399; + public static final int FISHING_SPOT_11400 = 11400; + public static final int BIG_DAVE_11401 = 11401; + public static final int CAPT_ARNAV_11402 = 11402; + public static final int MY_ARM_11403 = 11403; + public static final int COOK_11404 = 11404; + public static final int WISE_OLD_MAN_11405 = 11405; + public static final int HANS_11406 = 11406; + public static final int HASSAN_11407 = 11407; + public static final int LEPRECHAUN = 11408; /* This file is automatically generated. Do not edit. */ } From 37229a5fa43b50d1e98c651a4c19907574f8b6bf Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 22 Feb 2022 09:42:25 -0700 Subject: [PATCH 25/29] Update Scripts to 2022-2-23 --- .../src/main/scripts/CommandScript.hash | 2 +- .../src/main/scripts/CommandScript.rs2asm | 181 ++++++++++-------- 2 files changed, 101 insertions(+), 82 deletions(-) diff --git a/runelite-client/src/main/scripts/CommandScript.hash b/runelite-client/src/main/scripts/CommandScript.hash index 837a1a06f9..b6795bca51 100644 --- a/runelite-client/src/main/scripts/CommandScript.hash +++ b/runelite-client/src/main/scripts/CommandScript.hash @@ -1 +1 @@ -BC3DDC3675375E1FD9AD64DEBF4FDA5B4102FE542088C310881120DC47270566 \ No newline at end of file +7A4628DC7933B4340CEC5F1B3C75ED1857FEDB5E683829499A07E5C364F633FA \ No newline at end of file diff --git a/runelite-client/src/main/scripts/CommandScript.rs2asm b/runelite-client/src/main/scripts/CommandScript.rs2asm index 8f7fb0cece..1e345c3c41 100644 --- a/runelite-client/src/main/scripts/CommandScript.rs2asm +++ b/runelite-client/src/main/scripts/CommandScript.rs2asm @@ -90,13 +90,13 @@ LABEL60: iload 0 iconst 84 if_icmpeq LABEL76 - jump LABEL815 + jump LABEL829 LABEL76: invoke 1984 iload 2 iconst 0 if_icmpgt LABEL81 - jump LABEL814 + jump LABEL828 LABEL81: iload 3 iconst 1 @@ -699,7 +699,7 @@ LABEL587: sconst "You are not chatting as a guest in a clan channel at the moment." mes LABEL589: - jump LABEL810 + jump LABEL824 LABEL590: iload 5 iconst 41 @@ -792,7 +792,7 @@ LABEL662: sconst "You are not chatting in the channel of your own Iron Group at the moment." mes LABEL664: - jump LABEL810 + jump LABEL824 LABEL665: iload 5 iconst 9 @@ -852,7 +852,7 @@ LABEL706: iconst -1 invoke 5517 LABEL712: - jump LABEL810 + jump LABEL824 LABEL713: iload 5 iconst 2 @@ -868,17 +868,17 @@ LABEL717: iconst 0 iload 9 invoke 5517 - jump LABEL810 + jump LABEL824 LABEL727: iload 4 iconst 1 if_icmpeq LABEL731 - jump LABEL804 + jump LABEL818 LABEL731: iload 2 iconst 2 if_icmpgt LABEL735 - jump LABEL797 + jump LABEL811 LABEL735: get_varc_string 335 sconst "::toggleroof" @@ -886,61 +886,80 @@ LABEL735: string_indexof_string iconst 0 if_icmpeq LABEL742 - jump LABEL756 + jump LABEL770 LABEL742: getremoveroofs iconst 1 if_icmpeq LABEL746 - jump LABEL751 + jump LABEL758 LABEL746: iconst 0 setremoveroofs + get_varbit 12378 + iconst 0 + if_icmpeq LABEL752 + jump LABEL755 +LABEL752: sconst "Roofs will only be removed selectively." mes - jump LABEL755 -LABEL751: + jump LABEL757 +LABEL755: + sconst "Roofs will only be removed selectively. This setting will not be saved." + mes +LABEL757: + jump LABEL769 +LABEL758: iconst 1 setremoveroofs + get_varbit 12378 + iconst 1 + if_icmpeq LABEL764 + jump LABEL767 +LABEL764: sconst "Roofs are now all hidden." mes -LABEL755: - jump LABEL796 -LABEL756: + jump LABEL769 +LABEL767: + sconst "Roofs are now all hidden. This setting will not be saved." + mes +LABEL769: + jump LABEL810 +LABEL770: get_varc_string 335 sconst "::wiki " iconst 0 string_indexof_string iconst 0 - if_icmpeq LABEL768 + if_icmpeq LABEL782 get_varc_string 335 sconst "::wiki" compare iconst 0 - if_icmpeq LABEL768 + if_icmpeq LABEL782 sconst "runeliteCommand" ; load callback name runelite_callback ; invoke callback - jump LABEL771 -LABEL768: + jump LABEL785 +LABEL782: get_varc_string 335 invoke 3299 - jump LABEL796 -LABEL771: + jump LABEL810 +LABEL785: get_varc_string 335 sconst "::bank" iconst 0 string_indexof_string iconst 0 - if_icmpeq LABEL778 - jump LABEL785 -LABEL778: + if_icmpeq LABEL792 + jump LABEL799 +LABEL792: sconst "Hey, everyone, I just tried to do something very silly!" iconst 0 iconst -1 iconst 0 iconst -1 invoke 5517 - jump LABEL796 -LABEL785: + jump LABEL810 +LABEL799: get_varc_string 335 invoke 224 set_varc_string 335 @@ -952,97 +971,97 @@ LABEL785: iload 2 substring docheat -LABEL796: - jump LABEL803 -LABEL797: +LABEL810: + jump LABEL817 +LABEL811: get_varc_string 335 iconst 0 iconst -1 iconst 0 iconst -1 invoke 5517 -LABEL803: - jump LABEL810 -LABEL804: +LABEL817: + jump LABEL824 +LABEL818: get_varc_string 335 iconst 0 iconst -1 iconst 1 iload 9 invoke 5517 -LABEL810: +LABEL824: get_varc_string 335 invoke 77 sconst "" set_varc_string 335 -LABEL814: - jump LABEL890 -LABEL815: +LABEL828: + jump LABEL904 +LABEL829: iload 0 iconst 104 - if_icmpeq LABEL819 - jump LABEL825 -LABEL819: + if_icmpeq LABEL833 + jump LABEL839 +LABEL833: iload 3 iconst 1 - if_icmpeq LABEL823 - jump LABEL824 -LABEL823: + if_icmpeq LABEL837 + jump LABEL838 +LABEL837: invoke 75 -LABEL824: - jump LABEL890 -LABEL825: +LABEL838: + jump LABEL904 +LABEL839: iload 0 iconst 105 - if_icmpeq LABEL829 - jump LABEL835 -LABEL829: + if_icmpeq LABEL843 + jump LABEL849 +LABEL843: iload 3 iconst 1 - if_icmpeq LABEL833 - jump LABEL834 -LABEL833: + if_icmpeq LABEL847 + jump LABEL848 +LABEL847: invoke 76 -LABEL834: - jump LABEL890 -LABEL835: +LABEL848: + jump LABEL904 +LABEL849: iload 0 iconst 80 - if_icmpeq LABEL839 - jump LABEL884 -LABEL839: + if_icmpeq LABEL853 + jump LABEL898 +LABEL853: iconst 40697936 iconst 1 cc_find iconst 1 - if_icmpeq LABEL845 - jump LABEL846 -LABEL845: + if_icmpeq LABEL859 + jump LABEL860 +LABEL859: return -LABEL846: +LABEL860: get_varc_string 356 string_length iconst 0 - if_icmpgt LABEL851 - jump LABEL871 -LABEL851: + if_icmpgt LABEL865 + jump LABEL885 +LABEL865: get_varc_string 356 friend_test iconst 1 - if_icmpeq LABEL856 - jump LABEL859 -LABEL856: + if_icmpeq LABEL870 + jump LABEL873 +LABEL870: get_varc_string 356 invoke 107 return -LABEL859: +LABEL873: get_varc_int 60 clientclock - if_icmpgt LABEL863 - jump LABEL864 -LABEL863: + if_icmpgt LABEL877 + jump LABEL878 +LABEL877: return -LABEL864: +LABEL878: clientclock iconst 50 add @@ -1050,14 +1069,14 @@ LABEL864: sconst "That player was not found on your Friends list." mes return -LABEL871: +LABEL885: get_varc_int 60 clientclock - if_icmpgt LABEL875 - jump LABEL876 -LABEL875: + if_icmpgt LABEL889 + jump LABEL890 +LABEL889: return -LABEL876: +LABEL890: clientclock iconst 50 add @@ -1065,8 +1084,8 @@ LABEL876: sconst "You haven't received any messages to which you can reply." mes return - jump LABEL890 -LABEL884: + jump LABEL904 +LABEL898: get_varc_string 335 iconst 0 iload 0 @@ -1078,9 +1097,9 @@ LABEL884: runelite_callback ; if_icmpeq SKIPSETVARC ; skip setting varc with input set_varc_string 335 - jump LABEL890 ; jump over SKIPSETVARC + jump LABEL904 ; jump over SKIPSETVARC SKIPSETVARC: pop_string ; pop message -LABEL890: +LABEL904: invoke 223 return From 36ddf04b5f43af4d0aced9dc85865fbf212b41ad Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 23 Feb 2022 11:55:18 +0000 Subject: [PATCH 26/29] Release 1.8.12 --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 34b7b38d62..47c2934c8a 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 4aa3eaf1be..2784cae6ca 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 70e4080d39..684047fb64 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 cache diff --git a/pom.xml b/pom.xml index 5e33dd9167..19558e81a9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 pom RuneLite @@ -63,7 +63,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.8.12 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 565e23d095..74e6eaef97 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index a8c0353dd6..129147785c 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 8ba2729be0..b97a78179e 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index c4a2aa59aa..00b42e38db 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12-SNAPSHOT + 1.8.12 script-assembler-plugin From edf647f1abd52f2211ba1803b770c3da2e7d470b Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 23 Feb 2022 11:55:21 +0000 Subject: [PATCH 27/29] Bump for 1.8.13-SNAPSHOT --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 47c2934c8a..7246369f27 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 2784cae6ca..57c3667f93 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 684047fb64..84a81a4512 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT cache diff --git a/pom.xml b/pom.xml index 19558e81a9..fa8dfc977d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT pom RuneLite @@ -63,7 +63,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.8.12 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 74e6eaef97..15c2888624 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 129147785c..b24ff0f30c 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index b97a78179e..78198cd8d5 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 00b42e38db..2c26602602 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.8.12 + 1.8.13-SNAPSHOT script-assembler-plugin From 35949bce22b5de0a8bebb4fbd89615a09b0983f7 Mon Sep 17 00:00:00 2001 From: Hooder Date: Wed, 23 Feb 2022 02:41:00 +0100 Subject: [PATCH 28/29] gpu: Fix loading gluegen natives on some Windows configurations This commit works around a bug with loading natives when the user's home folder contains special characters such as `&`, `^` or `!`. When Gluegen loads native libraries on Windows, it uses a temporary directory located in `%appdata%` under the user's home directory, and Gluegen checks whether files can be executed from this temporary directory. To perform this check, it writes an executable to the directory, executes it, and ensures that the return code is zero. The executable file it writes is by default a `.bat` file, but it can be told to write an `.exe` file instead by supplying this VM argument: `-Djogamp.gluegen.UseNativeExeFile=true`. The default behaviour of writing and executing a `.bat` file is broken when the path to the temp folder contains a special character, due to a convoluted trail of calls that leads to undefined behaviour: - Gluegen attempts to execute the `.bat` file by calling `Runtime.exec()`: `Runtime.exec(new String[] { "...absolute path...bat" }, null, null)` - OpenJDK 11.0.8 passes the command to `ProcessBuilder`, which calls `ProcessImpl.start(...)`, which creates a new `ProcessImpl` instance. - In the `ProcessImpl` constructor, there are two different character escape modes: - **Legacy mode**, which allows ambiguous commands. - **Non-legacy mode**, which does more rigorous escaping. - Legacy is the default mode as long as `System.getSecurityManager()` returns `null`, which is the case for RuneLite currently. This mode can be changed by supplying the following VM argument: `-Djdk.lang.Process.allowAmbiguousCommands=false`. - Incidentally this also fixes the issue of loading natives with special characters in the path, however it applies to *all* `Runtime.exec()` calls. - In legacy mode, the command is wrapped in quotes if it contains either a space or tab character. The command is then passed along to the native function `Java_java_lang_ProcessImpl_create`, which eventually passes it along untouched to Microsoft's `CreateProcessW` function as the `lpCommandLine` argument. - In the documentation for this function, it is mentioned that an interpreter (i.e. `cmd.exe`) is required in order to run a `.bat` file. It is not specified what will happen if you instead pass the path to a `.bat` file directly to the function, which is what Gluegen ends up doing. However, `CreateProcessW` *does* support supplying the path to an `.exe`, which Gluegen will do when `jogamp.gluegen.UseNativeExeFile` is set to `true`. It is unclear why supplying a `.bat` file normally works, yet breaks when special characters are in the path. It seems like it should not work in the first place. This might help with #6509 and #14180. Some other special characters, like Cyrillic letters, are more fundamentally broken in RuneLite. This patch only slightly helps with that. --- .../main/java/net/runelite/client/plugins/gpu/GpuPlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java index 232dd9d351..96c992f2da 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java @@ -353,6 +353,8 @@ public class GpuPlugin extends Plugin implements DrawCallbacks System.setProperty("jogl.debug", "true"); } + System.setProperty("jogamp.gluegen.UseNativeExeFile", "true"); + GLProfile.initSingleton(); invokeOnMainThread(() -> From aef2b59871c6fd98820a95b6b5cb04a3477c6a6b Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Wed, 23 Feb 2022 18:14:10 +0100 Subject: [PATCH 29/29] project: Bump RuneLite version --- buildSrc/src/main/kotlin/Dependencies.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index ce9ef9e57c..37eeb877dc 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -25,7 +25,7 @@ object ProjectVersions { const val launcherVersion = "2.2.0" - const val rlVersion = "1.8.11" + const val rlVersion = "1.8.12" const val openosrsVersion = "4.20.2"