diff --git a/runelite-api/src/main/java/net/runelite/api/hooks/DrawCallbacks.java b/runelite-api/src/main/java/net/runelite/api/hooks/DrawCallbacks.java index 6452500d48..ef5213b40b 100644 --- a/runelite-api/src/main/java/net/runelite/api/hooks/DrawCallbacks.java +++ b/runelite-api/src/main/java/net/runelite/api/hooks/DrawCallbacks.java @@ -43,11 +43,30 @@ public interface DrawCallbacks SceneTileModel model, int tileZ, int tileX, int tileY, int zoom, int centerX, int centerY); - void draw(); + /** + * Called when a frame should be drawn. + * + * @param overlayColor Color of full-viewport overlays, if any + */ + void draw(int overlayColor); boolean drawFace(Model model, int face); + /** + * Called before the scene is drawn + * @param cameraX + * @param cameraY + * @param cameraZ + * @param cameraPitch + * @param cameraYaw + * @param plane + */ void drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane); + /** + * Called after the scene has been drawn + */ + void postDrawScene(); + void animate(Texture texture, int diff); } \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index a6a02c17a7..a7fcb7f709 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -141,7 +141,7 @@ public class WidgetID public static final int LOOTING_BAG_GROUP_ID = 81; public static final int SKOTIZO_GROUP_ID = 308; public static final int ENTERING_HOUSE_GROUP_ID = 71; - public static final int FULLSCREEN_MAP_GROUP_ID = 165; + public static final int FULLSCREEN_CONTAINER_TLI = 165; public static final int QUESTLIST_GROUP_ID = 399; public static final int SKILLS_GROUP_ID = 320; public static final int DIALOG_SPRITE2_ID = 11; diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index ea614afd36..8f5161c777 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -827,7 +827,7 @@ public enum WidgetInfo MULTICOMBAT_FIXED(WidgetID.FIXED_VIEWPORT_GROUP_ID, WidgetID.FixedViewport.MULTICOMBAT_INDICATOR), MULTICOMBAT_RESIZEABLE(WidgetID.RESIZABLE_VIEWPORT_BOTTOM_LINE_GROUP_ID, WidgetID.ResizableViewport.MULTICOMBAT_INDICATOR), - FULLSCREEN_MAP_ROOT(WidgetID.FULLSCREEN_MAP_GROUP_ID, WidgetID.FullScreenMap.ROOT), + FULLSCREEN_MAP_ROOT(WidgetID.FULLSCREEN_CONTAINER_TLI, WidgetID.FullScreenMap.ROOT), QUESTLIST_BOX(WidgetID.QUESTLIST_GROUP_ID, WidgetID.QuestList.BOX), QUESTLIST_CONTAINER(WidgetID.QUESTLIST_GROUP_ID, WidgetID.QuestList.CONTAINER), diff --git a/runelite-client/src/main/java/com/openosrs/client/ui/components/InfoPanel.java b/runelite-client/src/main/java/com/openosrs/client/ui/components/InfoPanel.java index f966797a93..07efae32cb 100644 --- a/runelite-client/src/main/java/com/openosrs/client/ui/components/InfoPanel.java +++ b/runelite-client/src/main/java/com/openosrs/client/ui/components/InfoPanel.java @@ -46,7 +46,7 @@ import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.FontManager; import com.openosrs.client.ui.OpenOSRSSplashScreen; import net.runelite.client.util.ImageUtil; -import net.runelite.client.util.LinkBrowser; +import com.openosrs.client.util.LinkBrowser; @Slf4j public class InfoPanel extends JPanel diff --git a/runelite-client/src/main/java/com/openosrs/client/util/LinkBrowser.java b/runelite-client/src/main/java/com/openosrs/client/util/LinkBrowser.java new file mode 100644 index 0000000000..64df5e1127 --- /dev/null +++ b/runelite-client/src/main/java/com/openosrs/client/util/LinkBrowser.java @@ -0,0 +1,83 @@ +package com.openosrs.client.util; + +import java.awt.Desktop; +import java.awt.Toolkit; +import java.awt.datatransfer.StringSelection; +import java.io.File; +import java.io.IOException; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class LinkBrowser extends net.runelite.client.util.LinkBrowser +{ + /** + * Tries to open the specified {@code File} with the systems default text editor. If operation fails + * an error message is displayed with the option to copy the absolute file path to clipboard. + * + * @param file the File instance of the log file + * @return did the file open successfully? + */ + public static boolean openLocalFile(final File file) + { + if (file == null || !file.exists()) + { + return false; + } + + if (attemptOpenLocalFile(file)) + { + log.debug("Opened log file through Desktop#edit to {}", file); + return true; + } + + showMessageBox("Unable to open log file. Press 'OK' and the file path will be copied to your clipboard", file.getAbsolutePath()); + return false; + } + + private static boolean attemptOpenLocalFile(final File file) + { + if (!Desktop.isDesktopSupported()) + { + return false; + } + + final Desktop desktop = Desktop.getDesktop(); + + if (!desktop.isSupported(Desktop.Action.OPEN)) + { + return false; + } + + try + { + desktop.open(file); + return true; + } + catch (IOException ex) + { + log.warn("Failed to open Desktop#edit {}", file, ex); + return false; + } + } + + /** + * Open swing message box with specified message and copy data to clipboard + * @param message message to show + */ + private static void showMessageBox(final String message, final String data) + { + SwingUtilities.invokeLater(() -> + { + final int result = JOptionPane.showConfirmDialog(null, message, "Message", + JOptionPane.OK_CANCEL_OPTION); + + if (result == JOptionPane.OK_OPTION) + { + final StringSelection stringSelection = new StringSelection(data); + Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null); + } + }); + } +} 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 872866c415..8184cf9f98 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -45,6 +45,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import javax.inject.Named; import javax.inject.Singleton; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; @@ -101,8 +102,6 @@ public class Notifier private static final int MINIMUM_FLASH_DURATION_MILLIS = 2000; private static final int MINIMUM_FLASH_DURATION_TICKS = MINIMUM_FLASH_DURATION_MILLIS / Constants.CLIENT_TICK_LENGTH; - private static final String appName = RuneLiteProperties.getTitle(); - private static final File NOTIFICATION_FILE = new File(RuneLite.RUNELITE_DIR, "notification.wav"); private static final long CLIP_MTIME_UNLOADED = -2; private static final long CLIP_MTIME_BUILTIN = -1; @@ -113,6 +112,7 @@ public class Notifier private final ScheduledExecutorService executorService; private final ChatMessageManager chatMessageManager; private final EventBus eventBus; + private final String appName; private final Path notifyIconPath; private boolean terminalNotifierAvailable; private Instant flashStart; @@ -127,7 +127,9 @@ public class Notifier final RuneLiteConfig runeliteConfig, final ScheduledExecutorService executorService, final ChatMessageManager chatMessageManager, - final EventBus eventBus) + final EventBus eventBus, + @Named("runelite.title") final String appName + ) { this.client = client; this.clientUI = clientUI; @@ -135,6 +137,7 @@ public class Notifier this.executorService = executorService; this.chatMessageManager = chatMessageManager; this.eventBus = eventBus; + this.appName = appName; this.notifyIconPath = RuneLite.RUNELITE_DIR.toPath().resolve("icon.png"); // First check if we are running in launcher diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java index 381d945a34..c20df7d8e5 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java @@ -32,6 +32,7 @@ import com.openosrs.client.config.OpenOSRSConfig; import com.openosrs.client.util.NonScheduledExecutorServiceExceptionLogger; import java.applet.Applet; import java.io.File; +import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; @@ -75,6 +76,12 @@ public class RuneLiteModule extends AbstractModule @Override protected void configure() { + Properties properties = RuneLiteProperties.getProperties(); + for (String key : properties.stringPropertyNames()) + { + String value = properties.getProperty(key); + bindConstant().annotatedWith(Names.named(key)).to(value); + } bindConstant().annotatedWith(Names.named("developerMode")).to(developerMode); bindConstant().annotatedWith(Names.named("safeMode")).to(safeMode); bind(File.class).annotatedWith(Names.named("sessionfile")).toInstance(sessionfile); diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLiteProperties.java b/runelite-client/src/main/java/net/runelite/client/RuneLiteProperties.java index ab0911c1f4..2be480f85e 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLiteProperties.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLiteProperties.java @@ -28,18 +28,14 @@ import java.io.IOException; import java.io.InputStream; import java.util.Properties; import javax.annotation.Nullable; +import lombok.AccessLevel; +import lombok.Getter; import okhttp3.HttpUrl; public class RuneLiteProperties { - private static final String RUNELITE_TITLE = "runelite.title"; private static final String RUNELITE_VERSION = "runelite.version"; - private static final String RUNESCAPE_VERSION = "runescape.version"; - private static final String DISCORD_APP_ID = "runelite.discord.appid"; private static final String DISCORD_INVITE = "runelite.discord.invite"; - private static final String GITHUB_LINK = "runelite.github.link"; - private static final String WIKI_LINK = "runelite.wiki.link"; - private static final String PATREON_LINK = "runelite.patreon.link"; private static final String LAUNCHER_VERSION_PROPERTY = "runelite.launcher.version"; private static final String INSECURE_SKIP_TLS_VERIFICATION_PROPERTY = "runelite.insecure-skip-tls-verification"; private static final String TROUBLESHOOTING_LINK = "runelite.wiki.troubleshooting.link"; @@ -49,8 +45,8 @@ public class RuneLiteProperties private static final String JAV_CONFIG_BACKUP = "runelite.jav_config_backup"; private static final String PLUGINHUB_BASE = "runelite.pluginhub.url"; private static final String PLUGINHUB_VERSION = "runelite.pluginhub.version"; - private static final String IMGUR_CLIENT_ID = "runelite.imgur.client.id"; + @Getter(AccessLevel.PACKAGE) private static final Properties properties = new Properties(); static @@ -65,46 +61,16 @@ public class RuneLiteProperties } } - public static String getTitle() - { - return properties.getProperty(RUNELITE_TITLE); - } - public static String getVersion() { return properties.getProperty(RUNELITE_VERSION); } - public static String getRunescapeVersion() - { - return properties.getProperty(RUNESCAPE_VERSION); - } - - public static String getDiscordAppId() - { - return properties.getProperty(DISCORD_APP_ID); - } - public static String getDiscordInvite() { return properties.getProperty(DISCORD_INVITE); } - public static String getGithubLink() - { - return properties.getProperty(GITHUB_LINK); - } - - public static String getWikiLink() - { - return properties.getProperty(WIKI_LINK); - } - - public static String getPatreonLink() - { - return properties.getProperty(PATREON_LINK); - } - @Nullable public static String getLauncherVersion() { @@ -146,9 +112,4 @@ public class RuneLiteProperties String version = System.getProperty(PLUGINHUB_VERSION, properties.getProperty(PLUGINHUB_VERSION)); return HttpUrl.parse(properties.get(PLUGINHUB_BASE) + "/" + version); } - - public static String getImgurClientId() - { - return properties.getProperty(IMGUR_CLIENT_ID); - } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/discord/DiscordService.java b/runelite-client/src/main/java/net/runelite/client/discord/DiscordService.java index cf2a16fd37..cc6ebe3b10 100644 --- a/runelite-client/src/main/java/net/runelite/client/discord/DiscordService.java +++ b/runelite-client/src/main/java/net/runelite/client/discord/DiscordService.java @@ -28,10 +28,10 @@ import com.google.common.base.Strings; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import javax.inject.Inject; +import javax.inject.Named; import javax.inject.Singleton; import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import net.runelite.client.RuneLiteProperties; import net.runelite.client.discord.events.DiscordDisconnected; import net.runelite.client.discord.events.DiscordErrored; import net.runelite.client.discord.events.DiscordJoinGame; @@ -50,6 +50,7 @@ public class DiscordService implements AutoCloseable { private final EventBus eventBus; private final ScheduledExecutorService executorService; + private final String discordAppId; private final DiscordRPC discordRPC; // Hold a reference to the event handlers to prevent the garbage collector from deleting them @@ -61,11 +62,14 @@ public class DiscordService implements AutoCloseable @Inject private DiscordService( final EventBus eventBus, - final ScheduledExecutorService executorService) + final ScheduledExecutorService executorService, + @Named("runelite.discord.appid") final String discordAppId + ) { this.eventBus = eventBus; this.executorService = executorService; + this.discordAppId = discordAppId; DiscordRPC discordRPC = null; DiscordEventHandlers discordEventHandlers = null; @@ -103,7 +107,7 @@ public class DiscordService implements AutoCloseable discordEventHandlers.joinGame = this::joinGame; discordEventHandlers.spectateGame = this::spectateGame; discordEventHandlers.joinRequest = this::joinRequest; - discordRPC.Discord_Initialize(RuneLiteProperties.getDiscordAppId(), discordEventHandlers, true, null); + discordRPC.Discord_Initialize(discordAppId, discordEventHandlers, true, null); executorService.scheduleAtFixedRate(discordRPC::Discord_RunCallbacks, 0, 2, TimeUnit.SECONDS); } diff --git a/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java b/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java index 0df12bf1ed..984b5f367a 100644 --- a/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java +++ b/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java @@ -69,6 +69,7 @@ public class ExternalPluginClient .newBuilder() .addPathSegments("manifest.js") .build(); + System.out.println(manifest.uri()); try (Response res = okHttpClient.newCall(new Request.Builder().url(manifest).build()).execute()) { if (res.code() != 200) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java index 44069b177d..4ccfd1925e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsPlugin.java @@ -34,13 +34,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import javax.inject.Inject; +import javax.inject.Named; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.MessageNode; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameStateChanged; import net.runelite.client.Notifier; -import net.runelite.client.RuneLiteProperties; import net.runelite.client.chat.ChatColorType; import net.runelite.client.chat.ChatMessageManager; import net.runelite.client.config.ConfigManager; @@ -70,6 +70,10 @@ public class ChatNotificationsPlugin extends Plugin @Inject private Notifier notifier; + @Inject + @Named("runelite.title") + private String runeliteTitle; + //Custom Highlights private Pattern usernameMatcher = null; private String usernameReplacer = ""; @@ -163,7 +167,7 @@ public class ChatNotificationsPlugin extends Plugin break; case CONSOLE: // Don't notify for notification messages - if (chatMessage.getName().equals(RuneLiteProperties.getTitle())) + if (chatMessage.getName().equals(runeliteTitle)) { return; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspectorOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspectorOverlay.java index 27b83f0f2a..bd89bd90c5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspectorOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/WidgetInspectorOverlay.java @@ -62,7 +62,7 @@ public class WidgetInspectorOverlay extends Overlay setPosition(OverlayPosition.DYNAMIC); setLayer(OverlayLayer.ABOVE_WIDGETS); setPriority(OverlayPriority.HIGHEST); - drawAfterInterface(WidgetID.FULLSCREEN_MAP_GROUP_ID); + drawAfterInterface(WidgetID.FULLSCREEN_CONTAINER_TLI); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java index d5a728a368..f14b259277 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java @@ -121,7 +121,7 @@ enum DiscordGameEventType CITY_JATIZSO("Jatizso" , DiscordAreaType.CITIES, 9531), CITY_KELDAGRIM("Keldagrim" , DiscordAreaType.CITIES, 11423, 11422, 11679, 11678), CITY_LANDS_END("Land's End", DiscordAreaType.CITIES, 5941), - CITY_LLETYA("Lletya" , DiscordAreaType.CITIES, 9265), + CITY_LLETYA("Lletya" , DiscordAreaType.CITIES, 9265, 11103), CITY_LOVAKENGJ_HOUSE("Lovakengj" , DiscordAreaType.CITIES, 5692, 5691, 5947, 6203, 6202, 5690, 5946), CITY_LUMBRIDGE("Lumbridge" , DiscordAreaType.CITIES, 12850), CITY_LUNAR_ISLE("Lunar Isle" , DiscordAreaType.CITIES, 8253, 8252, 8509, 8508), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java index f4cdaa34a5..7b00cc11e8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java @@ -37,6 +37,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; import javax.imageio.ImageIO; +import javax.inject.Named; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.GameState; @@ -46,7 +47,6 @@ import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.StatChanged; import net.runelite.api.events.VarbitChanged; -import net.runelite.client.RuneLiteProperties; import net.runelite.client.config.ConfigManager; import net.runelite.client.discord.DiscordService; import net.runelite.client.discord.events.DiscordJoinGame; @@ -106,6 +106,10 @@ public class DiscordPlugin extends Plugin @Inject private OkHttpClient okHttpClient; + @Inject + @Named("runelite.discord.invite") + private String discordInvite; + private final Map skillExp = new HashMap<>(); private NavigationButton discordButton; private boolean loginFlag; @@ -125,7 +129,7 @@ public class DiscordPlugin extends Plugin .tab(false) .tooltip("Join Discord") .icon(icon) - .onClick(() -> LinkBrowser.browse(RuneLiteProperties.getDiscordInvite())) + .onClick(() -> LinkBrowser.browse(discordInvite)) .build(); clientToolbar.addNavigation(discordButton); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordState.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordState.java index 671107833e..f311511d26 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordState.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordState.java @@ -35,8 +35,8 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import javax.inject.Inject; +import javax.inject.Named; import lombok.Data; -import net.runelite.client.RuneLiteProperties; import net.runelite.client.discord.DiscordPresence; import net.runelite.client.discord.DiscordService; import net.runelite.client.ws.PartyService; @@ -60,14 +60,24 @@ class DiscordState private final DiscordService discordService; private final DiscordConfig config; private final PartyService party; + private final String runeliteTitle; + private final String runeliteVersion; private DiscordPresence lastPresence; @Inject - private DiscordState(final DiscordService discordService, final DiscordConfig config, final PartyService party) + private DiscordState( + final DiscordService discordService, + final DiscordConfig config, + final PartyService party, + @Named("runelite.title") final String runeliteTitle, + @Named("runelite.version") final String runeliteVersion + ) { this.discordService = discordService; this.config = config; this.party = party; + this.runeliteTitle = runeliteTitle; + this.runeliteVersion = runeliteVersion; } /** @@ -188,12 +198,12 @@ class DiscordState } // Replace snapshot with + to make tooltip shorter (so it will span only 1 line) - final String versionShortHand = RuneLiteProperties.getVersion().replace("-SNAPSHOT", "+"); + final String versionShortHand = runeliteVersion.replace("-SNAPSHOT", "+"); final DiscordPresence.DiscordPresenceBuilder presenceBuilder = DiscordPresence.builder() .state(MoreObjects.firstNonNull(state, "")) .details(MoreObjects.firstNonNull(details, "")) - .largeImageText(RuneLiteProperties.getTitle() + " v" + versionShortHand) + .largeImageText(runeliteTitle + " v" + versionShortHand) .smallImageKey(imageKey) .partyMax(PARTY_MAX) .partySize(party.getMembers().size()); 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 67b2c1bcc1..7cbe5f31b0 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 @@ -242,8 +242,6 @@ public class GpuPlugin extends Plugin implements DrawCallbacks private AntiAliasingMode lastAntiAliasingMode; private int lastAnisotropicFilteringLevel = -1; - private int centerX; - private int centerY; private int yaw; private int pitch; // fields for non-compute draw @@ -264,6 +262,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks private int uniTexSamplingMode; private int uniTexSourceDimensions; private int uniTexTargetDimensions; + private int uniUiAlphaOverlay; private int uniTextures; private int uniTextureOffsets; private int uniBlockSmall; @@ -545,6 +544,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks uniTexTargetDimensions = gl.glGetUniformLocation(glUiProgram, "targetDimensions"); uniTexSourceDimensions = gl.glGetUniformLocation(glUiProgram, "sourceDimensions"); uniUiColorBlindMode = gl.glGetUniformLocation(glUiProgram, "colorBlindMode"); + uniUiAlphaOverlay = gl.glGetUniformLocation(glUiProgram, "alphaOverlay"); uniTextures = gl.glGetUniformLocation(glProgram, "textures"); uniTextureOffsets = gl.glGetUniformLocation(glProgram, "textureOffsets"); @@ -774,13 +774,149 @@ public class GpuPlugin extends Plugin implements DrawCallbacks @Override public void drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane) { - centerX = client.getCenterX(); - centerY = client.getCenterY(); yaw = client.getCameraYaw(); pitch = client.getCameraPitch(); final Scene scene = client.getScene(); scene.setDrawDistance(getDrawDistance()); + + invokeOnMainThread(() -> + { + // UBO. Only the first 32 bytes get modified here, the rest is the constant sin/cos table. + gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, uniformBufferId); + uniformBuffer.clear(); + uniformBuffer + .put(yaw) + .put(pitch) + .put(client.getCenterX()) + .put(client.getCenterY()) + .put(client.getScale()) + .put(client.getCameraX2()) + .put(client.getCameraY2()) + .put(client.getCameraZ2()); + uniformBuffer.flip(); + + gl.glBufferSubData(gl.GL_UNIFORM_BUFFER, 0, uniformBuffer.limit() * Integer.BYTES, uniformBuffer); + gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, 0); + + gl.glBindBufferBase(gl.GL_UNIFORM_BUFFER, 0, uniformBufferId); + }); + } + + @Override + public void postDrawScene() + { + invokeOnMainThread(this::postDraw); + } + + private void postDraw() + { + if (!useComputeShaders) + { + // Upload buffers + vertexBuffer.flip(); + uvBuffer.flip(); + + IntBuffer vertexBuffer = this.vertexBuffer.getBuffer(); + FloatBuffer uvBuffer = this.uvBuffer.getBuffer(); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, vertexBuffer.limit() * Integer.BYTES, vertexBuffer, gl.GL_DYNAMIC_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpUvBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, uvBuffer.limit() * Float.BYTES, uvBuffer, gl.GL_DYNAMIC_DRAW); + + return; + } + + // Upload buffers + vertexBuffer.flip(); + uvBuffer.flip(); + modelBuffer.flip(); + modelBufferSmall.flip(); + modelBufferUnordered.flip(); + + IntBuffer vertexBuffer = this.vertexBuffer.getBuffer(); + FloatBuffer uvBuffer = this.uvBuffer.getBuffer(); + IntBuffer modelBuffer = this.modelBuffer.getBuffer(); + IntBuffer modelBufferSmall = this.modelBufferSmall.getBuffer(); + IntBuffer modelBufferUnordered = this.modelBufferUnordered.getBuffer(); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, vertexBuffer.limit() * Integer.BYTES, vertexBuffer, gl.GL_DYNAMIC_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpUvBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, uvBuffer.limit() * Float.BYTES, uvBuffer, gl.GL_DYNAMIC_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBuffer.limit() * Integer.BYTES, modelBuffer, gl.GL_DYNAMIC_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferSmallId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBufferSmall.limit() * Integer.BYTES, modelBufferSmall, gl.GL_DYNAMIC_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferUnorderedId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBufferUnordered.limit() * Integer.BYTES, modelBufferUnordered, gl.GL_DYNAMIC_DRAW); + + // Output buffers + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpOutBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, + targetBufferOffset * 16, // each vertex is an ivec4, which is 16 bytes + null, + gl.GL_STREAM_DRAW); + + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpOutUvBufferId); + gl.glBufferData(gl.GL_ARRAY_BUFFER, + targetBufferOffset * 16, + null, + gl.GL_STREAM_DRAW); + + // Bind UBO to compute programs + gl.glUniformBlockBinding(glSmallComputeProgram, uniBlockSmall, 0); + gl.glUniformBlockBinding(glComputeProgram, uniBlockLarge, 0); + + /* + * Compute is split into three separate programs: 'unordered', 'small', and 'large' + * to save on GPU resources. Small will sort <= 512 faces, large will do <= 4096. + */ + + // unordered + gl.glUseProgram(glUnorderedComputeProgram); + + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferUnorderedId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); + + gl.glDispatchCompute(unorderedModels, 1, 1); + + // small + gl.glUseProgram(glSmallComputeProgram); + + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferSmallId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); + + gl.glDispatchCompute(smallModels, 1, 1); + + // large + gl.glUseProgram(glComputeProgram); + + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); + gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); + + gl.glDispatchCompute(largeModels, 1, 1); } @Override @@ -855,9 +991,9 @@ public class GpuPlugin extends Plugin implements DrawCallbacks } @Override - public void draw() + public void draw(int overlayColor) { - invokeOnMainThread(this::drawFrame); + invokeOnMainThread(() -> drawFrame(overlayColor)); } private void resize(int canvasWidth, int canvasHeight, int viewportWidth, int viewportHeight) @@ -883,7 +1019,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks } } - private void drawFrame() + private void drawFrame(int overlayColor) { if (jawtWindow.getAWTComponent() != client.getCanvas()) { @@ -953,121 +1089,10 @@ public class GpuPlugin extends Plugin implements DrawCallbacks gl.glClearColor((sky >> 16 & 0xFF) / 255f, (sky >> 8 & 0xFF) / 255f, (sky & 0xFF) / 255f, 1f); gl.glClear(gl.GL_COLOR_BUFFER_BIT); - // Upload buffers - vertexBuffer.flip(); - uvBuffer.flip(); - modelBuffer.flip(); - modelBufferSmall.flip(); - modelBufferUnordered.flip(); - - IntBuffer vertexBuffer = this.vertexBuffer.getBuffer(); - FloatBuffer uvBuffer = this.uvBuffer.getBuffer(); - IntBuffer modelBuffer = this.modelBuffer.getBuffer(); - IntBuffer modelBufferSmall = this.modelBufferSmall.getBuffer(); - IntBuffer modelBufferUnordered = this.modelBufferUnordered.getBuffer(); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpBufferId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, vertexBuffer.limit() * Integer.BYTES, vertexBuffer, gl.GL_DYNAMIC_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpUvBufferId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, uvBuffer.limit() * Float.BYTES, uvBuffer, gl.GL_DYNAMIC_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBuffer.limit() * Integer.BYTES, modelBuffer, gl.GL_DYNAMIC_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferSmallId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBufferSmall.limit() * Integer.BYTES, modelBufferSmall, gl.GL_DYNAMIC_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpModelBufferUnorderedId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, modelBufferUnordered.limit() * Integer.BYTES, modelBufferUnordered, gl.GL_DYNAMIC_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpOutBufferId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, - targetBufferOffset * 16, // each vertex is an ivec4, which is 16 bytes - null, - gl.GL_STREAM_DRAW); - - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, tmpOutUvBufferId); - gl.glBufferData(gl.GL_ARRAY_BUFFER, - targetBufferOffset * 16, - null, - gl.GL_STREAM_DRAW); - - // UBO. Only the first 32 bytes get modified here, the rest is the constant sin/cos table. - gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, uniformBufferId); - uniformBuffer.clear(); - uniformBuffer - .put(yaw) - .put(pitch) - .put(centerX) - .put(centerY) - .put(client.getScale()) - .put(client.getCameraX2()) - .put(client.getCameraY2()) - .put(client.getCameraZ2()); - uniformBuffer.flip(); - - gl.glBufferSubData(gl.GL_UNIFORM_BUFFER, 0, uniformBuffer.limit() * Integer.BYTES, uniformBuffer); - gl.glBindBuffer(gl.GL_UNIFORM_BUFFER, 0); - - gl.glBindBufferBase(gl.GL_UNIFORM_BUFFER, 0, uniformBufferId); - // Draw 3d scene final TextureProvider textureProvider = client.getTextureProvider(); if (textureProvider != null) { - if (useComputeShaders) - { - gl.glUniformBlockBinding(glSmallComputeProgram, uniBlockSmall, 0); - gl.glUniformBlockBinding(glComputeProgram, uniBlockLarge, 0); - - /* - * Compute is split into two separate programs 'small' and 'large' to - * save on GPU resources. Small will sort <= 512 faces, large will do <= 4096. - */ - - // unordered - gl.glUseProgram(glUnorderedComputeProgram); - - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferUnorderedId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); - - gl.glDispatchCompute(unorderedModels, 1, 1); - - // small - gl.glUseProgram(glSmallComputeProgram); - - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferSmallId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); - - gl.glDispatchCompute(smallModels, 1, 1); - - // large - gl.glUseProgram(glComputeProgram); - - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 0, tmpModelBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 1, this.bufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 2, tmpBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 3, tmpOutBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 4, tmpOutUvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 5, this.uvBufferId); - gl.glBindBufferBase(gl.GL_SHADER_STORAGE_BUFFER, 6, tmpUvBufferId); - - gl.glDispatchCompute(largeModels, 1, 1); - - gl.glMemoryBarrier(gl.GL_SHADER_STORAGE_BARRIER_BIT); - } - if (textureArrayId == -1) { // lazy init textures as they may not be loaded at plugin start. @@ -1166,14 +1191,28 @@ public class GpuPlugin extends Plugin implements DrawCallbacks // Draw buffers gl.glBindVertexArray(vaoHandle); - // When using compute shaders, draw using the output buffer of the compute. Otherwise - // only use the temporary buffers, which will contain the full scene. + int vertexBuffer, uvBuffer; + if (useComputeShaders) + { + // Before reading the SSBOs written to from postDrawScene() we must insert a barrier + gl.glMemoryBarrier(gl.GL_SHADER_STORAGE_BARRIER_BIT); + // Draw using the output buffer of the compute + vertexBuffer = tmpOutBufferId; + uvBuffer = tmpOutUvBufferId; + } + else + { + // Only use the temporary buffers, which will contain the full scene + vertexBuffer = tmpBufferId; + uvBuffer = tmpUvBufferId; + } + gl.glEnableVertexAttribArray(0); - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, useComputeShaders ? tmpOutBufferId : tmpBufferId); + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, vertexBuffer); gl.glVertexAttribIPointer(0, 4, gl.GL_INT, 0, 0); gl.glEnableVertexAttribArray(1); - gl.glBindBuffer(gl.GL_ARRAY_BUFFER, useComputeShaders ? tmpOutUvBufferId : tmpUvBufferId); + gl.glBindBuffer(gl.GL_ARRAY_BUFFER, uvBuffer); gl.glVertexAttribPointer(1, 4, gl.GL_FLOAT, false, 0, 0); gl.glDrawArrays(gl.GL_TRIANGLES, 0, targetBufferOffset); @@ -1208,7 +1247,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks tempUvOffset = 0; // Texture on UI - drawUi(canvasHeight, canvasWidth); + drawUi(overlayColor, canvasHeight, canvasWidth); glDrawable.swapBuffers(); @@ -1226,7 +1265,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks }; } - private void drawUi(final int canvasHeight, final int canvasWidth) + private void drawUi(final int overlayColor, final int canvasHeight, final int canvasWidth) { final BufferProvider bufferProvider = client.getBufferProvider(); final int[] pixels = bufferProvider.getPixels(); @@ -1254,6 +1293,12 @@ public class GpuPlugin extends Plugin implements DrawCallbacks gl.glUniform1i(uniTexSamplingMode, uiScalingMode.getMode()); gl.glUniform2i(uniTexSourceDimensions, canvasWidth, canvasHeight); gl.glUniform1i(uniUiColorBlindMode, config.colorBlindMode().ordinal()); + gl.glUniform4f(uniUiAlphaOverlay, + (overlayColor >> 16 & 0xFF) / 255f, + (overlayColor >> 8 & 0xFF) / 255f, + (overlayColor & 0xFF) / 255f, + (overlayColor >>> 24) / 255f + ); if (client.isStretchedEnabled()) { @@ -1449,14 +1494,20 @@ public class GpuPlugin extends Plugin implements DrawCallbacks Model model = renderable instanceof Model ? (Model) renderable : renderable.getModel(); if (model != null) { + // Apply height to renderable from the model + if (model != renderable) + { + renderable.setModelHeight(model.getModelHeight()); + } + model.calculateBoundsCylinder(); - model.calculateExtreme(orientation); if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash)) { return; } + model.calculateExtreme(orientation); client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash); modelX = x + client.getCameraX2(); @@ -1480,13 +1531,13 @@ public class GpuPlugin extends Plugin implements DrawCallbacks Model model = (Model) renderable; model.calculateBoundsCylinder(); - model.calculateExtreme(orientation); if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash)) { return; } + model.calculateExtreme(orientation); client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash); int tc = Math.min(MAX_TRIANGLE, model.getTrianglesCount()); @@ -1512,16 +1563,19 @@ public class GpuPlugin extends Plugin implements DrawCallbacks if (model != null) { // Apply height to renderable from the model - model.setModelHeight(model.getModelHeight()); + if (model != renderable) + { + renderable.setModelHeight(model.getModelHeight()); + } model.calculateBoundsCylinder(); - model.calculateExtreme(orientation); if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash)) { return; } + model.calculateExtreme(orientation); client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash); boolean hasUv = model.getFaceTextures() != null; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeConfig.java index 9cb66911af..c7db3ab0ab 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangeConfig.java @@ -37,7 +37,7 @@ public interface GrandExchangeConfig extends Config position = 1, keyName = "quickLookup", name = "Hotkey lookup (Alt + Left click)", - description = "Configures whether to enable the hotkey lookup for ge searches" + description = "Configures whether to enable the hotkey lookup for GE searches" ) default boolean quickLookup() { @@ -59,7 +59,7 @@ public interface GrandExchangeConfig extends Config position = 3, keyName = "enableOsbPrices", name = "Enable OSB actively traded prices", - description = "Shows the OSBuddy actively traded price at the GE" + description = "Shows the OSBuddy actively traded price on the GE buy interface" ) default boolean enableOsbPrices() { @@ -92,8 +92,8 @@ public interface GrandExchangeConfig extends Config @ConfigItem( position = 6, keyName = "showTotal", - name = "Show grand exchange total", - description = "Show grand exchange total" + name = "Show GE total", + description = "Display the total value of all trades at the top of the GE interface" ) default boolean showTotal() { @@ -104,7 +104,7 @@ public interface GrandExchangeConfig extends Config position = 7, keyName = "showExact", name = "Show exact total value", - description = "Show exact total value" + description = "When enabled along with the ‘Show GE total’ option, the unabbreviated value will be displayed" ) default boolean showExact() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java index d691cef668..b9eb0fd2e8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java @@ -36,6 +36,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; +import javax.inject.Named; import javax.inject.Singleton; import javax.swing.Box; import javax.swing.ImageIcon; @@ -91,6 +92,26 @@ public class InfoPanel extends PluginPanel @Inject private ConfigManager configManager; + @Inject + @Named("runelite.version") + private String runeliteVersion; + + @Inject + @Named("runelite.github.link") + private String githubLink; + + @Inject + @Named("runelite.discord.invite") + private String discordInvite; + + @Inject + @Named("runelite.patreon.link") + private String patreonLink; + + @Inject + @Named("runelite.wiki.link") + private String wikiLink; + static { ARROW_RIGHT_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "/util/arrow_right.png")); @@ -114,7 +135,7 @@ public class InfoPanel extends PluginPanel final Font smallFont = FontManager.getRunescapeSmallFont(); - JLabel version = new JLabel(htmlLabel("RuneLite version: ", RuneLiteProperties.getVersion())); + JLabel version = new JLabel(htmlLabel("RuneLite version: ", runeliteVersion)); version.setFont(smallFont); JLabel revision = new JLabel(); @@ -173,10 +194,10 @@ public class InfoPanel extends PluginPanel } }); - actionsContainer.add(buildLinkPanel(GITHUB_ICON, "Report an issue or", "make a suggestion", RuneLiteProperties.getGithubLink())); - actionsContainer.add(buildLinkPanel(DISCORD_ICON, "Talk to us on our", "Discord server", RuneLiteProperties.getDiscordInvite())); - actionsContainer.add(buildLinkPanel(PATREON_ICON, "Become a patron to", "help support RuneLite", RuneLiteProperties.getPatreonLink())); - actionsContainer.add(buildLinkPanel(WIKI_ICON, "Information about", "RuneLite and plugins", RuneLiteProperties.getWikiLink())); + actionsContainer.add(buildLinkPanel(GITHUB_ICON, "Report an issue or", "make a suggestion", githubLink)); + actionsContainer.add(buildLinkPanel(DISCORD_ICON, "Talk to us on our", "Discord server", discordInvite)); + actionsContainer.add(buildLinkPanel(PATREON_ICON, "Become a patron to", "help support RuneLite", patreonLink)); + actionsContainer.add(buildLinkPanel(WIKI_ICON, "Information about", "RuneLite and plugins", wikiLink)); add(versionPanel, BorderLayout.NORTH); add(actionsContainer, BorderLayout.CENTER); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java index 6391628e4d..a5dc493f5b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatChanges.java @@ -60,7 +60,7 @@ public class ItemStatChanges add(food(3), SHRIMPS, COOKED_MEAT, COOKED_CHICKEN, ROE, CHOCOLATE_BAR); add(food(4), SARDINE, CAKE, _23_CAKE, SLICE_OF_CAKE, CHOCOLATEY_MILK, BAKED_POTATO, EDIBLE_SEAWEED, MOONLIGHT_MEAD); add(food(5), BREAD, HERRING, CHOCOLATE_CAKE, _23_CHOCOLATE_CAKE, CHOCOLATE_SLICE, COOKED_RABBIT, CHILLI_CON_CARNE, - FRIED_MUSHROOMS, FRIED_ONIONS, REDBERRY_PIE, HALF_A_REDBERRY_PIE, CAVIAR, PYSK_FISH_0); + FRIED_MUSHROOMS, FRIED_ONIONS, REDBERRY_PIE, HALF_A_REDBERRY_PIE, CAVIAR, PYSK_FISH_0, COOKED_MYSTERY_MEAT); add(food(6), CHOCICE, MACKEREL, MEAT_PIE, HALF_A_MEAT_PIE, GUANIC_BAT_0, ROAST_BIRD_MEAT, SQUARE_SANDWICH, ROLL, BAGUETTE, TRIANGLE_SANDWICH, GIANT_CARP); add(food(7), TROUT, COD, PLAIN_PIZZA, _12_PLAIN_PIZZA, APPLE_PIE, HALF_AN_APPLE_PIE, ROAST_RABBIT, @@ -111,6 +111,7 @@ public class ItemStatChanges add(combo(2, food(5), boost(STRENGTH, 4), heal(ATTACK, -3)), PREMADE_SGG, SHORT_GREEN_GUY); add(combo(2, food(5), boost(STRENGTH, 7), heal(ATTACK, -4)), PREMADE_DR_DRAGON, DRUNK_DRAGON); add(combo(2, food(5), boost(STRENGTH, 7), heal(ATTACK, -4)), PREMADE_CHOC_SDY, CHOC_SATURDAY); + add(combo(4, boost(ATTACK, 5), boost(STRENGTH, 5), heal(MAGIC, -5), heal(PRAYER, -5)), BLOOD_PINT); // Sq'irk Juice add(heal(RUN_ENERGY, 5), WINTER_SQIRKJUICE); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java index fd60d7eef2..3ac2489645 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java @@ -125,7 +125,7 @@ public class MenuEntrySwapperPlugin extends Plugin private static final Set ESSENCE_MINE_NPCS = ImmutableSet.of( "aubury", - "wizard sedridor", + "sedridor", "wizard distentor", "wizard cromperty", "brimstail" diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java index be6001241d..1e56b743eb 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mousehighlight/MouseHighlightOverlay.java @@ -37,6 +37,7 @@ import net.runelite.api.VarClientInt; import net.runelite.api.widgets.WidgetID; import net.runelite.api.widgets.WidgetInfo; import net.runelite.client.ui.overlay.Overlay; +import net.runelite.client.ui.overlay.OverlayLayer; import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.tooltip.Tooltip; import net.runelite.client.ui.overlay.tooltip.TooltipManager; @@ -80,6 +81,9 @@ class MouseHighlightOverlay extends Overlay MouseHighlightOverlay(Client client, TooltipManager tooltipManager, MouseHighlightConfig config) { setPosition(OverlayPosition.DYNAMIC); + setLayer(OverlayLayer.ABOVE_WIDGETS); + // additionally allow tooltips above the full screen world map and welcome screen + drawAfterInterface(WidgetID.FULLSCREEN_CONTAINER_TLI); this.client = client; this.tooltipManager = tooltipManager; this.config = config; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixOverlay.java index 4c1a5569fc..87148caef7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixOverlay.java @@ -30,6 +30,7 @@ import java.awt.Graphics2D; import java.time.Duration; import java.time.Instant; import javax.inject.Inject; +import net.runelite.api.ObjectID; import net.runelite.api.Point; import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.OverlayLayer; @@ -39,6 +40,7 @@ import net.runelite.client.ui.overlay.components.ProgressPieComponent; class TearsOfGuthixOverlay extends Overlay { private static final Color CYAN_ALPHA = new Color(Color.CYAN.getRed(), Color.CYAN.getGreen(), Color.CYAN.getBlue(), 100); + private static final Color GREEN_ALPHA = new Color(Color.GREEN.getRed(), Color.GREEN.getGreen(), Color.GREEN.getBlue(), 100); private static final Duration MAX_TIME = Duration.ofSeconds(9); private final TearsOfGuthixPlugin plugin; @@ -64,8 +66,20 @@ class TearsOfGuthixOverlay extends Overlay final ProgressPieComponent progressPie = new ProgressPieComponent(); progressPie.setDiameter(15); - progressPie.setFill(CYAN_ALPHA); - progressPie.setBorderColor(Color.CYAN); + + if (object.getId() == ObjectID.BLUE_TEARS || + object.getId() == ObjectID.BLUE_TEARS_6665) + { + progressPie.setFill(CYAN_ALPHA); + progressPie.setBorderColor(Color.CYAN); + } + else if (object.getId() == ObjectID.GREEN_TEARS || + object.getId() == ObjectID.GREEN_TEARS_6666) + { + progressPie.setFill(GREEN_ALPHA); + progressPie.setBorderColor(Color.GREEN); + } + progressPie.setPosition(position); final Duration duration = Duration.between(timer, Instant.now()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixPlugin.java index 6567c15e24..899182b500 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixPlugin.java @@ -92,7 +92,9 @@ public class TearsOfGuthixPlugin extends Plugin DecorativeObject object = event.getDecorativeObject(); if (object.getId() == ObjectID.BLUE_TEARS || - object.getId() == ObjectID.BLUE_TEARS_6665) + object.getId() == ObjectID.BLUE_TEARS_6665 || + object.getId() == ObjectID.GREEN_TEARS || + object.getId() == ObjectID.GREEN_TEARS_6666) { if (client.getLocalPlayer().getWorldLocation().getRegionID() == TOG_REGION) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index a751b7f3f9..e4521feb9e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -60,7 +60,7 @@ enum GameTimer OVERLOAD_RAID(ItemID.OVERLOAD_4_20996, GameTimerImageType.ITEM, "Overload", 5, ChronoUnit.MINUTES, true), PRAYER_ENHANCE(ItemID.PRAYER_ENHANCE_4, GameTimerImageType.ITEM, "Prayer enhance", 290, ChronoUnit.SECONDS, true), GOD_WARS_ALTAR(SpriteID.SKILL_PRAYER, GameTimerImageType.SPRITE, "God wars altar", 10, ChronoUnit.MINUTES), - CHARGE(SpriteID.SPELL_CHARGE, GameTimerImageType.SPRITE, "Charge", 6, ChronoUnit.MINUTES), + CHARGE(SpriteID.SPELL_CHARGE, GameTimerImageType.SPRITE, "Charge", 7, ChronoUnit.MINUTES), STAFF_OF_THE_DEAD(ItemID.STAFF_OF_THE_DEAD, GameTimerImageType.ITEM, "Staff of the Dead", 1, ChronoUnit.MINUTES), ABYSSAL_SIRE_STUN(ItemID.ABYSSAL_ORPHAN, GameTimerImageType.ITEM, "Abyssal Sire Stun", 30, ChronoUnit.SECONDS, true), HOME_TELEPORT(SpriteID.SPELL_LUMBRIDGE_HOME_TELEPORT, GameTimerImageType.SPRITE, "Home Teleport", 30, ChronoUnit.MINUTES), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java index bbeab0a639..7ca46e130c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java @@ -219,7 +219,7 @@ class FarmingWorld add(new FarmingRegion("Lletya", 9265, new FarmingPatch("", Varbits.FARMING_4771, PatchImplementation.FRUIT_TREE) - )); + ), 11103); add(new FarmingRegion("Lumbridge", 12851, new FarmingPatch("", Varbits.FARMING_4771, PatchImplementation.HOPS) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index c839316c36..9223b82fb1 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -71,7 +71,6 @@ import net.runelite.api.Point; import net.runelite.api.events.GameStateChanged; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo; -import net.runelite.client.RuneLiteProperties; import net.runelite.client.callback.ClientThread; import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ExpandResizeType; @@ -122,6 +121,7 @@ public class ClientUI private final Provider clientThreadProvider; private final EventBus eventBus; private final boolean safeMode; + private final String title; private final CardLayout cardLayout = new CardLayout(); private final Rectangle sidebarButtonPosition = new Rectangle(); @@ -152,7 +152,9 @@ public class ClientUI ConfigManager configManager, Provider clientThreadProvider, EventBus eventBus, - @Named("safeMode") boolean safeMode) + @Named("safeMode") boolean safeMode, + @Named("runelite.title") String title + ) { this.config = config; this.keyManager = keyManager; @@ -162,6 +164,7 @@ public class ClientUI this.clientThreadProvider = clientThreadProvider; this.eventBus = eventBus; this.safeMode = safeMode; + this.title = title; } @Subscribe @@ -294,7 +297,7 @@ public class ClientUI return false; } - frame.setTitle(RuneLiteProperties.getTitle() + " - " + name); + frame.setTitle(title + " - " + name); return true; }); } @@ -321,7 +324,7 @@ public class ClientUI // Try to enable fullscreen on OSX OSXUtil.tryEnableFullscreen(frame); - frame.setTitle(RuneLiteProperties.getTitle()); + frame.setTitle(title); frame.setIconImage(ICON); frame.getLayeredPane().setCursor(Cursor.getDefaultCursor()); // Prevent substance from using a resize cursor for pointing frame.setLocationRelativeTo(frame.getOwner()); @@ -507,7 +510,7 @@ public class ClientUI frame.revalidateMinimumSize(); // Create tray icon (needs to be created after frame is packed) - trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame); + trayIcon = SwingUtil.createTrayIcon(ICON, title, frame); // Move frame around (needs to be done after frame is packed) if (config.rememberScreenBounds() && !safeMode) @@ -1034,12 +1037,12 @@ public class ClientUI if (player != null && player.getName() != null) { - frame.setTitle(RuneLiteProperties.getTitle() + " - " + player.getName()); + frame.setTitle(title + " - " + player.getName()); } } else { - frame.setTitle(RuneLiteProperties.getTitle()); + frame.setTitle(title); } if (frame.isAlwaysOnTopSupported()) @@ -1118,4 +1121,4 @@ public class ClientUI configManager.setConfiguration(CONFIG_GROUP, CONFIG_CLIENT_BOUNDS, bounds); } } -} +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/tooltip/TooltipOverlay.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/tooltip/TooltipOverlay.java index 002af12c34..81a1142e08 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/tooltip/TooltipOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/tooltip/TooltipOverlay.java @@ -61,8 +61,8 @@ public class TooltipOverlay extends Overlay setPosition(OverlayPosition.TOOLTIP); setPriority(OverlayPriority.HIGHEST); setLayer(OverlayLayer.ABOVE_WIDGETS); - // additionally allow tooltips above the world map - drawAfterInterface(WidgetID.WORLD_MAP_GROUP_ID); + // additionally allow tooltips above the full screen world map and welcome screen + drawAfterInterface(WidgetID.FULLSCREEN_CONTAINER_TLI); } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/util/ImageCapture.java b/runelite-client/src/main/java/net/runelite/client/util/ImageCapture.java index ab9f660781..dfee412c03 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ImageCapture.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ImageCapture.java @@ -45,6 +45,7 @@ import java.util.EnumSet; import javax.annotation.Nullable; import javax.imageio.ImageIO; import javax.inject.Inject; +import javax.inject.Named; import javax.inject.Singleton; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -53,7 +54,6 @@ import net.runelite.api.GameState; import net.runelite.api.WorldType; import net.runelite.client.Notifier; import static net.runelite.client.RuneLite.SCREENSHOT_DIR; -import net.runelite.client.RuneLiteProperties; import net.runelite.http.api.RuneLiteAPI; import okhttp3.Call; import okhttp3.Callback; @@ -72,14 +72,24 @@ public class ImageCapture private static final HttpUrl IMGUR_IMAGE_UPLOAD_URL = HttpUrl.parse("https://api.imgur.com/3/image"); private static final MediaType JSON = MediaType.parse("application/json"); - @Inject - private Client client; + private final Client client; + private final Notifier notifier; + private final OkHttpClient okHttpClient; + private final String imgurClientId; @Inject - private Notifier notifier; - - @Inject - private OkHttpClient okHttpClient; + private ImageCapture( + final Client client, + final Notifier notifier, + final OkHttpClient okHttpClient, + @Named("runelite.imgur.client.id") final String imgurClientId + ) + { + this.client = client; + this.notifier = notifier; + this.okHttpClient = okHttpClient; + this.imgurClientId = imgurClientId; + } /** * Saves a screenshot of the client window to the screenshot folder as a PNG, @@ -198,7 +208,7 @@ public class ImageCapture Request request = new Request.Builder() .url(IMGUR_IMAGE_UPLOAD_URL) - .addHeader("Authorization", "Client-ID " + RuneLiteProperties.getImgurClientId()) + .addHeader("Authorization", "Client-ID " + imgurClientId) .post(RequestBody.create(JSON, json)) .build(); 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 5637180ad0..e8965029c1 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 @@ -207,55 +207,4 @@ public class LinkBrowser } }); } - - - /** - * Tries to open the specified {@code File} with the systems default text editor. If operation fails - * an error message is displayed with the option to copy the absolute file path to clipboard. - * - * @param file the File instance of the log file - * @return did the file open successfully? - */ - public static boolean openLocalFile(final File file) - { - if (file == null || !file.exists()) - { - return false; - } - - if (attemptOpenLocalFile(file)) - { - log.debug("Opened log file through Desktop#edit to {}", file); - return true; - } - - showMessageBox("Unable to open log file. Press 'OK' and the file path will be copied to your clipboard", file.getAbsolutePath()); - return false; - } - - private static boolean attemptOpenLocalFile(final File file) - { - if (!Desktop.isDesktopSupported()) - { - return false; - } - - final Desktop desktop = Desktop.getDesktop(); - - if (!desktop.isSupported(Desktop.Action.OPEN)) - { - return false; - } - - try - { - desktop.open(file); - return true; - } - catch (IOException ex) - { - log.warn("Failed to open Desktop#edit {}", file, ex); - return false; - } - } } diff --git a/runelite-client/src/main/resources/net/runelite/client/callback/cursor.png b/runelite-client/src/main/resources/net/runelite/client/callback/cursor.png deleted file mode 100644 index 7415625a2f..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/callback/cursor.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/15seconds.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/15seconds.wav deleted file mode 100644 index d7cf952977..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/15seconds.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/5seconds.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/5seconds.wav deleted file mode 100644 index 17c05cd53b..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/5seconds.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmagic.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmagic.wav deleted file mode 100644 index e7a4383f1b..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmagic.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmelee.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmelee.wav deleted file mode 100644 index 9838762423..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackmelee.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackranged.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackranged.wav deleted file mode 100644 index da26385656..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/attackranged.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/break.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/break.wav deleted file mode 100644 index 1a9a744c57..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/break.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/idle.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/idle.wav deleted file mode 100644 index f8945891df..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/idle.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/incoming.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/incoming.wav deleted file mode 100644 index 532b0083f9..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/incoming.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowhealth.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowhealth.wav deleted file mode 100644 index 49b21d32ac..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowhealth.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowprayer.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowprayer.wav deleted file mode 100644 index 8a632ac14e..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/lowprayer.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/move.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/move.wav deleted file mode 100644 index 3e90326a5b..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/move.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/outofcombat.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/outofcombat.wav deleted file mode 100644 index 23d99f59d5..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/outofcombat.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymagic.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymagic.wav deleted file mode 100644 index 8994a0faef..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymagic.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymelee.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymelee.wav deleted file mode 100644 index 985f222670..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/praymelee.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/prayranged.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/prayranged.wav deleted file mode 100644 index 25e37ee07e..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/prayranged.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/reenableprayer.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/reenableprayer.wav deleted file mode 100644 index 1f046c9aed..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/reenableprayer.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/restorespec.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/restorespec.wav deleted file mode 100644 index 66f2077b10..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/restorespec.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/game/sounds/runaway.wav b/runelite-client/src/main/resources/net/runelite/client/game/sounds/runaway.wav deleted file mode 100644 index 90760c346f..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/game/sounds/runaway.wav and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/open.osrs.properties b/runelite-client/src/main/resources/net/runelite/client/open.osrs.properties deleted file mode 100644 index d101a6de1c..0000000000 --- a/runelite-client/src/main/resources/net/runelite/client/open.osrs.properties +++ /dev/null @@ -1,15 +0,0 @@ -runelite.version=@project.version@ -runescape.version=@rs.version@ -open.osrs.discord.appid=627741263881568257 -runelite.discord.invite=https://discord.gg/openosrs -runelite.github.link=https://github.com/open-osrs/runelite -runelite.wiki.link=https://github.com/open-osrs/runelite/wiki -runelite.patreon.link=https://www.patreon.com/openosrs -open.osrs.title=OpenOSRS -open.osrs.version=@open.osrs.version@ -open.osrs.builddate=@open.osrs.builddate@ -runelite.wiki.troubleshooting.link=https://github.com/open-osrs/runelite/wiki/Troubleshooting-problems-with-the-client -runelite.wiki.building.link=https://github.com/open-osrs/runelite/wiki/Building-with-IntelliJ-IDEA -runelite.dnschange.link=https://1.1.1.1/dns/ -plugin.path=@plugin.path@ -runelite.imgur.client.id=30d71e5f6860809 diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png b/runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png deleted file mode 100644 index cd26305f7a..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/comp_unordered.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/comp_unordered.glsl index 531eb6c935..8eb4bdaa69 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/comp_unordered.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/comp_unordered.glsl @@ -29,8 +29,6 @@ layout(local_size_x = 6) in; -#include common.glsl - void main() { uint groupId = gl_WorkGroupID.x; uint localId = gl_LocalInvocationID.x; @@ -41,7 +39,6 @@ void main() { int outOffset = minfo.idx; int uvOffset = minfo.uvOffset; int flags = minfo.flags; - int orientation = flags & 0x7ff; ivec4 pos = ivec4(minfo.x, minfo.y, minfo.z, 0); if (localId >= size) { @@ -62,16 +59,12 @@ void main() { thisC = tempvb[offset + ssboOffset * 3 + 2]; } - ivec4 thisrvA = rotate(thisA, orientation); - ivec4 thisrvB = rotate(thisB, orientation); - ivec4 thisrvC = rotate(thisC, orientation); - uint myOffset = localId; // position vertices in scene and write to out buffer - vout[outOffset + myOffset * 3] = pos + thisrvA; - vout[outOffset + myOffset * 3 + 1] = pos + thisrvB; - vout[outOffset + myOffset * 3 + 2] = pos + thisrvC; + vout[outOffset + myOffset * 3] = pos + thisA; + vout[outOffset + myOffset * 3 + 1] = pos + thisB; + vout[outOffset + myOffset * 3 + 2] = pos + thisC; if (uvOffset < 0) { uvout[outOffset + myOffset * 3] = vec4(0, 0, 0, 0); diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl index b89513a94e..df930d16be 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl @@ -43,26 +43,29 @@ out vec4 FragColor; #include colorblind.glsl void main() { - int hsl = int(fHsl); - vec3 rgb = hslToRgb(hsl) * smoothBanding + Color.rgb * (1.f - smoothBanding); - vec4 smoothColor = vec4(rgb, Color.a); + vec4 c; if (textureId > 0) { int textureIdx = textureId - 1; - vec2 uv = fUv; - vec2 animatedUv = uv + textureOffsets[textureIdx]; + vec2 animatedUv = fUv + textureOffsets[textureIdx]; vec4 textureColor = texture(textures, vec3(animatedUv, float(textureIdx))); vec4 textureColorBrightness = pow(textureColor, vec4(brightness, brightness, brightness, 1.0f)); - smoothColor = textureColorBrightness * smoothColor; + // textured triangles hsl is a 7 bit lightness 2-126 + float light = fHsl / 127.f; + c = textureColorBrightness * vec4(light, light, light, 1.f); + } else { + // pick interpolated hsl or rgb depending on smooth banding setting + vec3 rgb = hslToRgb(int(fHsl)) * smoothBanding + Color.rgb * (1.f - smoothBanding); + c = vec4(rgb, Color.a); } if (colorBlindMode > 0) { - smoothColor.rgb = colorblind(colorBlindMode, smoothColor.rgb); + c.rgb = colorblind(colorBlindMode, c.rgb); } - vec3 mixedColor = mix(smoothColor.rgb, fogColor.rgb, fogAmount); - FragColor = vec4(mixedColor, smoothColor.a); + vec3 mixedColor = mix(c.rgb, fogColor.rgb, fogAmount); + FragColor = vec4(mixedColor, c.a); } diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/fragui.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/fragui.glsl index e522d34400..5a54522f83 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/fragui.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/fragui.glsl @@ -34,6 +34,7 @@ uniform int samplingMode; uniform ivec2 sourceDimensions; uniform ivec2 targetDimensions; uniform int colorBlindMode; +uniform vec4 alphaOverlay; #include scale/bicubic.glsl #include scale/xbr_lv2_frag.glsl @@ -44,6 +45,13 @@ in XBRTable xbrTable; out vec4 FragColor; +vec4 alphaBlend(vec4 src, vec4 dst) { + return vec4( + src.rgb + dst.rgb * (1.0f - src.a), + src.a + dst.a * (1.0f - src.a) + ); +} + void main() { vec4 c; @@ -51,14 +59,17 @@ void main() { case SAMPLING_CATROM: case SAMPLING_MITCHELL: c = textureCubic(tex, TexCoord, samplingMode); + c = alphaBlend(c, alphaOverlay); c.rgb = colorblind(colorBlindMode, c.rgb); break; case SAMPLING_XBR: c = textureXBR(tex, TexCoord, xbrTable, ceil(1.0 * targetDimensions.x / sourceDimensions.x)); + c = alphaBlend(c, alphaOverlay); c.rgb = colorblind(colorBlindMode, c.rgb); break; default: // NEAREST or LINEAR, which uses GL_TEXTURE_MIN_FILTER/GL_TEXTURE_MAG_FILTER to affect sampling c = texture(tex, TexCoord); + c = alphaBlend(c, alphaOverlay); c.rgb = colorblind(colorBlindMode, c.rgb); } diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png deleted file mode 100644 index 41aa88c301..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externalmanager_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externalmanager_icon.png deleted file mode 100644 index 7cb7e2502c..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externalmanager_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_icon.png deleted file mode 100644 index 343c3dce0c..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_raw_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_raw_icon.png deleted file mode 100644 index 7f1afebf35..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/add_raw_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/delete_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/delete_icon.png deleted file mode 100644 index 3f4915d041..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/delete_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/discord_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/discord_icon.png deleted file mode 100644 index 6b7a6988f9..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/discord_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/gh_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/gh_icon.png deleted file mode 100644 index 4d8e66215e..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/openosrs/externals/gh_icon.png and /dev/null differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_herblore.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_herblore.json index 650945b8d8..6e3c4c088b 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_herblore.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_herblore.json @@ -360,6 +360,12 @@ "name": "Extended Antifire (3)", "xp": 82.5 }, + { + "level": 84, + "icon": 11951, + "name": "Extended Antifire (4)", + "xp": 110 + }, { "level": 86, "icon": 24635, @@ -378,6 +384,12 @@ "name": "Anti-venom(3)", "xp": 90 }, + { + "level": 87, + "icon": 12905, + "name": "Anti-venom(4)", + "xp": 120 + }, { "level": 90, "icon": 12695, @@ -386,14 +398,14 @@ }, { "level": 92, - "icon": 21981, - "name": "Super Antifire (3)", + "icon": 21978, + "name": "Super Antifire (4)", "xp": 130 }, { "level": 94, - "icon": 12915, - "name": "Anti-venom+(3)", + "icon": 12913, + "name": "Anti-venom+(4)", "xp": 125 }, { diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt b/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt index e0400293b0..fb8bd463ce 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skybox/skybox.txt @@ -974,7 +974,7 @@ c 7 4 #100 R 19 19 21 20 -// Cosmic renderable's plane +// Cosmic entity's plane #040404 r 32 75 diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java index 0167441221..aa2ac01f86 100644 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java @@ -246,6 +246,9 @@ public abstract class RSClientMixin implements RSClient @Inject private static ArrayList widgetItems = new ArrayList<>(); + @Inject + private static ArrayList hiddenWidgets = new ArrayList<>(); + @Inject @Override public void setPrintMenuActions(boolean yes) @@ -1549,6 +1552,30 @@ public abstract class RSClientMixin implements RSClient widget.setRenderX(renderX); widget.setRenderY(renderY); + if (widget.getContentType() == WidgetType.VIEWPORT) + { + client.setViewportColor(0); + } + else if (widget.getContentType() == WidgetType.RECTANGLE) + { + if (renderX == client.getViewportXOffset() && renderY == client.getViewportYOffset() + && widget.getWidth() == client.getViewportWidth() && widget.getHeight() == client.getViewportHeight() + && widget.getOpacity() > 0 && widget.isFilled() && client.isGpu()) + { + int textColor = widget.getTextColor(); + int alpha = widget.getOpacity() & 0xFF; + int inverseAlpha = 256 - alpha; + int viewportColor = client.getViewportColor(); + int c1 = (alpha * (textColor & 0xff00ff) >> 8 & 0xFF00FF) + (alpha * (textColor & 0x00FF00) >> 8 & 0x00FF00); + int c2 = (inverseAlpha * (viewportColor & 0xff00ff) >> 8 & 0xFF00FF) + (inverseAlpha * (viewportColor & 0x00FF00) >> 8 & 0x00FF00); + int outAlpha = alpha + ((viewportColor >>> 24) * (255 - alpha) * 0x8081 >>> 23); + client.setViewportColor(outAlpha << 24 | c1 + c2); + widget.setHidden(true); + hiddenWidgets.add(widget); + continue; + } + } + WidgetNode childNode = componentTable.get(widget.getId()); if (childNode != null) @@ -1565,10 +1592,6 @@ public abstract class RSClientMixin implements RSClient } } } - else - { - - } } } @@ -1649,6 +1672,15 @@ public abstract class RSClientMixin implements RSClient callbacks.drawInterface(group, widgetItems); widgetItems.clear(); + for (int i = hiddenWidgets.size() - 1; i >= 0; i--) + { + Widget widget = hiddenWidgets.get(i); + if (WidgetInfo.TO_GROUP(widget.getId()) == group) + { + widget.setHidden(false); + hiddenWidgets.remove(i); + } + } } } diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java index 93f389345a..eda0eabfed 100644 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameShellMixin.java @@ -83,7 +83,7 @@ public abstract class RSGameShellMixin implements RSGameShell DrawCallbacks drawCallbacks = client.getDrawCallbacks(); if (drawCallbacks != null) { - drawCallbacks.draw(); + drawCallbacks.draw(client.getViewportColor()); } } diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java index eb8e61faea..7f8c5d53ad 100644 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java +++ b/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java @@ -313,13 +313,19 @@ public abstract class RSSceneMixin implements RSScene client.setViewportWalking(false); } client.getCallbacks().drawScene(); + + if (client.getDrawCallbacks() != null) + { + client.getDrawCallbacks().postDrawScene(); + } + return; } } } } } - + outer: for (int z = minLevel; z < maxY; ++z) { RSTile[][] planeTiles = tiles[z]; @@ -378,17 +384,8 @@ public abstract class RSSceneMixin implements RSScene if (client.getTileUpdateCount() == 0) { - if (!isGpu && (client.getOculusOrbState() != 0 && !client.getComplianceValue("orbInteraction"))) - { - client.setEntitiesAtMouseCount(0); - } - client.setCheckClick(false); - if (!checkClick) - { - client.setViewportWalking(false); - } - client.getCallbacks().drawScene(); - return; + // exit the loop early and go straight to "if (!isGpu && (client..." + break outer; } } } @@ -407,6 +404,10 @@ public abstract class RSSceneMixin implements RSScene client.setViewportWalking(false); } client.getCallbacks().drawScene(); + if (client.getDrawCallbacks() != null) + { + client.getDrawCallbacks().postDrawScene(); + } } @Copy("newWallDecoration") @@ -799,9 +800,9 @@ public abstract class RSSceneMixin implements RSScene @MethodHook(value = "addTile", end = true) @Inject public void rl$addTile(int z, int x, int y, int shape, int rotation, int texture, int heightSw, int heightNw, - int heightNe, int heightSe, int underlaySwColor, int underlayNwColor, int underlayNeColor, - int underlaySeColor, int overlaySwColor, int overlayNwColor, int overlayNeColor, - int overlaySeColor, int underlayRgb, int overlayRgb) + int heightNe, int heightSe, int underlaySwColor, int underlayNwColor, int underlayNeColor, + int underlaySeColor, int overlaySwColor, int overlayNwColor, int overlayNeColor, + int overlaySeColor, int underlayRgb, int overlayRgb) { if (shape != 0 && shape != 1) { @@ -938,28 +939,28 @@ public abstract class RSSceneMixin implements RSScene { int lig = 0xFF - ((seLightness >> 1) * (seLightness >> 1) >> 8); pixels[pixelOffset] = ((overlayRgb & 0xFF00FF) * lig & ~0xFF00FF) + - ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; + ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; } if (points[indices[shapeOffset++]] != 0) { int lig = 0xFF - ((seLightness * 3 + neLightness >> 3) * - (seLightness * 3 + neLightness >> 3) >> 8); + (seLightness * 3 + neLightness >> 3) >> 8); pixels[pixelOffset + 1] = ((overlayRgb & 0xFF00FF) * lig & ~0xFF00FF) + - ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; + ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; } if (points[indices[shapeOffset++]] != 0) { int lig = 0xFF - ((seLightness + neLightness >> 2) * - (seLightness + neLightness >> 2) >> 8); + (seLightness + neLightness >> 2) >> 8); pixels[pixelOffset + 2] = ((overlayRgb & 0xFF00FF) * lig & ~0xFF00FF) + - ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; + ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; } if (points[indices[shapeOffset++]] != 0) { int lig = 0xFF - ((seLightness + neLightness * 3 >> 3) * - (seLightness + neLightness * 3 >> 3) >> 8); + (seLightness + neLightness * 3 >> 3) >> 8); pixels[pixelOffset + 3] = ((overlayRgb & 0xFF00FF) * lig & ~0xFF00FF) + - ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; + ((overlayRgb & 0xFF00) * lig & 0xFF0000) >> 8; } } seLightness += southDeltaLightness; @@ -1009,11 +1010,11 @@ public abstract class RSSceneMixin implements RSScene { pixels[pixelOffset] = points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; pixels[pixelOffset + 1] = - points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; + points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; pixels[pixelOffset + 2] = - points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; + points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; pixels[pixelOffset + 3] = - points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; + points[indices[shapeOffset++]] != 0 ? overlayRgb : underlayRgb; pixelOffset += width; } } @@ -1042,4 +1043,4 @@ public abstract class RSSceneMixin implements RSScene } } } -} +} \ No newline at end of file diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java b/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java index e798354db7..03a498f0fe 100644 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java +++ b/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java @@ -1308,4 +1308,10 @@ public interface RSClient extends RSGameShell, Client @Import("pcmSampleLength") void setPcmSampleLength(int var0); + + @Import("viewportColor") + int getViewportColor(); + + @Import("viewportColor") + void setViewportColor(int i); } diff --git a/runescape-client/src/main/java/Client.java b/runescape-client/src/main/java/Client.java index b8f9c3639e..1043246fa7 100644 --- a/runescape-client/src/main/java/Client.java +++ b/runescape-client/src/main/java/Client.java @@ -929,7 +929,8 @@ public final class Client extends GameShell implements Usernamed { @ObfuscatedGetter( intValue = -380994417 ) - public static int field730; + @Export("viewportColor") + public static int viewportColor; @ObfuscatedName("il") static boolean field649; @ObfuscatedName("im") @@ -1366,7 +1367,7 @@ public final class Client extends GameShell implements Usernamed { field788 = 0; // L: 374 oculusOrbNormalSpeed = 12; // L: 376 oculusOrbSlowedSpeed = 6; // L: 377 - field730 = 0; // L: 378 + viewportColor = 0; // L: 378 field649 = false; // L: 379 field732 = 0; // L: 380 field843 = false; // L: 381 @@ -5622,8 +5623,8 @@ public final class Client extends GameShell implements Usernamed { if (ServerPacket.field2146 == var1.serverPacket) { // L: 6617 var16 = var3.readInt(); // L: 6618 - if (var16 != field730) { // L: 6619 - field730 = var16; // L: 6620 + if (var16 != viewportColor) { // L: 6619 + viewportColor = var16; // L: 6620 WorldMapCacheName.method664(); // L: 6621 } diff --git a/runescape-client/src/main/java/SecureRandomFuture.java b/runescape-client/src/main/java/SecureRandomFuture.java index c5bd39688f..881e7c5ee6 100644 --- a/runescape-client/src/main/java/SecureRandomFuture.java +++ b/runescape-client/src/main/java/SecureRandomFuture.java @@ -202,7 +202,7 @@ public class SecureRandomFuture { var17 = (Decimator.oculusOrbFocalPointY >> 7) + class41.baseY; // L: 4384 PacketBufferNode var18 = ItemContainer.getPacketBufferNode(ClientPacket.field2269, Client.packetWriter.isaacCipher); // L: 4387 var18.packetBuffer.method5578(var16); // L: 4388 - var18.packetBuffer.method5587(Client.field730); // L: 4389 + var18.packetBuffer.method5587(Client.viewportColor); // L: 4389 var18.packetBuffer.method5739(var17); // L: 4390 var18.packetBuffer.writeByte(var15); // L: 4391 Client.packetWriter.addNode(var18); // L: 4392