Commit Graph
100 Commits
Author SHA1 Message Date
Adam 13ecfc0a9e gpu: add sync mode config
This allows the additional OFF mode which has the client manage its own
frame rate target without the use of vsync. On lower end systems which
have a hard time delivering a frame in the vsync interval this can give
a noticible performance improvement since it doesn't stall the cpu
waiting for the next vblank when a frame is skipped
2021-11-14 17:33:01 -05:00
AdamandJordan Atwood 1362af414a chat filter: Ignore character accents for matching
This lets plain latin-character filters to match messages with accents
and diacritics which are not easily typed on all keyboard layouts.

Co-authored-by: Jordan Atwood <jordan.atwood423@gmail.com>
2021-11-13 10:15:42 -05:00
Adam 67f7e7f488 clues test: remove unnecessary stubbing 2021-11-12 20:02:42 -05:00
Adam 706b9bdba0 clues: remove unnecessary item array copy
The array returned by getItems() is always a new array and so does not require copying
2021-11-12 09:17:13 -05:00
Adam 020d26ce7f Revert "crowdsourcing: Add varbit crowdsourcing (#13212)"
This reverts commit 685ec4524e.
2021-11-11 10:00:59 -05:00
Adam 70d916af52 banktags: remove setBankScroll event
This hasn't worked in awhile since it was assining the scroll value to the
wrong variable. Now we are computing the scroll in onScriptPreFixed for
[proc,bankmain_finishbuilding], so it is no longer necessary here.
2021-11-10 21:38:29 -05:00
Adam c8ec004b7a banktags: improve bank scrollbar updates
With tag tab tab or "Remove tab separators", the scrollbar height needs to be
adjusted to account for either many tag tabs (which requires scrolling to see)
or the hiding of the tab separators. This is because we artifically filter the
bank results without keeping the bank in searching mode, causing the vanilla
code which usually computes the scroll height to be incorrect.

The existing code does this by manually invoking [proc,update_scrollbar] later
with the recomputed scroll height. Now that invokeLater runs next tick and not
next frame, this leaves several frames with the scrollbar the incorrect size.

The desired scroll height is passed to [proc,bankmain_finishbuilding] in
argument int12, so instead we recompute the scroll height and overwrite the
script argument prior to execution.
2021-11-10 21:38:29 -05:00
Adam f71397f3f1 banktags: remove extra space in chatbox prompt 2021-11-10 21:38:29 -05:00
Adam 8ebef03e4d opponent info: use long npc name if available
This name is used on the in game hd hud (eg "Baby Muttadile" instead of "Muttadile")
2021-11-09 16:55:54 -05:00
Adam 7b6074f0f8 opponent info: hide overlay if hp hud is active 2021-11-09 16:23:19 -05:00
Adam 8803034721 gpu: enable adaptive vsync
From the opengl wiki:

Recent GL drivers implement a new WGL/GLX extension called EXT_swap_control_tear.
This extension brings "adaptive vsync" as featured in modern gaming consoles to the PC.

Adaptive vsync enables v-blank synchronisation when the frame rate is higher than the
sync rate, but disables synchronisation when the frame rate drops below the sync rate.
Disabling the synchronisation on low frame rates prevents the common problem where the
frame rate syncs to a integer fraction of the screen's refresh rate in a complex scene.

If the EXT_swap_control_tear extension is not supported, JOGL uses the absolute value
as the swap interval, 1, the same as before.
2021-11-09 15:37:24 -05:00
Adam 554ed2d4d4 gpu: initialize targetBufferOffset on startup 2021-11-07 18:01:36 -05:00
Adam 94e2627697 gpu: update suppressed warnings 2021-11-05 11:18:25 -04:00
Adam 59308db50b gpu: store and use previous viewport's offsets for each frame
Shortly after logging in there several frames without a tli, and so no scene is
rendered on them. Since we glClear the entire buffer each frame and re-render
the most recent scene draw to emulate the vanilla effect of not painting over
the viewport, the viewport offset x/y values at the time we draw the frame may
be -1 due to that frame not having the scene rendered. Store the viewport
offsets at the time of the most recent scene draw and use them for each
subsequent frame.
2021-11-04 15:42:33 -04:00
Adam 099221993a music: add option to mute ambient sound effects 2021-11-02 14:44:44 -04:00
Adam 63034431c0 api: add ambient sound effect 2021-11-02 14:44:44 -04:00
Adam 2eb2cdc328 cache: rename objectdefinition ambient sound ids 2021-11-02 14:44:44 -04:00
Adam c61d0c8a2f client: remove rogues' den plugin
An improved version of this plugin has been made available on the
pluginhub instead.
2021-11-02 14:27:18 -04:00
Adam 9065b2a792 clues: capitalize fairy ring BKP 2021-11-01 15:04:30 -04:00
Adam 87e51bd960 bank: block bank pin going to chatbox
With invokeLater() now running next tick instead of next frame, with uncapped fps there can be several frames with the bank pin visible in the chatbox. This blocks the keyboard input on this tick, preventing having to clear the chatbox later.
2021-11-01 14:28:50 -04:00
Adam f21596bc47 barrows: fix brothers slain overlay flashing
This was assuming there is always a tick between each frame to unhide the barrows potential
2021-10-28 19:03:17 -04:00
Adam 3c7339771d gpu: clear target buffer offset on login screen
This prevents the previous scene from rendering during loading prior to the welcome screen being opened
2021-10-28 19:03:17 -04:00
Adam ec5179dc77 music plugin: fix tooltips with uncapped fps 2021-10-28 19:02:56 -04:00
Adam f6929172fc camera plugin: fix tooltips with uncapped fps 2021-10-28 19:02:56 -04:00
Adam a96a6a5a40 api: add on tick callback 2021-10-28 19:02:56 -04:00
Adam 991e6e5aeb fpx config: increase fps max 2021-10-28 15:31:21 -04:00
Adam 6cad150f3a gpu: add uncap fps option 2021-10-28 14:27:46 -04:00
Adam 6ad7ba1799 client loader: add new jagex certificate 2021-10-28 14:24:13 -04:00
Adam ed2594a055 Bump to 1.8.0-SNAPSHOT 2021-10-28 13:59:59 -04:00
Adam da58903376 skillcalc: use fixed point arithmetic for xp calculations 2021-10-28 10:11:10 -04:00
Adam 6f5735be07 gpu: fix drawing loading and connection lost boxes 2021-10-27 20:15:27 -04:00
Adam 1443d5a34d Add runelite_callback opcode to cache
Also move the RL Instructions from the script assembler to cache too, so it can be reused by the updater. The api Opcodes class has no use in the public api and so is removed.
2021-10-27 20:13:01 -04:00
Adam 9e8551d832 skillcalc: use double precision for xp
Doing the xp calculation with floats and then converting it to double is
less precise, and causes minor errors that accumulate with very large xp
ranges
2021-10-27 17:03:02 -04:00
Adam 8197de776f skillcalc: round bonus xp to nearest tenth
XP cannot be more precise than a 10th of an xp. This was compute more precise xp values and when applied over many actions caused the computed actions to be incorrect
2021-10-26 22:00:59 -04:00
Adam b9191114fa skillcalc: only recompute xp bonus values once when bonus changes 2021-10-26 22:00:59 -04:00
Adam 4187db4059 prayer: fix sanfew prayer dose indicator
The plugin was incorectly computing the amount of prayer sanfews restore
2021-10-26 14:53:19 -04:00
Adam de810fb056 inventoryid: add gim shared storage inventories 2021-10-26 12:03:35 -04:00
Adam 983d82671c banktags: fix active tag being applied to shared storage 2021-10-26 11:59:17 -04:00
Adam 455e75b7bc widget overlay: update gwd kc position 2021-10-24 16:56:48 -04:00
Adam 2f613fa300 api: add clan id to clan channel changed event 2021-10-24 16:03:22 -04:00
Adam 46d4247f8e wiki: fix positioning wiki icon with wiki entity lookup off
When the wiki entity lookup option is off the parent layer isn't
positioned at all, causing the resulting wiki icon we create to be
incorrectly positioned.
2021-10-18 18:51:01 -04:00
Adam 3180576350 hiscore: simplify lookup menu option add logic 2021-10-17 20:38:27 -04:00
Adam 37608d1e64 gpu: improve model visible check
This method checks if the model is on screen by projecting points at the model
extremes to screen and seeing if they are in the viewport bounds.

When doing this, it offsets the model height for the top of the viewport check,
but does not offset the bottom of the model for the bottom viewport check. This
offsets the bottom height to the model y position before doing this check,
which improves the test on models which are beneath the tile they are placed on.
This is most noticible in the Karamja dungeon and Hydra dungeon which has
objects for the lava instead of tiles, and they are placed at y=0 with some or
all of the model being below that.
2021-10-15 17:26:27 -04:00
Adam 5dd1132d07 api: import model bottomY
Additionally, model height is already defined in the Renderable interface, and so isn't needed here
2021-10-15 17:26:27 -04:00
Adam 9dc779a5ef api: add getItemContainer(int) 2021-10-15 17:15:04 -04:00
Adam 870933985d game event manager: send itemcontainer change events for all containers 2021-10-15 17:15:04 -04:00
Adam 5b0acccbc7 api: make HashTable implement iterable 2021-10-15 17:15:04 -04:00
Adam 59e65877dd hiscore: switch to league hiscores 2021-10-05 14:59:18 -04:00
Adam c16172e508 api: add widget classes to runtime exclusions 2021-10-05 12:55:38 -04:00
38f1d2e71f ui: recompute minimum size after frame restore
Without this, the minimum size will be the same size as was prior to
maximizing the frame. If the side bar or panel is opened or closed when
maximized this can cause the minimum size to be incorrect after a
restore.

Co-authored-by: Mark Koester <mark.koester1@gmail.com>
Co-authored-by: Jeremy Plsek <jeremyplsek@gmail.com>
2021-10-04 12:51:18 -04:00
AdamandJason Barr 5fc784f082 item charges: fix rof tracking with varrock platebody
When the varrock armour effect triggers it will smelt two bars at once,
using two charges, unless there is only one ore remaining where it will
use only one charge.

Co-authored-by: Jason Barr <58792686+JBarr2710@users.noreply.github.com>
2021-10-03 22:49:42 -04:00
Adam 4ca3db6358 Fix ground marker minimap overlay position
The ground marker minimap overlay gets a local point for the tile to mark from fromWorld()
and passes it to localToMinimap() - but because the adjustment of -1, when the player position
is subtracted from it to compute the minimap location it causes the computed position to be off
by a full tile.

Additionally, drawRect() width and height is inclusive so the width/height must be subtracted by 1
2021-10-01 19:09:03 -04:00
Adam e60ce99081 spec counter: add Dinh's bulwark 2021-09-30 17:47:09 -04:00
Adam 8d537cabf1 api: add clan ids and accessors 2021-09-30 16:37:35 -04:00
Adam b6316b4772 api: move Favour to achievementdiary plugin 2021-09-29 10:23:36 -04:00
Adam 87dda2d54e api: mark runtime classes as final 2021-09-28 20:19:01 -04:00
Adam 31007d3437 api: add runtime jar
This jar excludes classes we know can never be referenced at runtime, which currently takes the resulting jar from 1.1MB to .3MB
2021-09-28 20:18:40 -04:00
Adam 8c2d7bd2f4 perspective: refactor localToCanvas
Use variable namings from modelToCanvas
2021-09-22 15:07:41 -04:00
Adam 3d79ab60a2 perspective: add gpu projection for modelToCanvas
GPU uses an alternative projection to avoid vertex snapping. Usually
this doesn't matter much, and in the worst case causes the discrepancy
to be only a few pixels, but with the model outline feature it causes
the outlines to be noticibly off when GPU is enabled.

This adds a second model-to-canvas method using the alternative
projection and uses it when GPU is enabled.
2021-09-22 15:01:41 -04:00
Adam 4cab29cf2f api: remove cachedModels2 and nodecache setters
This is being moved internally since it benefits areas like the farming guild even with gpu off
2021-09-21 11:09:51 -04:00
Adam 642677d6e2 http-service: assign name to scheduler thread 2021-09-21 11:02:15 -04:00
Adam 1505f34ace Update okhttp to 3.14.9 2021-09-21 10:58:56 -04:00
Adam fc183c13af xp tracker overlay: treat counter=off progressbar=off as hidden
If the xptracker is shown, but both counter and progress bar set to off, the xp tracker layer is not actually hidden but only has hidden children. This causes the overlay renderer to layout things around the invisible xptracker. Avoid this by checking the vars for the xptracker to see if it is hidden or not.
2021-09-19 15:44:49 -04:00
Adam df231d1ff9 xtea: skip unknown map regions
The client will include keys 0,0,0,0 for unknown map regions, which should just be skipped over instead of failing the entire request
2021-09-16 17:12:49 -04:00
Adam 4e0211b490 ground markers: add fill opacity config 2021-09-14 11:40:57 -04:00
Adam e56562f54a api: add scene tile shapes, underlay, and overlay ids 2021-09-12 10:01:06 -04:00
Adam 37654452c3 api: add model vertex normals 2021-09-12 10:01:00 -04:00
Adam a231192578 client: update jna to 5.9.0
This is required for macos aarch64 support
2021-09-11 11:05:36 -04:00
Adam 3c5f812331 npc overlay: clear highlighted npcs on logout
Despawn events don't fire for npcs on logout, copied from the npc highlight plugin
2021-09-11 10:53:05 -04:00
Adam 9cd1cbcea0 music: check game state before applying sliders on startup
This accesses vars, which typically cannot be accessed when not logged in, or in early startup
2021-09-11 00:03:21 -04:00
Adam 9cadc62eba widget overlay: correct raids points overlay position 2021-09-10 18:05:25 -04:00
Adam c5586123c8 npc overlay: set lower priority on npc change and despawn handlers
Similar to spawn, these need to run after plugins for most of the highlight functions to work correctly
2021-09-09 20:38:03 -04:00
Adam 342e0169e3 npc minimap overlay: use unmodified highlight color
The darker() is originally from the npc indicators minimap overlay, but other plugins now using this such as impling plugin do not expect this.

If we require the minimap colors to be different later we should add a separate property specifically for it.
2021-09-09 12:44:43 -04:00
Adam 178638b73b external plugins: require assertions when loading builtin plugins 2021-09-07 14:26:06 -04:00
Adam 58fb78ff00 runecraft: use npc overlay service 2021-09-06 21:45:15 -04:00
Adam 4a9b650249 corp: use npc overlay service 2021-09-06 21:45:14 -04:00
Adam c52667a5cc Move npc highlight overlay to core
This allows the other plugins which depend on the npc overaly to work
when npc highlight plugin is off, while still letting them use the
consistent highlight style of the central overlay.
2021-09-06 21:45:14 -04:00
Adam 99100979df npc highlight: fix npe rendering minimap names on npcs with no name 2021-09-06 21:41:33 -04:00
Adam 97095b41f8 ui: force heavyweight tooltips on macos
Lightweight components do not render correctly over AWT canvases on
MacOS. The popup factory API to override this is not available on 8, so
add an 11-specific popup factory to override it by using a multi-release
jar.
2021-09-05 16:56:01 -04:00
Adam 2cdd1be7d8 pom: remove source/target configuration on maven-compiler-plugin
On Java 11, which we require for building, the compiler accepts
--release 8 and no longer requires -source or -target, so these are
unnecessary
2021-09-05 16:10:37 -04:00
Adam cdbb0a3aa7 api: make getCanvasTilePoly work on multi-tile npcs 2021-09-05 11:49:43 -04:00
Adam adf0d75be8 wiki: move icon to match vanilla position 2021-09-04 12:32:21 -04:00
Adam ef3622c05a api: flatten model uvs
This drastically reduces the number of allocated float arrays on the heap just by flattening the uvs into a single array per model
2021-09-03 15:04:08 -04:00
Adam a3d33bee0d logback: add duplicate exception filter
This only applies to marked logged messages for overlay rendering and event subscribers, which are common sources of exceptions in 3rd party plugins
2021-09-03 11:45:06 -04:00
AdamandMax Weber e37292267b use maven's native reproducible build support
Co-authored-by: Max Weber <mii7303@gmail.com>
2021-08-31 10:38:25 -04:00
Adam b42932d581 loot tracker: add world id to loot record for dmmt 2021-08-30 11:05:33 -04:00
Adam a772eebf09 world hopper: bubble up mouse events from activity label
This fixes hopping and mouseover on the activity label not working
2021-08-27 19:59:27 -04:00
Adam 6723fb3205 overlay: only layout widget overlays if the preferred location is set
With the new steam client updates, the client tries to aggressively
move around several of the widget overlay components, including xp
tracker, and several hp bars. This tends to fight with the layouting we
already do with the widgets.

This changes the widgets to only be layouted if the overlay has a
preferred location or position set. Otherwise, it will offset the snap
corner bounds by where the client has positione the widget.

It is still possible to get the client ui to fight the widget overlay by
moving the overlays around manually, but it should no longer happen in
the default positioning of the widgets.
2021-08-27 16:59:26 -04:00
Adam ed5ae02bc3 world hopper: set activity tooltip on world list 2021-08-25 09:15:26 -04:00
Adam 719022c044 Update world types for seasonal deadman 2021-08-25 08:06:40 -04:00
Adam b695ca8689 ge: fix detecting dmmt world type 2021-08-24 18:59:55 -04:00
Adam c3c1222570 chat commands: update to parse new adv log pb counters 2021-08-23 17:03:07 -04:00
Adam e9665f3504 implings plugin: use npc indicators for impling overlay 2021-08-22 16:51:51 -04:00
Adam ec7af70da4 npc indicators: allow plugins to specify highlight styles
After changing the slayer plugin to use npc indicators for the outline
style, some users request being able to set the color of slayer
highlights to be unique in order to identify marked npcs such as
superiors while slaying. This readds the previous target color config
and adds new highlight style options to the slayer plugin.
2021-08-22 16:51:47 -04:00
Adam 442c6105ce chat commands: rename tob story mode to entry mode 2021-08-22 15:33:08 -04:00
Adam 7d89f5a52f xp updater: don't send updates for dmm, leagues, or beta worlds 2021-08-21 18:59:31 -04:00
Adam e9c252e227 chat channel: fix join/leave world hop detection
The ChatPlayers do not implement equals or hashCode, making them
unsuitable as a hashmap key. Instead just use a linked list and compare
the members using the comparable interface.
2021-08-21 15:41:53 -04:00
Adam d0714b5016 api: add type parameter to Comparable 2021-08-21 15:26:12 -04:00
Adam 541e20c592 clientui: fix restoring sidepanel when expanding sidebar
Closing and opening the sidebar when the side panel is collapsed
currently expands the side panel to the most recently opened panel,
even if it was collapsed at the time the sidebar was closed, and also
incorrectly doesn't set the nav button as selected.

This changes the behavior of expanding the sidebar to not open the side
panel if it was not opened at the time the sidebar was closed.
2021-08-17 16:02:55 -04:00
Adam b0b41a612a clientloader: fix loading classes in packages 2021-08-17 15:50:34 -04:00