From 7c56748377f0aa4a796b77a99d3f7bcfc4f844d0 Mon Sep 17 00:00:00 2001 From: Su-Shing Chen Date: Sat, 8 Jun 2019 16:09:50 +1200 Subject: [PATCH 1/7] Sort worlds in world hopper using Guava Use Guava to abstract the world hopper sorting code. This fixes secondary sorting when sorting by activity, e.g. when sorting by "Ping" and then by "Activity". --- .../worldhopper/WorldSwitcherPanel.java | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java index b27f356dac..df32b03ee4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java @@ -24,6 +24,7 @@ */ package net.runelite.client.plugins.worldhopper; +import com.google.common.collect.Ordering; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -33,6 +34,7 @@ import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.function.Function; import javax.swing.JPanel; import javax.swing.SwingUtilities; import lombok.AccessLevel; @@ -159,24 +161,23 @@ class WorldSwitcherPanel extends PluginPanel switch (orderIndex) { case PING: - return Integer.compare(r1.getPing(), r2.getPing()) * (ascendingOrder ? 1 : -1); + return getCompareValue(r1, r2, WorldTableRow::getPing); case WORLD: - return Integer.compare(r1.getWorld().getId(), r2.getWorld().getId()) * (ascendingOrder ? 1 : -1); + return getCompareValue(r1, r2, row -> row.getWorld().getId()); case PLAYERS: - return Integer.compare(r1.getUpdatedPlayerCount(), r2.getUpdatedPlayerCount()) * (ascendingOrder ? 1 : -1); + return getCompareValue(r1, r2, WorldTableRow::getUpdatedPlayerCount); case ACTIVITY: - return r1.getWorld().getActivity().compareTo(r2.getWorld().getActivity()) * -1 * (ascendingOrder ? 1 : -1); + // Leave empty activity worlds on the bottom of the list + return getCompareValue(r1, r2, row -> + { + String activity = row.getWorld().getActivity(); + return !activity.equals("-") ? activity : null; + }); default: return 0; } }); - // Leave empty activity worlds on the bottom of the list - if (orderIndex == WorldOrder.ACTIVITY) - { - rows.sort((r1, r2) -> r1.getWorld().getActivity().equals("-") ? 1 : -1); - } - rows.sort((r1, r2) -> { boolean b1 = plugin.isFavorite(r1.getWorld()); @@ -197,6 +198,17 @@ class WorldSwitcherPanel extends PluginPanel listContainer.repaint(); } + private int getCompareValue(WorldTableRow row1, WorldTableRow row2, Function compareByFn) + { + Ordering ordering = Ordering.natural(); + if (!ascendingOrder) + { + ordering = ordering.reverse(); + } + ordering = ordering.nullsLast(); + return ordering.compare(compareByFn.apply(row1), compareByFn.apply(row2)); + } + void updateFavoriteMenu(int world, boolean favorite) { for (WorldTableRow row : rows) From 799158bacd6c55ec7658d76b0f1e7e835833cc58 Mon Sep 17 00:00:00 2001 From: Su-Shing Chen Date: Sat, 8 Jun 2019 16:11:41 +1200 Subject: [PATCH 2/7] Put worlds with unknown ping at the bottom of the world hopper list Closes #8176 --- .../client/plugins/worldhopper/WorldSwitcherPanel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java index df32b03ee4..937a9e74d2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java @@ -161,7 +161,12 @@ class WorldSwitcherPanel extends PluginPanel switch (orderIndex) { case PING: - return getCompareValue(r1, r2, WorldTableRow::getPing); + // Leave worlds with unknown ping at the bottom + return getCompareValue(r1, r2, row -> + { + int ping = row.getPing(); + return ping > 0 ? ping : null; + }); case WORLD: return getCompareValue(r1, r2, row -> row.getWorld().getId()); case PLAYERS: From d72a1b9456ac2757c7012a6f2b35c679e3f490bb Mon Sep 17 00:00:00 2001 From: Max Weber Date: Wed, 3 Jul 2019 00:48:18 -0600 Subject: [PATCH 3/7] runelite-client: Don't try to contain to screen when contain is off Java's GraphicsConfiguration::getBounds() is completely nonfunctional for me, returning nearly random values, which causes the our window to move itself to random places, often outside of my displays' bounds --- .../runelite/client/ui/ContainableFrame.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java index 0748731c9a..fdfca6e89c 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java @@ -113,23 +113,27 @@ public class ContainableFrame extends JFrame if (forcedWidthIncrease || expandResizeType == ExpandResizeType.KEEP_GAME_SIZE) { final int newWindowWidth = getWidth() + increment; - final Rectangle screenBounds = getGraphicsConfiguration().getBounds(); - final boolean wouldExpandThroughEdge = getX() + newWindowWidth > screenBounds.getX() + screenBounds.getWidth(); int newWindowX = getX(); - if (wouldExpandThroughEdge) + if (containedInScreen) { - if (!isFrameCloseToRightEdge() || isFrameCloseToLeftEdge()) + final Rectangle screenBounds = getGraphicsConfiguration().getBounds(); + final boolean wouldExpandThroughEdge = getX() + newWindowWidth > screenBounds.getX() + screenBounds.getWidth(); + + if (wouldExpandThroughEdge) { - // Move the window to the edge - newWindowX = (int)(screenBounds.getX() + screenBounds.getWidth()) - getWidth(); + if (!isFrameCloseToRightEdge() || isFrameCloseToLeftEdge()) + { + // Move the window to the edge + newWindowX = (int) (screenBounds.getX() + screenBounds.getWidth()) - getWidth(); + } + + // Expand the window to the left as the user probably don't want the + // window to go through the screen + newWindowX -= increment; + + expandedClientOppositeDirection = true; } - - // Expand the window to the left as the user probably don't want the - // window to go through the screen - newWindowX -= increment; - - expandedClientOppositeDirection = true; } setBounds(newWindowX, getY(), newWindowWidth, getHeight()); From 3da044ea3a25dbdc26dd10772f49a535f042fcdd Mon Sep 17 00:00:00 2001 From: Damen Date: Fri, 5 Jul 2019 14:25:22 -0400 Subject: [PATCH 4/7] Add Dragonfire Shield timer to timers plugin (#9234) --- .../src/main/java/net/runelite/api/AnimationID.java | 1 + .../net/runelite/client/plugins/timers/GameTimer.java | 3 ++- .../runelite/client/plugins/timers/TimersConfig.java | 10 ++++++++++ .../runelite/client/plugins/timers/TimersPlugin.java | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/runelite-api/src/main/java/net/runelite/api/AnimationID.java b/runelite-api/src/main/java/net/runelite/api/AnimationID.java index 7aa4a7f8a3..316feda5d0 100644 --- a/runelite-api/src/main/java/net/runelite/api/AnimationID.java +++ b/runelite-api/src/main/java/net/runelite/api/AnimationID.java @@ -155,6 +155,7 @@ public final class AnimationID public static final int SAND_COLLECTION = 895; public static final int PISCARILIUS_CRANE_REPAIR = 7199; public static final int HOME_MAKE_TABLET = 4067; + public static final int DRAGONFIRE_SHIELD_SPECIAL = 6696; // NPC animations public static final int TZTOK_JAD_MAGIC_ATTACK = 2656; 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 529103d204..40a6c97ecb 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 @@ -78,7 +78,8 @@ enum GameTimer 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), - MINIGAME_TELEPORT(SpriteID.TAB_QUESTS_RED_MINIGAMES, GameTimerImageType.SPRITE, "Minigame Teleport", 20, ChronoUnit.MINUTES); + MINIGAME_TELEPORT(SpriteID.TAB_QUESTS_RED_MINIGAMES, GameTimerImageType.SPRITE, "Minigame Teleport", 20, ChronoUnit.MINUTES), + DRAGON_FIRE_SHIELD(ItemID.DRAGONFIRE_SHIELD_11284, GameTimerImageType.ITEM, "Dragonfire Shield Special", 2, ChronoUnit.MINUTES); @Getter private final Duration duration; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java index dd42787d73..eef5c4d613 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java @@ -200,4 +200,14 @@ public interface TimersConfig extends Config { return true; } + + @ConfigItem( + keyName = "showDfsSpecial", + name = "Dragonfire Shield special timer", + description = "Configures whether the special attack cooldown timer for the Dragonfire Shield is displayed" + ) + default boolean showDFSSpecial() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index d8d4c07cee..a1b2a04f1c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -706,6 +706,11 @@ public class TimersPlugin extends Plugin } } + if (config.showDFSSpecial() && lastAnimation == AnimationID.DRAGONFIRE_SHIELD_SPECIAL) + { + createGameTimer(DRAGON_FIRE_SHIELD); + } + lastAnimation = client.getLocalPlayer().getAnimation(); } From e7bb1c1e07444b0de4ae1a1310a4b1a9b8329831 Mon Sep 17 00:00:00 2001 From: SomeBall-1 Date: Fri, 5 Jul 2019 11:26:17 -0700 Subject: [PATCH 5/7] Add option to swap Talk-to with Enchant for Eluned (#9183) --- .../menuentryswapper/MenuEntrySwapperConfig.java | 10 ++++++++++ .../menuentryswapper/MenuEntrySwapperPlugin.java | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java index 8d9ee74b8a..8fa26b7f2f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java @@ -291,4 +291,14 @@ public interface MenuEntrySwapperConfig extends Config { return true; } + + @ConfigItem( + keyName = "swapEnchant", + name = "Enchant", + description = "Swap Talk-to with Enchant for Eluned" + ) + default boolean swapEnchant() + { + return true; + } } 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 a443fe0800..264a7b4105 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 @@ -455,6 +455,11 @@ public class MenuEntrySwapperPlugin extends Plugin { swap("quick-travel", option, target, true); } + + if (config.swapEnchant()) + { + swap("enchant", option, target, true); + } } else if (config.swapTravel() && option.equals("pass") && target.equals("energy barrier")) { From 83660849cba6cc1bc5e120499a4a9c5ba0cce394 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 6 Jul 2019 19:12:40 -0400 Subject: [PATCH 6/7] Properly capitalize 'Brother Kojo' in Watchtower clue scroll (#9297) --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index c2654b0e2b..4265b0d801 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -138,7 +138,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("46 is my number. My body is the colour of burnt orange and crawls among those with eight. Three mouths I have, yet I cannot eat. My blinking blue eye hides my grave.", new WorldPoint(3170, 3885, 0), "Sapphire respawn in the Spider's Nest, lvl 46 Wilderness. Dig under the sapphire spawn."), new CrypticClue("Green is the colour of my death as the winter-guise, I swoop towards the ground.", new WorldPoint(2780, 3783, 0), "Players need to slide down to where Trollweiss grows on Trollweiss Mountain."), new CrypticClue("Talk to a party-goer in Falador.", "Lucy", new WorldPoint(3046, 3382, 0), "Lucy is the bartender on the first floor of the party room."), - new CrypticClue("He knows just how easy it is to lose track of time.", "Brother Kojo", new WorldPoint(2570, 3250, 0), "Speak to brother Kojo in the Clock Tower. Answer: 22"), + new CrypticClue("He knows just how easy it is to lose track of time.", "Brother Kojo", new WorldPoint(2570, 3250, 0), "Speak to Brother Kojo in the Clock Tower. Answer: 22"), new CrypticClue("A great view - watch the rapidly drying hides get splashed. Check the box you are sitting on.", BOXES, new WorldPoint(2523, 3493, 1), "Almera's House north of Baxtorian Falls, search boxes on the first floor."), new CrypticClue("Search the Coffin in Edgeville.", COFFIN, new WorldPoint(3091, 3477, 0), "Search the coffin located by the Wilderness teleport lever."), new CrypticClue("When no weapons are at hand, then is the time to reflect. In Saradomin's name, redemption draws closer...", DRAWERS_350, new WorldPoint(2818, 3351, 0), "On Entrana, search the southern drawer in the house with the cooking range."), From 05c6743cb03c08a36b0e51c6bdb4a68dde367b19 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 7 Jul 2019 18:22:06 -0400 Subject: [PATCH 7/7] Remove runescape-api and mixins This code is used by internal tooling to build the client patch, which is already closed source, and is not directly shipped as a dependency. Outside contributions to it are rare due to the lack of build tools, and it is primarily being abused by others. As such, I no longer wish to release further changes to it under BSD-2. --- README.md | 2 - pom.xml | 2 - runelite-mixins/pom.xml | 91 - .../java/net/runelite/api/mixins/Copy.java | 48 - .../net/runelite/api/mixins/FieldHook.java | 41 - .../java/net/runelite/api/mixins/Inject.java | 37 - .../net/runelite/api/mixins/MethodHook.java | 41 - .../java/net/runelite/api/mixins/Mixin.java | 44 - .../java/net/runelite/api/mixins/Mixins.java | 37 - .../java/net/runelite/api/mixins/Replace.java | 47 - .../java/net/runelite/api/mixins/Shadow.java | 37 - .../java/net/runelite/mixins/CameraMixin.java | 112 -- .../net/runelite/mixins/ClickboxMixin.java | 320 ---- .../mixins/EntityHiderBridgeMixin.java | 143 -- .../net/runelite/mixins/EntityHiderMixin.java | 172 -- .../runelite/mixins/GraphicsObjectMixin.java | 54 - .../java/net/runelite/mixins/MenuMixin.java | 112 -- .../net/runelite/mixins/MinimapMixin.java | 101 -- .../mixins/ProcessClientErrorMixin.java | 74 - .../net/runelite/mixins/RSActorMixin.java | 286 --- .../mixins/RSChatLineBufferMixin.java | 72 - .../mixins/RSClanMemberManagerMixin.java | 71 - .../runelite/mixins/RSClanMemberMixin.java | 48 - .../net/runelite/mixins/RSClientMixin.java | 1542 ----------------- .../mixins/RSDecorativeObjectMixin.java | 167 -- .../runelite/mixins/RSDynamicObjectMixin.java | 81 - .../java/net/runelite/mixins/RSEnumMixin.java | 75 - .../runelite/mixins/RSFriendManagerMixin.java | 48 - .../net/runelite/mixins/RSFriendMixin.java | 49 - .../runelite/mixins/RSGameCanvasMixin.java | 93 - .../runelite/mixins/RSGameEngineMixin.java | 100 -- .../runelite/mixins/RSGameObjectMixin.java | 110 -- .../mixins/RSGrandExchangeOfferMixin.java | 108 -- .../runelite/mixins/RSGroundObjectMixin.java | 85 - .../net/runelite/mixins/RSHashTableMixin.java | 63 - .../net/runelite/mixins/RSHealthBarMixin.java | 50 - .../net/runelite/mixins/RSIgnoreMixin.java | 49 - .../runelite/mixins/RSIndexDataBaseMixin.java | 139 -- .../mixins/RSItemCompositionMixin.java | 92 - .../runelite/mixins/RSItemContainerMixin.java | 82 - .../net/runelite/mixins/RSItemLayerMixin.java | 58 - .../java/net/runelite/mixins/RSItemMixin.java | 125 -- .../mixins/RSKeyFocusListenerMixin.java | 95 - .../mixins/RSMainBufferProviderMixin.java | 89 - .../runelite/mixins/RSMessageNodeMixin.java | 97 -- .../net/runelite/mixins/RSModelDataMixin.java | 202 --- .../net/runelite/mixins/RSModelMixin.java | 437 ----- .../runelite/mixins/RSMouseInputMixin.java | 209 --- .../mixins/RSMouseWheelHandlerMixin.java | 54 - .../java/net/runelite/mixins/RSNPCMixin.java | 192 -- .../mixins/RSNameableContainerMixin.java | 72 - .../net/runelite/mixins/RSNameableMixin.java | 48 - .../java/net/runelite/mixins/RSNodeMixin.java | 46 - .../mixins/RSNpcCompositionMixin.java | 74 - .../mixins/RSPlayerCompositionMixin.java | 58 - .../net/runelite/mixins/RSPlayerMixin.java | 264 --- .../runelite/mixins/RSProjectileMixin.java | 72 - .../net/runelite/mixins/RSSceneMixin.java | 751 -------- .../mixins/RSSceneTileModelMixin.java | 84 - .../mixins/RSSceneTilePaintMixin.java | 84 - .../net/runelite/mixins/RSSequenceMixin.java | 243 --- .../runelite/mixins/RSSpritePixelsMixin.java | 136 -- .../net/runelite/mixins/RSTextureMixin.java | 92 - .../mixins/RSTextureProviderMixin.java | 58 - .../java/net/runelite/mixins/RSTileMixin.java | 565 ------ .../net/runelite/mixins/RSVarcsMixin.java | 31 - .../runelite/mixins/RSWallObjectMixin.java | 124 -- .../net/runelite/mixins/RSWidgetMixin.java | 584 ------- .../net/runelite/mixins/RSWorldMixin.java | 69 - .../runelite/mixins/Rasterizer2DMixin.java | 244 --- .../net/runelite/mixins/ScriptVMMixin.java | 156 -- .../net/runelite/mixins/SoundEffectMixin.java | 148 -- .../java/net/runelite/mixins/SpriteMixin.java | 80 - .../mixins/StretchedModeMaxSizeMixin.java | 76 - .../runelite/mixins/StretchedModeMixin.java | 216 --- .../net/runelite/mixins/TileObjectMixin.java | 113 -- .../java/net/runelite/mixins/VarbitMixin.java | 158 -- .../runelite/mixins/WidgetSpriteMixin.java | 64 - .../runelite/mixins/WorldHoppingMixin.java | 52 - .../runelite/mixins/WorldMapManagerMixin.java | 58 - .../net/runelite/mixins/WorldMapMixin.java | 53 - .../net/runelite/mixins/RSSceneMixinTest.java | 53 - runescape-api/pom.xml | 46 - .../java/net/runelite/mapping/Construct.java | 51 - .../java/net/runelite/mapping/Import.java | 40 - .../java/net/runelite/rs/api/RSActor.java | 127 -- .../net/runelite/rs/api/RSAudioTaskNode.java | 33 - .../runelite/rs/api/RSAudioTaskNodeQueue.java | 33 - .../java/net/runelite/rs/api/RSBuffer.java | 36 - .../net/runelite/rs/api/RSBufferProvider.java | 46 - .../net/runelite/rs/api/RSCacheableNode.java | 33 - .../net/runelite/rs/api/RSChatLineBuffer.java | 45 - .../net/runelite/rs/api/RSChatPlayer.java | 38 - .../net/runelite/rs/api/RSClanMember.java | 31 - .../runelite/rs/api/RSClanMemberManager.java | 36 - .../java/net/runelite/rs/api/RSClassInfo.java | 41 - .../java/net/runelite/rs/api/RSClient.java | 1016 ----------- .../net/runelite/rs/api/RSCollisionData.java | 34 - .../net/runelite/rs/api/RSCombatInfo1.java | 36 - .../net/runelite/rs/api/RSCombatInfoList.java | 36 - .../rs/api/RSCombatInfoListHolder.java | 36 - .../runelite/rs/api/RSDecorativeObject.java | 60 - .../java/net/runelite/rs/api/RSDeque.java | 36 - .../net/runelite/rs/api/RSDynamicObject.java | 43 - .../main/java/net/runelite/rs/api/RSEnum.java | 49 - .../net/runelite/rs/api/RSFileOnDisk.java | 40 - .../main/java/net/runelite/rs/api/RSFont.java | 30 - .../net/runelite/rs/api/RSFontTypeFace.java | 42 - .../java/net/runelite/rs/api/RSFrame.java | 51 - .../java/net/runelite/rs/api/RSFrameMap.java | 39 - .../java/net/runelite/rs/api/RSFrames.java | 33 - .../java/net/runelite/rs/api/RSFriend.java | 31 - .../runelite/rs/api/RSFriendContainer.java | 29 - .../net/runelite/rs/api/RSFriendManager.java | 40 - .../net/runelite/rs/api/RSGameCanvas.java | 29 - .../net/runelite/rs/api/RSGameEngine.java | 60 - .../net/runelite/rs/api/RSGameObject.java | 70 - .../runelite/rs/api/RSGrandExchangeOffer.java | 56 - .../net/runelite/rs/api/RSGraphicsObject.java | 53 - .../net/runelite/rs/api/RSGroundObject.java | 47 - .../java/net/runelite/rs/api/RSHashTable.java | 41 - .../java/net/runelite/rs/api/RSHealthBar.java | 50 - .../java/net/runelite/rs/api/RSIgnore.java | 31 - .../runelite/rs/api/RSIgnoreContainer.java | 29 - .../java/net/runelite/rs/api/RSIndexData.java | 33 - .../net/runelite/rs/api/RSIndexDataBase.java | 34 - .../net/runelite/rs/api/RSIndexedSprite.java | 95 - .../net/runelite/rs/api/RSIntegerNode.java | 39 - .../main/java/net/runelite/rs/api/RSItem.java | 60 - .../runelite/rs/api/RSItemComposition.java | 92 - .../net/runelite/rs/api/RSItemContainer.java | 37 - .../java/net/runelite/rs/api/RSItemLayer.java | 58 - .../runelite/rs/api/RSIterableHashTable.java | 35 - .../net/runelite/rs/api/RSJagexLoginType.java | 30 - .../runelite/rs/api/RSKeyFocusListener.java | 33 - .../runelite/rs/api/RSMainBufferProvider.java | 43 - .../runelite/rs/api/RSMapElementConfig.java | 35 - .../net/runelite/rs/api/RSMessageNode.java | 62 - .../java/net/runelite/rs/api/RSModel.java | 173 -- .../java/net/runelite/rs/api/RSModelData.java | 69 - .../net/runelite/rs/api/RSMouseInput.java | 33 - .../runelite/rs/api/RSMouseWheelHandler.java | 31 - .../main/java/net/runelite/rs/api/RSNPC.java | 42 - .../net/runelite/rs/api/RSNPCComposition.java | 78 - .../main/java/net/runelite/rs/api/RSName.java | 33 - .../java/net/runelite/rs/api/RSNameable.java | 37 - .../runelite/rs/api/RSNameableContainer.java | 55 - .../main/java/net/runelite/rs/api/RSNode.java | 51 - .../java/net/runelite/rs/api/RSNodeCache.java | 46 - .../runelite/rs/api/RSObjectComposition.java | 59 - .../net/runelite/rs/api/RSPacketBuffer.java | 31 - .../java/net/runelite/rs/api/RSPlayer.java | 66 - .../runelite/rs/api/RSPlayerComposition.java | 49 - .../net/runelite/rs/api/RSPreferences.java | 39 - .../net/runelite/rs/api/RSProjectile.java | 99 -- .../net/runelite/rs/api/RSRawAudioNode.java | 33 - .../net/runelite/rs/api/RSRenderOverview.java | 77 - .../net/runelite/rs/api/RSRenderable.java | 46 - .../java/net/runelite/rs/api/RSResampler.java | 29 - .../net/runelite/rs/api/RSRunException.java | 33 - .../java/net/runelite/rs/api/RSScene.java | 63 - .../net/runelite/rs/api/RSSceneTileModel.java | 87 - .../net/runelite/rs/api/RSSceneTilePaint.java | 55 - .../java/net/runelite/rs/api/RSScript.java | 39 - .../net/runelite/rs/api/RSScriptEvent.java | 47 - .../java/net/runelite/rs/api/RSSequence.java | 51 - .../net/runelite/rs/api/RSSoundEffect.java | 33 - .../java/net/runelite/rs/api/RSSprite.java | 29 - .../net/runelite/rs/api/RSSpritePixels.java | 62 - .../net/runelite/rs/api/RSTaskDataNode.java | 29 - .../java/net/runelite/rs/api/RSTexture.java | 47 - .../runelite/rs/api/RSTextureProvider.java | 53 - .../main/java/net/runelite/rs/api/RSTile.java | 108 -- .../java/net/runelite/rs/api/RSVarbit.java | 39 - .../java/net/runelite/rs/api/RSVarcs.java | 34 - .../net/runelite/rs/api/RSWallObject.java | 65 - .../java/net/runelite/rs/api/RSWidget.java | 474 ----- .../net/runelite/rs/api/RSWidgetNode.java | 35 - .../java/net/runelite/rs/api/RSWorld.java | 85 - .../net/runelite/rs/api/RSWorldMapData.java | 34 - .../runelite/rs/api/RSWorldMapManager.java | 44 - 181 files changed, 17600 deletions(-) delete mode 100644 runelite-mixins/pom.xml delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Copy.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/FieldHook.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Inject.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/MethodHook.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Mixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Mixins.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Replace.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/api/mixins/Shadow.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/CameraMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/ClickboxMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderBridgeMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/GraphicsObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/MenuMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/MinimapMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/ProcessClientErrorMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSActorMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSChatLineBufferMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberManagerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSDecorativeObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSDynamicObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSEnumMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSFriendManagerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSFriendMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSGameCanvasMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSGameEngineMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSGameObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSGrandExchangeOfferMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSGroundObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSHashTableMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSHealthBarMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSIgnoreMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSIndexDataBaseMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSItemCompositionMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSItemContainerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSItemLayerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSItemMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSKeyFocusListenerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSMainBufferProviderMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSMessageNodeMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSModelDataMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSModelMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSMouseInputMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSMouseWheelHandlerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSNPCMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSNameableContainerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSNameableMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSNodeMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSNpcCompositionMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerCompositionMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSProjectileMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTileModelMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTilePaintMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSSequenceMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSSpritePixelsMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSTextureMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSTextureProviderMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSTileMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSVarcsMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSWallObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSWidgetMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/RSWorldMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/Rasterizer2DMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/ScriptVMMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/SoundEffectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/SpriteMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMaxSizeMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/TileObjectMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/VarbitMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/WidgetSpriteMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/WorldHoppingMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/WorldMapManagerMixin.java delete mode 100644 runelite-mixins/src/main/java/net/runelite/mixins/WorldMapMixin.java delete mode 100644 runelite-mixins/src/test/java/net/runelite/mixins/RSSceneMixinTest.java delete mode 100644 runescape-api/pom.xml delete mode 100644 runescape-api/src/main/java/net/runelite/mapping/Construct.java delete mode 100644 runescape-api/src/main/java/net/runelite/mapping/Import.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSActor.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNodeQueue.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSBuffer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSBufferProvider.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSCacheableNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSChatLineBuffer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSChatPlayer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSClanMember.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSClanMemberManager.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSClassInfo.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSClient.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSCollisionData.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfo1.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoList.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoListHolder.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSDecorativeObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSDeque.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSDynamicObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSEnum.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFileOnDisk.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFont.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFontTypeFace.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFrame.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFrameMap.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFrames.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFriend.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFriendContainer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSFriendManager.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGameCanvas.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGameEngine.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGameObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGrandExchangeOffer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGraphicsObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSGroundObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSHashTable.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSHealthBar.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIgnore.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIgnoreContainer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIndexData.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIndexDataBase.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIndexedSprite.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIntegerNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSItem.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSItemComposition.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSItemContainer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSItemLayer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSIterableHashTable.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSJagexLoginType.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSKeyFocusListener.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSMainBufferProvider.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSMapElementConfig.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSMessageNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSModel.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSModelData.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSMouseInput.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSMouseWheelHandler.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNPC.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNPCComposition.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSName.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNameable.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNameableContainer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSNodeCache.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSObjectComposition.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSPacketBuffer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSPlayer.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSPlayerComposition.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSPreferences.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSProjectile.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSRawAudioNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSRenderOverview.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSRenderable.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSResampler.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSRunException.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSScene.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSceneTileModel.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSceneTilePaint.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSScript.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSScriptEvent.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSequence.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSoundEffect.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSprite.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSSpritePixels.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSTaskDataNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSTexture.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSTextureProvider.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSTile.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSVarbit.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSVarcs.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWallObject.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWidget.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWidgetNode.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWorld.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapData.java delete mode 100644 runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapManager.java diff --git a/README.md b/README.md index 9c70f4f745..2c0c749e1f 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ If you have any questions, please join our IRC channel on [irc.rizon.net #runeli - [http-api](http-api/src/main/java/net/runelite/http/api) - API for api.runelite.net - [http-service](http-service/src/main/java/net/runelite/http/service) - Service for api.runelite.net - [runelite-api](runelite-api/src/main/java/net/runelite/api) - RuneLite API, interfaces for accessing the client -- [runelite-mixins](runelite-mixins/src/main/java/net/runelite) - Mixins which are injected into the injected client's classes -- [runescape-api](runescape-api/src/main/java/net/runelite) - Mappings correspond to these interfaces, runelite-api is a subset of this - [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins ## Usage diff --git a/pom.xml b/pom.xml index 52a30f3d35..22bebd255d 100644 --- a/pom.xml +++ b/pom.xml @@ -117,9 +117,7 @@ cache-updater runelite-api runelite-client - runelite-mixins runelite-script-assembler-plugin - runescape-api http-api http-service protocol-api diff --git a/runelite-mixins/pom.xml b/runelite-mixins/pom.xml deleted file mode 100644 index e29ca008fe..0000000000 --- a/runelite-mixins/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - 4.0.0 - - - net.runelite - runelite-parent - 1.5.29-SNAPSHOT - - - mixins - RuneLite Mixins - - - - org.slf4j - slf4j-api - provided - - - net.runelite.rs - runescape-api - ${project.version} - provided - - - com.google.guava - guava - provided - - - javax.inject - javax.inject - 1 - provided - - - - junit - junit - 4.12 - test - - - org.mockito - mockito-all - 1.10.19 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - 1.6 - 1.6 - - - - - diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Copy.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Copy.java deleted file mode 100644 index c4a3b46326..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Copy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Indicates a copy of the specified method should be copied into - * the target class. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Documented -public @interface Copy -{ - /** - * Method to copy - * - * @return - */ - String value(); -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/FieldHook.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/FieldHook.java deleted file mode 100644 index 84a0db08f0..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/FieldHook.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Documented -public @interface FieldHook -{ - String value(); - - boolean before() default false; -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Inject.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Inject.java deleted file mode 100644 index a0f40f6bb5..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Inject.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) -public @interface Inject -{ - -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/MethodHook.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/MethodHook.java deleted file mode 100644 index 5caeca8336..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/MethodHook.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Documented -public @interface MethodHook -{ - String value(); - - boolean end() default false; -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixin.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixin.java deleted file mode 100644 index 6efd9d41fa..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixin.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Repeatable; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Repeatable(Mixins.class) -public @interface Mixin -{ - /** - * Class to inject this mixin into - * - * @return - */ - Class value(); -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixins.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixins.java deleted file mode 100644 index 2d55b71e51..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Mixins.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Mixins -{ - Mixin[] value(); -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Replace.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Replace.java deleted file mode 100644 index 57f7edc0dc..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Replace.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Replaces the existing method in the target class with the given method. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Documented -public @interface Replace -{ - /** - * Method to replace - * - * @return - */ - String value(); -} diff --git a/runelite-mixins/src/main/java/net/runelite/api/mixins/Shadow.java b/runelite-mixins/src/main/java/net/runelite/api/mixins/Shadow.java deleted file mode 100644 index 8b177eab19..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/api/mixins/Shadow.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.mixins; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Shadow -{ - String value(); -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/CameraMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/CameraMixin.java deleted file mode 100644 index 6f272856b1..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/CameraMixin.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; - -@Mixin(RSClient.class) -public abstract class CameraMixin implements RSClient -{ - private static final int STANDARD_PITCH_MAX = 383; - private static final int NEW_PITCH_MAX = 512; - - @Shadow("clientInstance") - static RSClient client; - - @Inject - static boolean pitchRelaxEnabled = false; - - @Inject - static int lastPitch = 128; - - @Inject - static int lastPitchTarget = 128; - - @Inject - public void setCameraPitchRelaxerEnabled(boolean enabled) - { - if (pitchRelaxEnabled == enabled) - { - return; - } - pitchRelaxEnabled = enabled; - if (!enabled) - { - int pitch = client.getCameraPitchTarget(); - if (pitch > STANDARD_PITCH_MAX) - { - client.setCameraPitchTarget(STANDARD_PITCH_MAX); - } - } - } - - @FieldHook("cameraPitchTarget") - @Inject - static void onCameraPitchTargetChanged(int idx) - { - int newPitch = client.getCameraPitchTarget(); - int pitch = newPitch; - if (pitchRelaxEnabled) - { - // This works because the vanilla camera movement code only moves %2 - if (lastPitchTarget > STANDARD_PITCH_MAX && newPitch == STANDARD_PITCH_MAX) - { - pitch = lastPitchTarget; - if (pitch > NEW_PITCH_MAX) - { - pitch = NEW_PITCH_MAX; - } - client.setCameraPitchTarget(pitch); - } - } - lastPitchTarget = pitch; - } - - @FieldHook("cameraPitch") - @Inject - static void onCameraPitchChanged(int idx) - { - int newPitch = client.getCameraPitch(); - int pitch = newPitch; - if (pitchRelaxEnabled) - { - // This works because the vanilla camera movement code only moves %2 - if (lastPitch > STANDARD_PITCH_MAX && newPitch == STANDARD_PITCH_MAX) - { - pitch = lastPitch; - if (pitch > NEW_PITCH_MAX) - { - pitch = NEW_PITCH_MAX; - } - client.setCameraPitch(pitch); - } - } - lastPitch = pitch; - } -} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/ClickboxMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/ClickboxMixin.java deleted file mode 100644 index a95cd06220..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/ClickboxMixin.java +++ /dev/null @@ -1,320 +0,0 @@ -package net.runelite.mixins; - -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSModel; - -/** - * Class to check clickboxes of models. Mostly refactored code from the client. - */ -@Mixin(RSClient.class) -public abstract class ClickboxMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - private static final int MAX_ENTITES_AT_MOUSE = 1000; - private static final int CLICKBOX_CLOSE = 50; - private static final int CLICKBOX_FAR = 3500; - private static final int OBJECT_INTERACTION_FAR = 35; // Max distance, in tiles, from camera - - @Inject - private static final int[] rl$modelViewportXs = new int[4700]; - - @Inject - private static final int[] rl$modelViewportYs = new int[4700]; - - @Inject - public void checkClickbox(Model rlModel, int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int _x, int _y, int _z, long hash) - { - RSModel model = (RSModel) rlModel; - boolean hasFlag = hash != 0L && (int) (hash >>> 16 & 1L) != 1; - boolean viewportContainsMouse = client.getViewportContainsMouse(); - - if (!hasFlag || !viewportContainsMouse || client.getOculusOrbState() != 0) - { - return; - } - - boolean bb = boundingboxCheck(model, _x, _y, _z); - if (!bb) - { - return; - } - - if (Math.sqrt(_x * _x + _z * _z) > OBJECT_INTERACTION_FAR * Perspective.LOCAL_TILE_SIZE) - { - return; - } - - // only need a boundingbox check? - if (model.isClickable()) - { - addHashAtMouse(hash); - return; - } - - // otherwise we must check if the mouse is in a triangle - final int vertexCount = model.getVerticesCount(); - final int triangleCount = model.getTrianglesCount(); - - final int[] vertexX = model.getVerticesX(); - final int[] vertexY = model.getVerticesY(); - final int[] vertexZ = model.getVerticesZ(); - - final int[] triangleX = model.getTrianglesX(); - final int[] triangleY = model.getTrianglesY(); - final int[] triangleZ = model.getTrianglesZ(); - - final int[] color3 = model.getFaceColors3(); - - final int zoom = client.get3dZoom(); - - final int centerX = client.getCenterX(); - final int centerY = client.getCenterY(); - - int sin = 0; - int cos = 0; - if (orientation != 0) - { - sin = Perspective.SINE[orientation]; - cos = Perspective.COSINE[orientation]; - } - - for (int i = 0; i < vertexCount; ++i) - { - int x = vertexX[i]; - int y = vertexY[i]; - int z = vertexZ[i]; - - int var42; - if (orientation != 0) - { - var42 = z * sin + x * cos >> 16; - z = z * cos - x * sin >> 16; - x = var42; - } - - x += _x; - y += _y; - z += _z; - - var42 = z * yawSin + yawCos * x >> 16; - z = yawCos * z - x * yawSin >> 16; - x = var42; - var42 = pitchCos * y - z * pitchSin >> 16; - z = y * pitchSin + pitchCos * z >> 16; - - if (z >= 50) - { - rl$modelViewportYs[i] = x * zoom / z + centerX; - rl$modelViewportXs[i] = var42 * zoom / z + centerY; - } - else - { - rl$modelViewportYs[i] = -5000; - } - } - - final int viewportMouseX = client.getViewportMouseX(); - final int viewportMouseY = client.getViewportMouseY(); - - for (int i = 0; i < triangleCount; ++i) - { - if (color3[i] == -2) - { - continue; - } - - final int vA = triangleX[i]; - final int vB = triangleY[i]; - final int vC = triangleZ[i]; - - int y1 = rl$modelViewportYs[vA]; - int y2 = rl$modelViewportYs[vB]; - int y3 = rl$modelViewportYs[vC]; - - int x1 = rl$modelViewportXs[vA]; - int x2 = rl$modelViewportXs[vB]; - int x3 = rl$modelViewportXs[vC]; - - if (y1 == -5000 || y2 == -5000 || y3 == -5000) - { - continue; - } - - final int radius = model.isClickable() ? 20 : 5; - - int var18 = radius + viewportMouseY; - boolean var34; - if (var18 < x1 && var18 < x2 && var18 < x3) - { - var34 = false; - } - else - { - var18 = viewportMouseY - radius; - if (var18 > x1 && var18 > x2 && var18 > x3) - { - var34 = false; - } - else - { - var18 = radius + viewportMouseX; - if (var18 < y1 && var18 < y2 && var18 < y3) - { - var34 = false; - } - else - { - var18 = viewportMouseX - radius; - if (var18 > y1 && var18 > y2 && var18 > y3) - { - var34 = false; - } - else - { - var34 = true; - } - } - } - } - - if (var34) - { - addHashAtMouse(hash); - break; - } - } - } - - @Inject - private void addHashAtMouse(long hash) - { - long[] entitiesAtMouse = client.getEntitiesAtMouse(); - int count = client.getEntitiesAtMouseCount(); - if (count < MAX_ENTITES_AT_MOUSE) - { - entitiesAtMouse[count] = hash; - client.setEntitiesAtMouseCount(count + 1); - } - } - - @Inject - private boolean boundingboxCheck(Model model, int x, int y, int z) - { - final int cameraPitch = client.getCameraPitch(); - final int cameraYaw = client.getCameraYaw(); - - final int pitchSin = Perspective.SINE[cameraPitch]; - final int pitchCos = Perspective.COSINE[cameraPitch]; - - final int yawSin = Perspective.SINE[cameraYaw]; - final int yawCos = Perspective.COSINE[cameraYaw]; - - final int centerX = client.getCenterX(); - final int centerY = client.getCenterY(); - - final int viewportMouseX = client.getViewportMouseX(); - final int viewportMouseY = client.getViewportMouseY(); - - final int Rasterizer3D_zoom = client.get3dZoom(); - - int var6 = (viewportMouseX - centerX) * CLICKBOX_CLOSE / Rasterizer3D_zoom; - int var7 = (viewportMouseY - centerY) * CLICKBOX_CLOSE / Rasterizer3D_zoom; - int var8 = (viewportMouseX - centerX) * CLICKBOX_FAR / Rasterizer3D_zoom; - int var9 = (viewportMouseY - centerY) * CLICKBOX_FAR / Rasterizer3D_zoom; - int var10 = rl$rot1(var7, CLICKBOX_CLOSE, pitchCos, pitchSin); - int var11 = rl$rot2(var7, CLICKBOX_CLOSE, pitchCos, pitchSin); - var7 = var10; - var10 = rl$rot1(var9, CLICKBOX_FAR, pitchCos, pitchSin); - int var12 = rl$rot2(var9, CLICKBOX_FAR, pitchCos, pitchSin); - var9 = var10; - var10 = rl$rot3(var6, var11, yawCos, yawSin); - var11 = rl$rot4(var6, var11, yawCos, yawSin); - var6 = var10; - var10 = rl$rot3(var8, var12, yawCos, yawSin); - var12 = rl$rot4(var8, var12, yawCos, yawSin); - int field1720 = (var10 - var6) / 2; - int field638 = (var9 - var7) / 2; - int field1846 = (var12 - var11) / 2; - int field1722 = Math.abs(field1720); - int field601 = Math.abs(field638); - int field38 = Math.abs(field1846); - - int var38 = x + model.getCenterX(); - int var39 = y + model.getCenterY(); - int var40 = z + model.getCenterZ(); - int var41 = model.getExtremeX(); - int var42 = model.getExtremeY(); - int var43 = model.getExtremeZ(); - - int field1861 = (var6 + var10) / 2; - int field2317 = (var7 + var9) / 2; - int field528 = (var12 + var11) / 2; - - int var44 = field1861 - var38; - int var45 = field2317 - var39; - int var46 = field528 - var40; - - boolean passes; - if (Math.abs(var44) > var41 + field1722) - { - passes = false; - } - else if (Math.abs(var45) > var42 + field601) - { - passes = false; - } - else if (Math.abs(var46) > var43 + field38) - { - passes = false; - } - else if (Math.abs(var46 * field638 - var45 * field1846) > var42 * field38 + var43 * field601) - { - passes = false; - } - else if (Math.abs(var44 * field1846 - var46 * field1720) > var43 * field1722 + var41 * field38) - { - passes = false; - } - else if (Math.abs(var45 * field1720 - var44 * field638) > var42 * field1722 + var41 * field601) - { - passes = false; - } - else - { - passes = true; - } - - return passes; - } - - @Inject - private static int rl$rot1(int var0, int var1, int var2, int var3) - { - return var0 * var2 + var3 * var1 >> 16; - } - - @Inject - private static int rl$rot2(int var0, int var1, int var2, int var3) - { - return var2 * var1 - var3 * var0 >> 16; - } - - @Inject - private static int rl$rot3(int var0, int var1, int var2, int var3) - { - return var0 * var2 - var3 * var1 >> 16; - } - - @Inject - private static int rl$rot4(int var0, int var1, int var2, int var3) - { - return var3 * var0 + var2 * var1 >> 16; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderBridgeMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderBridgeMixin.java deleted file mode 100644 index 959e9c41bc..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderBridgeMixin.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSClient; - -@Mixin(RSClient.class) -public abstract class EntityHiderBridgeMixin implements RSClient -{ - @Inject - public static boolean isHidingEntities; - - @Inject - public static boolean hidePlayers; - - @Inject - public static boolean hidePlayers2D; - - @Inject - public static boolean hideFriends; - - @Inject - public static boolean hideClanMates; - - @Inject - public static boolean hideLocalPlayer; - - @Inject - public static boolean hideLocalPlayer2D; - - @Inject - public static boolean hideNPCs; - - @Inject - public static boolean hideNPCs2D; - - @Inject - public static boolean hideAttackers; - - @Inject - public static boolean hideProjectiles; - - @Inject - @Override - public void setIsHidingEntities(boolean state) - { - isHidingEntities = state; - } - - @Inject - @Override - public void setPlayersHidden(boolean state) - { - hidePlayers = state; - } - - @Inject - @Override - public void setPlayersHidden2D(boolean state) - { - hidePlayers2D = state; - } - - @Inject - @Override - public void setFriendsHidden(boolean state) - { - hideFriends = state; - } - - @Inject - @Override - public void setClanMatesHidden(boolean state) - { - hideClanMates = state; - } - - @Inject - @Override - public void setLocalPlayerHidden(boolean state) - { - hideLocalPlayer = state; - } - - @Inject - @Override - public void setLocalPlayerHidden2D(boolean state) - { - hideLocalPlayer2D = state; - } - - @Inject - @Override - public void setNPCsHidden(boolean state) - { - hideNPCs = state; - } - - @Inject - @Override - public void setNPCsHidden2D(boolean state) - { - hideNPCs2D = state; - } - - @Inject - @Override - public void setAttackersHidden(boolean state) - { - hideAttackers = state; - } - - @Inject - @Override - public void setProjectilesHidden(boolean state) - { - hideProjectiles = state; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderMixin.java deleted file mode 100644 index d055fceed5..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/EntityHiderMixin.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSActor; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSNPC; -import net.runelite.rs.api.RSPlayer; -import net.runelite.rs.api.RSProjectile; -import net.runelite.rs.api.RSScene; -import net.runelite.rs.api.RSRenderable; - -@Mixin(RSScene.class) -public abstract class EntityHiderMixin implements RSScene -{ - @Shadow("clientInstance") - private static RSClient client; - - @Shadow("isHidingEntities") - private static boolean isHidingEntities; - - @Shadow("hidePlayers") - private static boolean hidePlayers; - - @Shadow("hidePlayers2D") - private static boolean hidePlayers2D; - - @Shadow("hideFriends") - private static boolean hideFriends; - - @Shadow("hideClanMates") - private static boolean hideClanMates; - - @Shadow("hideLocalPlayer") - private static boolean hideLocalPlayer; - - @Shadow("hideLocalPlayer2D") - private static boolean hideLocalPlayer2D; - - @Shadow("hideNPCs") - private static boolean hideNPCs; - - @Shadow("hideNPCs2D") - private static boolean hideNPCs2D; - - @Shadow("hideAttackers") - private static boolean hideAttackers; - - @Shadow("hideProjectiles") - private static boolean hideProjectiles; - - @Copy("addEntityMarker") - abstract boolean addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSRenderable renderable, int var10, boolean var11, long var12, int var13); - - @Replace("addEntityMarker") - boolean rl$addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSRenderable renderable, int var10, boolean var11, long var12, int var13) - { - final boolean shouldDraw = shouldDraw(renderable, false); - - if (!shouldDraw) - { - final int tileX = x >> 7; - final int tileY = y >> 7; - /* - * Set the 'occupied' tick to -1, to reset the tile being 'occupied', - * making the game think an entity hasn't been rendered at the location yet. - */ - client.getOccupiedTilesTick()[tileX][tileY] = -1; - } - - return shouldDraw && addEntityMarker(var1, var2, var3, var4, var5, x, y, var8, renderable, var10, var11, var12, var13); - } - - @Copy("draw2DExtras") - private static void draw2DExtras(RSActor actor, int var1, int var2, int var3, int var4, int var5) - { - throw new RuntimeException(); - } - - @Replace("draw2DExtras") - private static void rl$draw2DExtras(RSActor actor, int var1, int var2, int var3, int var4, int var5) - { - if (shouldDraw(actor, true)) - { - draw2DExtras(actor, var1, var2, var3, var4, var5); - } - } - - @Inject - private static boolean shouldDraw(Object renderable, boolean drawingUI) - { - if (!isHidingEntities) - { - return true; - } - - if (renderable instanceof RSPlayer) - { - boolean local = drawingUI ? hideLocalPlayer2D : hideLocalPlayer; - boolean other = drawingUI ? hidePlayers2D : hidePlayers; - boolean isLocalPlayer = renderable == client.getLocalPlayer(); - - if (isLocalPlayer ? local : other) - { - RSPlayer player = (RSPlayer) renderable; - - if (!hideAttackers) - { - if (player.getInteracting() == client.getLocalPlayer()) - { - return true; - } - } - - if (player.getName() == null) - { - // player.isFriend() and player.isClanMember() npe when the player has a null name - return false; - } - - return (!hideFriends && player.isFriend()) || (!isLocalPlayer && !hideClanMates && player.isClanMember()); - } - } - else if (renderable instanceof RSNPC) - { - RSNPC npc = (RSNPC) renderable; - - if (!hideAttackers) - { - if (npc.getInteracting() == client.getLocalPlayer()) - { - return true; - } - } - - return drawingUI ? !hideNPCs2D : !hideNPCs; - } - else if (renderable instanceof RSProjectile) - { - return !hideProjectiles; - } - - return true; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/GraphicsObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/GraphicsObjectMixin.java deleted file mode 100644 index 7bfa3c1bd9..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/GraphicsObjectMixin.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2018, Woox - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.events.GraphicsObjectCreated; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGraphicsObject; - -@Mixin(RSGraphicsObject.class) -public abstract class GraphicsObjectMixin implements RSGraphicsObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - GraphicsObjectMixin() - { - final GraphicsObjectCreated event = new GraphicsObjectCreated(this); - client.getCallbacks().post(event); - } - - @Override - @Inject - public LocalPoint getLocation() - { - return new LocalPoint(this.getX(), this.getY()); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/MenuMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/MenuMixin.java deleted file mode 100644 index 9bfb4af721..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/MenuMixin.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2019, Ron Young - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSFont; - -@Mixin(RSClient.class) -public abstract class MenuMixin implements RSClient -{ - private static final int MENU_BORDER_OUTER_2010 = 0x6D6A5B; - private static final int MENU_BORDER_INNER_2010 = 0x524A3D; - private static final int MENU_PADDING_2010 = 0x2B2622; - private static final int MENU_BACKGROUND_2010 = 0x2B271C; - private static final int MENU_TEXT_2010 = 0xC6B895; - private static final int MENU_HEADER_GRADIENT_TOP_2010 = 0x322E22; - private static final int MENU_HEADER_GRADIENT_BOTTOM_2010 = 0x090A04; - - @Inject - @Override - public void draw2010Menu() - { - int x = getMenuX(); - int y = getMenuY(); - int w = getMenuWidth(); - int h = getMenuHeight(); - - // Outside border - RasterizerDrawHorizontalLine(x + 2, y, w - 4, MENU_BORDER_OUTER_2010); - RasterizerDrawHorizontalLine(x + 2, y + h - 1, w - 4, MENU_BORDER_OUTER_2010); - RasterizerDrawVerticalLine(x, y + 2, h - 4, MENU_BORDER_OUTER_2010); - RasterizerDrawVerticalLine(x + w - 1, y + 2, h - 4, MENU_BORDER_OUTER_2010); - - // Padding - RasterizerDrawRectangle(x + 1, y + 5, w - 2, h - 6, MENU_PADDING_2010); - RasterizerDrawHorizontalLine(x + 1, y + 17, w - 2, MENU_PADDING_2010); - RasterizerDrawCircle(x + 2, y + h - 3, 0, MENU_PADDING_2010); - RasterizerDrawCircle(x + w - 3, y + h - 3, 0, MENU_PADDING_2010); - - // Header - RasterizerDrawGradient(x + 2, y + 1, w - 4, 16, MENU_HEADER_GRADIENT_TOP_2010, MENU_HEADER_GRADIENT_BOTTOM_2010); - RasterizerFillRectangle(x + 1, y + 1, 2, 4, MENU_PADDING_2010); - RasterizerFillRectangle(x + w - 3, y + 1, 2, 4, MENU_PADDING_2010); - - // Inside border - RasterizerDrawHorizontalLine(x + 2, y + 18, w - 4, MENU_BORDER_INNER_2010); - RasterizerDrawHorizontalLine(x + 3, y + h - 3, w - 6, MENU_BORDER_INNER_2010); - RasterizerDrawVerticalLine(x + 2, y + 18, h - 21, MENU_BORDER_INNER_2010); - RasterizerDrawVerticalLine(x + w - 3, y + 18, h - 21, MENU_BORDER_INNER_2010); - - // Options background - RasterizerFillRectangle(x + 3, y + 19, w - 6, h - 22, MENU_BACKGROUND_2010); - - // Corner insets - RasterizerDrawCircle(x + 1, y + 1, 0, MENU_BORDER_OUTER_2010); - RasterizerDrawCircle(x + w - 2, y + 1, 0, MENU_BORDER_OUTER_2010); - RasterizerDrawCircle(x + 1, y + h - 2, 0, MENU_BORDER_OUTER_2010); - RasterizerDrawCircle(x + w - 2, y + h - 2, 0, MENU_BORDER_OUTER_2010); - - RSFont font = getFontBold12(); - font.drawTextLeftAligned("Choose Option", x + 3, y + 14, MENU_TEXT_2010, -1); - - int mouseX = getMouseX(); - int mouseY = getMouseY(); - - int count = getMenuOptionCount(); - String[] targets = getMenuTargets(); - String[] options = getMenuOptions(); - for (int i = 0; i < count; i++) - { - int rowY = y + (count - 1 - i) * 15 + 31; - - String s = options[i]; - if (!targets[i].isEmpty()) - { - s += " " + targets[i]; - } - - font.drawTextLeftAligned(s, x + 3, rowY, MENU_TEXT_2010, -1); - - // Highlight current option - if (mouseX > x && mouseX < w + x && mouseY > rowY - 13 && mouseY < rowY + 3) - { - RasterizerFillRectangleAlpha(x + 3, rowY - 12, w - 6, 15, 0xffffff, 80); - } - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/MinimapMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/MinimapMixin.java deleted file mode 100644 index 1aab9836f8..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/MinimapMixin.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import static net.runelite.api.Perspective.SCENE_SIZE; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSScene; -import net.runelite.rs.api.RSSpritePixels; - -@Mixin(RSClient.class) -public abstract class MinimapMixin implements RSClient -{ - @Inject - @Override - public RSSpritePixels drawInstanceMap(int z) - { - RSSpritePixels ourSprite = createSpritePixels(new int[512 * 512], 512, 512); - RSSpritePixels theirSprite = getMinimapSprite(); - - RSScene scene = getScene(); - int[] pixels = ourSprite.getPixels(); - byte[][][] tileSettings = getTileSettings(); - - try - { - setMinimapSprite(ourSprite); - - int var4; - for (int x = 1; x < SCENE_SIZE - 1; ++x) - { - var4 = (103 - x) * 2048 + 24628; - - for (int y = 1; y < SCENE_SIZE - 1; ++y) - { - if ((tileSettings[z][y][x] & 24) == 0) - { - scene.drawTile(pixels, var4, 512, z, y, x); - } - - if (z < 3 && (tileSettings[z + 1][y][x] & 8) != 0) - { - scene.drawTile(pixels, var4, 512, z + 1, y, x); - } - - var4 += 4; - } - } - - int color1 = (238 + (int) (Math.random() * 20.0D) - 10 << 16) + (238 + (int) (Math.random() * 20.0D) - 10 << 8) + (238 + (int) (Math.random() * 20.0D) - 10); - int color2 = 238 + (int) (Math.random() * 20.0D) - 10 << 16; - ourSprite.setRaster(); - - for (int y = 1; y < SCENE_SIZE - 1; ++y) - { - for (int x = 1; x < SCENE_SIZE - 1; ++x) - { - if ((tileSettings[z][x][y] & 24) == 0) - { - drawObject(z, x, y, color1, color2); - } - - if (z < 3 && (tileSettings[z + 1][x][y] & 8) != 0) - { - drawObject(z + 1, x, y, color1, color2); - } - } - } - } - finally - { - getBufferProvider().setRaster(); - setMinimapSprite(theirSprite); - } - - return ourSprite; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/ProcessClientErrorMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/ProcessClientErrorMixin.java deleted file mode 100644 index eb3e971a3a..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/ProcessClientErrorMixin.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSRunException; - -@Mixin(RSClient.class) -public abstract class ProcessClientErrorMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("processClientError") - static void rs$processClientError(String string, Throwable throwable) - { - throw new RuntimeException(); - } - - @Replace("processClientError") - static void rl$processClientError(String string, Throwable throwable) - { - if (throwable != null) - { - Throwable throwableToScan = throwable; - - if (throwable instanceof RSRunException) - { - throwableToScan = ((RSRunException) throwable).getParent(); - } - - client.getLogger().error("Game crash: {}", string, throwableToScan); - - StackTraceElement[] stackTrace = throwableToScan.getStackTrace(); - - for (StackTraceElement stackTraceElement : stackTrace) - { - // If stack trace contains "runelite", don't send it - if (stackTraceElement.getClassName().contains("runelite")) - { - return; - } - } - } - - rs$processClientError(string, throwable); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSActorMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSActorMixin.java deleted file mode 100644 index 7c2d19323f..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSActorMixin.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Graphics2D; -import java.awt.Polygon; -import java.awt.image.BufferedImage; -import net.runelite.api.Actor; -import net.runelite.api.Hitsplat; -import net.runelite.api.NPC; -import net.runelite.api.NPCComposition; -import net.runelite.api.Perspective; -import net.runelite.api.Player; -import net.runelite.api.Point; -import net.runelite.api.SpritePixels; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.coords.WorldArea; -import net.runelite.api.coords.WorldPoint; -import net.runelite.api.events.AnimationChanged; -import net.runelite.api.events.GraphicChanged; -import net.runelite.api.events.HitsplatApplied; -import net.runelite.api.events.InteractingChanged; -import net.runelite.api.events.LocalPlayerDeath; -import net.runelite.api.events.OverheadTextChanged; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSActor; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSCombatInfo1; -import net.runelite.rs.api.RSHealthBar; -import net.runelite.rs.api.RSCombatInfoList; -import net.runelite.rs.api.RSCombatInfoListHolder; -import net.runelite.rs.api.RSNPC; -import net.runelite.rs.api.RSNode; - -@Mixin(RSActor.class) -public abstract class RSActorMixin implements RSActor -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public Actor getInteracting() - { - int i = getRSInteracting(); - if (i == -1 || i == 65535) - { - return null; - } - - if (i < 0x8000) - { - NPC[] npcs = client.getCachedNPCs(); - return npcs[i]; - } - - i -= 0x8000; - Player[] players = client.getCachedPlayers(); - return players[i]; - } - - @Inject - @Override - public int getHealthRatio() - { - RSCombatInfoList combatInfoList = getCombatInfoList(); - if (combatInfoList != null) - { - RSNode node = combatInfoList.getNode(); - RSNode next = node.getNext(); - if (next instanceof RSCombatInfoListHolder) - { - RSCombatInfoListHolder combatInfoListWrapper = (RSCombatInfoListHolder) next; - RSCombatInfoList combatInfoList1 = combatInfoListWrapper.getCombatInfo1(); - - RSNode node2 = combatInfoList1.getNode(); - RSNode next2 = node2.getNext(); - if (next2 instanceof RSCombatInfo1) - { - RSCombatInfo1 combatInfo = (RSCombatInfo1) next2; - return combatInfo.getHealthRatio(); - } - } - } - return -1; - } - - @Inject - @Override - public int getHealth() - { - RSCombatInfoList combatInfoList = getCombatInfoList(); - if (combatInfoList != null) - { - RSNode node = combatInfoList.getNode(); - RSNode next = node.getNext(); - if (next instanceof RSCombatInfoListHolder) - { - RSCombatInfoListHolder combatInfoListWrapper = (RSCombatInfoListHolder) next; - RSHealthBar cf = combatInfoListWrapper.getHealthBar(); - return cf.getHealthScale(); - } - } - return -1; - } - - @Override - @Inject - public WorldPoint getWorldLocation() - { - return WorldPoint.fromLocal(client, - this.getPathX()[0] * Perspective.LOCAL_TILE_SIZE + Perspective.LOCAL_TILE_SIZE / 2, - this.getPathY()[0] * Perspective.LOCAL_TILE_SIZE + Perspective.LOCAL_TILE_SIZE / 2, - client.getPlane()); - } - - @Inject - @Override - public LocalPoint getLocalLocation() - { - return new LocalPoint(getX(), getY()); - } - - @Inject - @Override - public Polygon getCanvasTilePoly() - { - return Perspective.getCanvasTilePoly(client, getLocalLocation()); - } - - @Inject - @Override - public Point getCanvasTextLocation(Graphics2D graphics, String text, int zOffset) - { - return Perspective.getCanvasTextLocation(client, graphics, getLocalLocation(), text, zOffset); - } - - @Inject - @Override - public Point getCanvasImageLocation(BufferedImage image, int zOffset) - { - return Perspective.getCanvasImageLocation(client, getLocalLocation(), image, zOffset); - } - - @Inject - @Override - public Point getCanvasSpriteLocation(SpritePixels sprite, int zOffset) - { - return Perspective.getCanvasSpriteLocation(client, getLocalLocation(), sprite, zOffset); - } - - @Inject - @Override - public Point getMinimapLocation() - { - return Perspective.localToMinimap(client, getLocalLocation()); - } - - @FieldHook("animation") - @Inject - public void animationChanged(int idx) - { - AnimationChanged animationChange = new AnimationChanged(); - animationChange.setActor(this); - client.getCallbacks().post(animationChange); - } - - @FieldHook("graphic") - @Inject - public void graphicChanged(int idx) - { - GraphicChanged graphicChanged = new GraphicChanged(); - graphicChanged.setActor(this); - client.getCallbacks().post(graphicChanged); - } - - @FieldHook("interacting") - @Inject - public void interactingChanged(int idx) - { - InteractingChanged interactingChanged = new InteractingChanged(this, getInteracting()); - client.getCallbacks().post(interactingChanged); - } - - @FieldHook("overhead") - @Inject - public void overheadTextChanged(int idx) - { - String overheadText = getOverheadText(); - if (overheadText != null) - { - OverheadTextChanged overheadTextChanged = new OverheadTextChanged(this, overheadText); - client.getCallbacks().post(overheadTextChanged); - } - } - - @Inject - @Override - public WorldArea getWorldArea() - { - int size = 1; - if (this instanceof NPC) - { - NPCComposition composition = ((NPC)this).getComposition(); - if (composition != null && composition.getConfigs() != null) - { - composition = composition.transform(); - } - if (composition != null) - { - size = composition.getSize(); - } - } - - return new WorldArea(this.getWorldLocation(), size, size); - } - - @Inject - @MethodHook("setCombatInfo") - public void setCombatInfo(int combatInfoId, int gameCycle, int var3, int var4, int healthRatio, int health) - { - if (healthRatio == 0) - { - if (this == client.getLocalPlayer()) - { - client.getLogger().debug("You died!"); - - LocalPlayerDeath event = new LocalPlayerDeath(); - client.getCallbacks().post(event); - } - else if (this instanceof RSNPC) - { - ((RSNPC) this).setDead(true); - } - } - } - - /** - * Called after a hitsplat has been processed on an actor. - * Note that this event runs even if the hitsplat didn't show up, - * i.e. the actor already had 4 visible hitsplats. - * - * @param type The hitsplat type (i.e. color) - * @param value The value of the hitsplat (i.e. how high the hit was) - * @param var3 unknown - * @param var4 unknown - * @param gameCycle The gamecycle the hitsplat was applied on - * @param duration The amount of gamecycles the hitsplat will last for - */ - @Inject - @MethodHook(value = "applyActorHitsplat", end = true) - public void applyActorHitsplat(int type, int value, int var3, int var4, int gameCycle, int duration) - { - final Hitsplat hitsplat = new Hitsplat(Hitsplat.HitsplatType.fromInteger(type), value, gameCycle + duration); - final HitsplatApplied event = new HitsplatApplied(); - event.setActor(this); - event.setHitsplat(hitsplat); - client.getCallbacks().post(event); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSChatLineBufferMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSChatLineBufferMixin.java deleted file mode 100644 index 6b720a26f8..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSChatLineBufferMixin.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.MessageNode; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSCacheableNode; -import net.runelite.rs.api.RSChatLineBuffer; - -@Mixin(RSChatLineBuffer.class) -public abstract class RSChatLineBufferMixin implements RSChatLineBuffer -{ - @Inject - @Override - public void removeMessageNode(MessageNode node) - { - MessageNode[] lines = getLines(); - final int length = getLength(); - int found = -1; - - // Find the index of the node - for (int idx = 0; idx < length; idx++) - { - if (lines[idx] == node) - { - found = idx; - break; - } - } - - if (found == -1) - { - return; - } - - // Shift down all other messages - for (int i = found; i < length - 1; i++) - { - lines[i] = lines[i + 1]; - } - lines[length - 1] = null; - setLength(length - 1); - - RSCacheableNode rsCacheableNode = (RSCacheableNode) node; - rsCacheableNode.unlink(); - rsCacheableNode.unlinkDual(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberManagerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberManagerMixin.java deleted file mode 100644 index 25e01ce1ca..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberManagerMixin.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.ClanMember; -import net.runelite.api.events.ClanMemberJoined; -import net.runelite.api.events.ClanMemberLeft; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClanMemberManager; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSName; -import net.runelite.rs.api.RSNameable; - -@Mixin(RSClanMemberManager.class) -public abstract class RSClanMemberManagerMixin implements RSClanMemberManager -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public void rl$add(RSName name, RSName prevName) - { - ClanMember member = findByName(name); - if (member == null) - { - return; - } - - ClanMemberJoined event = new ClanMemberJoined(member); - client.getCallbacks().postDeferred(event); - } - - @Inject - @Override - public void rl$remove(RSNameable nameable) - { - ClanMember member = findByName(nameable.getRsName()); - if (member == null) - { - return; - } - - ClanMemberLeft event = new ClanMemberLeft(member); - client.getCallbacks().postDeferred(event); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberMixin.java deleted file mode 100644 index a35a267bce..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSClanMemberMixin.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.ClanMemberRank; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSClanMember; - -@Mixin(RSClanMember.class) -public abstract class RSClanMemberMixin implements RSClanMember -{ - @Override - @Inject - public String getUsername() - { - return getRsName().getName(); - } - - @Override - @Inject - public ClanMemberRank getRank() - { - return ClanMemberRank.valueOf(getRSRank()); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java deleted file mode 100644 index 7932b31482..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSClientMixin.java +++ /dev/null @@ -1,1542 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.EnumSet; -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; -import javax.inject.Named; -import net.runelite.api.ChatMessageType; -import net.runelite.api.ClanMember; -import net.runelite.api.EnumComposition; -import net.runelite.api.Friend; -import net.runelite.api.GameState; -import net.runelite.api.GrandExchangeOffer; -import net.runelite.api.GraphicsObject; -import net.runelite.api.HashTable; -import net.runelite.api.HintArrowType; -import net.runelite.api.Ignore; -import net.runelite.api.IndexDataBase; -import net.runelite.api.IndexedSprite; -import net.runelite.api.InventoryID; -import net.runelite.api.MenuAction; -import static net.runelite.api.MenuAction.PLAYER_EIGTH_OPTION; -import static net.runelite.api.MenuAction.PLAYER_FIFTH_OPTION; -import static net.runelite.api.MenuAction.PLAYER_FIRST_OPTION; -import static net.runelite.api.MenuAction.PLAYER_FOURTH_OPTION; -import static net.runelite.api.MenuAction.PLAYER_SECOND_OPTION; -import static net.runelite.api.MenuAction.PLAYER_SEVENTH_OPTION; -import static net.runelite.api.MenuAction.PLAYER_SIXTH_OPTION; -import static net.runelite.api.MenuAction.PLAYER_THIRD_OPTION; -import net.runelite.api.MenuEntry; -import net.runelite.api.MessageNode; -import net.runelite.api.NPC; -import net.runelite.api.Node; -import net.runelite.api.PacketBuffer; -import static net.runelite.api.Perspective.LOCAL_TILE_SIZE; -import net.runelite.api.Player; -import net.runelite.api.Point; -import net.runelite.api.Prayer; -import net.runelite.api.Projectile; -import net.runelite.api.Skill; -import net.runelite.api.SpritePixels; -import net.runelite.api.Tile; -import net.runelite.api.VarPlayer; -import net.runelite.api.Varbits; -import net.runelite.api.WidgetNode; -import net.runelite.api.WorldType; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.coords.WorldPoint; -import net.runelite.api.events.BoostedLevelChanged; -import net.runelite.api.events.CanvasSizeChanged; -import net.runelite.api.events.ChatMessage; -import net.runelite.api.events.ClanChanged; -import net.runelite.api.events.ClientTick; -import net.runelite.api.events.DraggingWidgetChanged; -import net.runelite.api.events.ExperienceChanged; -import net.runelite.api.events.GameStateChanged; -import net.runelite.api.events.GrandExchangeOfferChanged; -import net.runelite.api.events.MenuEntryAdded; -import net.runelite.api.events.MenuOpened; -import net.runelite.api.events.MenuOptionClicked; -import net.runelite.api.events.MenuShouldLeftClick; -import net.runelite.api.events.NpcSpawned; -import net.runelite.api.events.PlayerDespawned; -import net.runelite.api.events.PlayerMenuOptionsChanged; -import net.runelite.api.events.PlayerSpawned; -import net.runelite.api.events.ResizeableChanged; -import net.runelite.api.events.UsernameChanged; -import net.runelite.api.events.VarbitChanged; -import net.runelite.api.events.WidgetLoaded; -import net.runelite.api.hooks.Callbacks; -import net.runelite.api.hooks.DrawCallbacks; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.vars.AccountType; -import net.runelite.api.widgets.Widget; -import net.runelite.api.widgets.WidgetInfo; -import net.runelite.api.widgets.WidgetItem; -import net.runelite.api.widgets.WidgetType; -import net.runelite.rs.api.RSChatLineBuffer; -import net.runelite.rs.api.RSClanMemberManager; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDeque; -import net.runelite.rs.api.RSEnum; -import net.runelite.rs.api.RSFriendContainer; -import net.runelite.rs.api.RSFriendManager; -import net.runelite.rs.api.RSHashTable; -import net.runelite.rs.api.RSIgnoreContainer; -import net.runelite.rs.api.RSIndexDataBase; -import net.runelite.rs.api.RSIndexedSprite; -import net.runelite.rs.api.RSItem; -import net.runelite.rs.api.RSItemContainer; -import net.runelite.rs.api.RSNPC; -import net.runelite.rs.api.RSName; -import net.runelite.rs.api.RSPlayer; -import net.runelite.rs.api.RSSpritePixels; -import net.runelite.rs.api.RSWidget; -import org.slf4j.Logger; - -@Mixin(RSClient.class) -public abstract class RSClientMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @javax.inject.Inject - private Callbacks callbacks; - - @Inject - private DrawCallbacks drawCallbacks; - - @Inject - @javax.inject.Inject - @Named("Core Logger") - private Logger logger; - - @Inject - private static int tickCount; - - @Inject - private static boolean interpolatePlayerAnimations; - - @Inject - private static boolean interpolateNpcAnimations; - - @Inject - private static boolean interpolateObjectAnimations; - - @Inject - private static RSPlayer[] oldPlayers = new RSPlayer[2048]; - - @Inject - private static int itemPressedDurationBuffer; - - @Inject - private static int inventoryDragDelay; - - @Inject - private static int oldMenuEntryCount; - - @Inject - private static RSItem lastItemDespawn; - - @Inject - private boolean gpu; - - @Inject - private static boolean oldIsResized; - - @Inject - static int skyboxColor; - - @Inject - private final Cache enumCache = CacheBuilder.newBuilder() - .maximumSize(64) - .build(); - - @Inject - public RSClientMixin() - { - } - - @Inject - @Override - public Callbacks getCallbacks() - { - return callbacks; - } - - @Inject - @Override - public DrawCallbacks getDrawCallbacks() - { - return drawCallbacks; - } - - @Inject - @Override - public void setDrawCallbacks(DrawCallbacks drawCallbacks) - { - this.drawCallbacks = drawCallbacks; - } - - @Inject - @Override - public Logger getLogger() - { - return logger; - } - - @Inject - @Override - public boolean isInterpolatePlayerAnimations() - { - return interpolatePlayerAnimations; - } - - @Inject - @Override - public void setInterpolatePlayerAnimations(boolean interpolate) - { - interpolatePlayerAnimations = interpolate; - } - - @Inject - @Override - public boolean isInterpolateNpcAnimations() - { - return interpolateNpcAnimations; - } - - @Inject - @Override - public void setInterpolateNpcAnimations(boolean interpolate) - { - interpolateNpcAnimations = interpolate; - } - - @Inject - @Override - public boolean isInterpolateObjectAnimations() - { - return interpolateObjectAnimations; - } - - @Inject - @Override - public void setInterpolateObjectAnimations(boolean interpolate) - { - interpolateObjectAnimations = interpolate; - } - - @Inject - @Override - public void setInventoryDragDelay(int delay) - { - inventoryDragDelay = delay; - } - - @Inject - @Override - public AccountType getAccountType() - { - int varbit = getVar(Varbits.ACCOUNT_TYPE); - - switch (varbit) - { - case 1: - return AccountType.IRONMAN; - case 2: - return AccountType.ULTIMATE_IRONMAN; - case 3: - return AccountType.HARDCORE_IRONMAN; - } - - return AccountType.NORMAL; - } - - @Inject - @Override - public Tile getSelectedSceneTile() - { - int tileX = getSelectedSceneTileX(); - int tileY = getSelectedSceneTileY(); - - if (tileX == -1 || tileY == -1) - { - return null; - } - - return getScene().getTiles()[getPlane()][tileX][tileY]; - } - - @Inject - @Override - public List getPlayers() - { - int validPlayerIndexes = getPlayerIndexesCount(); - int[] playerIndexes = getPlayerIndices(); - Player[] cachedPlayers = getCachedPlayers(); - List players = new ArrayList(validPlayerIndexes); - - for (int i = 0; i < validPlayerIndexes; ++i) - { - players.add(cachedPlayers[playerIndexes[i]]); - } - - return players; - } - - @Inject - @Override - public List getNpcs() - { - int validNpcIndexes = getNpcIndexesCount(); - int[] npcIndexes = getNpcIndices(); - NPC[] cachedNpcs = getCachedNPCs(); - List npcs = new ArrayList(validNpcIndexes); - - for (int i = 0; i < validNpcIndexes; ++i) - { - npcs.add(cachedNpcs[npcIndexes[i]]); - } - - return npcs; - } - - @Inject - @Override - public int getBoostedSkillLevel(Skill skill) - { - int[] boostedLevels = getBoostedSkillLevels(); - return boostedLevels[skill.ordinal()]; - } - - @Inject - @Override - public int getRealSkillLevel(Skill skill) - { - int[] realLevels = getRealSkillLevels(); - return realLevels[skill.ordinal()]; - } - - @Inject - @Override - public int getTotalLevel() - { - int totalLevel = 0; - - int[] realLevels = client.getRealSkillLevels(); - int lastSkillIdx = Skill.CONSTRUCTION.ordinal(); - - for (int i = 0; i < realLevels.length; i++) - { - if (i <= lastSkillIdx) - { - totalLevel += realLevels[i]; - } - } - - return totalLevel; - } - - @Inject - @Override - public void addChatMessage(ChatMessageType type, String name, String message, String sender) - { - addChatMessage(type.getType(), name, message, sender); - } - - @Inject - @Override - public GameState getGameState() - { - return GameState.of(getRSGameState()); - } - - @Inject - @Override - public Point getMouseCanvasPosition() - { - return new Point(getMouseX(), getMouseY()); - } - - @Inject - @Override - public Widget[] getWidgetRoots() - { - int topGroup = getWidgetRoot(); - List widgets = new ArrayList(); - for (RSWidget widget : getWidgets()[topGroup]) - { - if (widget != null && widget.getRSParentId() == -1) - { - widgets.add(widget); - } - } - return widgets.toArray(new Widget[widgets.size()]); - } - - @Inject - @Override - public Widget getWidget(WidgetInfo widget) - { - int groupId = widget.getGroupId(); - int childId = widget.getChildId(); - - return getWidget(groupId, childId); - } - - @Inject - @Override - public RSWidget[] getGroup(int groupId) - { - RSWidget[][] widgets = getWidgets(); - - if (widgets == null || groupId < 0 || groupId >= widgets.length || widgets[groupId] == null) - { - return null; - } - - return widgets[groupId]; - } - - @Inject - @Override - public Widget getWidget(int groupId, int childId) - { - RSWidget[][] widgets = getWidgets(); - - if (widgets == null || widgets.length <= groupId) - { - return null; - } - - RSWidget[] childWidgets = widgets[groupId]; - if (childWidgets == null || childWidgets.length <= childId) - { - return null; - } - - return childWidgets[childId]; - } - - @Inject - @Override - public int getVar(VarPlayer varPlayer) - { - int[] varps = getVarps(); - return varps[varPlayer.getId()]; - } - - @Inject - @Override - public int getVarpValue(int[] varps, int varpId) - { - return varps[varpId]; - } - - @Inject - @Override - public void setVarpValue(int[] varps, int varpId, int value) - { - varps[varpId] = value; - } - - @Inject - @Override - public boolean isPrayerActive(Prayer prayer) - { - return getVar(prayer.getVarbit()) == 1; - } - - /** - * Returns the local player's current experience in the specified - * {@link Skill}. - * - * @param skill the {@link Skill} to retrieve the experience for - * @return the local player's current experience in the specified - * {@link Skill}, or -1 if the {@link Skill} isn't valid - */ - @Inject - @Override - public int getSkillExperience(Skill skill) - { - int[] experiences = getSkillExperiences(); - - if (skill == Skill.OVERALL) - { - logger.debug("getSkillExperience called for {}!", skill); - return (int) getOverallExperience(); - } - - int idx = skill.ordinal(); - - // I'm not certain exactly how needed this is, but if the Skill enum is updated in the future - // to hold something else that's not reported it'll save us from an ArrayIndexOutOfBoundsException. - if (idx >= experiences.length) - { - return -1; - } - - return experiences[idx]; - } - - @Inject - @Override - public long getOverallExperience() - { - int[] experiences = getSkillExperiences(); - - long totalExperience = 0L; - - for (int experience : experiences) - { - totalExperience += experience; - } - - return totalExperience; - } - - @Inject - @Override - public void refreshChat() - { - setChatCycle(getCycleCntr()); - } - - @Inject - @Override - public Widget getViewportWidget() - { - if (isResized()) - { - if (getVar(Varbits.SIDE_PANELS) == 1) - { - return getWidget(WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE); - } - else - { - return getWidget(WidgetInfo.RESIZABLE_VIEWPORT_OLD_SCHOOL_BOX); - } - } - return getWidget(WidgetInfo.FIXED_VIEWPORT); - } - - @Inject - @Override - public MenuEntry[] getMenuEntries() - { - int count = getMenuOptionCount(); - String[] menuOptions = getMenuOptions(); - String[] menuTargets = getMenuTargets(); - int[] menuIdentifiers = getMenuIdentifiers(); - int[] menuTypes = getMenuTypes(); - int[] params0 = getMenuActionParams0(); - int[] params1 = getMenuActionParams1(); - boolean[] leftClick = getMenuForceLeftClick(); - - MenuEntry[] entries = new MenuEntry[count]; - for (int i = 0; i < count; ++i) - { - MenuEntry entry = entries[i] = new MenuEntry(); - entry.setOption(menuOptions[i]); - entry.setTarget(menuTargets[i]); - entry.setIdentifier(menuIdentifiers[i]); - entry.setType(menuTypes[i]); - entry.setParam0(params0[i]); - entry.setParam1(params1[i]); - entry.setForceLeftClick(leftClick[i]); - } - return entries; - } - - @Inject - @Override - public void setMenuEntries(MenuEntry[] entries) - { - int count = 0; - String[] menuOptions = getMenuOptions(); - String[] menuTargets = getMenuTargets(); - int[] menuIdentifiers = getMenuIdentifiers(); - int[] menuTypes = getMenuTypes(); - int[] params0 = getMenuActionParams0(); - int[] params1 = getMenuActionParams1(); - boolean[] leftClick = getMenuForceLeftClick(); - - for (MenuEntry entry : entries) - { - menuOptions[count] = entry.getOption(); - menuTargets[count] = entry.getTarget(); - menuIdentifiers[count] = entry.getIdentifier(); - menuTypes[count] = entry.getType(); - params0[count] = entry.getParam0(); - params1[count] = entry.getParam1(); - leftClick[count] = entry.isForceLeftClick(); - ++count; - } - - setMenuOptionCount(count); - oldMenuEntryCount = count; - } - - @FieldHook("menuOptionCount") - @Inject - public static void onMenuOptionsChanged(int idx) - { - int oldCount = oldMenuEntryCount; - int newCount = client.getMenuOptionCount(); - - oldMenuEntryCount = newCount; - - if (newCount == oldCount + 1) - { - MenuEntryAdded event = new MenuEntryAdded( - client.getMenuOptions()[newCount - 1], - client.getMenuTargets()[newCount - 1], - client.getMenuTypes()[newCount - 1], - client.getMenuIdentifiers()[newCount - 1], - client.getMenuActionParams0()[newCount - 1], - client.getMenuActionParams1()[newCount - 1] - ); - - client.getCallbacks().post(event); - } - } - - @Inject - @Override - public List getProjectiles() - { - List projectiles = new ArrayList(); - RSDeque projectileDeque = this.getProjectilesDeque(); - Node head = projectileDeque.getHead(); - - for (Node node = head.getNext(); node != head; node = node.getNext()) - { - projectiles.add((Projectile) node); - } - - return projectiles; - } - - @Inject - @Override - public List getGraphicsObjects() - { - List graphicsObjects = new ArrayList(); - RSDeque graphicsObjectDeque = this.getGraphicsObjectDeque(); - Node head = graphicsObjectDeque.getHead(); - - for (Node node = head.getNext(); node != head; node = node.getNext()) - { - graphicsObjects.add((GraphicsObject) node); - } - - return graphicsObjects; - } - - @Inject - @Override - public void setModIcons(IndexedSprite[] modIcons) - { - setRSModIcons((RSIndexedSprite[]) modIcons); - } - - @Inject - @Override - @Nullable - public LocalPoint getLocalDestinationLocation() - { - int sceneX = getDestinationX(); - int sceneY = getDestinationY(); - if (sceneX != 0 && sceneY != 0) - { - return LocalPoint.fromScene(sceneX, sceneY); - } - return null; - } - - @Inject - @Override - public void changeMemoryMode(boolean lowMemory) - { - setLowMemory(lowMemory); - setSceneLowMemory(lowMemory); - setAudioHighMemory(true); - setObjectCompositionLowDetail(lowMemory); - } - - @Inject - @Override - public RSItemContainer getItemContainer(InventoryID inventory) - { - RSHashTable itemContainers = getItemContainers(); - return (RSItemContainer) itemContainers.get(inventory.getId()); - } - - @Inject - @Override - public boolean isFriended(String name, boolean mustBeLoggedIn) - { - RSName rsName = createName(name, getLoginType()); - return getFriendManager().isFriended(rsName, mustBeLoggedIn); - } - - @Inject - @Override - public int getClanChatCount() - { - final RSClanMemberManager clanMemberManager = getClanMemberManager(); - return clanMemberManager != null ? clanMemberManager.getCount() : 0; - } - - @Inject - @Override - public ClanMember[] getClanMembers() - { - final RSClanMemberManager clanMemberManager = getClanMemberManager(); - if (clanMemberManager == null) - { - return null; - } - - final int count = clanMemberManager.getCount(); - return Arrays.copyOf(clanMemberManager.getNameables(), count); - } - - @Inject - @Override - public String getClanOwner() - { - return getClanMemberManager().getClanOwner(); - } - - @Inject - @Override - public String getClanChatName() - { - return getClanMemberManager().getClanChatName(); - } - - @Inject - @Override - public Friend[] getFriends() - { - final RSFriendManager friendManager = getFriendManager(); - if (friendManager == null) - { - return null; - } - - final RSFriendContainer friendContainer = friendManager.getFriendContainer(); - if (friendContainer == null) - { - return null; - } - - final int count = friendContainer.getCount(); - return Arrays.copyOf(friendContainer.getNameables(), count); - } - - @Inject - @Override - public int getFriendsCount() - { - final RSFriendManager friendManager = getFriendManager(); - if (friendManager == null) - { - return -1; - } - - final RSFriendContainer friendContainer = friendManager.getFriendContainer(); - if (friendContainer == null) - { - return -1; - } - - return friendContainer.getCount(); - } - - @Inject - @Override - public Ignore[] getIgnores() - { - final RSFriendManager friendManager = getFriendManager(); - if (friendManager == null) - { - return null; - } - - final RSIgnoreContainer ignoreContainer = friendManager.getIgnoreContainer(); - if (ignoreContainer == null) - { - return null; - } - - final int count = ignoreContainer.getCount(); - return Arrays.copyOf(ignoreContainer.getNameables(), count); - } - - @Inject - @Override - public int getIgnoreCount() - { - final RSFriendManager friendManager = getFriendManager(); - if (friendManager == null) - { - return -1; - } - - final RSIgnoreContainer ignoreContainer = friendManager.getIgnoreContainer(); - if (ignoreContainer == null) - { - return -1; - } - - return ignoreContainer.getCount(); - } - - @Inject - @Override - public boolean isClanMember(String name) - { - final RSClanMemberManager clanMemberManager = getClanMemberManager(); - return clanMemberManager != null && clanMemberManager.isMember(createName(name, getLoginType())); - } - - @FieldHook("draggingWidget") - @Inject - public static void draggingWidgetChanged(int idx) - { - DraggingWidgetChanged draggingWidgetChanged = new DraggingWidgetChanged(); - draggingWidgetChanged.setDraggingWidget(client.isDraggingWidget()); - client.getCallbacks().post(draggingWidgetChanged); - } - - @Inject - @Override - public SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale) - { - assert isClientThread(); - int zoom = get3dZoom(); - set3dZoom(scale); - try - { - return createItemSprite(itemId, quantity, border, shadowColor, stackable, noted); - } - finally - { - set3dZoom(zoom); - } - } - - @Copy("runWidgetOnLoadListener") - public static void rs$runWidgetOnLoadListener(int groupId) - { - throw new RuntimeException(); - } - - @Replace("runWidgetOnLoadListener") - public static void rl$runWidgetOnLoadListener(int groupId) - { - rs$runWidgetOnLoadListener(groupId); - - RSWidget[][] widgets = client.getWidgets(); - boolean loaded = widgets != null && widgets[groupId] != null; - - if (loaded) - { - WidgetLoaded event = new WidgetLoaded(); - event.setGroupId(groupId); - client.getCallbacks().post(event); - } - } - - @FieldHook("itemPressedDuration") - @Inject - public static void itemPressedDurationChanged(int idx) - { - if (client.getItemPressedDuration() > 0) - { - itemPressedDurationBuffer++; - if (itemPressedDurationBuffer >= inventoryDragDelay) - { - client.setItemPressedDuration(itemPressedDurationBuffer); - } - else - { - client.setItemPressedDuration(0); - } - } - else - { - itemPressedDurationBuffer = 0; - } - } - - @FieldHook("skillExperiences") - @Inject - public static void experiencedChanged(int idx) - { - ExperienceChanged experienceChanged = new ExperienceChanged(); - Skill[] possibleSkills = Skill.values(); - - // We subtract one here because 'Overall' isn't considered a skill that's updated. - if (idx < possibleSkills.length - 1) - { - Skill updatedSkill = possibleSkills[idx]; - experienceChanged.setSkill(updatedSkill); - client.getCallbacks().post(experienceChanged); - } - } - - @FieldHook("boostedSkillLevels") - @Inject - public static void boostedSkillLevelsChanged(int idx) - { - Skill[] skills = Skill.values(); - - if (idx >= 0 && idx < skills.length - 1) - { - Skill updatedSkill = skills[idx]; - BoostedLevelChanged boostedLevelChanged = new BoostedLevelChanged(); - boostedLevelChanged.setSkill(updatedSkill); - client.getCallbacks().post(boostedLevelChanged); - } - } - - @FieldHook("playerOptions") - @Inject - public static void playerOptionsChanged(int idx) - { - // Reset the menu type - MenuAction[] playerActions = {PLAYER_FIRST_OPTION, PLAYER_SECOND_OPTION, PLAYER_THIRD_OPTION, PLAYER_FOURTH_OPTION, - PLAYER_FIFTH_OPTION, PLAYER_SIXTH_OPTION, PLAYER_SEVENTH_OPTION, PLAYER_EIGTH_OPTION}; - if (idx >= 0 && idx < playerActions.length) - { - MenuAction playerAction = playerActions[idx]; - client.getPlayerMenuTypes()[idx] = playerAction.getId(); - } - - PlayerMenuOptionsChanged optionsChanged = new PlayerMenuOptionsChanged(); - optionsChanged.setIndex(idx); - client.getCallbacks().post(optionsChanged); - } - - @FieldHook("gameState") - @Inject - public static void gameStateChanged(int idx) - { - GameStateChanged gameStateChange = new GameStateChanged(); - gameStateChange.setGameState(client.getGameState()); - client.getCallbacks().post(gameStateChange); - } - - - @FieldHook("cachedNPCs") - @Inject - public static void cachedNPCsChanged(int idx) - { - RSNPC[] cachedNPCs = client.getCachedNPCs(); - if (idx < 0 || idx >= cachedNPCs.length) - { - return; - } - - RSNPC npc = cachedNPCs[idx]; - if (npc != null) - { - npc.setIndex(idx); - - client.getCallbacks().postDeferred(new NpcSpawned(npc)); - } - } - - @FieldHook("cachedPlayers") - @Inject - public static void cachedPlayersChanged(int idx) - { - RSPlayer[] cachedPlayers = client.getCachedPlayers(); - if (idx < 0 || idx >= cachedPlayers.length) - { - return; - } - - RSPlayer player = cachedPlayers[idx]; - RSPlayer oldPlayer = oldPlayers[idx]; - oldPlayers[idx] = player; - - if (oldPlayer != null) - { - client.getCallbacks().post(new PlayerDespawned(oldPlayer)); - } - if (player != null) - { - client.getCallbacks().postDeferred(new PlayerSpawned(player)); - } - } - - @Inject - @FieldHook("grandExchangeOffers") - public static void onGrandExchangeOffersChanged(int idx) - { - if (idx == -1) - { - return; - } - - GrandExchangeOffer internalOffer = client.getGrandExchangeOffers()[idx]; - - if (internalOffer == null) - { - return; - } - - GrandExchangeOfferChanged offerChangedEvent = new GrandExchangeOfferChanged(); - offerChangedEvent.setOffer(internalOffer); - offerChangedEvent.setSlot(idx); - client.getCallbacks().post(offerChangedEvent); - } - - @FieldHook("clientVarps") - @Inject - public static void settingsChanged(int idx) - { - VarbitChanged varbitChanged = new VarbitChanged(); - varbitChanged.setIndex(idx); - client.getCallbacks().post(varbitChanged); - } - - @FieldHook("isResized") - @Inject - public static void resizeChanged(int idx) - { - //maybe couple with varbitChanged. resizeable may not be a varbit but it would fit with the other client settings. - boolean isResized = client.isResized(); - - if (oldIsResized != isResized) - { - ResizeableChanged resizeableChanged = new ResizeableChanged(); - resizeableChanged.setResized(isResized); - client.getCallbacks().post(resizeableChanged); - - oldIsResized = isResized; - } - } - - @FieldHook("clanMemberManager") - @Inject - public static void clanMemberManagerChanged(int idx) - { - client.getCallbacks().post(new ClanChanged(client.getClanMemberManager() != null)); - } - - @FieldHook("canvasWidth") - @Inject - public static void canvasWidthChanged(int idx) - { - client.getCallbacks().post(new CanvasSizeChanged()); - } - - @FieldHook("canvasHeight") - @Inject - public static void canvasHeightChanged(int idx) - { - client.getCallbacks().post(new CanvasSizeChanged()); - } - - @Inject - @Override - public boolean hasHintArrow() - { - return client.getHintArrowTargetType() != HintArrowType.NONE.getValue(); - } - - @Inject - @Override - public HintArrowType getHintArrowType() - { - int type = client.getHintArrowTargetType(); - if (type == HintArrowType.NPC.getValue()) - { - return HintArrowType.NPC; - } - else if (type == HintArrowType.PLAYER.getValue()) - { - return HintArrowType.PLAYER; - } - else if (type == HintArrowType.WORLD_POSITION.getValue()) - { - return HintArrowType.WORLD_POSITION; - } - else - { - return HintArrowType.NONE; - } - } - - @Inject - @Override - public void clearHintArrow() - { - client.setHintArrowTargetType(HintArrowType.NONE.getValue()); - } - - @Inject - @Override - public void setHintArrow(NPC npc) - { - client.setHintArrowTargetType(HintArrowType.NPC.getValue()); - client.setHintArrowNpcTargetIdx(npc.getIndex()); - } - - @Inject - @Override - public void setHintArrow(Player player) - { - client.setHintArrowTargetType(HintArrowType.PLAYER.getValue()); - client.setHintArrowPlayerTargetIdx(((RSPlayer) player).getPlayerId()); - } - - @Inject - @Override - public void setHintArrow(WorldPoint point) - { - client.setHintArrowTargetType(HintArrowType.WORLD_POSITION.getValue()); - client.setHintArrowX(point.getX()); - client.setHintArrowY(point.getY()); - // position the arrow in center of the tile - client.setHintArrowOffsetX(LOCAL_TILE_SIZE / 2); - client.setHintArrowOffsetY(LOCAL_TILE_SIZE / 2); - } - - @Inject - @Override - public WorldPoint getHintArrowPoint() - { - if (getHintArrowType() == HintArrowType.WORLD_POSITION) - { - int x = client.getHintArrowX(); - int y = client.getHintArrowY(); - return new WorldPoint(x, y, client.getPlane()); - } - - return null; - } - - @Inject - @Override - public Player getHintArrowPlayer() - { - if (getHintArrowType() == HintArrowType.PLAYER) - { - int idx = client.getHintArrowPlayerTargetIdx(); - RSPlayer[] players = client.getCachedPlayers(); - - if (idx < 0 || idx >= players.length) - { - return null; - } - - return players[idx]; - } - - return null; - } - - @Inject - @Override - public NPC getHintArrowNpc() - { - if (getHintArrowType() == HintArrowType.NPC) - { - int idx = client.getHintArrowNpcTargetIdx(); - RSNPC[] npcs = client.getCachedNPCs(); - - if (idx < 0 || idx >= npcs.length) - { - return null; - } - - return npcs[idx]; - } - - return null; - } - - @Copy("menuAction") - static void rs$menuAction(int var0, int var1, int var2, int var3, String var4, String var5, int var6, int var7) - { - throw new RuntimeException(); - } - - @Replace("menuAction") - static void rl$menuAction(int actionParam, int widgetId, int menuAction, int id, String menuOption, String menuTarget, int var6, int var7) - { - /* Along the way, the RuneScape client may change a menuAction by incrementing it with 2000. - * I have no idea why, but it does. Their code contains the same conditional statement. - */ - if (menuAction >= 2000) - { - menuAction -= 2000; - } - - final MenuOptionClicked menuOptionClicked = new MenuOptionClicked(); - menuOptionClicked.setActionParam(actionParam); - menuOptionClicked.setMenuOption(menuOption); - menuOptionClicked.setMenuTarget(menuTarget); - menuOptionClicked.setMenuAction(MenuAction.of(menuAction)); - menuOptionClicked.setId(id); - menuOptionClicked.setWidgetId(widgetId); - client.getCallbacks().post(menuOptionClicked); - - if (menuOptionClicked.isConsumed()) - { - return; - } - - rs$menuAction(actionParam, widgetId, menuAction, id, menuOption, menuTarget, var6, var7); - } - - @FieldHook("username") - @Inject - public static void onUsernameChanged(int idx) - { - client.getCallbacks().post(new UsernameChanged()); - } - - @Override - @Inject - public int getTickCount() - { - return tickCount; - } - - @Override - @Inject - public void setTickCount(int tick) - { - tickCount = tick; - } - - @Inject - @Override - public EnumSet getWorldType() - { - int flags = getFlags(); - return WorldType.fromMask(flags); - } - - @Inject - @MethodHook("openMenu") - public void menuOpened(int var1, int var2) - { - final MenuOpened event = new MenuOpened(); - event.setMenuEntries(getMenuEntries()); - callbacks.post(event); - } - - @Inject - @MethodHook("updateNpcs") - public static void updateNpcs(boolean var0, PacketBuffer var1) - { - client.getCallbacks().updateNpcs(); - } - - @Inject - @MethodHook(value = "addChatMessage", end = true) - public static void onAddChatMessage(int type, String name, String message, String sender) - { - Logger logger = client.getLogger(); - if (logger.isDebugEnabled()) - { - logger.debug("Chat message type {}: {}", ChatMessageType.of(type), message); - } - - // Get the message node which was added - Map chatLineMap = client.getChatLineMap(); - RSChatLineBuffer chatLineBuffer = chatLineMap.get(type); - MessageNode messageNode = chatLineBuffer.getLines()[0]; - - final ChatMessageType chatMessageType = ChatMessageType.of(type); - final ChatMessage chatMessage = new ChatMessage(messageNode, chatMessageType, name, message, sender, messageNode.getTimestamp()); - client.getCallbacks().post(chatMessage); - } - - @Inject - @MethodHook("methodDraw") - public void methodDraw(boolean var1) - { - callbacks.clientMainLoop(); - } - - @MethodHook("renderWidgetLayer") - @Inject - public static void renderWidgetLayer(Widget[] widgets, int parentId, int minX, int minY, int maxX, int maxY, int x, int y, int var8) - { - Callbacks callbacks = client.getCallbacks(); - HashTable componentTable = client.getComponentTable(); - - for (Widget rlWidget : widgets) - { - RSWidget widget = (RSWidget) rlWidget; - if (widget == null || widget.getRSParentId() != parentId || widget.isSelfHidden()) - { - continue; - } - - if (parentId != -1) - { - widget.setRenderParentId(parentId); - } - - final int renderX = x + widget.getRelativeX(); - final int renderY = y + widget.getRelativeY(); - widget.setRenderX(renderX); - widget.setRenderY(renderY); - - final int widgetType = widget.getType(); - if (widgetType == WidgetType.GRAPHIC && widget.getItemId() != -1) - { - if (renderX >= minX && renderX <= maxX && renderY >= minY && renderY <= maxY) - { - WidgetItem widgetItem = new WidgetItem(widget.getItemId(), widget.getItemQuantity(), -1, widget.getBounds(), widget); - callbacks.drawItem(widget.getItemId(), widgetItem); - } - } - else if (widgetType == WidgetType.INVENTORY) - { - Collection widgetItems = widget.getWidgetItems(); - for (WidgetItem widgetItem : widgetItems) - { - callbacks.drawItem(widgetItem.getId(), widgetItem); - } - } - - WidgetNode childNode = componentTable.get(widget.getId()); - if (childNode != null) - { - int widgetId = widget.getId(); - int groupId = childNode.getId(); - RSWidget[] children = client.getWidgets()[groupId]; - - for (RSWidget child : children) - { - if (child.getRSParentId() == -1) - { - child.setRenderParentId(widgetId); - } - } - } - } - } - - @Inject - @Override - public RSItem getLastItemDespawn() - { - return lastItemDespawn; - } - - @Inject - @Override - public void setLastItemDespawn(RSItem lastItemDespawn) - { - RSClientMixin.lastItemDespawn = lastItemDespawn; - } - - @Inject - @Override - public boolean isGpu() - { - return gpu; - } - - @Inject - @Override - public void setGpu(boolean gpu) - { - this.gpu = gpu; - } - - @Inject - @Override - public void queueChangedSkill(Skill skill) - { - int[] skills = client.getChangedSkills(); - int count = client.getChangedSkillsCount(); - skills[++count - 1 & 31] = skill.ordinal(); - client.setChangedSkillsCount(count); - } - - @Inject - @Override - public RSSpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId) - { - RSIndexDataBase rsSource = (RSIndexDataBase) source; - byte[] configData = rsSource.getConfigData(archiveId, fileId); - if (configData == null) - { - return null; - } - - decodeSprite(configData); - - int indexedSpriteCount = getIndexedSpriteCount(); - int maxWidth = getIndexedSpriteWidth(); - int maxHeight = getIndexedSpriteHeight(); - int[] offsetX = getIndexedSpriteOffsetXs(); - int[] offsetY = getIndexedSpriteOffsetYs(); - int[] widths = getIndexSpriteWidths(); - int[] heights = getIndexedSpriteHeights(); - byte[][] spritePixelsArray = getSpritePixels(); - int[] indexedSpritePalette = getIndexedSpritePalette(); - - RSSpritePixels[] array = new RSSpritePixels[indexedSpriteCount]; - - for (int i = 0; i < indexedSpriteCount; ++i) - { - int width = widths[i]; - int height = heights[i]; - - byte[] pixelArray = spritePixelsArray[i]; - int[] pixels = new int[width * height]; - - RSSpritePixels spritePixels = createSpritePixels(pixels, width, height); - spritePixels.setMaxHeight(maxHeight); - spritePixels.setMaxWidth(maxWidth); - spritePixels.setOffsetX(offsetX[i]); - spritePixels.setOffsetY(offsetY[i]); - - for (int j = 0; j < width * height; ++j) - { - pixels[j] = indexedSpritePalette[pixelArray[j] & 0xff]; - } - - array[i] = spritePixels; - } - - setIndexedSpriteOffsetXs(null); - setIndexedSpriteOffsetYs(null); - setIndexSpriteWidths(null); - setIndexedSpriteHeights(null); - setIndexSpritePalette(null); - setSpritePixels(null); - - return array; - } - - @Inject - @Override - public void setSkyboxColor(int newSkyboxColor) - { - skyboxColor = newSkyboxColor; - } - - @Inject - @Override - public int getSkyboxColor() - { - return skyboxColor; - } - - @Inject - @FieldHook("cycleCntr") - public static void onCycleCntrChanged(int idx) - { - client.getCallbacks().post(new ClientTick()); - } - - @Copy("shouldLeftClickOpenMenu") - boolean rs$shouldLeftClickOpenMenu() - { - throw new RuntimeException(); - } - - @Replace("shouldLeftClickOpenMenu") - boolean rl$shouldLeftClickOpenMenu() - { - if (rs$shouldLeftClickOpenMenu()) - { - return true; - } - - MenuShouldLeftClick menuShouldLeftClick = new MenuShouldLeftClick(); - client.getCallbacks().post(menuShouldLeftClick); - - if (menuShouldLeftClick.isForceRightClick()) - { - return true; - } - - int len = getMenuOptionCount(); - if (len > 0) - { - int type = getMenuTypes()[len - 1]; - return type == MenuAction.RUNELITE_OVERLAY.getId(); - } - - return false; - } - - @Inject - @Override - public EnumComposition getEnum(int id) - { - assert isClientThread() : "getEnum must be called on client thread"; - - RSEnum rsEnum = enumCache.getIfPresent(id); - if (rsEnum != null) - { - return rsEnum; - } - - rsEnum = getRsEnum(id); - enumCache.put(id, rsEnum); - return rsEnum; - } - - @Inject - @Override - public void resetHealthBarCaches() - { - getHealthBarCache().reset(); - getHealthBarSpriteCache().reset(); - } -} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSDecorativeObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSDecorativeObjectMixin.java deleted file mode 100644 index 9bf27786eb..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSDecorativeObjectMixin.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Polygon; -import java.awt.geom.Area; -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDecorativeObject; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSRenderable; - -@Mixin(RSDecorativeObject.class) -public abstract class RSDecorativeObjectMixin implements RSDecorativeObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int decorativeObjectPlane; - - @Inject - @Override - public int getPlane() - { - return decorativeObjectPlane; - } - - @Inject - @Override - public void setPlane(int plane) - { - this.decorativeObjectPlane = plane; - } - - @Inject - private RSModel getModel() - { - RSRenderable renderable = getRenderable(); - if (renderable == null) - { - return null; - } - - RSModel model; - - if (renderable instanceof Model) - { - model = (RSModel) renderable; - } - else - { - model = renderable.getModel(); - } - - return model; - } - - @Inject - private RSModel getModel2() - { - RSRenderable renderable = getRenderable2(); - if (renderable == null) - { - return null; - } - - RSModel model; - - if (renderable instanceof Model) - { - model = (RSModel) renderable; - } - else - { - model = renderable.getModel(); - } - - return model; - } - - @Inject - @Override - public Area getClickbox() - { - Area clickbox = new Area(); - - LocalPoint lp = getLocalLocation(); - Area clickboxA = Perspective.getClickbox(client, getModel(), 0, - new LocalPoint(lp.getX() + getXOffset(), lp.getY() + getYOffset())); - Area clickboxB = Perspective.getClickbox(client, getModel2(), 0, lp); - - if (clickboxA == null && clickboxB == null) - { - return null; - } - - if (clickboxA != null) - { - clickbox.add(clickboxA); - } - - if (clickboxB != null) - { - clickbox.add(clickboxB); - } - - return clickbox; - } - - @Inject - @Override - public Polygon getConvexHull() - { - RSModel model = getModel(); - - if (model == null) - { - return null; - } - - int tileHeight = Perspective.getTileHeight(client, new LocalPoint(getX(), getY()), client.getPlane()); - return model.getConvexHull(getX() + getXOffset(), getY() + getYOffset(), 0, tileHeight); - } - - @Inject - @Override - public Polygon getConvexHull2() - { - RSModel model = getModel2(); - - if (model == null) - { - return null; - } - - int tileHeight = Perspective.getTileHeight(client, new LocalPoint(getX(), getY()), client.getPlane()); - return model.getConvexHull(getX(), getY(), 0, tileHeight); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSDynamicObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSDynamicObjectMixin.java deleted file mode 100644 index f9639b6309..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSDynamicObjectMixin.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDynamicObject; -import net.runelite.rs.api.RSModel; - -@Mixin(RSDynamicObject.class) -public abstract class RSDynamicObjectMixin implements RSDynamicObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("getModel") - public abstract RSModel rs$getModel(); - - @Replace("getModel") - public RSModel rl$getModel() - { - try - { - // reset frame because it may have been set from the constructor - // it should be set again inside the getModel method - int animFrame = getAnimFrame(); - if (animFrame < 0) - { - setAnimFrame((animFrame ^ Integer.MIN_VALUE) & 0xFFFF); - } - return rs$getModel(); - } - finally - { - int animFrame = getAnimFrame(); - if (animFrame < 0) - { - setAnimFrame((animFrame ^ Integer.MIN_VALUE) & 0xFFFF); - } - } - } - - @FieldHook("animCycleCount") - @Inject - public void onAnimCycleCountChanged(int idx) - { - if (client.isInterpolateObjectAnimations()) - { - // sets the packed anim frame with the frame cycle - int objectFrameCycle = client.getGameCycle() - getAnimCycleCount(); - setAnimFrame(Integer.MIN_VALUE | objectFrameCycle << 16 | getAnimFrame()); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSEnumMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSEnumMixin.java deleted file mode 100644 index 06dd3ab2e8..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSEnumMixin.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2019, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSEnum; - -@Mixin(RSEnum.class) -public abstract class RSEnumMixin implements RSEnum -{ - @Inject - @Override - public int getIntValue(int key) - { - final int[] keys = getKeys(); - if (keys == null) - { - return getDefaultInt(); - } - - for (int i = 0; i < keys.length; ++i) - { - if (keys[i] == key) - { - final int[] values = getIntVals(); - return values[i]; - } - } - return getDefaultInt(); - } - - @Inject - @Override - public String getStringValue(int key) - { - final int[] keys = getKeys(); - if (keys == null) - { - return getDefaultString(); - } - - for (int i = 0; i < keys.length; ++i) - { - if (keys[i] == key) - { - final String[] values = getStringVals(); - return values[i]; - } - } - return getDefaultString(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendManagerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendManagerMixin.java deleted file mode 100644 index 91d5077dd0..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendManagerMixin.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.events.RemovedFriend; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSFriendManager; - -@Mixin(RSFriendManager.class) -public abstract class RSFriendManagerMixin implements RSFriendManager -{ - @Shadow("clientInstance") - private static RSClient client; - - @MethodHook("removeFriend") - @Inject - public void rl$removeFriend(String friendName) - { - RemovedFriend removedFriend = new RemovedFriend(friendName); - client.getCallbacks().post(removedFriend); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendMixin.java deleted file mode 100644 index db47e095a1..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSFriendMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSFriend; -import net.runelite.rs.api.RSName; - -@Mixin(RSFriend.class) -public abstract class RSFriendMixin implements RSFriend -{ - @Override - @Inject - public String getName() - { - return getRsName().getName(); - } - - @Override - @Inject - public String getPrevName() - { - RSName prevName = getRsPrevName(); - return prevName == null ? null : prevName.getName(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameCanvasMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameCanvasMixin.java deleted file mode 100644 index f456a1c5e7..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameCanvasMixin.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Canvas; -import java.awt.event.FocusListener; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGameCanvas; - -@Mixin(RSGameCanvas.class) -public abstract class RSGameCanvasMixin extends Canvas implements RSGameCanvas -{ - @Shadow("clientInstance") - private static RSClient client; - - // This is inverted because it is false initialized. - @Inject - private static boolean shouldNotHaveFocus; - - @Inject - @Override - public void removeFocusListener(FocusListener l) - { - super.removeFocusListener(l); - shouldNotHaveFocus = !this.hasFocus(); - } - - @Inject - @Override - public void requestFocus() - { - // Runescape requests focus whenever the window is resized. Because of this, PluginPanels cannot have focus - // if they cause the sidebar to expand. This change prevents Runescape from requesting focus whenever it wants - if (!shouldNotHaveFocus) - { - this.requestFocusInWindow(); - } - } - - @Inject - @Override - public void setSize(int width, int height) - { - if (client.isStretchedEnabled()) - { - super.setSize(client.getStretchedDimensions().width, client.getStretchedDimensions().height); - } - else - { - super.setSize(width, height); - } - } - - @Inject - @Override - public void setLocation(int x, int y) - { - if (client.isStretchedEnabled()) - { - super.setLocation((getParent().getWidth() - client.getStretchedDimensions().width) / 2, 0); - } - else - { - super.setLocation(x, y); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameEngineMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameEngineMixin.java deleted file mode 100644 index ee4fe10fa6..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameEngineMixin.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.event.FocusEvent; -import net.runelite.api.events.FocusChanged; -import net.runelite.api.hooks.DrawCallbacks; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGameEngine; - -@Mixin(RSGameEngine.class) -public abstract class RSGameEngineMixin implements RSGameEngine -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private Thread thread; - - @Inject - @Override - public Thread getClientThread() - { - return thread; - } - - @Inject - @Override - public boolean isClientThread() - { - return thread == Thread.currentThread(); - } - - @Inject - @MethodHook("run") - public void onRun() - { - thread = Thread.currentThread(); - thread.setName("Client"); - } - - @Inject - @MethodHook("focusGained") - public void onFocusGained(FocusEvent focusEvent) - { - final FocusChanged focusChanged = new FocusChanged(); - focusChanged.setFocused(true); - client.getCallbacks().post(focusChanged); - } - - @Inject - @MethodHook("post") - public void onPost(Object canvas) - { - DrawCallbacks drawCallbacks = client.getDrawCallbacks(); - if (drawCallbacks != null) - { - drawCallbacks.draw(); - } - } - - @FieldHook("replaceCanvasNextFrame") - @Inject - public void onReplaceCanvasNextFrameChanged(int idx) - { - // when this is initially called the client instance doesn't exist yet - if (client != null && client.isGpu() && isReplaceCanvasNextFrame()) - { - setReplaceCanvasNextFrame(false); - setResizeCanvasNextFrame(true); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGameObjectMixin.java deleted file mode 100644 index 25fb322c79..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGameObjectMixin.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Polygon; -import java.awt.geom.Area; -import net.runelite.api.Perspective; -import net.runelite.api.Point; -import net.runelite.api.coords.Angle; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGameObject; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSRenderable; - -@Mixin(RSGameObject.class) -public abstract class RSGameObjectMixin implements RSGameObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public Point getSceneMinLocation() - { - return new Point(getRelativeX(), getRelativeY()); - } - - @Inject - @Override - public Point getSceneMaxLocation() - { - return new Point(getOffsetX(), getOffsetY()); - } - - @Inject - private RSModel getModel() - { - RSRenderable renderable = getRenderable(); - if (renderable == null) - { - return null; - } - - if (renderable instanceof RSModel) - { - return (RSModel) renderable; - } - else - { - return renderable.getModel(); - } - } - - @Inject - @Override - public Area getClickbox() - { - return Perspective.getClickbox(client, getModel(), getRsOrientation(), getLocalLocation()); - } - - @Inject - @Override - public Polygon getConvexHull() - { - RSModel model = getModel(); - - if (model == null) - { - return null; - } - - int tileHeight = Perspective.getTileHeight(client, new LocalPoint(getX(), getY()), client.getPlane()); - return model.getConvexHull(getX(), getY(), getRsOrientation(), tileHeight); - } - - @Override - @Inject - public Angle getOrientation() - { - int orientation = getRsOrientation(); - int rotation = (getFlags() >> 6) & 3; - return new Angle(rotation * 512 + orientation); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGrandExchangeOfferMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGrandExchangeOfferMixin.java deleted file mode 100644 index 17509a4aa1..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGrandExchangeOfferMixin.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.runelite.mixins; - -import net.runelite.api.GrandExchangeOfferState; -import static net.runelite.api.GrandExchangeOfferState.BOUGHT; -import static net.runelite.api.GrandExchangeOfferState.BUYING; -import static net.runelite.api.GrandExchangeOfferState.CANCELLED_BUY; -import static net.runelite.api.GrandExchangeOfferState.CANCELLED_SELL; -import static net.runelite.api.GrandExchangeOfferState.EMPTY; -import static net.runelite.api.GrandExchangeOfferState.SELLING; -import static net.runelite.api.GrandExchangeOfferState.SOLD; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSGrandExchangeOffer; - -@Mixin(RSGrandExchangeOffer.class) -public abstract class RSGrandExchangeOfferMixin implements RSGrandExchangeOffer -{ - - /* - Internally a GrandExchangeOffer's state is represented as 4 flags - packed into the lower half of a byte. They are: - */ - - //Set for sell offers, unset for buy offers - private static final int IS_SELLING = 1 << 3; // 0b1000 - - - /* - Set for offers that have finished, either because they've - been filled, or because they were cancelled - */ - private static final int COMPLETED = 1 << 2; // 0b0100 - - /* - Set for offers that are actually live - NB: Insta-buy/sell offers will be simultaneously LIVE and LOCAL - */ - private static final int LIVE = 1 << 1; // 0b0010 - - //True for just-made, just-cancelled, completely cancelled, and completed offers - private static final int LOCAL = 1; - - @Inject - @Override - public GrandExchangeOfferState getState() - { - byte code = getRSState(); - boolean isSelling = (code & IS_SELLING) == IS_SELLING; - boolean isFinished = (code & COMPLETED) == COMPLETED; - - - if (code == 0) - { - return EMPTY; - } - else if (isFinished && getQuantitySold() < getTotalQuantity()) - { - return isSelling ? CANCELLED_SELL : CANCELLED_BUY; - } - else if (isSelling) - { - if (isFinished) - { - return SOLD; - } - else // if isUnfinished - { - return SELLING; - } - } - else // if isBuying - { - if (isFinished) - { - return BOUGHT; - } - else // if isUnfinished - { - return BUYING; - } - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSGroundObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSGroundObjectMixin.java deleted file mode 100644 index d0d00d8e9b..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSGroundObjectMixin.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.geom.Area; -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.Renderable; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGroundObject; - -@Mixin(RSGroundObject.class) -public abstract class RSGroundObjectMixin implements RSGroundObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int groundObjectPlane; - - @Inject - @Override - public int getPlane() - { - return groundObjectPlane; - } - - @Inject - @Override - public void setPlane(int plane) - { - this.groundObjectPlane = plane; - } - - @Inject - private Model getModel() - { - Renderable renderable = getRenderable(); - if (renderable == null) - { - return null; - } - - if (renderable instanceof Model) - { - return (Model) renderable; - } - else - { - return renderable.getModel(); - } - } - - @Inject - @Override - public Area getClickbox() - { - return Perspective.getClickbox(client, getModel(), 0, getLocalLocation()); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSHashTableMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSHashTableMixin.java deleted file mode 100644 index ae82420438..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSHashTableMixin.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import net.runelite.api.Node; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSHashTable; -import net.runelite.rs.api.RSNode; - -@Mixin(RSHashTable.class) -public abstract class RSHashTableMixin implements RSHashTable -{ - @Inject - @Override - public Collection getNodes() - { - // Copied in RSWidgetMixin.getParentId to reduce allocations - List nodes = new ArrayList(); - - RSNode[] buckets = getBuckets(); - for (int i = 0; i < buckets.length; ++i) - { - Node node = buckets[i]; - - // It looks like the first node in the bucket is always - // a sentinel - Node cur = node.getNext(); - while (cur != node) - { - nodes.add(cur); - cur = cur.getNext(); - } - } - - return nodes; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSHealthBarMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSHealthBarMixin.java deleted file mode 100644 index ee80620f2e..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSHealthBarMixin.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2019, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.events.PostHealthBar; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSBuffer; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSHealthBar; - -@Mixin(RSHealthBar.class) -public abstract class RSHealthBarMixin implements RSHealthBar -{ - @Shadow("clientInstance") - private static RSClient client; - - @MethodHook(value = "read", end = true) - @Inject - public void onRead(RSBuffer buffer) - { - PostHealthBar postHealthBar = new PostHealthBar(); - postHealthBar.setHealthBar(this); - client.getCallbacks().post(postHealthBar); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSIgnoreMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSIgnoreMixin.java deleted file mode 100644 index 98bcd7b3b2..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSIgnoreMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSIgnore; -import net.runelite.rs.api.RSName; - -@Mixin(RSIgnore.class) -public abstract class RSIgnoreMixin implements RSIgnore -{ - @Override - @Inject - public String getName() - { - return getRsName().getName(); - } - - @Override - @Inject - public String getPrevName() - { - RSName prevName = getRsPrevName(); - return prevName == null ? null : prevName.getName(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSIndexDataBaseMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSIndexDataBaseMixin.java deleted file mode 100644 index c2c6806802..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSIndexDataBaseMixin.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import com.google.common.hash.HashCode; -import com.google.common.hash.Hashing; -import com.google.common.io.BaseEncoding; -import com.google.common.io.ByteStreams; -import com.google.common.io.CharStreams; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.overlay.OverlayIndex; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSIndexData; -import net.runelite.rs.api.RSIndexDataBase; -import org.slf4j.Logger; - -@Mixin(RSIndexDataBase.class) -public abstract class RSIndexDataBaseMixin implements RSIndexDataBase -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private boolean overlayOutdated; - - @Inject - @Override - public boolean isOverlayOutdated() - { - return overlayOutdated; - } - - @Copy("getConfigData") - abstract byte[] rs$getConfigData(int archiveId, int fileId); - - @Replace("getConfigData") - public byte[] rl$getConfigData(int archiveId, int fileId) - { - byte[] rsData = rs$getConfigData(archiveId, fileId); - RSIndexData indexData = (RSIndexData) this; - - if (!OverlayIndex.hasOverlay(indexData.getIndex(), archiveId)) - { - return rsData; - } - - Logger log = client.getLogger(); - - InputStream in = getClass().getResourceAsStream("/runelite/" + indexData.getIndex() + "/" + archiveId); - if (in == null) - { - log.warn("Missing overlay data for {}/{}", indexData.getIndex(), archiveId); - return rsData; - } - - InputStream in2 = getClass().getResourceAsStream("/runelite/" + indexData.getIndex() + "/" + archiveId + ".hash"); - if (rsData == null) - { - if (in2 != null) - { - log.warn("Hash file for non existing archive {}/{}", indexData.getIndex(), archiveId); - return null; - } - - log.debug("Adding archive {}/{}", indexData.getIndex(), archiveId); - - try - { - return ByteStreams.toByteArray(in); - } - catch (IOException ex) - { - log.warn("error loading archive replacement", ex); - } - - return null; - } - if (in2 == null) - { - log.warn("Missing hash file for {}/{}", indexData.getIndex(), archiveId); - return rsData; - } - - HashCode rsDataHash = Hashing.sha256().hashBytes(rsData); - - String rsHash = BaseEncoding.base16().encode(rsDataHash.asBytes()); - - try - { - String replaceHash = CharStreams.toString(new InputStreamReader(in2)); - - if (replaceHash.equals(rsHash)) - { - log.debug("Replacing archive {}/{}", - indexData.getIndex(), archiveId); - return ByteStreams.toByteArray(in); - } - - log.warn("Mismatch in overlaid cache archive hash for {}/{}: {} != {}", - indexData.getIndex(), archiveId, replaceHash, rsHash); - overlayOutdated = true; - } - catch (IOException ex) - { - log.warn("error checking hash", ex); - } - - return rsData; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemCompositionMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSItemCompositionMixin.java deleted file mode 100644 index c37acc3946..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemCompositionMixin.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.runelite.mixins; - -import net.runelite.api.events.PostItemComposition; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSItemComposition; - -@Mixin(RSItemComposition.class) -public abstract class RSItemCompositionMixin implements RSItemComposition -{ - private static final int DEFAULT_CUSTOM_SHIFT_CLICK_INDEX = -2; - - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int shiftClickActionIndex = DEFAULT_CUSTOM_SHIFT_CLICK_INDEX; - - @Inject - RSItemCompositionMixin() - { - } - - @Inject - @Override - public boolean isStackable() - { - return getIsStackable() != 0; - } - - @Inject - @Override - public void setShiftClickActionIndex(int shiftClickActionIndex) - { - this.shiftClickActionIndex = shiftClickActionIndex; - } - - @Copy("getShiftClickActionIndex") - abstract int rs$getShiftClickActionIndex(); - - @Replace("getShiftClickActionIndex") - public int getShiftClickActionIndex() - { - return shiftClickActionIndex == DEFAULT_CUSTOM_SHIFT_CLICK_INDEX ? rs$getShiftClickActionIndex() : shiftClickActionIndex; - } - - @Inject - @Override - public void resetShiftClickActionIndex() - { - shiftClickActionIndex = DEFAULT_CUSTOM_SHIFT_CLICK_INDEX; - } - - @Inject - @MethodHook(value = "post", end = true) - public void post() - { - final PostItemComposition event = new PostItemComposition(); - event.setItemComposition(this); - client.getCallbacks().post(event); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemContainerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSItemContainerMixin.java deleted file mode 100644 index 638e90ced9..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemContainerMixin.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2016-2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.Item; -import net.runelite.api.events.ItemContainerChanged; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSItem; -import net.runelite.rs.api.RSItemContainer; - -@Mixin(RSItemContainer.class) -public abstract class RSItemContainerMixin implements RSItemContainer -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int rl$lastCycle; - - @Inject - @Override - public Item[] getItems() - { - int[] itemIds = getItemIds(); - int[] stackSizes = getStackSizes(); - Item[] items = new Item[itemIds.length]; - - for (int i = 0; i < itemIds.length; ++i) - { - RSItem item = client.createItem(); - item.setId(itemIds[i]); - item.setQuantity(stackSizes[i]); - items[i] = item; - } - - return items; - } - - @FieldHook("stackSizes") - @Inject - public void stackSizesChanged(int idx) - { - int cycle = client.getGameCycle(); - if (rl$lastCycle == cycle) - { - // Limit item container updates to one per cycle - return; - } - - rl$lastCycle = cycle; - - ItemContainerChanged event = new ItemContainerChanged(this); - client.getCallbacks().postDeferred(event); - } - -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemLayerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSItemLayerMixin.java deleted file mode 100644 index 8b67d4d314..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemLayerMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.geom.Area; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSItemLayer; - -@Mixin(RSItemLayer.class) -public abstract class RSItemLayerMixin implements RSItemLayer -{ - @Inject - private int itemLayerPlane; - - @Inject - @Override - public int getPlane() - { - return itemLayerPlane; - } - - @Inject - @Override - public void setPlane(int plane) - { - this.itemLayerPlane = plane; - } - - @Inject - @Override - public Area getClickbox() - { - throw new UnsupportedOperationException(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSItemMixin.java deleted file mode 100644 index 1d0732d9f6..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSItemMixin.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.Tile; -import net.runelite.api.events.ItemQuantityChanged; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSItem; - -@Mixin(RSItem.class) -public abstract class RSItemMixin implements RSItem -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int rl$sceneX = -1; - - @Inject - private int rl$sceneY = -1; - - @Inject - RSItemMixin() - { - } - - @Inject - @Override - public Tile getTile() - { - int x = rl$sceneX; - int y = rl$sceneY; - - if (x == -1 || y == -1) - { - return null; - } - - Tile[][][] tiles = client.getScene().getTiles(); - Tile tile = tiles[client.getPlane()][x][y]; - return tile; - } - - @Inject - @Override - public void onUnlink() - { - if (rl$sceneX != -1) - { - // on despawn, the first item unlinked is the item despawning. However on spawn - // items can be delinked in order to sort them, so we can't assume the item here is despawning - if (client.getLastItemDespawn() == null) - { - client.setLastItemDespawn(this); - } - } - } - - @Inject - @FieldHook(value = "quantity", before = true) - public void quantityChanged(int quantity) - { - if (rl$sceneX != -1) - { - client.getLogger().debug("Item quantity changed: {} ({} -> {})", getId(), getQuantity(), quantity); - - ItemQuantityChanged itemQuantityChanged = new ItemQuantityChanged(this, getTile(), getQuantity(), quantity); - client.getCallbacks().post(itemQuantityChanged); - } - } - - @Inject - @Override - public int getX() - { - return rl$sceneX; - } - - @Inject - @Override - public void setX(int x) - { - rl$sceneX = x; - } - - @Inject - @Override - public int getY() - { - return rl$sceneY; - } - - @Inject - @Override - public void setY(int y) - { - rl$sceneY = y; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSKeyFocusListenerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSKeyFocusListenerMixin.java deleted file mode 100644 index 73ddd9fd99..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSKeyFocusListenerMixin.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.event.FocusEvent; -import java.awt.event.KeyEvent; -import net.runelite.api.events.FocusChanged; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSKeyFocusListener; - -@Mixin(RSKeyFocusListener.class) -public abstract class RSKeyFocusListenerMixin implements RSKeyFocusListener -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("keyPressed") - abstract void rs$keyPressed(KeyEvent keyEvent); - - @Copy("keyReleased") - abstract void rs$keyReleased(KeyEvent keyEvent); - - @Copy("keyTyped") - abstract void rs$keyTyped(KeyEvent keyEvent); - - @Override - @Replace("keyPressed") - public final synchronized void keyPressed(KeyEvent keyEvent) - { - client.getCallbacks().keyPressed(keyEvent); - if (!keyEvent.isConsumed()) - { - rs$keyPressed(keyEvent); - } - } - - @Override - @Replace("keyReleased") - public final synchronized void keyReleased(KeyEvent keyEvent) - { - client.getCallbacks().keyReleased(keyEvent); - if (!keyEvent.isConsumed()) - { - rs$keyReleased(keyEvent); - } - } - - @Override - @Replace("keyTyped") - public final void keyTyped(KeyEvent keyEvent) - { - client.getCallbacks().keyTyped(keyEvent); - if (!keyEvent.isConsumed()) - { - rs$keyTyped(keyEvent); - } - } - - @Inject - @MethodHook("focusLost") - public void onFocusLost(FocusEvent focusEvent) - { - final FocusChanged focusChanged = new FocusChanged(); - focusChanged.setFocused(false); - client.getCallbacks().post(focusChanged); - } -} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSMainBufferProviderMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSMainBufferProviderMixin.java deleted file mode 100644 index 0edcd02ad5..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSMainBufferProviderMixin.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Component; -import java.awt.Graphics; -import java.awt.color.ColorSpace; -import java.awt.image.BufferedImage; -import java.awt.image.DataBuffer; -import java.awt.image.DataBufferInt; -import java.awt.image.DirectColorModel; -import java.awt.image.Raster; -import java.awt.image.WritableRaster; -import java.nio.IntBuffer; -import java.util.Hashtable; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSMainBufferProvider; - -@Mixin(RSMainBufferProvider.class) -public abstract class RSMainBufferProviderMixin implements RSMainBufferProvider -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private IntBuffer buffer; - - @MethodHook(value = "", end = true) - @Inject - public void init(int width, int height, Component canvas) - { - if (!client.isGpu()) - { - return; - } - - final int[] pixels = getPixels(); - - // we need to make our own buffered image for the client with the alpha channel enabled in order to - // have alphas for the overlays applied correctly - DataBufferInt dataBufferInt = new DataBufferInt(pixels, pixels.length); - DirectColorModel directColorModel = new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), - 32, 0xff0000, 0xff00, 0xff, 0xff000000, - true, DataBuffer.TYPE_INT); - WritableRaster writableRaster = Raster.createWritableRaster(directColorModel.createCompatibleSampleModel(width, height), dataBufferInt, null); - BufferedImage bufferedImage = new BufferedImage(directColorModel, writableRaster, true, new Hashtable()); - - setImage(bufferedImage); - } - - /** - * Replacing this method makes it so we can completely - * control when/what is drawn on the game's canvas, - * as the method that is replaced draws - * the game's image on the canvas. - */ - @Replace("draw") - final void draw(Graphics graphics, int x, int y) - { - client.getCallbacks().draw(this, graphics, x, y); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSMessageNodeMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSMessageNodeMixin.java deleted file mode 100644 index da716252e7..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSMessageNodeMixin.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.ChatMessageType; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSMessageNode; - -@Mixin(RSMessageNode.class) -public abstract class RSMessageNodeMixin implements RSMessageNode -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private String runeLiteFormatMessage; - - @Inject - private int rl$timestamp; - - @Inject - RSMessageNodeMixin() - { - rl$timestamp = (int) (System.currentTimeMillis() / 1000L); - } - - @Inject - @Override - public ChatMessageType getType() - { - return ChatMessageType.of(getRSType()); - } - - @Inject - @Override - public String getRuneLiteFormatMessage() - { - return runeLiteFormatMessage; - } - - @Inject - @Override - public void setRuneLiteFormatMessage(String runeLiteFormatMessage) - { - this.runeLiteFormatMessage = runeLiteFormatMessage; - } - - @Inject - @Override - public int getTimestamp() - { - return rl$timestamp; - } - - @Inject - @Override - public void setTimestamp(int timestamp) - { - this.rl$timestamp = timestamp; - } - - @Inject - @MethodHook(value = "setMessage", end = true) - public void setMessage(int type, String name, String sender, String value) - { - // Message nodes get reused after a time by calling setMessage. - // Clear the runelite formatted message then. - runeLiteFormatMessage = null; - rl$timestamp = (int) (System.currentTimeMillis() / 1000L); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSModelDataMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSModelDataMixin.java deleted file mode 100644 index 6a074e6aba..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSModelDataMixin.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.Model; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSModelData; - -@Mixin(RSModelData.class) -public abstract class RSModelDataMixin implements RSModelData -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private float[][] faceTextureUCoordinates; - - @Inject - private float[][] faceTextureVCoordinates; - - @Copy("light") - public abstract Model rs$light(int ambient, int contrast, int var3, int var4, int var5); - - @Replace("light") - public Model rl$light(int ambient, int contrast, int var3, int var4, int var5) - { - client.getLogger().trace("Lighting model {}", this); - - Model model = rs$light(ambient, contrast, var3, var4, var5); - if (model == null) - { - return null; - } - - if (faceTextureUCoordinates == null) - { - computeTextureUVCoordinates(); - } - - RSModel rsModel = (RSModel) model; - rsModel.setFaceTextureUCoordinates(faceTextureUCoordinates); - rsModel.setFaceTextureVCoordinates(faceTextureVCoordinates); - return model; - } - - @Inject - public void computeTextureUVCoordinates() - { - final short[] faceTextures = getFaceTextures(); - if (faceTextures == null) - { - return; - } - - final int[] vertexPositionsX = getVertexX(); - final int[] vertexPositionsY = getVertexY(); - final int[] vertexPositionsZ = getVertexZ(); - - final int[] trianglePointsX = getTrianglePointsX(); - final int[] trianglePointsY = getTrianglePointsY(); - final int[] trianglePointsZ = getTrianglePointsZ(); - - final short[] texTriangleX = getTexTriangleX(); - final short[] texTriangleY = getTexTriangleY(); - final short[] texTriangleZ = getTexTriangleZ(); - - final byte[] textureCoords = getTextureCoords(); - final byte[] textureRenderTypes = getTextureRenderTypes(); - - int faceCount = getTriangleFaceCount(); - this.faceTextureUCoordinates = new float[faceCount][]; - this.faceTextureVCoordinates = new float[faceCount][]; - - for (int i = 0; i < faceCount; i++) - { - int textureCoordinate; - if (textureCoords == null) - { - textureCoordinate = -1; - } - else - { - textureCoordinate = textureCoords[i]; - } - - short textureIdx; - textureIdx = faceTextures[i]; - - if (textureIdx != -1) - { - float[] u = new float[3]; - float[] v = new float[3]; - - if (textureCoordinate == -1) - { - u[0] = 0.0F; - v[0] = 1.0F; - - u[1] = 1.0F; - v[1] = 1.0F; - - u[2] = 0.0F; - v[2] = 0.0F; - } - else - { - textureCoordinate &= 0xFF; - - byte textureRenderType = 0; - if (textureRenderTypes != null) - { - textureRenderType = textureRenderTypes[textureCoordinate]; - } - - if (textureRenderType == 0) - { - int faceVertexIdx1 = trianglePointsX[i]; - int faceVertexIdx2 = trianglePointsY[i]; - int faceVertexIdx3 = trianglePointsZ[i]; - - int triangleVertexIdx1 = texTriangleX[textureCoordinate]; - int triangleVertexIdx2 = texTriangleY[textureCoordinate]; - int triangleVertexIdx3 = texTriangleZ[textureCoordinate]; - - float triangleX = (float) vertexPositionsX[triangleVertexIdx1]; - float triangleY = (float) vertexPositionsY[triangleVertexIdx1]; - float triangleZ = (float) vertexPositionsZ[triangleVertexIdx1]; - - float f_882_ = (float) vertexPositionsX[triangleVertexIdx2] - triangleX; - float f_883_ = (float) vertexPositionsY[triangleVertexIdx2] - triangleY; - float f_884_ = (float) vertexPositionsZ[triangleVertexIdx2] - triangleZ; - float f_885_ = (float) vertexPositionsX[triangleVertexIdx3] - triangleX; - float f_886_ = (float) vertexPositionsY[triangleVertexIdx3] - triangleY; - float f_887_ = (float) vertexPositionsZ[triangleVertexIdx3] - triangleZ; - float f_888_ = (float) vertexPositionsX[faceVertexIdx1] - triangleX; - float f_889_ = (float) vertexPositionsY[faceVertexIdx1] - triangleY; - float f_890_ = (float) vertexPositionsZ[faceVertexIdx1] - triangleZ; - float f_891_ = (float) vertexPositionsX[faceVertexIdx2] - triangleX; - float f_892_ = (float) vertexPositionsY[faceVertexIdx2] - triangleY; - float f_893_ = (float) vertexPositionsZ[faceVertexIdx2] - triangleZ; - float f_894_ = (float) vertexPositionsX[faceVertexIdx3] - triangleX; - float f_895_ = (float) vertexPositionsY[faceVertexIdx3] - triangleY; - float f_896_ = (float) vertexPositionsZ[faceVertexIdx3] - triangleZ; - - float f_897_ = f_883_ * f_887_ - f_884_ * f_886_; - float f_898_ = f_884_ * f_885_ - f_882_ * f_887_; - float f_899_ = f_882_ * f_886_ - f_883_ * f_885_; - float f_900_ = f_886_ * f_899_ - f_887_ * f_898_; - float f_901_ = f_887_ * f_897_ - f_885_ * f_899_; - float f_902_ = f_885_ * f_898_ - f_886_ * f_897_; - float f_903_ = 1.0F / (f_900_ * f_882_ + f_901_ * f_883_ + f_902_ * f_884_); - - u[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_; - u[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_; - u[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_; - - f_900_ = f_883_ * f_899_ - f_884_ * f_898_; - f_901_ = f_884_ * f_897_ - f_882_ * f_899_; - f_902_ = f_882_ * f_898_ - f_883_ * f_897_; - f_903_ = 1.0F / (f_900_ * f_885_ + f_901_ * f_886_ + f_902_ * f_887_); - - v[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_; - v[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_; - v[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_; - } - } - - this.faceTextureUCoordinates[i] = u; - this.faceTextureVCoordinates[i] = v; - } - } - } - -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSModelMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSModelMixin.java deleted file mode 100644 index 470f453b03..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSModelMixin.java +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Polygon; -import java.util.ArrayList; -import java.util.List; -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.Point; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.model.Jarvis; -import net.runelite.api.model.Triangle; -import net.runelite.api.model.Vertex; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSFrame; -import net.runelite.rs.api.RSFrameMap; -import net.runelite.rs.api.RSFrames; -import net.runelite.rs.api.RSModel; - -@Mixin(RSModel.class) -public abstract class RSModelMixin implements RSModel -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int rl$sceneId; - - @Inject - private int rl$bufferOffset; - - @Inject - private int rl$uvBufferOffset; - - @Inject - private float[][] rl$faceTextureUCoordinates; - - @Inject - private float[][] rl$faceTextureVCoordinates; - - @MethodHook(value = "", end = true) - @Inject - public void rl$init(RSModel[] models, int length) - { - int count = 0; - for (int i = 0; i < length; ++i) - { - RSModel model = models[i]; - if (model != null) - { - count += model.getTrianglesCount(); - } - } - - float[][] u = new float[count][]; - float[][] v = new float[count][]; - int idx = 0; - - for (int i = 0; i < length; ++i) - { - RSModel model = models[i]; - if (model != null) - { - float[][] modelU = model.getFaceTextureUCoordinates(); - float[][] modelV = model.getFaceTextureVCoordinates(); - - for (int j = 0; j < model.getTrianglesCount(); ++j) - { - if (modelU != null && modelV != null) - { - u[idx] = modelU[j]; - v[idx] = modelV[j]; - } - ++idx; - } - } - } - - setFaceTextureUCoordinates(u); - setFaceTextureVCoordinates(v); - } - - @Override - @Inject - public List getVertices() - { - int[] verticesX = getVerticesX(); - int[] verticesY = getVerticesY(); - int[] verticesZ = getVerticesZ(); - - List vertices = new ArrayList(getVerticesCount()); - - for (int i = 0; i < getVerticesCount(); ++i) - { - Vertex v = new Vertex( - verticesX[i], - verticesY[i], - verticesZ[i] - ); - vertices.add(v); - } - - return vertices; - } - - @Override - @Inject - public List getTriangles() - { - int[] trianglesX = getTrianglesX(); - int[] trianglesY = getTrianglesY(); - int[] trianglesZ = getTrianglesZ(); - - List vertices = getVertices(); - List triangles = new ArrayList(getTrianglesCount()); - - for (int i = 0; i < getTrianglesCount(); ++i) - { - int triangleX = trianglesX[i]; - int triangleY = trianglesY[i]; - int triangleZ = trianglesZ[i]; - - Triangle triangle = new Triangle( - vertices.get(triangleX), - vertices.get(triangleY), - vertices.get(triangleZ) - ); - triangles.add(triangle); - } - - return triangles; - } - - @Copy("contourGround") - public abstract Model rs$contourGround(int[][] tileHeights, int packedX, int height, int packedY, boolean copy, int contouredGround); - - @Replace("contourGround") - public Model rl$contourGround(int[][] tileHeights, int packedX, int height, int packedY, boolean copy, int contouredGround) - { - // With contouredGround >= 0 lighted models are countoured, so we need to copy uvs - Model model = rs$contourGround(tileHeights, packedX, height, packedY, copy, contouredGround); - if (model != null && model != this) - { - RSModel rsModel = (RSModel) model; - rsModel.setFaceTextureUCoordinates(rl$faceTextureUCoordinates); - rsModel.setFaceTextureVCoordinates(rl$faceTextureVCoordinates); - } - return model; - } - - @MethodHook("buildSharedModel") - @Inject - public void rl$buildSharedModel(boolean refTransparencies, Model sharedModel, byte[] transparencyBuffer) - { - // Animated models are usually a shared Model instance that is global - RSModel rsModel = (RSModel) sharedModel; - rsModel.setFaceTextureUCoordinates(rl$faceTextureUCoordinates); - rsModel.setFaceTextureVCoordinates(rl$faceTextureVCoordinates); - } - - @Inject - public void interpolateFrames(RSFrames frames, int frameId, RSFrames nextFrames, int nextFrameId, int interval, - int intervalCount) - { - if (getVertexGroups() != null) - { - if (frameId != -1) - { - RSFrame frame = frames.getFrames()[frameId]; - RSFrameMap skin = frame.getSkin(); - RSFrame nextFrame = null; - if (nextFrames != null) - { - nextFrame = nextFrames.getFrames()[nextFrameId]; - if (nextFrame.getSkin() != skin) - { - nextFrame = null; - } - } - - client.setAnimOffsetX(0); - client.setAnimOffsetY(0); - client.setAnimOffsetZ(0); - - interpolateFrames(skin, frame, nextFrame, interval, intervalCount); - resetBounds(); - } - } - } - - @Inject - public void interpolateFrames(RSFrameMap skin, RSFrame frame, RSFrame nextFrame, int interval, int intervalCount) - { - if (nextFrame == null || interval == 0) - { - // if there is no next frame or interval then animate the model as we normally would - for (int i = 0; i < frame.getTransformCount(); i++) - { - int type = frame.getTransformTypes()[i]; - this.animate(skin.getTypes()[type], skin.getList()[type], frame.getTranslatorX()[i], - frame.getTranslatorY()[i], frame.getTranslatorZ()[i]); - } - } - else - { - int transformIndex = 0; - int nextTransformIndex = 0; - for (int i = 0; i < skin.getCount(); i++) - { - boolean frameValid = false; - if (transformIndex < frame.getTransformCount() - && frame.getTransformTypes()[transformIndex] == i) - { - frameValid = true; - } - boolean nextFrameValid = false; - if (nextTransformIndex < nextFrame.getTransformCount() - && nextFrame.getTransformTypes()[nextTransformIndex] == i) - { - nextFrameValid = true; - } - if (frameValid || nextFrameValid) - { - int staticFrame = 0; - int type = skin.getTypes()[i]; - if (type == 3 || type == 10) - { - staticFrame = 128; - } - int currentTranslateX = staticFrame; - int currentTranslateY = staticFrame; - int currentTranslateZ = staticFrame; - if (frameValid) - { - currentTranslateX = frame.getTranslatorX()[transformIndex]; - currentTranslateY = frame.getTranslatorY()[transformIndex]; - currentTranslateZ = frame.getTranslatorZ()[transformIndex]; - transformIndex++; - } - int nextTranslateX = staticFrame; - int nextTranslateY = staticFrame; - int nextTranslateZ = staticFrame; - if (nextFrameValid) - { - nextTranslateX = nextFrame.getTranslatorX()[nextTransformIndex]; - nextTranslateY = nextFrame.getTranslatorY()[nextTransformIndex]; - nextTranslateZ = nextFrame.getTranslatorZ()[nextTransformIndex]; - nextTransformIndex++; - } - int translateX; - int translateY; - int translateZ; - if (type == 2) - { - int deltaX = nextTranslateX - currentTranslateX & 0xFF; - int deltaY = nextTranslateY - currentTranslateY & 0xFF; - int deltaZ = nextTranslateZ - currentTranslateZ & 0xFF; - if (deltaX >= 128) - { - deltaX -= 256; - } - if (deltaY >= 128) - { - deltaY -= 256; - } - if (deltaZ >= 128) - { - deltaZ -= 256; - } - translateX = currentTranslateX + deltaX * interval / intervalCount & 0xFF; - translateY = currentTranslateY + deltaY * interval / intervalCount & 0xFF; - translateZ = currentTranslateZ + deltaZ * interval / intervalCount & 0xFF; - } - else if (type == 5) - { - // don't interpolate alpha transformations - // alpha - translateX = currentTranslateX; - translateY = 0; - translateZ = 0; - } - else - { - translateX = currentTranslateX + (nextTranslateX - currentTranslateX) * interval / intervalCount; - translateY = currentTranslateY + (nextTranslateY - currentTranslateY) * interval / intervalCount; - translateZ = currentTranslateZ + (nextTranslateZ - currentTranslateZ) * interval / intervalCount; - } - // use interpolated translations to animate - animate(type, skin.getList()[i], translateX, translateY, translateZ); - } - } - } - } - - @Override - @Inject - public Polygon getConvexHull(int localX, int localY, int orientation, int tileHeight) - { - List vertices = getVertices(); - - // rotate vertices - for (int i = 0; i < vertices.size(); ++i) - { - Vertex v = vertices.get(i); - vertices.set(i, v.rotate(orientation)); - } - - List points = new ArrayList(); - - for (Vertex v : vertices) - { - // Compute canvas location of vertex - Point p = Perspective.localToCanvas(client, - localX - v.getX(), - localY - v.getZ(), - tileHeight + v.getY()); - if (p != null) - { - points.add(p); - } - } - - // Run Jarvis march algorithm - points = Jarvis.convexHull(points); - if (points == null) - { - return null; - } - - // Convert to a polygon - Polygon p = new Polygon(); - for (Point point : points) - { - p.addPoint(point.getX(), point.getY()); - } - - return p; - } - - @Inject - @Override - public int getSceneId() - { - return rl$sceneId; - } - - @Inject - @Override - public void setSceneId(int sceneId) - { - this.rl$sceneId = sceneId; - } - - @Inject - @Override - public int getBufferOffset() - { - return rl$bufferOffset; - } - - @Inject - @Override - public void setBufferOffset(int bufferOffset) - { - rl$bufferOffset = bufferOffset; - } - - @Inject - @Override - public int getUvBufferOffset() - { - return rl$uvBufferOffset; - } - - @Inject - @Override - public void setUvBufferOffset(int bufferOffset) - { - rl$uvBufferOffset = bufferOffset; - } - - @Inject - @Override - public float[][] getFaceTextureUCoordinates() - { - return rl$faceTextureUCoordinates; - } - - @Inject - @Override - public void setFaceTextureUCoordinates(float[][] faceTextureUCoordinates) - { - this.rl$faceTextureUCoordinates = faceTextureUCoordinates; - } - - @Inject - @Override - public float[][] getFaceTextureVCoordinates() - { - return rl$faceTextureVCoordinates; - } - - @Inject - @Override - public void setFaceTextureVCoordinates(float[][] faceTextureVCoordinates) - { - this.rl$faceTextureVCoordinates = faceTextureVCoordinates; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseInputMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseInputMixin.java deleted file mode 100644 index dcaa7261b1..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseInputMixin.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.event.MouseEvent; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSMouseInput; - -@Mixin(RSMouseInput.class) -public abstract class RSMouseInputMixin implements RSMouseInput -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int isInEvent; - - @Copy("mousePressed") - abstract void rs$mousePressed(MouseEvent mouseEvent); - - @Copy("mouseReleased") - abstract void rs$mouseReleased(MouseEvent mouseEvent); - - @Copy("mouseClicked") - abstract void rs$mouseClicked(MouseEvent mouseEvent); - - @Copy("mouseEntered") - abstract void rs$mouseEntered(MouseEvent mouseEvent); - - @Copy("mouseExited") - abstract void rs$mouseExited(MouseEvent mouseEvent); - - @Copy("mouseDragged") - abstract void rs$mouseDragged(MouseEvent mouseEvent); - - @Copy("mouseMoved") - abstract void rs$mouseMoved(MouseEvent mouseEvent); - - @Override - @Replace("mousePressed") - public synchronized void mousePressed(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mousePressed(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mousePressed(mouseEvent); - } - finally - { - isInEvent--; - } - } - } - - @Override - @Replace("mouseReleased") - public synchronized void mouseReleased(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mouseReleased(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mouseReleased(mouseEvent); - } - finally - { - isInEvent--; - } - } - } - - @Override - @Replace("mouseClicked") - public void mouseClicked(MouseEvent event) - { - event = client.getCallbacks().mouseClicked(event); - if (!event.isConsumed()) - { - rs$mouseClicked(event); - } - } - - @Override - @Replace("mouseEntered") - public synchronized void mouseEntered(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mouseEntered(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mouseEntered(mouseEvent); - } - finally - { - isInEvent--; - } - } - } - - - @Override - @Replace("mouseExited") - public synchronized void mouseExited(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mouseExited(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mouseExited(mouseEvent); - } - finally - { - isInEvent--; - } - } - } - - @Override - @Replace("mouseDragged") - public synchronized void mouseDragged(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mouseDragged(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mouseDragged(mouseEvent); - } - finally - { - isInEvent--; - } - } - } - - @Override - @Replace("mouseMoved") - public synchronized void mouseMoved(MouseEvent mouseEvent) - { - if (isInEvent == 0) - { - mouseEvent = client.getCallbacks().mouseMoved(mouseEvent); - } - if (!mouseEvent.isConsumed()) - { - isInEvent++; - try - { - rs$mouseMoved(mouseEvent); - } - finally - { - isInEvent--; - } - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseWheelHandlerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseWheelHandlerMixin.java deleted file mode 100644 index 1c56a34458..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSMouseWheelHandlerMixin.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.event.MouseWheelEvent; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSMouseWheelHandler; - -@Mixin(RSMouseWheelHandler.class) -public abstract class RSMouseWheelHandlerMixin implements RSMouseWheelHandler -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("mouseWheelMoved") - abstract void rs$mouseWheelMoved(MouseWheelEvent event); - - @Override - @Replace("mouseWheelMoved") - public void mouseWheelMoved(MouseWheelEvent event) - { - event = client.getCallbacks().mouseWheelMoved(event); - if (!event.isConsumed()) - { - rs$mouseWheelMoved(event); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSNPCMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSNPCMixin.java deleted file mode 100644 index be4cad31fc..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSNPCMixin.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Polygon; -import net.runelite.api.AnimationID; -import net.runelite.api.NPCComposition; -import net.runelite.api.Perspective; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.events.NpcDespawned; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSNPC; -import net.runelite.rs.api.RSNPCComposition; - -@Mixin(RSNPC.class) -public abstract class RSNPCMixin implements RSNPC -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int npcIndex; - - @Inject - private boolean dead; - - @Inject - @Override - public int getId() - { - RSNPCComposition composition = getComposition(); - if (composition != null && composition.getConfigs() != null) - { - composition = composition.transform(); - } - return composition == null ? -1 : composition.getId(); - } - - @Inject - @Override - public String getName() - { - RSNPCComposition composition = getComposition(); - if (composition != null && composition.getConfigs() != null) - { - composition = composition.transform(); - } - return composition == null ? null : composition.getName().replace('\u00A0', ' '); - } - - @Inject - @Override - public int getCombatLevel() - { - RSNPCComposition composition = getComposition(); - if (composition != null && composition.getConfigs() != null) - { - composition = composition.transform(); - } - return composition == null ? -1 : composition.getCombatLevel(); - } - - @Inject - @Override - public int getIndex() - { - return npcIndex; - } - - @Inject - @Override - public void setIndex(int id) - { - npcIndex = id; - } - - @FieldHook(value = "composition", before = true) - @Inject - public void onCompositionChanged(RSNPCComposition composition) - { - if (composition == null) - { - client.getCallbacks().post(new NpcDespawned(this)); - } - } - - @Copy("getModel") - public abstract RSModel rs$getModel(); - - @Replace("getModel") - public RSModel rl$getModel() - { - if (!client.isInterpolateNpcAnimations() - || getAnimation() == AnimationID.HELLHOUND_DEFENCE) - { - return rs$getModel(); - } - int actionFrame = getActionFrame(); - int poseFrame = getPoseFrame(); - int spotAnimFrame = getSpotAnimFrame(); - try - { - // combine the frames with the frame cycle so we can access this information in the sequence methods - // without having to change method calls - setActionFrame(Integer.MIN_VALUE | getActionFrameCycle() << 16 | actionFrame); - setPoseFrame(Integer.MIN_VALUE | getPoseFrameCycle() << 16 | poseFrame); - setSpotAnimFrame(Integer.MIN_VALUE | getSpotAnimFrameCycle() << 16 | spotAnimFrame); - return rs$getModel(); - } - finally - { - // reset frames - setActionFrame(actionFrame); - setPoseFrame(poseFrame); - setSpotAnimFrame(spotAnimFrame); - } - } - - @Inject - @Override - public NPCComposition getTransformedComposition() - { - RSNPCComposition composition = getComposition(); - if (composition != null && composition.getConfigs() != null) - { - composition = composition.transform(); - } - return composition; - } - - @Inject - @Override - public boolean isDead() - { - return dead; - } - - @Inject - @Override - public void setDead(boolean dead) - { - this.dead = dead; - } - - @Inject - @Override - public Polygon getConvexHull() - { - RSModel model = getModel(); - if (model == null) - { - return null; - } - - int size = getComposition().getSize(); - LocalPoint tileHeightPoint = new LocalPoint( - size * Perspective.LOCAL_HALF_TILE_SIZE - Perspective.LOCAL_HALF_TILE_SIZE + getX(), - size * Perspective.LOCAL_HALF_TILE_SIZE - Perspective.LOCAL_HALF_TILE_SIZE + getY()); - - int tileHeight = Perspective.getTileHeight(client, tileHeightPoint, client.getPlane()); - return model.getConvexHull(getX(), getY(), getOrientation(), tileHeight); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableContainerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableContainerMixin.java deleted file mode 100644 index 8a3a1492e0..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableContainerMixin.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * Copyright (c) 2019, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSName; -import net.runelite.rs.api.RSNameable; -import net.runelite.rs.api.RSNameableContainer; - -@Mixin(RSNameableContainer.class) -public abstract class RSNameableContainerMixin implements RSNameableContainer -{ - /** - * Default implementation of rl$add - * @param name - * @param prevName - */ - @Inject - @Override - public void rl$add(RSName name, RSName prevName) - { - } - - /** - * Default implementation of rl$del - * @param nameable - */ - @Inject - @Override - public void rl$remove(RSNameable nameable) - { - } - - @Inject - @MethodHook(value = "add", end = true) - public void add(RSName name, RSName prevName) - { - rl$add(name, prevName); - } - - @Inject - @MethodHook("remove") - public void remove(RSNameable nameable) - { - rl$remove(nameable); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableMixin.java deleted file mode 100644 index 2d64135330..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSNameableMixin.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.events.NameableNameChanged; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSNameable; - -@Mixin(RSNameable.class) -public abstract class RSNameableMixin implements RSNameable -{ - @Shadow("clientInstance") - private static RSClient client; - - @FieldHook("prevName") - @Inject - public void onPrevNameChanged(int idx) - { - NameableNameChanged nameableNameChanged = new NameableNameChanged(this); - client.getCallbacks().post(nameableNameChanged); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSNodeMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSNodeMixin.java deleted file mode 100644 index 4a8f7162cf..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSNodeMixin.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSNode; - -@Mixin(RSNode.class) -public abstract class RSNodeMixin implements RSNode -{ - @Inject - public void onUnlink() - { - } - - @Inject - @MethodHook("unlink") - public void rl$unlink() - { - onUnlink(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSNpcCompositionMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSNpcCompositionMixin.java deleted file mode 100644 index b12477525c..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSNpcCompositionMixin.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.HeadIcon; -import static net.runelite.api.HeadIcon.MAGIC; -import static net.runelite.api.HeadIcon.MELEE; -import static net.runelite.api.HeadIcon.RANGED; -import static net.runelite.api.HeadIcon.RANGE_MAGE; -import net.runelite.api.events.NpcActionChanged; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSNPCComposition; - -@Mixin(RSNPCComposition.class) -public abstract class RSNpcCompositionMixin implements RSNPCComposition -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public HeadIcon getOverheadIcon() - { - switch (getRsOverheadIcon()) - { - case 0: - return MELEE; - case 1: - return RANGED; - case 2: - return MAGIC; - case 6: - return RANGE_MAGE; - default: - return null; - } - } - - @FieldHook("actions") - @Inject - public void actionsHook(int idx) - { - NpcActionChanged npcActionChanged = new NpcActionChanged(); - npcActionChanged.setNpcComposition(this); - npcActionChanged.setIdx(idx); - client.getCallbacks().post(npcActionChanged); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerCompositionMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerCompositionMixin.java deleted file mode 100644 index d52b267daf..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerCompositionMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.kit.KitType; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSPlayerComposition; - -@Mixin(RSPlayerComposition.class) -public abstract class RSPlayerCompositionMixin implements RSPlayerComposition -{ - @Inject - @Override - public int getEquipmentId(KitType type) - { - int id = getEquipmentIds()[type.getIndex()]; - if (id < 512) - { - return -1; // not an item - } - return id - 512; - } - - @Inject - @Override - public int getKitId(KitType type) - { - int id = getEquipmentIds()[type.getIndex()]; - if (id < 256 || id >= 512) - { - return -1; // not a kit - } - return id - 256; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerMixin.java deleted file mode 100644 index e4f8d9b8e7..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSPlayerMixin.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Polygon; -import java.util.ArrayList; -import java.util.List; -import net.runelite.api.HeadIcon; -import static net.runelite.api.HeadIcon.MAGIC; -import static net.runelite.api.HeadIcon.MELEE; -import static net.runelite.api.HeadIcon.RANGED; -import static net.runelite.api.HeadIcon.REDEMPTION; -import static net.runelite.api.HeadIcon.RETRIBUTION; -import static net.runelite.api.HeadIcon.SMITE; -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.Point; -import net.runelite.api.SkullIcon; -import static net.runelite.api.SkullIcon.DEAD_MAN_FIVE; -import static net.runelite.api.SkullIcon.DEAD_MAN_FOUR; -import static net.runelite.api.SkullIcon.DEAD_MAN_ONE; -import static net.runelite.api.SkullIcon.DEAD_MAN_THREE; -import static net.runelite.api.SkullIcon.DEAD_MAN_TWO; -import static net.runelite.api.SkullIcon.SKULL; -import static net.runelite.api.SkullIcon.SKULL_FIGHT_PIT; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.model.Triangle; -import net.runelite.api.model.Vertex; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSName; -import net.runelite.rs.api.RSPlayer; - -@Mixin(RSPlayer.class) -public abstract class RSPlayerMixin implements RSPlayer -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public String getName() - { - final RSName rsName = getRsName(); - - if (rsName == null) - { - return null; - } - - String name = rsName.getName(); - - if (name == null) - { - return null; - } - - return name.replace('\u00A0', ' '); - } - - @Inject - @Override - public HeadIcon getOverheadIcon() - { - switch (getRsOverheadIcon()) - { - case 0: - return MELEE; - case 1: - return RANGED; - case 2: - return MAGIC; - case 3: - return RETRIBUTION; - case 4: - return SMITE; - case 5: - return REDEMPTION; - default: - return null; - } - } - - @Inject - @Override - public SkullIcon getSkullIcon() - { - if (this != client.getLocalPlayer()) - { - // prevent seeing skulls of other players. - return null; - } - - switch (getRsSkullIcon()) - { - case 0: - return SKULL; - case 1: - return SKULL_FIGHT_PIT; - case 8: - return DEAD_MAN_FIVE; - case 9: - return DEAD_MAN_FOUR; - case 10: - return DEAD_MAN_THREE; - case 11: - return DEAD_MAN_TWO; - case 12: - return DEAD_MAN_ONE; - default: - return null; - } - } - - @Inject - @Override - public Polygon[] getPolygons() - { - Model model = getModel(); - - if (model == null) - { - return null; - } - - int localX = getX(); - int localY = getY(); - - int orientation = getOrientation(); - - final int tileHeight = Perspective.getTileHeight(client, new LocalPoint(localX, localY), client.getPlane()); - - List triangles = model.getTriangles(); - - triangles = rotate(triangles, orientation); - - List polys = new ArrayList(); - for (Triangle triangle : triangles) - { - Vertex vx = triangle.getA(); - Vertex vy = triangle.getB(); - Vertex vz = triangle.getC(); - - Point x = Perspective.localToCanvas(client, - localX - vx.getX(), - localY - vx.getZ(), - tileHeight + vx.getY()); - - Point y = Perspective.localToCanvas(client, - localX - vy.getX(), - localY - vy.getZ(), - tileHeight + vy.getY()); - - Point z = Perspective.localToCanvas(client, - localX - vz.getX(), - localY - vz.getZ(), - tileHeight + vz.getY()); - - int[] xx = - { - x.getX(), y.getX(), z.getX() - }; - int[] yy = - { - x.getY(), y.getY(), z.getY() - }; - polys.add(new Polygon(xx, yy, 3)); - } - - return polys.toArray(new Polygon[polys.size()]); - } - - @Inject - @Override - public Polygon getConvexHull() - { - RSModel model = getModel(); - if (model == null) - { - return null; - } - - int tileHeight = Perspective.getTileHeight(client, new LocalPoint(getX(), getY()), client.getPlane()); - return model.getConvexHull(getX(), getY(), getOrientation(), tileHeight); - } - - @Inject - private List rotate(List triangles, int orientation) - { - List rotatedTriangles = new ArrayList(); - for (Triangle triangle : triangles) - { - Vertex a = triangle.getA(); - Vertex b = triangle.getB(); - Vertex c = triangle.getC(); - - Triangle rotatedTriangle = new Triangle( - a.rotate(orientation), - b.rotate(orientation), - c.rotate(orientation) - ); - rotatedTriangles.add(rotatedTriangle); - } - return rotatedTriangles; - } - - @Copy("getModel") - public abstract RSModel rs$getModel(); - - @Replace("getModel") - public RSModel rl$getModel() - { - if (!client.isInterpolatePlayerAnimations()) - { - return rs$getModel(); - } - int actionFrame = getActionFrame(); - int poseFrame = getPoseFrame(); - int spotAnimFrame = getSpotAnimFrame(); - try - { - // combine the frames with the frame cycle so we can access this information in the sequence methods - // without having to change method calls - setActionFrame(Integer.MIN_VALUE | getActionFrameCycle() << 16 | actionFrame); - setPoseFrame(Integer.MIN_VALUE | getPoseFrameCycle() << 16 | poseFrame); - setSpotAnimFrame(Integer.MIN_VALUE | getSpotAnimFrameCycle() << 16 | spotAnimFrame); - return rs$getModel(); - } - finally - { - // reset frames - setActionFrame(actionFrame); - setPoseFrame(poseFrame); - setSpotAnimFrame(spotAnimFrame); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSProjectileMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSProjectileMixin.java deleted file mode 100644 index e5b8c238db..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSProjectileMixin.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.events.ProjectileMoved; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSProjectile; - -@Mixin(RSProjectile.class) -public abstract class RSProjectileMixin implements RSProjectile -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public int getRemainingCycles() - { - int currentGameCycle = client.getGameCycle(); - - return getEndCycle() - currentGameCycle; - } - - /** - * Called when a projectile is set to move towards a point. For - * projectiles that target the ground, like AoE projectiles from - * Lizardman Shamans, this is only called once - * - * @param targetX X position of where the projectile is being moved to - * @param targetY Y position of where the projectile is being moved to - * @param targetZ Z position of where the projectile is being moved to - * @param cycle - */ - @Inject - @MethodHook("moveProjectile") - public void projectileMoved(int targetX, int targetY, int targetZ, int cycle) - { - final LocalPoint position = new LocalPoint(targetX, targetY); - final ProjectileMoved projectileMoved = new ProjectileMoved(); - projectileMoved.setProjectile(this); - projectileMoved.setPosition(position); - projectileMoved.setZ(targetZ); - client.getCallbacks().post(projectileMoved); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java deleted file mode 100644 index 7bbb154848..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneMixin.java +++ /dev/null @@ -1,751 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.Perspective; -import net.runelite.api.Renderable; -import net.runelite.api.SceneTileModel; -import net.runelite.api.SceneTilePaint; -import net.runelite.api.Tile; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.hooks.DrawCallbacks; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDecorativeObject; -import net.runelite.rs.api.RSGroundObject; -import net.runelite.rs.api.RSItemLayer; -import net.runelite.rs.api.RSScene; -import net.runelite.rs.api.RSSceneTileModel; -import net.runelite.rs.api.RSTile; -import net.runelite.rs.api.RSWallObject; - -@Mixin(RSScene.class) -public abstract class RSSceneMixin implements RSScene -{ - private static final int DEFAULT_DISTANCE = 25; - private static final int MAX_DISTANCE = 90; - - private static final int PITCH_LOWER_LIMIT = 128; - private static final int PITCH_UPPER_LIMIT = 383; - - private static final int MAX_TARGET_DISTANCE = 45; - - @Shadow("clientInstance") - static RSClient client; - - @Shadow("pitchRelaxEnabled") - private static boolean pitchRelaxEnabled; - - @Inject - private static int[] tmpX = new int[6]; - - @Shadow("skyboxColor") - static int skyboxColor; - - @Inject - private static int[] tmpY = new int[6]; - - @Inject - private static int rl$drawDistance; - - @Replace("drawScene") - void rl$drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane) - { - final DrawCallbacks drawCallbacks = client.getDrawCallbacks(); - if (drawCallbacks != null) - { - drawCallbacks.drawScene(cameraX, cameraY, cameraZ, cameraPitch, cameraYaw, plane); - } - - final boolean isGpu = client.isGpu(); - final boolean checkClick = client.isCheckClick(); - if (!client.isMenuOpen()) - { - // Force check click to update the selected tile - client.setCheckClick(true); - final int mouseX = client.getMouseX(); - final int mouseY = client.getMouseY(); - client.setMouseCanvasHoverPositionX(mouseX - client.getViewportXOffset()); - client.setMouseCanvasHoverPositionY(mouseY - client.getViewportYOffset()); - } - - if (!isGpu) - { - if (skyboxColor != 0) - { - client.RasterizerFillRectangle( - client.getViewportXOffset(), - client.getViewportYOffset(), - client.getViewportWidth(), - client.getViewportHeight(), - skyboxColor - ); - } - } - - final int maxX = getMaxX(); - final int maxY = getMaxY(); - final int maxZ = getMaxZ(); - - final int minLevel = getMinLevel(); - - final RSTile[][][] tiles = getTiles(); - final int distance = isGpu ? rl$drawDistance : DEFAULT_DISTANCE; - - if (cameraX < 0) - { - cameraX = 0; - } - else if (cameraX >= maxX * Perspective.LOCAL_TILE_SIZE) - { - cameraX = maxX * Perspective.LOCAL_TILE_SIZE - 1; - } - - if (cameraZ < 0) - { - cameraZ = 0; - } - else if (cameraZ >= maxZ * Perspective.LOCAL_TILE_SIZE) - { - cameraZ = maxZ * Perspective.LOCAL_TILE_SIZE - 1; - } - - // we store the uncapped pitch for setting camera angle for the pitch relaxer - // we still have to cap the pitch in order to access the visibility map, though - int realPitch = cameraPitch; - if (cameraPitch < PITCH_LOWER_LIMIT) - { - cameraPitch = PITCH_LOWER_LIMIT; - } - else if (cameraPitch > PITCH_UPPER_LIMIT) - { - cameraPitch = PITCH_UPPER_LIMIT; - } - if (!pitchRelaxEnabled) - { - realPitch = cameraPitch; - } - - client.setCycle(client.getCycle() + 1); - - client.setPitchSin(Perspective.SINE[realPitch]); - client.setPitchCos(Perspective.COSINE[realPitch]); - client.setYawSin(Perspective.SINE[cameraYaw]); - client.setYawCos(Perspective.COSINE[cameraYaw]); - - final int[][][] tileHeights = client.getTileHeights(); - boolean[][] renderArea = client.getVisibilityMaps()[(cameraPitch - 128) / 32][cameraYaw / 64]; - client.setRenderArea(renderArea); - - client.setCameraX2(cameraX); - client.setCameraY2(cameraY); - client.setCameraZ2(cameraZ); - - int screenCenterX = cameraX / Perspective.LOCAL_TILE_SIZE; - int screenCenterZ = cameraZ / Perspective.LOCAL_TILE_SIZE; - - client.setScreenCenterX(screenCenterX); - client.setScreenCenterZ(screenCenterZ); - client.setScenePlane(plane); - - int minTileX = screenCenterX - distance; - if (minTileX < 0) - { - minTileX = 0; - } - - int minTileZ = screenCenterZ - distance; - if (minTileZ < 0) - { - minTileZ = 0; - } - - int maxTileX = screenCenterX + distance; - if (maxTileX > maxX) - { - maxTileX = maxX; - } - - int maxTileZ = screenCenterZ + distance; - if (maxTileZ > maxZ) - { - maxTileZ = maxZ; - } - - client.setMinTileX(minTileX); - client.setMinTileZ(minTileZ); - client.setMaxTileX(maxTileX); - client.setMaxTileZ(maxTileZ); - - updateOccluders(); - - client.setTileUpdateCount(0); - - for (int z = minLevel; z < maxY; ++z) - { - RSTile[][] planeTiles = tiles[z]; - - for (int x = minTileX; x < maxTileX; ++x) - { - for (int y = minTileZ; y < maxTileZ; ++y) - { - RSTile tile = planeTiles[x][y]; - if (tile != null) - { - if (tile.getPhysicalLevel() <= plane - && (isGpu - || renderArea[x - screenCenterX + DEFAULT_DISTANCE][y - screenCenterZ + DEFAULT_DISTANCE] - || tileHeights[z][x][y] - cameraY >= 2000)) - { - tile.setDraw(true); - tile.setVisible(true); - tile.setDrawEntities(true); - client.setTileUpdateCount(client.getTileUpdateCount() + 1); - } - else - { - tile.setDraw(false); - tile.setVisible(false); - tile.setWallCullDirection(0); - } - } - } - } - } - - for (int z = minLevel; z < maxY; ++z) - { - RSTile[][] planeTiles = tiles[z]; - - for (int x = -distance; x <= 0; ++x) - { - int var10 = x + screenCenterX; - int var16 = screenCenterX - x; - if (var10 >= minTileX || var16 < maxTileX) - { - for (int y = -distance; y <= 0; ++y) - { - int var13 = y + screenCenterZ; - int var14 = screenCenterZ - y; - if (var10 >= minTileX) - { - if (var13 >= minTileZ) - { - RSTile tile = planeTiles[var10][var13]; - if (tile != null && tile.isDraw()) - { - draw(tile, true); - } - } - - if (var14 < maxTileZ) - { - RSTile tile = planeTiles[var10][var14]; - if (tile != null && tile.isDraw()) - { - draw(tile, true); - } - } - } - - if (var16 < maxTileX) - { - if (var13 >= minTileZ) - { - RSTile tile = planeTiles[var16][var13]; - if (tile != null && tile.isDraw()) - { - draw(tile, true); - } - } - - if (var14 < maxTileZ) - { - RSTile tile = planeTiles[var16][var14]; - if (tile != null && tile.isDraw()) - { - draw(tile, true); - } - } - } - - if (client.getTileUpdateCount() == 0) - { - if (!isGpu && client.getOculusOrbState() != 0) - { - client.setEntitiesAtMouseCount(0); - } - client.setCheckClick(false); - if (!checkClick) - { - client.setViewportWalking(false); - } - client.getCallbacks().drawScene(); - return; - } - } - } - } - } - - for (int z = minLevel; z < maxY; ++z) - { - RSTile[][] planeTiles = tiles[z]; - - for (int x = -distance; x <= 0; ++x) - { - int var10 = x + screenCenterX; - int var16 = screenCenterX - x; - if (var10 >= minTileX || var16 < maxTileX) - { - for (int y = -distance; y <= 0; ++y) - { - int var13 = y + screenCenterZ; - int var14 = screenCenterZ - y; - if (var10 >= minTileX) - { - if (var13 >= minTileZ) - { - RSTile tile = planeTiles[var10][var13]; - if (tile != null && tile.isDraw()) - { - draw(tile, false); - } - } - - if (var14 < maxTileZ) - { - RSTile tile = planeTiles[var10][var14]; - if (tile != null && tile.isDraw()) - { - draw(tile, false); - } - } - } - - if (var16 < maxTileX) - { - if (var13 >= minTileZ) - { - RSTile tile = planeTiles[var16][var13]; - if (tile != null && tile.isDraw()) - { - draw(tile, false); - } - } - - if (var14 < maxTileZ) - { - RSTile tile = planeTiles[var16][var14]; - if (tile != null && tile.isDraw()) - { - draw(tile, false); - } - } - } - - if (client.getTileUpdateCount() == 0) - { - if (!isGpu && client.getOculusOrbState() != 0) - { - client.setEntitiesAtMouseCount(0); - } - client.setCheckClick(false); - if (!checkClick) - { - client.setViewportWalking(false); - } - client.getCallbacks().drawScene(); - return; - } - } - } - } - } - - if (!isGpu && client.getOculusOrbState() != 0) - { - client.setEntitiesAtMouseCount(0); - } - client.setCheckClick(false); - if (!checkClick) - { - // If checkClick was false, then the selected tile wouldn't have existed next tick, - // so clear viewport walking in order to prevent it triggering a walk - client.setViewportWalking(false); - } - client.getCallbacks().drawScene(); - } - - @Copy("addBoundaryDecoration") - abstract public void rs$addBoundaryDecoration(int plane, int x, int y, int floor, Renderable var5, Renderable var6, int var7, int var8, int var9, int var10, long hash, int var12); - - @Replace("addBoundaryDecoration") - public void rl$addBoundaryDecoration(int plane, int x, int y, int floor, Renderable var5, Renderable var6, int var7, int var8, int var9, int var10, long hash, int var12) - { - rs$addBoundaryDecoration(plane, x, y, floor, var5, var6, var7, var8, var9, var10, hash, var12); - Tile tile = getTiles()[plane][x][y]; - if (tile != null) - { - RSDecorativeObject object = (RSDecorativeObject) tile.getDecorativeObject(); - if (object != null) - { - object.setPlane(plane); - } - } - } - - @Copy("addItemPile") - abstract public void rs$addItemPile(int plane, int x, int y, int hash, Renderable var5, long var6, Renderable var7, Renderable var8); - - @Replace("addItemPile") - public void rl$addItemPile(int plane, int x, int y, int hash, Renderable var5, long var6, Renderable var7, Renderable var8) - { - rs$addItemPile(plane, x, y, hash, var5, var6, var7, var8); - Tile tile = getTiles()[plane][x][y]; - if (tile != null) - { - RSItemLayer itemLayer = (RSItemLayer) tile.getItemLayer(); - if (itemLayer != null) - { - itemLayer.setPlane(plane); - } - } - } - - @Copy("groundObjectSpawned") - abstract public void rs$groundObjectSpawned(int plane, int x, int y, int floor, Renderable var5, long hash, int var7); - - @Replace("groundObjectSpawned") - public void rl$groundObjectSpawned(int plane, int x, int y, int floor, Renderable var5, long hash, int var7) - { - rs$groundObjectSpawned(plane, x, y, floor, var5, hash, var7); - Tile tile = getTiles()[plane][x][y]; - if (tile != null) - { - RSGroundObject groundObject = (RSGroundObject) tile.getGroundObject(); - if (groundObject != null) - { - groundObject.setPlane(plane); - } - } - } - - @Copy("addBoundary") - abstract public void rs$addBoundary(int plane, int x, int y, int floor, Renderable var5, Renderable var6, int var7, int var8, long hash, int var10); - - @Replace("addBoundary") - public void rl$addBoundary(int plane, int x, int y, int floor, Renderable var5, Renderable var6, int var7, int var8, long hash, int var10) - { - rs$addBoundary(plane, x, y, floor, var5, var6, var7, var8, hash, var10); - Tile tile = getTiles()[plane][x][y]; - if (tile != null) - { - RSWallObject wallObject = (RSWallObject) tile.getWallObject(); - if (wallObject != null) - { - wallObject.setPlane(plane); - } - } - } - - @Copy("drawTileUnderlay") - abstract public void rs$drawTileUnderlay(SceneTilePaint tile, int z, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y); - - @Replace("drawTileUnderlay") - public void rl$drawTileUnderlay(SceneTilePaint tile, int z, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y) - { - if (!client.isGpu()) - { - try - { - rs$drawTileUnderlay(tile, z, pitchSin, pitchCos, yawSin, yawCos, x, y); - } - catch (Exception ex) - { - client.getLogger().warn("error during tile underlay rendering", ex); - } - return; - } - - final DrawCallbacks drawCallbacks = client.getDrawCallbacks(); - - if (drawCallbacks == null) - { - return; - } - - try - { - final int[][][] tileHeights = getTileHeights(); - - final int cameraX2 = client.getCameraX2(); - final int cameraY2 = client.getCameraY2(); - final int cameraZ2 = client.getCameraZ2(); - - final int zoom = client.get3dZoom(); - final int centerX = client.getCenterX(); - final int centerY = client.getCenterY(); - - final int mouseX2 = client.getMouseX2(); - final int mouseY2 = client.getMouseY2(); - - final boolean checkClick = client.isCheckClick(); - - int var9; - int var10 = var9 = (x << 7) - cameraX2; - int var11; - int var12 = var11 = (y << 7) - cameraZ2; - int var13; - int var14 = var13 = var10 + 128; - int var15; - int var16 = var15 = var12 + 128; - int var17 = tileHeights[z][x][y] - cameraY2; - int var18 = tileHeights[z][x + 1][y] - cameraY2; - int var19 = tileHeights[z][x + 1][y + 1] - cameraY2; - int var20 = tileHeights[z][x][y + 1] - cameraY2; - int var21 = var10 * yawCos + yawSin * var12 >> 16; - var12 = var12 * yawCos - yawSin * var10 >> 16; - var10 = var21; - var21 = var17 * pitchCos - pitchSin * var12 >> 16; - var12 = pitchSin * var17 + var12 * pitchCos >> 16; - var17 = var21; - if (var12 >= 50) - { - var21 = var14 * yawCos + yawSin * var11 >> 16; - var11 = var11 * yawCos - yawSin * var14 >> 16; - var14 = var21; - var21 = var18 * pitchCos - pitchSin * var11 >> 16; - var11 = pitchSin * var18 + var11 * pitchCos >> 16; - var18 = var21; - if (var11 >= 50) - { - var21 = var13 * yawCos + yawSin * var16 >> 16; - var16 = var16 * yawCos - yawSin * var13 >> 16; - var13 = var21; - var21 = var19 * pitchCos - pitchSin * var16 >> 16; - var16 = pitchSin * var19 + var16 * pitchCos >> 16; - var19 = var21; - if (var16 >= 50) - { - var21 = var9 * yawCos + yawSin * var15 >> 16; - var15 = var15 * yawCos - yawSin * var9 >> 16; - var9 = var21; - var21 = var20 * pitchCos - pitchSin * var15 >> 16; - var15 = pitchSin * var20 + var15 * pitchCos >> 16; - if (var15 >= 50) - { - int dy = var10 * zoom / var12 + centerX; - int dx = var17 * zoom / var12 + centerY; - int cy = var14 * zoom / var11 + centerX; - int cx = var18 * zoom / var11 + centerY; - int ay = var13 * zoom / var16 + centerX; - int ax = var19 * zoom / var16 + centerY; - int by = var9 * zoom / var15 + centerX; - int bx = var21 * zoom / var15 + centerY; - - drawCallbacks.drawScenePaint(0, pitchSin, pitchCos, yawSin, yawCos, - -cameraX2, -cameraY2, -cameraZ2, - tile, z, x, y, - zoom, centerX, centerY); - - if ((ay - by) * (cx - bx) - (ax - bx) * (cy - by) > 0) - { - if (checkClick && client.containsBounds(mouseX2, mouseY2, ax, bx, cx, ay, by, cy)) - { - setTargetTile(x, y); - } - } - - if ((dy - cy) * (bx - cx) - (dx - cx) * (by - cy) > 0) - { - if (checkClick && client.containsBounds(mouseX2, mouseY2, dx, cx, bx, dy, cy, by)) - { - setTargetTile(x, y); - } - } - - } - } - } - } - } - catch (Exception ex) - { - client.getLogger().warn("error during underlay rendering", ex); - } - } - - @Copy("drawTileOverlay") - abstract public void rs$drawTileOverlay(SceneTileModel tile, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y); - - @Replace("drawTileOverlay") - public void rl$drawTileOverlay(SceneTileModel tile, int pitchSin, int pitchCos, int yawSin, int yawCos, int tileX, int tileY) - { - if (!client.isGpu()) - { - rs$drawTileOverlay(tile, pitchSin, pitchCos, yawSin, yawCos, tileX, tileY); - return; - } - - final DrawCallbacks drawCallbacks = client.getDrawCallbacks(); - - if (drawCallbacks == null) - { - return; - } - - try - { - final int cameraX2 = client.getCameraX2(); - final int cameraY2 = client.getCameraY2(); - final int cameraZ2 = client.getCameraZ2(); - final int zoom = client.get3dZoom(); - final int centerX = client.getCenterX(); - final int centerY = client.getCenterY(); - - drawCallbacks.drawSceneModel(0, pitchSin, pitchCos, yawSin, yawCos, -cameraX2, -cameraY2, -cameraZ2, - tile, client.getPlane(), tileX, tileY, - zoom, centerX, centerY); - - final boolean checkClick = client.isCheckClick(); - if (!checkClick) - { - return; - } - - RSSceneTileModel sceneTileModel = (RSSceneTileModel) tile; - - final int[] faceX = sceneTileModel.getFaceX(); - final int[] faceY = sceneTileModel.getFaceY(); - final int[] faceZ = sceneTileModel.getFaceZ(); - - final int[] vertexX = sceneTileModel.getVertexX(); - final int[] vertexY = sceneTileModel.getVertexY(); - final int[] vertexZ = sceneTileModel.getVertexZ(); - - final int vertexCount = vertexX.length; - final int faceCount = faceX.length; - - final int mouseX2 = client.getMouseX2(); - final int mouseY2 = client.getMouseY2(); - - for (int i = 0; i < vertexCount; ++i) - { - int vx = vertexX[i] - cameraX2; - int vy = vertexY[i] - cameraY2; - int vz = vertexZ[i] - cameraZ2; - - int rotA = vz * yawSin + vx * yawCos >> 16; - int rotB = vz * yawCos - vx * yawSin >> 16; - - int var13 = vy * pitchCos - rotB * pitchSin >> 16; - int var12 = vy * pitchSin + rotB * pitchCos >> 16; - if (var12 < 50) - { - return; - } - - int ax = rotA * zoom / var12 + centerX; - int ay = var13 * zoom / var12 + centerY; - - tmpX[i] = ax; - tmpY[i] = ay; - } - - for (int i = 0; i < faceCount; ++i) - { - int va = faceX[i]; - int vb = faceY[i]; - int vc = faceZ[i]; - - int x1 = tmpX[va]; - int x2 = tmpX[vb]; - int x3 = tmpX[vc]; - - int y1 = tmpY[va]; - int y2 = tmpY[vb]; - int y3 = tmpY[vc]; - - if ((x1 - x2) * (y3 - y2) - (y1 - y2) * (x3 - x2) > 0) - { - if (client.containsBounds(mouseX2, mouseY2, y1, y2, y3, x1, x2, x3)) - { - setTargetTile(tileX, tileY); - break; - } - } - } - } - catch (Exception ex) - { - client.getLogger().warn("error during overlay rendering", ex); - } - } - - @Inject - @Override - public int getDrawDistance() - { - return rl$drawDistance; - } - - @Inject - @Override - public void setDrawDistance(int drawDistance) - { - rl$drawDistance = drawDistance; - } - - @Inject - static void setTargetTile(int targetX, int targetY) - { - final LocalPoint current = client.getLocalPlayer().getLocalLocation(); - - // Limit walk distance - https://math.stackexchange.com/a/85582 - final int a = current.getSceneX(); - final int b = current.getSceneY(); - final int c = targetX; - final int d = targetY; - - final int r = MAX_TARGET_DISTANCE; - final int t = (int) Math.hypot(a - c, b - d) - r; - int x = targetX; - int y = targetY; - - if (t > 0) - { - x = (r * c + t * a) / (r + t); - y = (r * d + t * b) / (r + t); - } - - client.setSelectedSceneTileX(x); - client.setSelectedSceneTileY(y); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTileModelMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTileModelMixin.java deleted file mode 100644 index a1ab51260e..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTileModelMixin.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSSceneTileModel; - -@Mixin(RSSceneTileModel.class) -public abstract class RSSceneTileModelMixin implements RSSceneTileModel -{ - @Inject - private int rl$modelBufferOffset; - - @Inject - private int rl$modelUvBufferOffset; - - @Inject - private int rl$modelBufferLen; - - @Inject - @Override - public int getBufferOffset() - { - return rl$modelBufferOffset; - } - - @Inject - @Override - public void setBufferOffset(int bufferOffset) - { - rl$modelBufferOffset = bufferOffset; - } - - @Inject - @Override - public int getUvBufferOffset() - { - return rl$modelUvBufferOffset; - } - - @Inject - @Override - public void setUvBufferOffset(int bufferOffset) - { - rl$modelUvBufferOffset = bufferOffset; - } - - @Inject - @Override - public int getBufferLen() - { - return rl$modelBufferLen; - } - - @Inject - @Override - public void setBufferLen(int bufferLen) - { - rl$modelBufferLen = bufferLen; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTilePaintMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTilePaintMixin.java deleted file mode 100644 index 27c719d58c..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSceneTilePaintMixin.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSSceneTilePaint; - -@Mixin(RSSceneTilePaint.class) -public abstract class RSSceneTilePaintMixin implements RSSceneTilePaint -{ - @Inject - private int rl$paintModelBufferOffset; - - @Inject - private int rl$paintModelUvBufferOffset; - - @Inject - private int rl$paintModelBufferLen; - - @Inject - @Override - public int getBufferOffset() - { - return rl$paintModelBufferOffset; - } - - @Inject - @Override - public void setBufferOffset(int bufferOffset) - { - rl$paintModelBufferOffset = bufferOffset; - } - - @Inject - @Override - public int getUvBufferOffset() - { - return rl$paintModelUvBufferOffset; - } - - @Inject - @Override - public void setUvBufferOffset(int bufferOffset) - { - rl$paintModelUvBufferOffset = bufferOffset; - } - - @Inject - @Override - public int getBufferLen() - { - return rl$paintModelBufferLen; - } - - @Inject - @Override - public void setBufferLen(int bufferLen) - { - rl$paintModelBufferLen = bufferLen; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSequenceMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSequenceMixin.java deleted file mode 100644 index 563d5fce17..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSequenceMixin.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSFrames; -import net.runelite.rs.api.RSModel; -import net.runelite.rs.api.RSSequence; - -@Mixin(RSSequence.class) -public abstract class RSSequenceMixin implements RSSequence -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("applyTransformations") - public abstract RSModel rs$applyTransformations(RSModel model, int actionFrame, RSSequence poseSeq, int poseFrame); - - @Replace("applyTransformations") - public RSModel rl$applyTransformations(RSModel model, int actionFrame, RSSequence poseSeq, int poseFrame) - { - // reset frame ids because we're not interpolating this - if (actionFrame < 0) - { - int packed = actionFrame ^ Integer.MIN_VALUE; - actionFrame = packed & 0xFFFF; - } - if (poseFrame < 0) - { - int packed = poseFrame ^ Integer.MIN_VALUE; - poseFrame = packed & 0xFFFF; - } - return rs$applyTransformations(model, actionFrame, poseSeq, poseFrame); - } - - @Copy("transformActorModel") - public abstract RSModel rs$transformActorModel(RSModel model, int frameIdx); - - @Replace("transformActorModel") - public RSModel rl$transformActorModel(RSModel model, int frame) - { - // check if the frame has been modified - if (frame < 0) - { - // remove flag to check if the frame has been modified - int packed = frame ^ Integer.MIN_VALUE; - int interval = packed >> 16; - frame = packed & 0xFFFF; - int nextFrame = frame + 1; - if (nextFrame >= getFrameIDs().length) - { - // dont interpolate last frame - nextFrame = -1; - } - int[] frameIds = getFrameIDs(); - int frameId = frameIds[frame]; - RSFrames frames = client.getFrames(frameId >> 16); - int frameIdx = frameId & 0xFFFF; - - int nextFrameIdx = -1; - RSFrames nextFrames = null; - if (nextFrame != -1) - { - int nextFrameId = frameIds[nextFrame]; - nextFrames = client.getFrames(nextFrameId >> 16); - nextFrameIdx = nextFrameId & 0xFFFF; - } - - if (frames == null) - { - // not sure what toSharedModel does but it is needed - return model.toSharedModel(true); - } - else - { - RSModel animatedModel = model.toSharedModel(!frames.getFrames()[frameIdx].isShowing()); - animatedModel.interpolateFrames(frames, frameIdx, nextFrames, nextFrameIdx, interval, - getFrameLenths()[frame]); - return animatedModel; - } - } - else - { - return rs$transformActorModel(model, frame); - } - } - - @Copy("transformObjectModel") - public abstract RSModel rs$transformObjectModel(RSModel model, int frame, int rotation); - - @Replace("transformObjectModel") - public RSModel rl$transformObjectModel(RSModel model, int frame, int rotation) - { - // check if the frame has been modified - if (frame < 0) - { - // remove flag to check if the frame has been modified - int packed = frame ^ Integer.MIN_VALUE; - int interval = packed >> 16; - frame = packed & 0xFFFF; - - int nextFrame = frame + 1; - if (nextFrame >= getFrameIDs().length) - { - // dont interpolate last frame - nextFrame = -1; - } - int[] frameIds = getFrameIDs(); - int frameId = frameIds[frame]; - RSFrames frames = client.getFrames(frameId >> 16); - int frameIdx = frameId & 0xFFFF; - - int nextFrameIdx = -1; - RSFrames nextFrames = null; - if (nextFrame != -1) - { - int nextFrameId = frameIds[nextFrame]; - nextFrames = client.getFrames(nextFrameId >> 16); - nextFrameIdx = nextFrameId & 0xFFFF; - } - - if (frames == null) - { - return model.toSharedModel(true); - } - else - { - RSModel animatedModel = model.toSharedModel(!frames.getFrames()[frameIdx].isShowing()); - // reset rotation before animating - rotation &= 3; - if (rotation == 1) - { - animatedModel.rotateY270Ccw(); - } - else if (rotation == 2) - { - animatedModel.rotateY180Ccw(); - } - else if (rotation == 3) - { - animatedModel.rotateY90Ccw(); - } - animatedModel.interpolateFrames(frames, frameIdx, nextFrames, nextFrameIdx, interval, - getFrameLenths()[frame]); - // reapply rotation after animating - if (rotation == 1) - { - animatedModel.rotateY90Ccw(); - } - else if (rotation == 2) - { - animatedModel.rotateY180Ccw(); - } - else if (rotation == 3) - { - animatedModel.rotateY270Ccw(); - } - return animatedModel; - } - } - else - { - return rs$transformObjectModel(model, frame, rotation); - } - } - - @Copy("transformSpotAnimModel") - public abstract RSModel rs$transformSpotAnimModel(RSModel model, int frame); - - @Replace("transformSpotAnimModel") - public RSModel rl$transformSpotAnimModel(RSModel model, int frame) - { - // check if the frame has been modified - if (frame < 0) - { - // remove flag to check if the frame has been modified - int packed = frame ^ Integer.MIN_VALUE; - int interval = packed >> 16; - frame = packed & 0xFFFF; - int nextFrame = frame + 1; - if (nextFrame >= getFrameIDs().length) - { - // dont interpolate last frame - nextFrame = -1; - } - int[] frameIds = getFrameIDs(); - int frameId = frameIds[frame]; - RSFrames frames = client.getFrames(frameId >> 16); - int frameIdx = frameId & 0xFFFF; - - int nextFrameIdx = -1; - RSFrames nextFrames = null; - if (nextFrame != -1) - { - int nextFrameId = frameIds[nextFrame]; - nextFrames = client.getFrames(nextFrameId >> 16); - nextFrameIdx = nextFrameId & 0xFFFF; - } - - if (frames == null) - { - return model.toSharedSpotAnimModel(true); - } - else - { - RSModel animatedModel = model.toSharedSpotAnimModel(!frames.getFrames()[frameIdx].isShowing()); - animatedModel.interpolateFrames(frames, frameIdx, nextFrames, nextFrameIdx, interval, - getFrameLenths()[frame]); - return animatedModel; - } - } - else - { - return rs$transformSpotAnimModel(model, frame); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSSpritePixelsMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSSpritePixelsMixin.java deleted file mode 100644 index b351a3d768..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSSpritePixelsMixin.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Color; -import java.awt.image.BufferedImage; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSSpritePixels; - -@Mixin(RSSpritePixels.class) -public abstract class RSSpritePixelsMixin implements RSSpritePixels -{ - @Inject - @Override - public BufferedImage toBufferedImage() - { - BufferedImage img = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB); - - toBufferedImage(img); - - return img; - } - - @Inject - @Override - public void toBufferedImage(BufferedImage img) - { - int width = getWidth(); - int height = getHeight(); - - if (img.getWidth() != width || img.getHeight() != height) - { - throw new IllegalArgumentException("Image bounds do not match SpritePixels"); - } - - int[] pixels = getPixels(); - int[] transPixels = new int[pixels.length]; - - for (int i = 0; i < pixels.length; i++) - { - if (pixels[i] != 0) - { - transPixels[i] = pixels[i] | 0xff000000; - } - } - - img.setRGB(0, 0, width, height, transPixels, 0, width); - } - - @Inject - @Override - public BufferedImage toBufferedOutline(Color color) - { - BufferedImage img = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB); - - toBufferedOutline(img, color.getRGB()); - - return img; - } - - @Inject - @Override - public void toBufferedOutline(BufferedImage img, int color) - { - int width = getWidth(); - int height = getHeight(); - - if (img.getWidth() != width || img.getHeight() != height) - { - throw new IllegalArgumentException("Image bounds do not match SpritePixels"); - } - - int[] pixels = getPixels(); - int[] newPixels = new int[width * height]; - int pixelIndex = 0; - - for (int y = 0; y < height; ++y) - { - for (int x = 0; x < width; ++x) - { - int pixel = pixels[pixelIndex]; - if (pixel == 16777215 || pixel == 0) - { - // W - if (x > 0 && pixels[pixelIndex - 1] != 0) - { - pixel = color; - } - // N - else if (y > 0 && pixels[pixelIndex - width] != 0) - { - pixel = color; - } - // E - else if (x < width - 1 && pixels[pixelIndex + 1] != 0) - { - pixel = color; - } - // S - else if (y < height - 1 && pixels[pixelIndex + width] != 0) - { - pixel = color; - } - newPixels[pixelIndex] = pixel; - } - - pixelIndex++; - } - } - - img.setRGB(0, 0, width, height, newPixels, 0, width); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureMixin.java deleted file mode 100644 index 357da3f2f2..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureMixin.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSTexture; - -@Mixin(RSTexture.class) -public abstract class RSTextureMixin implements RSTexture -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private float rl$u; - - @Inject - private float rl$v; - - @Copy("animate") - public abstract void rs$animate(int diff); - - @Replace("animate") - public void rl$animate(int diff) - { - // The client animates textures by cycling the backing pixels of the texture each fram - // based on how long it was since the last tick. On GPU we let the plugin manage this - // which will calculate uvs instead. - if (!client.isGpu()) - { - rs$animate(diff); - return; - } - - client.getDrawCallbacks().animate(this, diff); - } - - @Inject - @Override - public float getU() - { - return rl$u; - } - - @Inject - @Override - public void setU(float u) - { - this.rl$u = u; - } - - @Inject - @Override - public float getV() - { - return rl$v; - } - - @Inject - @Override - public void setV(float v) - { - this.rl$v = v; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureProviderMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureProviderMixin.java deleted file mode 100644 index df3c15b38f..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSTextureProviderMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.IndexDataBase; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSTextureProvider; - -@Mixin(RSTextureProvider.class) -public abstract class RSTextureProviderMixin implements RSTextureProvider -{ - @Shadow("clientInstance") - private static RSClient client; - - @MethodHook(value = "", end = true) - @Inject - public void rl$init(IndexDataBase indexTextures, IndexDataBase indexSprites, int maxSize, double brightness, int width) - { - // the client's max size is 20, however there are many scenes with >20 textures, - // which causes continuous alloc/free of textures with the gl. There are - // only ~57 textures in total. - setMaxSize(64); - setSize(64); - } - - @MethodHook(value = "checkTextures", end = true) - @Inject - public void checkTextures(int diff) - { - client.getCallbacks().drawAboveOverheads(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSTileMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSTileMixin.java deleted file mode 100644 index 1cb4a729a8..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSTileMixin.java +++ /dev/null @@ -1,565 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.ArrayList; -import java.util.List; -import net.runelite.api.CollisionData; -import net.runelite.api.CollisionDataFlag; -import net.runelite.api.Constants; -import net.runelite.api.DecorativeObject; -import net.runelite.api.GroundObject; -import net.runelite.api.Item; -import net.runelite.api.ItemLayer; -import net.runelite.api.Node; -import net.runelite.api.Point; -import net.runelite.api.Tile; -import net.runelite.api.WallObject; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.coords.WorldPoint; -import net.runelite.api.events.DecorativeObjectChanged; -import net.runelite.api.events.DecorativeObjectDespawned; -import net.runelite.api.events.DecorativeObjectSpawned; -import net.runelite.api.events.GameObjectChanged; -import net.runelite.api.events.GameObjectDespawned; -import net.runelite.api.events.GameObjectSpawned; -import net.runelite.api.events.GroundObjectChanged; -import net.runelite.api.events.GroundObjectDespawned; -import net.runelite.api.events.GroundObjectSpawned; -import net.runelite.api.events.ItemDespawned; -import net.runelite.api.events.ItemSpawned; -import net.runelite.api.events.WallObjectChanged; -import net.runelite.api.events.WallObjectDespawned; -import net.runelite.api.events.WallObjectSpawned; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSActor; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDeque; -import net.runelite.rs.api.RSGameObject; -import net.runelite.rs.api.RSGraphicsObject; -import net.runelite.rs.api.RSItem; -import net.runelite.rs.api.RSItemLayer; -import net.runelite.rs.api.RSNode; -import net.runelite.rs.api.RSProjectile; -import net.runelite.rs.api.RSRenderable; -import net.runelite.rs.api.RSTile; -import org.slf4j.Logger; - -@Mixin(RSTile.class) -public abstract class RSTileMixin implements RSTile -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private static RSGameObject lastGameObject; - - @Inject - private static RSDeque[][][] lastGroundItems = new RSDeque[Constants.MAX_Z][Constants.SCENE_SIZE][Constants.SCENE_SIZE]; - - @Inject - private WallObject previousWallObject; - - @Inject - private DecorativeObject previousDecorativeObject; - - @Inject - private GroundObject previousGroundObject; - - @Inject - private RSGameObject[] previousGameObjects; - - @Inject - @Override - public WorldPoint getWorldLocation() - { - return WorldPoint.fromScene(client, getX(), getY(), getPlane()); - } - - @Inject - @Override - public Point getSceneLocation() - { - return new Point(getX(), getY()); - } - - @Inject - @Override - public LocalPoint getLocalLocation() - { - return LocalPoint.fromScene(getX(), getY()); - } - - @FieldHook("wallObject") - @Inject - public void wallObjectChanged(int idx) - { - WallObject previous = previousWallObject; - WallObject current = getWallObject(); - - previousWallObject = current; - - if (current == null && previous != null) - { - WallObjectDespawned wallObjectDespawned = new WallObjectDespawned(); - wallObjectDespawned.setTile(this); - wallObjectDespawned.setWallObject(previous); - client.getCallbacks().post(wallObjectDespawned); - } - else if (current != null && previous == null) - { - WallObjectSpawned wallObjectSpawned = new WallObjectSpawned(); - wallObjectSpawned.setTile(this); - wallObjectSpawned.setWallObject(current); - client.getCallbacks().post(wallObjectSpawned); - } - else if (current != null && previous != null) - { - WallObjectChanged wallObjectChanged = new WallObjectChanged(); - wallObjectChanged.setTile(this); - wallObjectChanged.setPrevious(previous); - wallObjectChanged.setWallObject(current); - client.getCallbacks().post(wallObjectChanged); - } - } - - @FieldHook("decorativeObject") - @Inject - public void decorativeObjectChanged(int idx) - { - DecorativeObject previous = previousDecorativeObject; - DecorativeObject current = getDecorativeObject(); - - previousDecorativeObject = current; - - if (current == null && previous != null) - { - DecorativeObjectDespawned decorativeObjectDespawned = new DecorativeObjectDespawned(); - decorativeObjectDespawned.setTile(this); - decorativeObjectDespawned.setDecorativeObject(previous); - client.getCallbacks().post(decorativeObjectDespawned); - } - else if (current != null && previous == null) - { - DecorativeObjectSpawned decorativeObjectSpawned = new DecorativeObjectSpawned(); - decorativeObjectSpawned.setTile(this); - decorativeObjectSpawned.setDecorativeObject(current); - client.getCallbacks().post(decorativeObjectSpawned); - } - else if (current != null && previous != null) - { - DecorativeObjectChanged decorativeObjectChanged = new DecorativeObjectChanged(); - decorativeObjectChanged.setTile(this); - decorativeObjectChanged.setPrevious(previous); - decorativeObjectChanged.setDecorativeObject(current); - client.getCallbacks().post(decorativeObjectChanged); - } - } - - @FieldHook("groundObject") - @Inject - public void groundObjectChanged(int idx) - { - GroundObject previous = previousGroundObject; - GroundObject current = getGroundObject(); - - previousGroundObject = current; - - if (current == null && previous != null) - { - GroundObjectDespawned groundObjectDespawned = new GroundObjectDespawned(); - groundObjectDespawned.setTile(this); - groundObjectDespawned.setGroundObject(previous); - client.getCallbacks().post(groundObjectDespawned); - } - else if (current != null && previous == null) - { - GroundObjectSpawned groundObjectSpawned = new GroundObjectSpawned(); - groundObjectSpawned.setTile(this); - groundObjectSpawned.setGroundObject(current); - client.getCallbacks().post(groundObjectSpawned); - } - else if (current != null && previous != null) - { - GroundObjectChanged groundObjectChanged = new GroundObjectChanged(); - groundObjectChanged.setTile(this); - groundObjectChanged.setPrevious(previous); - groundObjectChanged.setGroundObject(current); - client.getCallbacks().post(groundObjectChanged); - } - } - - @FieldHook("objects") - @Inject - public void gameObjectsChanged(int idx) - { - if (idx == -1) // this happens from the field assignment - { - return; - } - - if (previousGameObjects == null) - { - previousGameObjects = new RSGameObject[5]; - } - - // Previous game object - RSGameObject previous = previousGameObjects[idx]; - - // GameObject that was changed. - RSGameObject current = (RSGameObject) getGameObjects()[idx]; - - // Update previous object to current - previousGameObjects[idx] = current; - - // Last game object - RSGameObject last = lastGameObject; - - // Update last game object - lastGameObject = current; - - // Duplicate event, return - if (current == previous) - { - return; - } - - if (current != null && current == last) - { - // When >1 tile objects are added to the scene, the same GameObject is added to - // multiple tiles. We keep lastGameObject to prevent duplicate spawn events from - // firing for these objects. - return; - } - - // actors, projectiles, and graphics objects are added and removed from the scene each frame as GameObjects, - // so ignore them. - boolean currentInvalid = false, prevInvalid = false; - if (current != null) - { - RSRenderable renderable = current.getRenderable(); - currentInvalid = renderable instanceof RSActor || renderable instanceof RSProjectile || renderable instanceof RSGraphicsObject; - } - - if (previous != null) - { - RSRenderable renderable = previous.getRenderable(); - prevInvalid = renderable instanceof RSActor || renderable instanceof RSProjectile || renderable instanceof RSGraphicsObject; - } - - Logger logger = client.getLogger(); - if (current == null) - { - if (prevInvalid) - { - return; - } - - logger.trace("Game object despawn: {}", previous.getId()); - - GameObjectDespawned gameObjectDespawned = new GameObjectDespawned(); - gameObjectDespawned.setTile(this); - gameObjectDespawned.setGameObject(previous); - client.getCallbacks().post(gameObjectDespawned); - } - else if (previous == null) - { - if (currentInvalid) - { - return; - } - - logger.trace("Game object spawn: {}", current.getId()); - - GameObjectSpawned gameObjectSpawned = new GameObjectSpawned(); - gameObjectSpawned.setTile(this); - gameObjectSpawned.setGameObject(current); - client.getCallbacks().post(gameObjectSpawned); - } - else - { - if (currentInvalid && prevInvalid) - { - return; - } - - logger.trace("Game object change: {} -> {}", previous.getId(), current.getId()); - - GameObjectChanged gameObjectsChanged = new GameObjectChanged(); - gameObjectsChanged.setTile(this); - gameObjectsChanged.setPrevious(previous); - gameObjectsChanged.setGameObject(current); - client.getCallbacks().post(gameObjectsChanged); - } - } - - @FieldHook("itemLayer") - @Inject - public void itemLayerChanged(int idx) - { - int x = getX(); - int y = getY(); - int z = client.getPlane(); - RSDeque[][][] groundItemDeque = client.getGroundItemDeque(); - - RSDeque oldQueue = lastGroundItems[z][x][y]; - RSDeque newQueue = groundItemDeque[z][x][y]; - - if (oldQueue != newQueue) - { - if (oldQueue != null) - { - // despawn everything in old .. - RSNode head = oldQueue.getHead(); - for (RSNode cur = head.getNext(); cur != head; cur = cur.getNext()) - { - RSItem item = (RSItem) cur; - ItemDespawned itemDespawned = new ItemDespawned(this, item); - client.getCallbacks().post(itemDespawned); - } - } - lastGroundItems[z][x][y] = newQueue; - } - - RSItem lastUnlink = client.getLastItemDespawn(); - if (lastUnlink != null) - { - client.setLastItemDespawn(null); - } - - RSItemLayer itemLayer = (RSItemLayer) getItemLayer(); - if (itemLayer == null) - { - if (lastUnlink != null) - { - ItemDespawned itemDespawned = new ItemDespawned(this, lastUnlink); - client.getCallbacks().post(itemDespawned); - } - return; - } - - RSDeque itemDeque = newQueue; - - if (itemDeque == null) - { - if (lastUnlink != null) - { - ItemDespawned itemDespawned = new ItemDespawned(this, lastUnlink); - client.getCallbacks().post(itemDespawned); - } - return; - } - - // The new item gets added to either the head, or the tail, depending on its price - RSNode head = itemDeque.getHead(); - RSNode current = null; - RSNode previous = head.getPrevious(); - boolean forward = false; - if (head != previous) - { - RSItem prev = (RSItem) previous; - if (x != prev.getX() || y != prev.getY()) - { - current = prev; - } - } - - RSNode next = head.getNext(); - if (current == null && head != next) - { - RSItem n = (RSItem) next; - if (x != n.getX() || y != n.getY()) - { - current = n; - forward = true; - } - } - - if (lastUnlink != null && lastUnlink != previous && lastUnlink != next) - { - ItemDespawned itemDespawned = new ItemDespawned(this, lastUnlink); - client.getCallbacks().post(itemDespawned); - } - - if (current == null) - { - return; // already seen this spawn, or no new item - } - - do - { - RSItem item = (RSItem) current; - item.setX(x); - item.setY(y); - - ItemSpawned itemSpawned = new ItemSpawned(this, item); - client.getCallbacks().post(itemSpawned); - - current = forward ? current.getNext() : current.getPrevious(); - - // Send spawn events for anything on this tile which is at the wrong location, which happens - // when the scene base changes - } while (current != head && (((RSItem) current).getX() != x || ((RSItem) current).getY() != y)); - } - - @Inject - @Override - public boolean hasLineOfSightTo(Tile other) - { - // Thanks to Henke for this method :) - - if (this.getPlane() != other.getPlane()) - { - return false; - } - - CollisionData[] collisionData = client.getCollisionMaps(); - if (collisionData == null) - { - return false; - } - - int z = this.getPlane(); - int[][] collisionDataFlags = collisionData[z].getFlags(); - - Point p1 = this.getSceneLocation(); - Point p2 = other.getSceneLocation(); - if (p1.getX() == p2.getX() && p1.getY() == p2.getY()) - { - return true; - } - - int dx = p2.getX() - p1.getX(); - int dy = p2.getY() - p1.getY(); - int dxAbs = Math.abs(dx); - int dyAbs = Math.abs(dy); - - int xFlags = CollisionDataFlag.BLOCK_LINE_OF_SIGHT_FULL; - int yFlags = CollisionDataFlag.BLOCK_LINE_OF_SIGHT_FULL; - if (dx < 0) - { - xFlags |= CollisionDataFlag.BLOCK_LINE_OF_SIGHT_EAST; - } - else - { - xFlags |= CollisionDataFlag.BLOCK_LINE_OF_SIGHT_WEST; - } - if (dy < 0) - { - yFlags |= CollisionDataFlag.BLOCK_LINE_OF_SIGHT_NORTH; - } - else - { - yFlags |= CollisionDataFlag.BLOCK_LINE_OF_SIGHT_SOUTH; - } - - if (dxAbs > dyAbs) - { - int x = p1.getX(); - int yBig = p1.getY() << 16; // The y position is represented as a bigger number to handle rounding - int slope = (dy << 16) / dxAbs; - yBig += 0x8000; // Add half of a tile - if (dy < 0) - { - yBig--; // For correct rounding - } - int direction = dx < 0 ? -1 : 1; - - while (x != p2.getX()) - { - x += direction; - int y = yBig >>> 16; - if ((collisionDataFlags[x][y] & xFlags) != 0) - { - // Collision while traveling on the x axis - return false; - } - yBig += slope; - int nextY = yBig >>> 16; - if (nextY != y && (collisionDataFlags[x][nextY] & yFlags) != 0) - { - // Collision while traveling on the y axis - return false; - } - } - } - else - { - int y = p1.getY(); - int xBig = p1.getX() << 16; // The x position is represented as a bigger number to handle rounding - int slope = (dx << 16) / dyAbs; - xBig += 0x8000; // Add half of a tile - if (dx < 0) - { - xBig--; // For correct rounding - } - int direction = dy < 0 ? -1 : 1; - - while (y != p2.getY()) - { - y += direction; - int x = xBig >>> 16; - if ((collisionDataFlags[x][y] & yFlags) != 0) - { - // Collision while traveling on the y axis - return false; - } - xBig += slope; - int nextX = xBig >>> 16; - if (nextX != x && (collisionDataFlags[nextX][y] & xFlags) != 0) - { - // Collision while traveling on the x axis - return false; - } - } - } - - // No collision - return true; - } - - @Inject - @Override - public List getGroundItems() - { - ItemLayer layer = this.getItemLayer(); - if (layer == null) - { - return null; - } - - List result = new ArrayList(); - Node node = layer.getBottom(); - while (node instanceof Item) - { - result.add((Item) node); - node = node.getNext(); - } - return result; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSVarcsMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSVarcsMixin.java deleted file mode 100644 index 2c9a0d4e1e..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSVarcsMixin.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.runelite.mixins; - -import net.runelite.api.events.VarClientIntChanged; -import net.runelite.api.events.VarClientStrChanged; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.MethodHook; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSVarcs; - -@Mixin(RSVarcs.class) -public abstract class RSVarcsMixin implements RSVarcs -{ - @Shadow("clientInstance") - private static RSClient client; - - @MethodHook(value = "putVarc", end = true) - @Inject - public void onVarCIntChanged(int id, int value) - { - client.getCallbacks().post(new VarClientIntChanged(id)); - } - - @MethodHook(value = "putVarcStringNew", end = true) - @Inject - public void onVarCStrChanged(int id, String value) - { - client.getCallbacks().post(new VarClientStrChanged(id)); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSWallObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSWallObjectMixin.java deleted file mode 100644 index e5db24d686..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSWallObjectMixin.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.geom.Area; -import net.runelite.api.Model; -import net.runelite.api.Perspective; -import net.runelite.api.Renderable; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSWallObject; - -@Mixin(RSWallObject.class) -public abstract class RSWallObjectMixin implements RSWallObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private int wallPlane; - - @Inject - @Override - public int getPlane() - { - return wallPlane; - } - - @Inject - @Override - public void setPlane(int plane) - { - this.wallPlane = plane; - } - - @Inject - private Model getModelA() - { - Renderable renderable = getRenderable1(); - if (renderable == null) - { - return null; - } - - if (renderable instanceof Model) - { - return (Model) renderable; - } - else - { - return renderable.getModel(); - } - } - - @Inject - private Model getModelB() - { - Renderable renderable = getRenderable2(); - if (renderable == null) - { - return null; - } - - if (renderable instanceof Model) - { - return (Model) renderable; - } - else - { - return renderable.getModel(); - } - } - - @Inject - @Override - public Area getClickbox() - { - Area clickbox = new Area(); - - Area clickboxA = Perspective.getClickbox(client, getModelA(), 0, getLocalLocation()); - Area clickboxB = Perspective.getClickbox(client, getModelB(), 0, getLocalLocation()); - - if (clickboxA == null && clickboxB == null) - { - return null; - } - - if (clickboxA != null) - { - clickbox.add(clickboxA); - } - - if (clickboxB != null) - { - clickbox.add(clickboxB); - } - - return clickbox; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSWidgetMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSWidgetMixin.java deleted file mode 100644 index 60ec7821cb..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSWidgetMixin.java +++ /dev/null @@ -1,584 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import net.runelite.api.HashTable; -import net.runelite.api.Node; -import net.runelite.api.Point; -import net.runelite.api.WidgetNode; -import net.runelite.api.events.WidgetHiddenChanged; -import net.runelite.api.events.WidgetPositioned; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.widgets.Widget; -import static net.runelite.api.widgets.WidgetInfo.TO_CHILD; -import static net.runelite.api.widgets.WidgetInfo.TO_GROUP; -import net.runelite.api.widgets.WidgetItem; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSHashTable; -import net.runelite.rs.api.RSNode; -import net.runelite.rs.api.RSWidget; - -@Mixin(RSWidget.class) -public abstract class RSWidgetMixin implements RSWidget -{ - private static final int ITEM_SLOT_SIZE = 32; - - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private static int rl$widgetLastPosChanged; - - @Inject - private int rl$parentId; - - @Inject - private int rl$x; - - @Inject - private int rl$y; - - @Inject - RSWidgetMixin() - { - rl$parentId = -1; - rl$x = -1; - rl$y = -1; - } - - @Inject - @Override - public void setRenderParentId(int parentId) - { - rl$parentId = parentId; - } - - @Inject - @Override - public void setRenderX(int x) - { - rl$x = x; - } - - @Inject - @Override - public void setRenderY(int y) - { - rl$y = y; - } - - @Inject - @Override - public Widget getParent() - { - int id = getParentId(); - if (id == -1) - { - return null; - } - - return client.getWidget(TO_GROUP(id), TO_CHILD(id)); - } - - @Inject - @Override - public int getParentId() - { - assert client.isClientThread(); - - int rsParentId = getRSParentId(); - if (rsParentId != -1) - { - return rsParentId; - } - - final int id = getId(); - if (TO_GROUP(id) == client.getWidgetRoot()) - { - // this is a root widget - return -1; - } - - int parentId = rl$parentId; - if (parentId != -1) - { - // if this happens, the widget is or was nested. - // rl$parentId is updated when drawing, but will not be updated when - // the widget is no longer reachable in the tree, leaving - // parent id potentially incorrect - - // check the parent in the component table - HashTable componentTable = client.getComponentTable(); - WidgetNode widgetNode = componentTable.get(parentId); - if (widgetNode == null || widgetNode.getId() != TO_GROUP(id)) - { - // invalidate parent - rl$parentId = -1; - } - else - { - return parentId; - } - } - - // also the widget may not have been drawn, yet - int groupId = TO_GROUP(getId()); - RSHashTable componentTable = client.getComponentTable(); - RSNode[] buckets = componentTable.getBuckets(); - for (RSNode node : buckets) - { - // It looks like the first node in the bucket is always - // a sentinel - Node cur = node.getNext(); - while (cur != node) - { - WidgetNode wn = (WidgetNode) cur; - - if (groupId == wn.getId()) - { - return (int) wn.getHash(); - } - - cur = cur.getNext(); - } - } - - return -1; - } - - @Inject - @Override - public String getText() - { - return getRSText().replace('\u00A0', ' '); - } - - @Inject - @Override - public String getName() - { - return getRSName().replace('\u00A0', ' '); - } - - @Inject - @Override - public void setName(String name) - { - setRSName(name.replace(' ', '\u00A0')); - } - - @Inject - @Override - public boolean isHidden() - { - assert client.isClientThread(); - - if (isSelfHidden()) - { - return true; - } - - Widget parent = getParent(); - - if (parent == null) - { - if (TO_GROUP(getId()) != client.getWidgetRoot()) - { - // Widget has no parent and is not the root widget (which is always visible), - // so it's not visible. - return true; - } - } - else if (parent.isHidden()) - { - // If the parent is hidden, this widget is also hidden. - return true; - } - - return false; - } - - @Inject - @Override - public Point getCanvasLocation() - { - return new Point(rl$x, rl$y); - } - - @Inject - @Override - public Rectangle getBounds() - { - Point canvasLocation = getCanvasLocation(); - return new Rectangle(canvasLocation.getX(), canvasLocation.getY(), getWidth(), getHeight()); - } - - @Inject - @Override - public Collection getWidgetItems() - { - int[] itemIds = getItemIds(); - - if (itemIds == null) - { - return null; - } - - List items = new ArrayList(itemIds.length); - - for (int i = 0; i < itemIds.length; ++i) - { - if (itemIds[i] <= 0) - { - continue; - } - - WidgetItem item = getWidgetItem(i); - - if (item != null) - { - items.add(item); - } - } - - return items; - } - - @Inject - @Override - public WidgetItem getWidgetItem(int index) - { - int[] itemIds = getItemIds(); - int[] itemQuantities = getItemQuantities(); - - if (itemIds == null || itemQuantities == null) - { - return null; - } - - int columns = getWidth(); // the number of item slot columns is stored here - int xPitch = getXPitch(); - int yPitch = getYPitch(); - int itemId = itemIds[index]; - int itemQuantity = itemQuantities[index]; - - if (columns <= 0) - { - return null; - } - - int row = index / columns; - int col = index % columns; - int itemX = rl$x + ((ITEM_SLOT_SIZE + xPitch) * col); - int itemY = rl$y + ((ITEM_SLOT_SIZE + yPitch) * row); - - Rectangle bounds = new Rectangle(itemX, itemY, ITEM_SLOT_SIZE, ITEM_SLOT_SIZE); - return new WidgetItem(itemId - 1, itemQuantity, index, bounds, this); - } - - @Inject - @Override - public Widget getChild(int index) - { - RSWidget[] widgets = getChildren(); - - if (widgets == null || widgets[index] == null) - { - return null; - } - - return widgets[index]; - } - - @Inject - @Override - public Widget[] getDynamicChildren() - { - RSWidget[] children = getChildren(); - - if (children == null) - { - return new Widget[0]; - } - - List widgets = new ArrayList(); - for (RSWidget widget : children) - { - if (widget != null && widget.getRSParentId() == getId()) - { - widgets.add(widget); - } - } - return widgets.toArray(new Widget[widgets.size()]); - } - - @Inject - @Override - public Widget[] getStaticChildren() - { - if (getRSParentId() == getId()) - { - // This is a dynamic widget, so it can't have static children - return new Widget[0]; - } - - List widgets = new ArrayList(); - for (RSWidget widget : client.getGroup(TO_GROUP(getId()))) - { - if (widget != null && widget.getRSParentId() == getId()) - { - widgets.add(widget); - } - } - return widgets.toArray(new RSWidget[widgets.size()]); - } - - @Inject - @Override - public Widget[] getNestedChildren() - { - assert client.isClientThread(); - - if (getRSParentId() == getId()) - { - // This is a dynamic widget, so it can't have nested children - return new Widget[0]; - } - - HashTable componentTable = client.getComponentTable(); - - WidgetNode wn = componentTable.get(getId()); - if (wn == null) - { - return new RSWidget[0]; - } - - int group = wn.getId(); - - List widgets = new ArrayList(); - for (RSWidget widget : client.getGroup(group)) - { - if (widget != null && widget.getRSParentId() == -1) - { - widgets.add(widget); - } - } - return widgets.toArray(new RSWidget[widgets.size()]); - } - - @Inject - @Override - public boolean contains(Point point) - { - Rectangle bounds = getBounds(); - return bounds != null && bounds.contains(new java.awt.Point(point.getX(), point.getY())); - } - - @Inject - @Override - public void broadcastHidden(boolean hidden) - { - WidgetHiddenChanged event = new WidgetHiddenChanged(); - event.setWidget(this); - event.setHidden(hidden); - - client.getCallbacks().post(event); - - RSWidget[] children = getChildren(); - - if (children != null) - { - // recursive through children - for (RSWidget child : children) - { - // if the widget is hidden it will not magically unhide from its parent changing - if (child == null || child.isSelfHidden()) - { - continue; - } - - child.broadcastHidden(hidden); - } - } - - // make sure we iterate nested children as well - // cannot be null - Widget[] nestedChildren = getNestedChildren(); - - for (Widget nestedChild : nestedChildren) - { - if (nestedChild == null || nestedChild.isSelfHidden()) - { - continue; - } - - ((RSWidget) nestedChild).broadcastHidden(hidden); - } - } - - @FieldHook("isHidden") - @Inject - public void onHiddenChanged(int idx) - { - int id = getId(); - - if (id == -1) - { - return; - } - - Widget parent = getParent(); - - // if the parent is hidden then changes in this widget don't have any visual effect - // so ignore them - if (parent != null) - { - if (parent.isHidden()) - { - return; - } - } - else if (TO_GROUP(id) != client.getWidgetRoot()) - { - return; - } - - broadcastHidden(isSelfHidden()); - } - - @FieldHook("relativeY") - @Inject - public void onPositionChanged(int idx) - { - int id = getId(); - if (id == -1) - { - return; - } - - int tick = client.getGameCycle(); - if (tick == rl$widgetLastPosChanged) - { - return; - } - - rl$widgetLastPosChanged = tick; - - client.getLogger().trace("Posting widget position changed"); - - WidgetPositioned widgetPositioned = new WidgetPositioned(); - client.getCallbacks().postDeferred(widgetPositioned); - } - - @Inject - @Override - public Widget createChild(int index, int type) - { - assert client.isClientThread(); - - RSWidget w = client.createWidget(); - w.setType(type); - w.setParentId(getId()); - w.setId(getId()); - w.setIsIf3(true); - - RSWidget[] siblings = getChildren(); - - if (index < 0) - { - if (siblings == null) - { - index = 0; - } - else - { - index = 0; - for (int i = siblings.length - 1; i >= 0; i--) - { - if (siblings[i] != null) - { - index = i + 1; - break; - } - } - } - } - - if (siblings == null) - { - siblings = new RSWidget[index + 1]; - setChildren(siblings); - } - else if (siblings.length <= index) - { - RSWidget[] newSiblings = new RSWidget[index + 1]; - System.arraycopy(siblings, 0, newSiblings, 0, siblings.length); - siblings = newSiblings; - setChildren(siblings); - } - - siblings[index] = w; - w.setIndex(index); - - return w; - } - - @Inject - @Override - public void revalidate() - { - assert client.isClientThread(); - - client.revalidateWidget(this); - } - - @Inject - @Override - public void revalidateScroll() - { - assert client.isClientThread(); - - client.revalidateWidget(this); - client.revalidateWidgetScroll(client.getWidgets()[TO_GROUP(this.getId())], this, false); - } - - @Inject - @Override - public void deleteAllChildren() - { - if (getChildren() != null) - { - Arrays.fill(getChildren(), null); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/RSWorldMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/RSWorldMixin.java deleted file mode 100644 index 55155b500f..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/RSWorldMixin.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.EnumSet; -import net.runelite.api.WorldType; -import net.runelite.api.events.WorldListLoad; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSWorld; - -@Mixin(RSWorld.class) -public abstract class RSWorldMixin implements RSWorld -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - @Override - public EnumSet getTypes() - { - return WorldType.fromMask(getMask()); - } - - @Inject - @Override - public void setTypes(final EnumSet types) - { - setMask(WorldType.toMask(types)); - } - - @Inject - @FieldHook("playerCount") - public void playerCountChanged(int idx) - { - RSWorld[] worlds = client.getWorldList(); - if (worlds != null && worlds.length > 0 && worlds[worlds.length - 1] == this) - { - // this is the last world in the list. - WorldListLoad worldLoad = new WorldListLoad(worlds); - client.getCallbacks().post(worldLoad); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/Rasterizer2DMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/Rasterizer2DMixin.java deleted file mode 100644 index c8c2cc5a9b..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/Rasterizer2DMixin.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; - -@Mixin(RSClient.class) -public abstract class Rasterizer2DMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private static void drawAlpha(int[] pixels, int index, int value, int alpha) - { - if (!client.isGpu() || pixels != client.getBufferProvider().getPixels()) - { - pixels[index] = value; - return; - } - - // (int) x * 0x8081 >>> 23 is equivalent to (short) x / 255 - int outAlpha = alpha + ((pixels[index] >>> 24) * (255 - alpha) * 0x8081 >>> 23); - pixels[index] = value & 0x00FFFFFF | outAlpha << 24; - } - - @Copy("drawGradientAlpha") - private static void rs$raster2d6(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7) - { - throw new RuntimeException(); - } - - @Replace("drawGradientAlpha") - private static void rl$drawGradientAlpha(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7) - { - final int width = client.getGraphicsPixelsWidth(); - final int startX = client.getStartX(); - final int startY = client.getStartY(); - final int endX = client.getEndX(); - final int endY = client.getEndY(); - final int[] pixels = client.getGraphicsPixels(); - - if (!client.isGpu()) - { - rs$raster2d6(var0, var1, var2, var3, var4, var5, var6, var7); - return; - } - - if (var2 > 0 && var3 > 0) - { - int var8 = 0; - int var9 = 65536 / var3; - if (var0 < startX) - { - var2 -= startX - var0; - var0 = startX; - } - - if (var1 < startY) - { - var8 += (startY - var1) * var9; - var3 -= startY - var1; - var1 = startY; - } - - if (var0 + var2 > endX) - { - var2 = endX - var0; - } - - if (var3 + var1 > endY) - { - var3 = endY - var1; - } - - int var10 = width - var2; - int var11 = var0 + width * var1; - - for (int var12 = -var3; var12 < 0; ++var12) - { - int var13 = 65536 - var8 >> 8; - int var14 = var8 >> 8; - int var15 = (var13 * var6 + var14 * var7 & 65280) >>> 8; - if (var15 == 0) - { - var11 += width; - var8 += var9; - } - else - { - int var16 = (var14 * (var5 & 16711935) + var13 * (var4 & 16711935) & -16711936) + (var14 * (var5 & 65280) + var13 * (var4 & 65280) & 16711680) >>> 8; - int var17 = 255 - var15; - int var18 = ((var16 & 16711935) * var15 >> 8 & 16711935) + (var15 * (var16 & 65280) >> 8 & 65280); - - for (int var19 = -var2; var19 < 0; ++var19) - { - int var20 = pixels[var11]; - var20 = ((var20 & 16711935) * var17 >> 8 & 16711935) + (var17 * (var20 & 65280) >> 8 & 65280); - drawAlpha(pixels, var11++, var18 + var20, var15); - } - - var11 += var10; - var8 += var9; - } - } - } - } - - @Copy("raster2d7") - public static void rs$raster2d7(int var0, int var1, int var2, int var3, int var4, int var5, byte[] var6, int var7) - { - throw new RuntimeException(); - } - - @Replace("raster2d7") - public static void rl$raster2d7(int var0, int var1, int var2, int var3, int var4, int var5, byte[] var6, int var7) - { - final int width = client.getGraphicsPixelsWidth(); - final int height = client.getGraphicsPixelsHeight(); - final int[] pixels = client.getGraphicsPixels(); - - if (!client.isGpu()) - { - rs$raster2d7(var0, var1, var2, var3, var4, var5, var6, var7); - return; - } - - if (var0 + var2 >= 0 && var3 + var1 >= 0) - { - if (var0 < width && var1 < height) - { - int var8 = 0; - int var9 = 0; - if (var0 < 0) - { - var8 -= var0; - var2 += var0; - } - - if (var1 < 0) - { - var9 -= var1; - var3 += var1; - } - - if (var0 + var2 > width) - { - var2 = width - var0; - } - - if (var3 + var1 > height) - { - var3 = height - var1; - } - - int var10 = var6.length / var7; - int var11 = width - var2; - int var12 = var4 >>> 24; - int var13 = var5 >>> 24; - int var14; - int var15; - int var16; - int var17; - int var18; - if (var12 == 255 && var13 == 255) - { - var14 = var0 + var8 + (var9 + var1) * width; - - for (var15 = var9 + var1; var15 < var3 + var9 + var1; ++var15) - { - for (var16 = var0 + var8; var16 < var0 + var8 + var2; ++var16) - { - var17 = (var15 - var1) % var10; - var18 = (var16 - var0) % var7; - if (var6[var18 + var17 * var7] != 0) - { - pixels[var14++] = var5; - } - else - { - pixels[var14++] = var4; - } - } - - var14 += var11; - } - } - else - { - var14 = var0 + var8 + (var9 + var1) * width; - - for (var15 = var9 + var1; var15 < var3 + var9 + var1; ++var15) - { - for (var16 = var0 + var8; var16 < var0 + var8 + var2; ++var16) - { - var17 = (var15 - var1) % var10; - var18 = (var16 - var0) % var7; - int var19 = var4; - if (var6[var18 + var17 * var7] != 0) - { - var19 = var5; - } - - int var20 = var19 >>> 24; - int var21 = 255 - var20; - int var22 = pixels[var14]; - int var23 = ((var19 & 16711935) * var20 + (var22 & 16711935) * var21 & -16711936) + (var20 * (var19 & 65280) + var21 * (var22 & 65280) & 16711680) >> 8; - drawAlpha(pixels, var14++, var23, var20); - } - - var14 += var11; - } - } - } - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/ScriptVMMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/ScriptVMMixin.java deleted file mode 100644 index 03cecd206a..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/ScriptVMMixin.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import net.runelite.api.Client; -import net.runelite.api.events.ScriptCallbackEvent; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.api.widgets.JavaScriptCallback; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSScript; -import net.runelite.rs.api.RSScriptEvent; - -import static net.runelite.api.Opcodes.RUNELITE_EXECUTE; - -@Mixin(RSClient.class) -public abstract class ScriptVMMixin implements RSClient -{ - @Shadow("clientInstance") - private static Client client; - - // This field is set by the ScriptVM raw injector - @Inject - private static RSScript currentScript; - - // This field is set by the ScriptVM raw injector - @Inject - private static int currentScriptPC; - - // Call is injected into runScript by the ScriptVM raw injector - @Inject - static boolean vmExecuteOpcode(int opcode) - { - if (opcode == RUNELITE_EXECUTE) - { - assert currentScript.getInstructions()[currentScriptPC] == RUNELITE_EXECUTE; - - int stringStackSize = client.getStringStackSize(); - String stringOp = client.getStringStack()[--stringStackSize]; - client.setStringStackSize(stringStackSize); - - if ("debug".equals(stringOp)) - { - int intStackSize = client.getIntStackSize(); - - String fmt = client.getStringStack()[--stringStackSize]; - StringBuffer out = new StringBuffer(); - Matcher m = Pattern.compile("%(.)").matcher(fmt); - for (; m.find(); ) - { - m.appendReplacement(out, ""); - switch (m.group(1).charAt(0)) - { - case 'i': - case 'd': - out.append(client.getIntStack()[--intStackSize]); - break; - case 's': - out.append(client.getStringStack()[--stringStackSize]); - break; - default: - out.append(m.group(0)).append("=unknown"); - } - } - m.appendTail(out); - - client.getLogger().debug(out.toString()); - - client.setStringStackSize(stringStackSize); - client.setIntStackSize(intStackSize); - return true; - } - - ScriptCallbackEvent event = new ScriptCallbackEvent(); - event.setScript(currentScript); - event.setEventName(stringOp); - client.getCallbacks().post(event); - return true; - } - return false; - } - - @Copy("runScript") - static void rs$runScript(RSScriptEvent event, int maxExecutionTime) - { - throw new RuntimeException(); - } - - @Replace("runScript") - static void rl$runScript(RSScriptEvent event, int maxExecutionTime) - { - Object[] arguments = event.getArguments(); - if (arguments != null && arguments.length > 0 && arguments[0] instanceof JavaScriptCallback) - { - try - { - ((JavaScriptCallback) arguments[0]).run(event); - } - catch (Exception e) - { - client.getLogger().error("Error in JavaScriptCallback", e); - } - return; - } - - try - { - rs$runScript(event, maxExecutionTime); - } - finally - { - currentScript = null; - } - } - - @Inject - @Override - public void runScript(int id, Object... args) - { - assert isClientThread(); - assert currentScript == null; - Object[] cargs = new Object[args.length + 1]; - cargs[0] = id; - System.arraycopy(args, 0, cargs, 1, args.length); - RSScriptEvent se = createScriptEvent(); - se.setArguments(cargs); - runScript(se, 5000000); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/SoundEffectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/SoundEffectMixin.java deleted file mode 100644 index c9a3f77ba4..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/SoundEffectMixin.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.SoundEffectVolume; -import net.runelite.api.events.AreaSoundEffectPlayed; -import net.runelite.api.events.SoundEffectPlayed; -import net.runelite.api.mixins.FieldHook; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSAudioTaskNode; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSRawAudioNode; -import net.runelite.rs.api.RSSoundEffect; -import net.runelite.rs.api.RSTaskDataNode; - -@Mixin(RSClient.class) -public abstract class SoundEffectMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private static int lastSoundEffectCount; - - @Inject - @Override - public void playSoundEffect(int id) - { - playSoundEffect(id, 0, 0, 0, 0); - } - - @Inject - @Override - public void playSoundEffect(int id, int x, int y, int range) - { - playSoundEffect(id, x, y, range, 0); - } - - @Inject - @Override - public void playSoundEffect(int id, int x, int y, int range, int delay) - { - int position = ((x & 255) << 16) + ((y & 255) << 8) + (range & 255); - - int[] queuedSoundEffectIDs = getQueuedSoundEffectIDs(); - int[] queuedSoundEffectLoops = getQueuedSoundEffectLoops(); - int[] queuedSoundEffectDelays = getQueuedSoundEffectDelays(); - RSSoundEffect[] audioEffects = getAudioEffects(); - int[] soundLocations = getSoundLocations(); - int queuedSoundEffectCount = getQueuedSoundEffectCount(); - - queuedSoundEffectIDs[queuedSoundEffectCount] = id; - queuedSoundEffectLoops[queuedSoundEffectCount] = 1; - queuedSoundEffectDelays[queuedSoundEffectCount] = delay; - audioEffects[queuedSoundEffectCount] = null; - soundLocations[queuedSoundEffectCount] = position; - - setQueuedSoundEffectCount(queuedSoundEffectCount + 1); - } - - @Inject - @Override - public void playSoundEffect(int id, int volume) - { - RSSoundEffect soundEffect = getTrack(getIndexCache4(), id, 0); - if (soundEffect == null) - { - return; - } - - // If the current volume is not muted, use it instead - final int soundEffectVolume = getSoundEffectVolume(); - if (soundEffectVolume != SoundEffectVolume.MUTED) - { - volume = soundEffectVolume; - } - - RSRawAudioNode rawAudioNode = soundEffect.toRawAudioNode().applyResampler(getSoundEffectResampler()); - RSAudioTaskNode audioTaskNode = createSoundEffectAudioTaskNode(rawAudioNode, 100, volume); - audioTaskNode.setNumLoops(1); - - getSoundEffectAudioQueue().queueAudioTaskNode((RSTaskDataNode) audioTaskNode); - } - - @FieldHook("queuedSoundEffectCount") - @Inject - public static void queuedSoundEffectCountChanged(int idx) - { - int soundCount = client.getQueuedSoundEffectCount(); - if (soundCount == lastSoundEffectCount + 1) - { - int soundIndex = soundCount - 1; - int packedLocation = client.getSoundLocations()[soundIndex]; - - if (packedLocation == 0) - { - // Regular sound effect - - SoundEffectPlayed event = new SoundEffectPlayed(); - event.setSoundId(client.getQueuedSoundEffectIDs()[soundIndex]); - event.setDelay(client.getQueuedSoundEffectDelays()[soundIndex]); - client.getCallbacks().post(event); - } - else - { - // Area sound effect - - int x = (packedLocation >> 16) & 0xFF; - int y = (packedLocation >> 8) & 0xFF; - int range = (packedLocation) & 0xFF; - - AreaSoundEffectPlayed event = new AreaSoundEffectPlayed(); - event.setSoundId(client.getQueuedSoundEffectIDs()[soundIndex]); - event.setSceneX(x); - event.setSceneY(y); - event.setRange(range); - event.setDelay(client.getQueuedSoundEffectDelays()[soundIndex]); - client.getCallbacks().post(event); - } - } - - lastSoundEffectCount = soundCount; - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/SpriteMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/SpriteMixin.java deleted file mode 100644 index efe5ee605c..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/SpriteMixin.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.HashMap; -import java.util.Map; -import net.runelite.api.SpritePixels; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSIndexDataBase; -import net.runelite.rs.api.RSSpritePixels; - -@Mixin(RSClient.class) -public abstract class SpriteMixin implements RSClient -{ - @Inject - private static final Map spriteOverrides = new HashMap(); - - @Inject - private static final Map widgetSpriteOverrides = new HashMap(); - - @Inject - @Override - public Map getSpriteOverrides() - { - return spriteOverrides; - } - - @Inject - @Override - public Map getWidgetSpriteOverrides() - { - return widgetSpriteOverrides; - } - - @Copy("getSpriteAsSpritePixels") - public static RSSpritePixels rs$loadSprite(RSIndexDataBase var0, int var1, int var2) - { - throw new RuntimeException(); - } - - @Replace("getSpriteAsSpritePixels") - public static RSSpritePixels rl$loadSprite(RSIndexDataBase var0, int var1, int var2) - { - SpritePixels sprite = spriteOverrides.get(var1); - - if (sprite != null) - { - return (RSSpritePixels) sprite; - } - - return rs$loadSprite(var0, var1, var2); - } -} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMaxSizeMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMaxSizeMixin.java deleted file mode 100644 index aa52b4e5e5..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMaxSizeMixin.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Dimension; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSGameEngine; - -@Mixin(RSGameEngine.class) -public abstract class StretchedModeMaxSizeMixin implements RSGameEngine -{ - @Shadow("clientInstance") - private static RSClient client; - - @Copy("resizeCanvas") - abstract void rs$resizeCanvas(); - - @Replace("resizeCanvas") - public void rl$resizeCanvas() - { - if (client.isStretchedEnabled()) - { - client.invalidateStretching(false); - - if (client.isResized()) - { - Dimension realDimensions = client.getRealDimensions(); - - setMaxCanvasWidth(realDimensions.width); - setMaxCanvasHeight(realDimensions.height); - } - } - - rs$resizeCanvas(); - } - - @Copy("setMaxCanvasSize") - abstract void rs$setMaxCanvasSize(int width, int height); - - @Replace("setMaxCanvasSize") - public void rl$setMaxCanvasSize(int width, int height) - { - if (client.isStretchedEnabled() && client.isResized()) - { - return; - } - - rs$setMaxCanvasSize(width, height); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMixin.java deleted file mode 100644 index 1dbfe97f00..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/StretchedModeMixin.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Container; -import java.awt.Dimension; -import net.runelite.api.Constants; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSClient; - -@Mixin(RSClient.class) -public abstract class StretchedModeMixin implements RSClient -{ - @Inject - private static boolean stretchedEnabled; - - @Inject - private static boolean stretchedFast; - - @Inject - private static boolean stretchedIntegerScaling; - - @Inject - private static boolean stretchedKeepAspectRatio; - - @Inject - private static double scalingFactor; - - @Inject - private static Dimension cachedStretchedDimensions; - - @Inject - private static Dimension cachedRealDimensions; - - @Inject - @Override - public boolean isStretchedEnabled() - { - return stretchedEnabled; - } - - @Inject - @Override - public void setStretchedEnabled(boolean state) - { - stretchedEnabled = state; - } - - @Inject - @Override - public boolean isStretchedFast() - { - return stretchedFast; - } - - @Inject - @Override - public void setStretchedFast(boolean state) - { - stretchedFast = state; - } - - @Inject - @Override - public void setStretchedIntegerScaling(boolean state) - { - stretchedIntegerScaling = state; - } - - @Inject - @Override - public void setStretchedKeepAspectRatio(boolean state) - { - stretchedKeepAspectRatio = state; - } - - @Inject - @Override - public void setScalingFactor(int factor) - { - scalingFactor = 1 + (factor / 100D); - } - - @Inject - @Override - public Dimension getRealDimensions() - { - if (!isStretchedEnabled()) - { - return getCanvas().getSize(); - } - - if (cachedRealDimensions == null) - { - if (isResized()) - { - Container canvasParent = getCanvas().getParent(); - - int parentWidth = canvasParent.getWidth(); - int parentHeight = canvasParent.getHeight(); - - int newWidth = (int) (parentWidth / scalingFactor); - int newHeight = (int) (parentHeight / scalingFactor); - - if (newWidth < Constants.GAME_FIXED_WIDTH || newHeight < Constants.GAME_FIXED_HEIGHT) - { - double scalingFactorW = (double)parentWidth / Constants.GAME_FIXED_WIDTH; - double scalingFactorH = (double)parentHeight / Constants.GAME_FIXED_HEIGHT; - double scalingFactor = Math.min(scalingFactorW, scalingFactorH); - - newWidth = (int) (parentWidth / scalingFactor); - newHeight = (int) (parentHeight / scalingFactor); - } - - cachedRealDimensions = new Dimension(newWidth, newHeight); - } - else - { - cachedRealDimensions = Constants.GAME_FIXED_SIZE; - } - } - - return cachedRealDimensions; - } - - @Inject - @Override - public Dimension getStretchedDimensions() - { - if (cachedStretchedDimensions == null) - { - Container canvasParent = getCanvas().getParent(); - - int parentWidth = canvasParent.getWidth(); - int parentHeight = canvasParent.getHeight(); - - Dimension realDimensions = getRealDimensions(); - - if (stretchedKeepAspectRatio) - { - double aspectRatio = realDimensions.getWidth() / realDimensions.getHeight(); - - int tempNewWidth = (int) (parentHeight * aspectRatio); - - if (tempNewWidth > parentWidth) - { - parentHeight = (int) (parentWidth / aspectRatio); - } - else - { - parentWidth = tempNewWidth; - } - } - - if (stretchedIntegerScaling) - { - if (parentWidth > realDimensions.width) - { - parentWidth = parentWidth - (parentWidth % realDimensions.width); - } - if (parentHeight > realDimensions.height) - { - parentHeight = parentHeight - (parentHeight % realDimensions.height); - } - } - - cachedStretchedDimensions = new Dimension(parentWidth, parentHeight); - } - - return cachedStretchedDimensions; - } - - @Inject - @Override - public void invalidateStretching(boolean resize) - { - cachedRealDimensions = null; - cachedStretchedDimensions = null; - - if (resize && isResized()) - { - /* - Tells the game to run resizeCanvas the next frame. - - This is useful when resizeCanvas wouldn't usually run, - for example when we've only changed the scaling factor - and we still want the game's canvas to resize - with regards to the new maximum bounds. - */ - setResizeCanvasNextFrame(true); - } - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/TileObjectMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/TileObjectMixin.java deleted file mode 100644 index f2a22c9d60..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/TileObjectMixin.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.awt.Graphics2D; -import java.awt.Polygon; -import net.runelite.api.Perspective; -import net.runelite.api.Point; -import net.runelite.api.TileObject; -import net.runelite.api.coords.LocalPoint; -import net.runelite.api.coords.WorldPoint; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Mixins; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSDecorativeObject; -import net.runelite.rs.api.RSGameObject; -import net.runelite.rs.api.RSGroundObject; -import net.runelite.rs.api.RSItemLayer; -import net.runelite.rs.api.RSWallObject; - -@Mixins({ - @Mixin(RSDecorativeObject.class), - @Mixin(RSGameObject.class), - @Mixin(RSGroundObject.class), - @Mixin(RSItemLayer.class), - @Mixin(RSWallObject.class) -}) -public abstract class TileObjectMixin implements TileObject -{ - @Shadow("clientInstance") - private static RSClient client; - - @Override - @Inject - public int getId() - { - long hash = getHash(); - return (int) (hash >>> 17 & 4294967295L); - } - - @Override - @Inject - public WorldPoint getWorldLocation() - { - return WorldPoint.fromLocal(client, getX(), getY(), getPlane()); - } - - @Override - @Inject - public LocalPoint getLocalLocation() - { - return new LocalPoint(getX(), getY()); - } - - @Override - @Inject - public Point getCanvasLocation() - { - return getCanvasLocation(0); - } - - @Override - @Inject - public Point getCanvasLocation(int zOffset) - { - return Perspective.localToCanvas(client, getLocalLocation(), getPlane(), zOffset); - } - - @Override - @Inject - public Polygon getCanvasTilePoly() - { - return Perspective.getCanvasTilePoly(client, getLocalLocation()); - } - - @Override - @Inject - public Point getCanvasTextLocation(Graphics2D graphics, String text, int zOffset) - { - return Perspective.getCanvasTextLocation(client, graphics, getLocalLocation(), text, zOffset); - } - - @Override - @Inject - public Point getMinimapLocation() - { - return Perspective.localToMinimap(client, getLocalLocation()); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/VarbitMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/VarbitMixin.java deleted file mode 100644 index a473dad4a9..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/VarbitMixin.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import java.util.Map; -import net.runelite.api.VarClientInt; -import net.runelite.api.VarClientStr; -import net.runelite.api.Varbits; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSNodeCache; -import net.runelite.rs.api.RSVarbit; - -@Mixin(RSClient.class) -public abstract class VarbitMixin implements RSClient -{ - @Shadow("clientInstance") - private static RSClient client; - - @Inject - private Cache varbitCache = CacheBuilder.newBuilder() - .maximumSize(128) - .build(); - - @Inject - VarbitMixin() - { - } - - @Inject - @Override - public int getVar(Varbits varbit) - { - int varbitId = varbit.getId(); - return getVarbitValue(getVarps(), varbitId); - } - - @Inject - @Override - public void setSetting(Varbits varbit, int value) - { - int varbitId = varbit.getId(); - setVarbitValue(getVarps(), varbitId, value); - } - - @Inject - @Override - public int getVarbitValue(int[] varps, int varbitId) - { - assert client.isClientThread(); - - RSVarbit v = varbitCache.getIfPresent(varbitId); - if (v == null) - { - client.getVarbit(varbitId); // load varbit into cache - RSNodeCache varbits = client.getVarbitCache(); - v = (RSVarbit) varbits.get(varbitId); // get from cache - varbitCache.put(varbitId, v); - } - - if (v.getIndex() == 0 && v.getLeastSignificantBit() == 0 && v.getMostSignificantBit() == 0) - { - throw new IndexOutOfBoundsException("Varbit " + varbitId + " does not exist"); - } - - int value = varps[v.getIndex()]; - int lsb = v.getLeastSignificantBit(); - int msb = v.getMostSignificantBit(); - int mask = (1 << ((msb - lsb) + 1)) - 1; - return (value >> lsb) & mask; - } - - @Inject - @Override - public void setVarbitValue(int[] varps, int varbitId, int value) - { - RSVarbit v = varbitCache.getIfPresent(varbitId); - if (v == null) - { - client.getVarbit(varbitId); // load varbit into cache - RSNodeCache varbits = client.getVarbitCache(); - v = (RSVarbit) varbits.get(varbitId); // get from cache - varbitCache.put(varbitId, v); - } - - int lsb = v.getLeastSignificantBit(); - int msb = v.getMostSignificantBit(); - int mask = (1 << ((msb - lsb) + 1)) - 1; - varps[v.getIndex()] = (varps[v.getIndex()] & ~(mask << lsb)) | ((value & mask) << lsb); - } - - @Inject - @Override - public int getVar(VarClientInt varClientInt) - { - Map varcmap = getVarcMap(); - Object object = varcmap.get(varClientInt.getIndex()); - return object instanceof Integer ? (Integer) object : 0; - } - - @Inject - @Override - public String getVar(VarClientStr varClientStr) - { - Map varcmap = getVarcMap(); - Object var2 = varcmap.get(varClientStr.getIndex()); - return var2 instanceof String ? (String) var2 : ""; - } - - @Inject - @Override - public void setVar(VarClientStr varClientStr, String value) - { - Map varcmap = getVarcMap(); - varcmap.put(varClientStr.getIndex(), value); - } - - @Inject - @Override - public void setVar(VarClientInt varClientInt, int value) - { - Map varcmap = getVarcMap(); - varcmap.put(varClientInt.getIndex(), value); - } - - @Inject - @Override - public Map getVarcMap() - { - return getVarcs().getVarcMap(); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/WidgetSpriteMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/WidgetSpriteMixin.java deleted file mode 100644 index 12001fb4c8..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/WidgetSpriteMixin.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import java.util.Map; -import net.runelite.api.SpritePixels; -import net.runelite.api.mixins.Copy; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSSpritePixels; -import net.runelite.rs.api.RSWidget; - -@Mixin(RSWidget.class) -public abstract class WidgetSpriteMixin implements RSWidget -{ - @Shadow("widgetSpriteOverrides") - private static Map widgetSpriteOverrides; - - @Copy("getWidgetSprite") - public RSSpritePixels rs$getWidgetSprite(boolean var1) - { - throw new RuntimeException(); - } - - @Replace("getWidgetSprite") - public RSSpritePixels rl$getWidgetSprite(boolean var1) - { - if (getSpriteId() != -1) - { - SpritePixels sprite = widgetSpriteOverrides.get(getId()); - - if (sprite != null) - { - return (RSSpritePixels) sprite; - } - } - - return rs$getWidgetSprite(var1); - } -} \ No newline at end of file diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/WorldHoppingMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/WorldHoppingMixin.java deleted file mode 100644 index 78778e3993..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/WorldHoppingMixin.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.MenuAction; -import net.runelite.api.World; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.api.widgets.WidgetInfo; -import net.runelite.rs.api.RSClient; - -@Mixin(RSClient.class) -public abstract class WorldHoppingMixin implements RSClient -{ - @Inject - @Override - public void openWorldHopper() - { - // The clicked x & y coordinates (the last arguments) are not processed in the game or sent to Jagex, so they don't have to be real. - menuAction(-1, WidgetInfo.WORLD_SWITCHER_BUTTON.getId(), MenuAction.WIDGET_DEFAULT.getId(), 1, "World Switcher", "", 658, 384); - } - - @Inject - @Override - public void hopToWorld(World world) - { - final int worldId = world.getId(); - menuAction(worldId, WidgetInfo.WORLD_SWITCHER_LIST.getId(), MenuAction.WIDGET_DEFAULT.getId(), 1, "Switch", "" + (worldId - 300) + "", 683, 244); - } -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapManagerMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapManagerMixin.java deleted file mode 100644 index 3f51e31e48..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapManagerMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2018, Morgan Lewis - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.mixins.Mixin; -import net.runelite.api.mixins.Replace; -import net.runelite.api.mixins.Shadow; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSWorldMapManager; - -@Mixin(RSWorldMapManager.class) -public abstract class WorldMapManagerMixin implements RSWorldMapManager -{ - @Shadow("clientInstance") - static RSClient client; - - /* - The worldMapZoom is essentially pixels per tile. In most instances - getPixelsPerTile returns the same as worldMapZoom. - - At some map widths when 100% zoomed in the Jagex version of this function - returns 7.89 instead of 8.0 (the worldMapZoom at this level). - This would cause both the x and y positions of the map to shift - slightly when the map was certain widths. - - This mixin function replaces Jagex calculation with getWorldMapZoom. - This small change makes the world map tile sizing predictable. - */ - @Replace("getPixelsPerTile") - @Override - public float getPixelsPerTile(int graphicsDiff, int worldDiff) - { - return client.getRenderOverview().getWorldMapZoom(); - } - -} diff --git a/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapMixin.java b/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapMixin.java deleted file mode 100644 index bdd291b354..0000000000 --- a/runelite-mixins/src/main/java/net/runelite/mixins/WorldMapMixin.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2018, Morgan Lewis - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.Point; -import net.runelite.api.coords.WorldPoint; -import net.runelite.api.mixins.Inject; -import net.runelite.api.mixins.Mixin; -import net.runelite.rs.api.RSRenderOverview; -import net.runelite.rs.api.RSWorldMapManager; - -@Mixin(RSRenderOverview.class) -public abstract class WorldMapMixin implements RSRenderOverview -{ - @Override - @Inject - public Point getWorldMapPosition() - { - RSWorldMapManager worldMapManager = getWorldMapManager(); - int worldX = getWorldMapX() + worldMapManager.getSurfaceOffsetX(); - int worldY = getWorldMapY() + worldMapManager.getSurfaceOffsetY(); - return new Point(worldX, worldY); - } - - @Inject - public void setWorldMapPositionTarget(WorldPoint worldPoint) - { - setWorldMapPositionTarget(worldPoint.getX(), worldPoint.getY()); - } - -} diff --git a/runelite-mixins/src/test/java/net/runelite/mixins/RSSceneMixinTest.java b/runelite-mixins/src/test/java/net/runelite/mixins/RSSceneMixinTest.java deleted file mode 100644 index 54097331eb..0000000000 --- a/runelite-mixins/src/test/java/net/runelite/mixins/RSSceneMixinTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mixins; - -import net.runelite.api.coords.LocalPoint; -import net.runelite.rs.api.RSClient; -import net.runelite.rs.api.RSPlayer; -import org.junit.Test; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -public class RSSceneMixinTest -{ - @Test - public void testWalkDistance() - { - RSClient client = mock(RSClient.class); - RSPlayer localPlayer = mock(RSPlayer.class); - when(client.getLocalPlayer()).thenReturn(localPlayer); - - when(localPlayer.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); - - RSSceneMixin.client = client; - RSSceneMixin.setTargetTile(90, 0); - - verify(client).setSelectedSceneTileX(eq(45)); - verify(client).setSelectedSceneTileY(eq(0)); - } -} \ No newline at end of file diff --git a/runescape-api/pom.xml b/runescape-api/pom.xml deleted file mode 100644 index cfe8d98273..0000000000 --- a/runescape-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - - net.runelite - runelite-parent - 1.5.29-SNAPSHOT - - - net.runelite.rs - runescape-api - RuneScape API - - - - net.runelite - runelite-api - ${project.version} - - - diff --git a/runescape-api/src/main/java/net/runelite/mapping/Construct.java b/runescape-api/src/main/java/net/runelite/mapping/Construct.java deleted file mode 100644 index a5b5b2541a..0000000000 --- a/runescape-api/src/main/java/net/runelite/mapping/Construct.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mapping; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Inject a method to create and construct an object. - * The object type is inferred from the return value - * of the method. - * - * {@code - * {@literal @}Construct - * RSIndexedImage createIndexedImage(); - * } - * - * @author Adam - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Documented -public @interface Construct -{ - -} diff --git a/runescape-api/src/main/java/net/runelite/mapping/Import.java b/runescape-api/src/main/java/net/runelite/mapping/Import.java deleted file mode 100644 index 97e4e81d7f..0000000000 --- a/runescape-api/src/main/java/net/runelite/mapping/Import.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.mapping; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target( -{ - ElementType.FIELD, ElementType.METHOD -}) -public @interface Import -{ - String value(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSActor.java b/runescape-api/src/main/java/net/runelite/rs/api/RSActor.java deleted file mode 100644 index 801cf4413a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSActor.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Actor; -import net.runelite.mapping.Import; - -public interface RSActor extends RSRenderable, Actor -{ - @Import("interacting") - int getRSInteracting(); - - @Import("overhead") - @Override - String getOverheadText(); - - @Import("overhead") - @Override - void setOverheadText(String overheadText); - - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("pathX") - int[] getPathX(); - - @Import("pathY") - int[] getPathY(); - - @Import("animation") - @Override - int getAnimation(); - - @Import("animation") - @Override - void setAnimation(int animation); - - @Import("graphic") - @Override - int getGraphic(); - - @Import("graphic") - @Override - void setGraphic(int graphic); - - @Import("combatInfoList") - RSCombatInfoList getCombatInfoList(); - - @Import("orientation") - @Override - int getOrientation(); - - @Import("logicalHeight") - @Override - int getLogicalHeight(); - - @Import("idlePoseAnimation") - @Override - void setIdlePoseAnimation(int animation); - - @Import("poseAnimation") - @Override - void setPoseAnimation(int animation); - - @Import("actionFrame") - int getActionFrame(); - - @Import("actionFrame") - @Override - void setActionFrame(int frame); - - @Import("actionFrameCycle") - int getActionFrameCycle(); - - @Import("poseFrame") - int getPoseFrame(); - - @Import("poseFrame") - void setPoseFrame(int frame); - - @Import("poseFrameCycle") - int getPoseFrameCycle(); - - @Import("spotAnimFrame") - int getSpotAnimFrame(); - - @Import("spotAnimFrame") - @Override - void setSpotAnimFrame(int frame); - - @Import("spotAnimFrameCycle") - int getSpotAnimFrameCycle(); - - @Import("hitsplatValues") - int[] getHitsplatValues(); - - @Import("hitsplatTypes") - int[] getHitsplatTypes(); - - @Import("hitsplatCycles") - int[] getHitsplatCycles(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNode.java deleted file mode 100644 index 9a90fc7883..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNode.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSAudioTaskNode -{ - @Import("setNumLoops") - void setNumLoops(int numLoops); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNodeQueue.java b/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNodeQueue.java deleted file mode 100644 index 2a50e79471..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSAudioTaskNodeQueue.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSAudioTaskNodeQueue -{ - @Import("queueAudioTaskNode") - void queueAudioTaskNode(RSTaskDataNode taskDataNode); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSBuffer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSBuffer.java deleted file mode 100644 index 0c357c3fee..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSBuffer.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSBuffer extends RSNode -{ - @Import("payload") - byte[] getPayload(); - - @Import("offset") - int getOffset(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSBufferProvider.java b/runescape-api/src/main/java/net/runelite/rs/api/RSBufferProvider.java deleted file mode 100644 index c46cfa6b7c..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSBufferProvider.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.BufferProvider; -import net.runelite.mapping.Import; - -public interface RSBufferProvider extends BufferProvider -{ - @Import("pixels") - @Override - int[] getPixels(); - - @Import("width") - @Override - int getWidth(); - - @Import("height") - @Override - int getHeight(); - - @Import("setRaster") - void setRaster(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSCacheableNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSCacheableNode.java deleted file mode 100644 index 44d7b876cc..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSCacheableNode.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSCacheableNode extends RSNode -{ - @Import("unlinkDual") - void unlinkDual(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSChatLineBuffer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSChatLineBuffer.java deleted file mode 100644 index 9aa9b35c3b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSChatLineBuffer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2017. l2- - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.runelite.rs.api; - -import net.runelite.api.ChatLineBuffer; -import net.runelite.api.MessageNode; -import net.runelite.mapping.Import; - -public interface RSChatLineBuffer extends ChatLineBuffer -{ - @Import("lines") - @Override - MessageNode[] getLines(); - - @Import("length") - @Override - int getLength(); - - @Import("length") - void setLength(int length); -} \ No newline at end of file diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSChatPlayer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSChatPlayer.java deleted file mode 100644 index 0a6824b2e3..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSChatPlayer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2016-2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ChatPlayer; -import net.runelite.mapping.Import; - -public interface RSChatPlayer extends ChatPlayer, RSNameable -{ - @Import("world") - @Override - int getWorld(); - - @Import("rank") - int getRSRank(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSClanMember.java b/runescape-api/src/main/java/net/runelite/rs/api/RSClanMember.java deleted file mode 100644 index ba65238fa4..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClanMember.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ClanMember; - -public interface RSClanMember extends RSChatPlayer, ClanMember -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSClanMemberManager.java b/runescape-api/src/main/java/net/runelite/rs/api/RSClanMemberManager.java deleted file mode 100644 index 36a486c28b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClanMemberManager.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSClanMemberManager extends RSNameableContainer -{ - @Import("clanOwner") - String getClanOwner(); - - @Import("clanChatName") - String getClanChatName(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSClassInfo.java b/runescape-api/src/main/java/net/runelite/rs/api/RSClassInfo.java deleted file mode 100644 index 52dbd172d1..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClassInfo.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import net.runelite.mapping.Import; - -public interface RSClassInfo -{ - @Import("methods") - Method[] getMethods(); - - @Import("fields") - Field[] getFields(); - - @Import("args") - byte[][][] getArgs(); -} 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 deleted file mode 100644 index e4833e1830..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSClient.java +++ /dev/null @@ -1,1016 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.util.Map; -import net.runelite.api.Client; -import net.runelite.api.SpritePixels; -import net.runelite.api.World; -import net.runelite.api.widgets.Widget; -import net.runelite.mapping.Construct; -import net.runelite.mapping.Import; - -public interface RSClient extends RSGameEngine, Client -{ - @Import("cameraX") - @Override - int getCameraX(); - - @Import("cameraY") - @Override - int getCameraY(); - - @Import("cameraZ") - @Override - int getCameraZ(); - - @Import("cameraX2") - @Override - int getCameraX2(); - - @Import("cameraY2") - @Override - int getCameraY2(); - - @Import("cameraZ2") - @Override - int getCameraZ2(); - - @Import("plane") - @Override - int getPlane(); - - @Import("cameraPitch") - @Override - int getCameraPitch(); - - @Import("cameraPitch") - void setCameraPitch(int cameraPitch); - - @Import("cameraYaw") - @Override - int getCameraYaw(); - - @Import("world") - int getWorld(); - - @Import("FPS") - @Override - int getFPS(); - - @Import("mapAngle") - @Override - int getMapAngle(); - - @Import("tileHeights") - @Override - int[][][] getTileHeights(); - - @Import("tileSettings") - @Override - byte[][][] getTileSettings(); - - @Import("clientVarps") - @Override - int[] getVarps(); - - @Import("varcs") - RSVarcs getVarcs(); - - @Import("energy") - @Override - int getEnergy(); - - @Import("weight") - @Override - int getWeight(); - - @Import("baseX") - @Override - int getBaseX(); - - @Import("baseY") - @Override - int getBaseY(); - - @Import("boostedSkillLevels") - @Override - int[] getBoostedSkillLevels(); - - @Import("realSkillLevels") - @Override - int[] getRealSkillLevels(); - - @Import("skillExperiences") - @Override - int[] getSkillExperiences(); - - @Import("changedSkills") - int[] getChangedSkills(); - - @Import("changedSkillsCount") - int getChangedSkillsCount(); - - @Import("changedSkillsCount") - void setChangedSkillsCount(int i); - - @Import("gameState") - int getRSGameState(); - - @Import("checkClick") - void setCheckClick(boolean checkClick); - - @Import("mouseX2") - void setMouseCanvasHoverPositionX(int x); - - @Import("mouseY2") - void setMouseCanvasHoverPositionY(int y); - - @Import("mouseCurrentButton") - @Override - int getMouseCurrentButton(); - - @Import("selectedSceneTileX") - int getSelectedSceneTileX(); - - @Import("selectedSceneTileX") - void setSelectedSceneTileX(int selectedSceneTileX); - - @Import("selectedSceneTileY") - int getSelectedSceneTileY(); - - @Import("selectedSceneTileY") - void setSelectedSceneTileY(int selectedSceneTileY); - - @Import("draggingWidget") - @Override - boolean isDraggingWidget(); - - @Import("draggedWidget") - @Override - RSWidget getDraggedWidget(); - - @Import("draggedOnWidget") - @Override - RSWidget getDraggedOnWidget(); - - @Import("draggedOnWidget") - @Override - void setDraggedOnWidget(Widget widget); - - @Import("widgets") - RSWidget[][] getWidgets(); - - /** - * Gets an array of widgets that correspond to the passed group ID. - * - * @param groupId the group ID - * @return the widget group - * @see net.runelite.api.widgets.WidgetID - */ - RSWidget[] getGroup(int groupId); - - @Import("scene") - @Override - RSScene getScene(); - - @Import("localPlayer") - @Override - RSPlayer getLocalPlayer(); - - @Import("npcIndexesCount") - int getNpcIndexesCount(); - - @Import("npcIndices") - int[] getNpcIndices(); - - @Import("cachedNPCs") - @Override - RSNPC[] getCachedNPCs(); - - @Import("collisionMaps") - RSCollisionData[] getCollisionMaps(); - - @Import("playerIndexesCount") - int getPlayerIndexesCount(); - - @Import("playerIndices") - int[] getPlayerIndices(); - - @Import("cachedPlayers") - @Override - RSPlayer[] getCachedPlayers(); - - @Import("localInteractingIndex") - int getLocalInteractingIndex(); - - @Import("groundItemDeque") - RSDeque[][][] getGroundItemDeque(); - - @Import("projectiles") - RSDeque getProjectilesDeque(); - - @Import("graphicsObjectDeque") - RSDeque getGraphicsObjectDeque(); - - @Import("username") - @Override - String getUsername(); - - @Import("username") - @Override - void setUsername(String username); - - @Import("password") - @Override - void setPassword(String password); - - @Import("otp") - @Override - void setOtp(String otp); - - @Import("currentLoginField") - @Override - int getCurrentLoginField(); - - @Import("loginIndex") - @Override - int getLoginIndex(); - - @Import("playerOptions") - @Override - String[] getPlayerOptions(); - - @Import("playerOptionsPriorities") - @Override - boolean[] getPlayerOptionsPriorities(); - - @Import("playerMenuTypes") - @Override - int[] getPlayerMenuTypes(); - - @Import("mouseX") - int getMouseX(); - - @Import("mouseY") - int getMouseY(); - - @Import("mouseX2") - int getMouseX2(); - - @Import("mouseY2") - int getMouseY2(); - - @Import("containsBounds") - boolean containsBounds(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7); - - @Import("checkClick") - boolean isCheckClick(); - - @Import("menuOptionCount") - int getMenuOptionCount(); - - @Import("menuOptionCount") - void setMenuOptionCount(int menuOptionCount); - - @Import("menuOptions") - String[] getMenuOptions(); - - @Import("menuTargets") - String[] getMenuTargets(); - - @Import("menuIdentifiers") - int[] getMenuIdentifiers(); - - @Import("menuTypes") - int[] getMenuTypes(); - - @Import("menuActionParams0") - int[] getMenuActionParams0(); - - @Import("menuActionParams1") - int[] getMenuActionParams1(); - - @Import("menuForceLeftClick") - boolean[] getMenuForceLeftClick(); - - @Import("worldList") - @Override - RSWorld[] getWorldList(); - - @Import("addChatMessage") - void addChatMessage(int type, String name, String message, String sender); - - @Override - @Import("getObjectDefinition") - RSObjectComposition getObjectDefinition(int objectId); - - @Override - @Import("getNpcDefinition") - RSNPCComposition getNpcDefinition(int npcId); - - @Import("scale") - @Override - int getScale(); - - @Import("canvasHeight") - @Override - int getCanvasHeight(); - - @Import("canvasWidth") - @Override - int getCanvasWidth(); - - @Import("viewportHeight") - @Override - int getViewportHeight(); - - @Import("viewportWidth") - @Override - int getViewportWidth(); - - @Import("Viewport_xOffset") - @Override - int getViewportXOffset(); - - @Import("Viewport_yOffset") - @Override - int getViewportYOffset(); - - @Import("isResized") - @Override - boolean isResized(); - - @Import("widgetPositionX") - @Override - int[] getWidgetPositionsX(); - - @Import("widgetPositionY") - @Override - int[] getWidgetPositionsY(); - - @Import("itemContainers") - RSHashTable getItemContainers(); - - @Import("getItemDefinition") - @Override - RSItemComposition getItemDefinition(int itemId); - - @Import("createSprite") - RSSpritePixels createItemSprite(int itemId, int quantity, int thickness, int borderColor, int stackable, boolean noted); - - @Import("decodeSprite") - void decodeSprite(byte[] data); - - @Import("indexedSpriteCount") - int getIndexedSpriteCount(); - - @Import("indexedSpriteWidth") - int getIndexedSpriteWidth(); - - @Import("indexedSpriteHeight") - int getIndexedSpriteHeight(); - - @Import("indexedSpriteOffsetXs") - int[] getIndexedSpriteOffsetXs(); - - @Import("indexedSpriteOffsetXs") - void setIndexedSpriteOffsetXs(int[] indexedSpriteOffsetXs); - - @Import("indexedSpriteOffsetYs") - int[] getIndexedSpriteOffsetYs(); - - @Import("indexedSpriteOffsetYs") - void setIndexedSpriteOffsetYs(int[] indexedSpriteOffsetYs); - - @Import("indexSpriteWidths") - int[] getIndexSpriteWidths(); - - @Import("indexSpriteWidths") - void setIndexSpriteWidths(int[] indexSpriteWidths); - - @Import("indexedSpriteHeights") - int[] getIndexedSpriteHeights(); - - @Import("indexedSpriteHeights") - void setIndexedSpriteHeights(int[] indexedSpriteHeights); - - @Import("spritePixels") - byte[][] getSpritePixels(); - - @Import("spritePixels") - void setSpritePixels(byte[][] spritePixels); - - @Import("indexedSpritePalette") - int[] getIndexedSpritePalette(); - - @Import("indexedSpritePalette") - void setIndexSpritePalette(int[] indexSpritePalette); - - @Import("indexSprites") - @Override - RSIndexDataBase getIndexSprites(); - - @Import("indexScripts") - @Override - RSIndexDataBase getIndexScripts(); - - @Import("widgetFlags") - @Override - RSHashTable getWidgetFlags(); - - @Import("componentTable") - @Override - RSHashTable getComponentTable(); - - @Import("grandExchangeOffers") - RSGrandExchangeOffer[] getGrandExchangeOffers(); - - @Import("isMenuOpen") - @Override - boolean isMenuOpen(); - - @Import("gameCycle") - @Override - int getGameCycle(); - - @Import("packetHandler") - void packetHandler(); - - @Import("chatLineMap") - @Override - Map getChatLineMap(); - - @Import("messages") - @Override - RSIterableHashTable getMessages(); - - @Import("revision") - @Override - int getRevision(); - - @Import("mapRegions") - @Override - int[] getMapRegions(); - - @Import("instanceTemplateChunks") - @Override - int[][][] getInstanceTemplateChunks(); - - @Import("xteaKeys") - @Override - int[][] getXteaKeys(); - - @Import("gameDrawingMode") - @Override - int getGameDrawingMode(); - - @Import("gameDrawingMode") - @Override - void setGameDrawingMode(int gameDrawingMode); - - @Import("cycleCntr") - int getCycleCntr(); - - @Import("chatCycle") - void setChatCycle(int value); - - /** - * Get the widget top group. widgets[topGroup] contains widgets with - * parentId -1, which are the widget roots. - * - * @return - */ - @Import("widgetRoot") - int getWidgetRoot(); - - @Import("mapElementConfigs") - @Override - RSMapElementConfig[] getMapElementConfigs(); - - @Import("mapscene") - @Override - RSIndexedSprite[] getMapScene(); - - @Import("mapIcons") - @Override - RSSpritePixels[] getMapIcons(); - - @Import("mapDots") - RSSpritePixels[] getMapDots(); - - @Import("modIcons") - @Override - RSIndexedSprite[] getModIcons(); - - @Import("modIcons") - void setRSModIcons(RSIndexedSprite[] modIcons); - - @Construct - @Override - RSIndexedSprite createIndexedSprite(); - - @Construct - @Override - RSSpritePixels createSpritePixels(int[] pixels, int width, int height); - - @Import("destinationX") - int getDestinationX(); - - @Import("destinationY") - int getDestinationY(); - - @Import("audioEffects") - RSSoundEffect[] getAudioEffects(); - - @Import("queuedSoundEffectIDs") - int[] getQueuedSoundEffectIDs(); - - @Import("soundLocations") - int[] getSoundLocations(); - - @Import("queuedSoundEffectLoops") - int[] getQueuedSoundEffectLoops(); - - @Import("queuedSoundEffectDelays") - int[] getQueuedSoundEffectDelays(); - - @Import("queuedSoundEffectCount") - int getQueuedSoundEffectCount(); - - @Import("queuedSoundEffectCount") - void setQueuedSoundEffectCount(int queuedSoundEffectCount); - - @Import("queueSoundEffect") - void queueSoundEffect(int id, int numLoops, int delay); - - @Import("rasterProvider") - @Override - RSBufferProvider getBufferProvider(); - - @Import("mouseIdleTicks") - @Override - int getMouseIdleTicks(); - - @Import("mouseLastPressedTimeMillis") - @Override - long getMouseLastPressedMillis(); - - @Import("keyboardIdleTicks") - @Override - int getKeyboardIdleTicks(); - - @Import("lowMemory") - void setLowMemory(boolean lowMemory); - - @Import("sceneLowMemory") - void setSceneLowMemory(boolean lowMemory); - - @Import("audioHighMemory") - void setAudioHighMemory(boolean highMemory); - - @Import("objectCompositionLowDetail") - void setObjectCompositionLowDetail(boolean lowDetail); - - @Construct - RSItem createItem(); - - @Import("intStackSize") - @Override - int getIntStackSize(); - - @Import("intStackSize") - @Override - void setIntStackSize(int stackSize); - - @Import("intStack") - @Override - int[] getIntStack(); - - @Import("scriptStringStackSize") - @Override - int getStringStackSize(); - - @Import("scriptStringStackSize") - @Override - void setStringStackSize(int stackSize); - - @Import("scriptStringStack") - @Override - String[] getStringStack(); - - @Import("friendManager") - RSFriendManager getFriendManager(); - - @Import("clanMemberManager") - RSClanMemberManager getClanMemberManager(); - - @Import("loginType") - RSJagexLoginType getLoginType(); - - @Construct - RSName createName(String name, RSJagexLoginType type); - - @Import("getVarbit") - int getVarbit(int varbitId); - - @Import("varbits") - RSNodeCache getVarbitCache(); - - @Import("preferences") - @Override - RSPreferences getPreferences(); - - /** - * This is the pitch the user has set the camera to. - * It should be between 128 and (pitchUnlimiter?512:383) JAUs(1). - * The difference between this and cameraPitch is that cameraPitch has a lower limit, imposed by the surrounding - * terrain. - * - * (1) JAU - Jagex Angle Unit; 1/1024 of a revolution - */ - @Import("cameraPitchTarget") - int getCameraPitchTarget(); - - @Import("cameraPitchTarget") - void setCameraPitchTarget(int pitch); - - @Import("pitchSin") - void setPitchSin(int v); - - @Import("pitchCos") - void setPitchCos(int v); - - @Import("yawSin") - void setYawSin(int v); - - @Import("yawCos") - void setYawCos(int v); - - @Import("Rasterizer3D_zoom") - @Override - int get3dZoom(); - - @Import("Rasterizer3D_zoom") - void set3dZoom(int zoom); - - @Import("Rasterizer3D_clipMidX2") - @Override - int getRasterizer3D_clipMidX2(); - - @Import("Rasterizer3D_clipNegativeMidX") - @Override - int getRasterizer3D_clipNegativeMidX(); - - @Import("Rasterizer3D_clipNegativeMidY") - @Override - int getRasterizer3D_clipNegativeMidY(); - - @Import("Rasterizer3D_clipMidY2") - @Override - int getRasterizer3D_clipMidY2(); - - @Import("centerX") - @Override - int getCenterX(); - - @Import("centerY") - @Override - int getCenterY(); - - @Import("renderOverview") - RSRenderOverview getRenderOverview(); - - @Import("changeWorld") - @Override - void changeWorld(World world); - - @Construct - @Override - RSWorld createWorld(); - - @Import("animOffsetX") - void setAnimOffsetX(int animOffsetX); - - @Import("animOffsetY") - void setAnimOffsetY(int animOffsetY); - - @Import("animOffsetZ") - void setAnimOffsetZ(int animOffsetZ); - - @Import("getFrames") - RSFrames getFrames(int frameId); - - @Import("minimapSprite") - RSSpritePixels getMinimapSprite(); - - @Import("minimapSprite") - void setMinimapSprite(SpritePixels spritePixels); - - @Import("drawObject") - void drawObject(int z, int x, int y, int randomColor1, int randomColor2); - - @Construct - RSScriptEvent createScriptEvent(); - - @Import("runScript") - void runScript(RSScriptEvent ev, int ex); - - @Import("hintArrowTargetType") - void setHintArrowTargetType(int value); - - @Import("hintArrowTargetType") - int getHintArrowTargetType(); - - @Import("hintArrowX") - void setHintArrowX(int value); - - @Import("hintArrowX") - int getHintArrowX(); - - @Import("hintArrowY") - void setHintArrowY(int value); - - @Import("hintArrowY") - int getHintArrowY(); - - @Import("hintArrowOffsetX") - void setHintArrowOffsetX(int value); - - @Import("hintArrowOffsetY") - void setHintArrowOffsetY(int value); - - @Import("hintArrowNpcTargetIdx") - void setHintArrowNpcTargetIdx(int value); - - @Import("hintArrowNpcTargetIdx") - int getHintArrowNpcTargetIdx(); - - @Import("hintArrowPlayerTargetIdx") - void setHintArrowPlayerTargetIdx(int value); - - @Import("hintArrowPlayerTargetIdx") - int getHintArrowPlayerTargetIdx(); - - @Import("isDynamicRegion") - @Override - boolean isInInstancedRegion(); - - @Import("itemPressedDuration") - @Override - int getItemPressedDuration(); - - @Import("itemPressedDuration") - void setItemPressedDuration(int duration); - - @Import("flags") - int getFlags(); - - @Import("compass") - void setCompass(SpritePixels spritePixels); - - @Import("widgetSpriteCache") - @Override - RSNodeCache getWidgetSpriteCache(); - - @Import("items") - @Override - RSNodeCache getItemCompositionCache(); - - @Import("oculusOrbState") - @Override - int getOculusOrbState(); - - @Import("oculusOrbState") - @Override - void setOculusOrbState(int state); - - @Import("oculusOrbNormalSpeed") - @Override - void setOculusOrbNormalSpeed(int state); - - @Import("lookingAtX") - @Override - int getOculusOrbFocalPointX(); - - @Import("lookingAtY") - @Override - int getOculusOrbFocalPointY(); - - RSItem getLastItemDespawn(); - - void setLastItemDespawn(RSItem lastItemDespawn); - - @Construct - RSWidget createWidget(); - - @Import("revalidateWidget") - void revalidateWidget(Widget w); - - @Import("revalidateWidgetScroll") - void revalidateWidgetScroll(Widget[] group, Widget w, boolean postEvent); - - @Import("menuAction") - void menuAction(int var0, int var1, int var2, int var3, String var4, String var5, int var6, int var7); - - @Import("Viewport_entityCountAtMouse") - int getEntitiesAtMouseCount(); - - @Import("Viewport_entityCountAtMouse") - void setEntitiesAtMouseCount(int i); - - @Import("Viewport_entitiesAtMouse") - long[] getEntitiesAtMouse(); - - @Import("Viewport_mouseX") - int getViewportMouseX(); - - @Import("Viewport_mouseY") - int getViewportMouseY(); - - @Import("textureProvider") - @Override - RSTextureProvider getTextureProvider(); - - @Import("occupiedTilesTick") - int[][] getOccupiedTilesTick(); - - @Import("cachedModels2") - RSNodeCache getCachedModels2(); - - @Import("cycle") - int getCycle(); - - @Import("cycle") - void setCycle(int cycle); - - @Import("visibilityMaps") - boolean[][][][] getVisibilityMaps(); - - @Import("renderArea") - void setRenderArea(boolean[][] renderArea); - - @Import("cameraX2") - void setCameraX2(int cameraX2); - - @Import("cameraY2") - void setCameraY2(int cameraY2); - - @Import("cameraZ2") - void setCameraZ2(int cameraZ2); - - @Import("screenCenterX") - void setScreenCenterX(int screenCenterX); - - @Import("screenCenterZ") - void setScreenCenterZ(int screenCenterZ); - - @Import("Scene_plane") - void setScenePlane(int scenePlane); - - @Import("minTileX") - void setMinTileX(int i); - - @Import("minTileZ") - void setMinTileZ(int i); - - @Import("maxTileX") - void setMaxTileX(int i); - - @Import("maxTileZ") - void setMaxTileZ(int i); - - @Import("tileUpdateCount") - int getTileUpdateCount(); - - @Import("tileUpdateCount") - void setTileUpdateCount(int tileUpdateCount); - - @Import("Viewport_containsMouse") - boolean getViewportContainsMouse(); - - @Import("graphicsPixels") - int[] getGraphicsPixels(); - - @Import("graphicsPixelsWidth") - int getGraphicsPixelsWidth(); - - @Import("graphicsPixelsHeight") - int getGraphicsPixelsHeight(); - - @Import("fillRectangle") - void RasterizerFillRectangle(int x, int y, int w, int h, int rgb); - - @Import("startX") - int getStartX(); - - @Import("startY") - int getStartY(); - - @Import("endX") - int getEndX(); - - @Import("endY") - int getEndY(); - - @Import("if1DraggedWidget") - @Override - RSWidget getIf1DraggedWidget(); - - @Import("if1DraggedItemIndex") - @Override - int getIf1DraggedItemIndex(); - - @Import("spellSelected") - @Override - void setSpellSelected(boolean selected); - - @Import("getEnum") - RSEnum getRsEnum(int id); - - @Import("menuX") - int getMenuX(); - - @Import("menuY") - int getMenuY(); - - @Import("menuHeight") - int getMenuHeight(); - - @Import("menuWidth") - int getMenuWidth(); - - @Import("fontBold12") - RSFont getFontBold12(); - - @Import("drawHorizontalLine") - void RasterizerDrawHorizontalLine(int x, int y, int w, int rgb); - - @Import("drawVerticalLine") - void RasterizerDrawVerticalLine(int x, int y, int h, int rgb); - - @Import("drawGradient") - void RasterizerDrawGradient(int x, int y, int w, int h, int rgbTop, int rgbBottom); - - @Import("fillRectangleAlpha") - void RasterizerFillRectangleAlpha(int x, int y, int w, int h, int rgb, int a); - - @Import("drawRectangle") - void RasterizerDrawRectangle(int x, int y, int w, int h, int rgb); - - @Import("drawCircle") - void RasterizerDrawCircle(int x, int y, int r, int rgb); - - @Import("healthbarCache") - RSNodeCache getHealthBarCache(); - - @Import("healthBarSpriteCache") - RSNodeCache getHealthBarSpriteCache(); - - @Import("getTrack") - RSSoundEffect getTrack(RSIndexData indexData, int id, int var0); - - @Import("createSoundEffectAudioTaskNode") - RSAudioTaskNode createSoundEffectAudioTaskNode(RSRawAudioNode audioNode, int var0, int volume); - - @Import("soundEffectAudioQueue") - RSAudioTaskNodeQueue getSoundEffectAudioQueue(); - - @Import("indexCache4") - RSIndexData getIndexCache4(); - - @Import("soundEffectResampler") - RSResampler getSoundEffectResampler(); - - @Import("soundEffectVolume") - int getSoundEffectVolume(); - - @Import("viewportWalking") - void setViewportWalking(boolean viewportWalking); - - @Import("crossSprites") - @Override - RSSpritePixels[] getCrossSprites(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSCollisionData.java b/runescape-api/src/main/java/net/runelite/rs/api/RSCollisionData.java deleted file mode 100644 index 8df6236650..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSCollisionData.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.CollisionData; -import net.runelite.mapping.Import; - -public interface RSCollisionData extends CollisionData -{ - @Import("flags") - int[][] getFlags(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfo1.java b/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfo1.java deleted file mode 100644 index 7f9519718b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfo1.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSCombatInfo1 -{ - @Import("healthRatio") - int getHealthRatio(); - - @Import("health") - int getHealth(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoList.java b/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoList.java deleted file mode 100644 index 297556f8ec..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoList.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -/** - * Created by bold on 2/2/17. - */ -public interface RSCombatInfoList -{ - @Import("node") - RSNode getNode(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoListHolder.java b/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoListHolder.java deleted file mode 100644 index dcfab0d976..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSCombatInfoListHolder.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSCombatInfoListHolder extends RSNode -{ - @Import("combatInfo1") - RSCombatInfoList getCombatInfo1(); - - @Import("healthBar") - RSHealthBar getHealthBar(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSDecorativeObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSDecorativeObject.java deleted file mode 100644 index 910c5acc1b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSDecorativeObject.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.DecorativeObject; -import net.runelite.mapping.Import; - -public interface RSDecorativeObject extends DecorativeObject -{ - @Import("hash") - @Override - long getHash(); - - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("offsetX") - int getXOffset(); - - @Import("offsetY") - int getYOffset(); - - @Import("rotation") - int getOrientation(); - - @Import("renderable1") - @Override - RSRenderable getRenderable(); - - @Import("renderable2") - @Override - RSRenderable getRenderable2(); - - void setPlane(int plane); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSDeque.java b/runescape-api/src/main/java/net/runelite/rs/api/RSDeque.java deleted file mode 100644 index 9a0c2aa303..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSDeque.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSDeque -{ - @Import("current") - RSNode getCurrent(); - - @Import("head") - RSNode getHead(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSDynamicObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSDynamicObject.java deleted file mode 100644 index 4d18bdd26a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSDynamicObject.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Renderable; -import net.runelite.mapping.Import; - -public interface RSDynamicObject extends Renderable, RSRenderable -{ - @Import("id") - int getId(); - - @Import("animFrame") - int getAnimFrame(); - - @Import("animFrame") - void setAnimFrame(int frame); - - @Import("animCycleCount") - int getAnimCycleCount(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSEnum.java b/runescape-api/src/main/java/net/runelite/rs/api/RSEnum.java deleted file mode 100644 index afad5c131e..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSEnum.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2019, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.EnumComposition; -import net.runelite.mapping.Import; - -public interface RSEnum extends EnumComposition, RSCacheableNode -{ - @Import("keys") - @Override - int[] getKeys(); - - @Import("intVals") - @Override - int[] getIntVals(); - - @Import("stringVals") - @Override - String[] getStringVals(); - - @Import("defaultInt") - int getDefaultInt(); - - @Import("defaultString") - String getDefaultString(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFileOnDisk.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFileOnDisk.java deleted file mode 100644 index e7f07e34ee..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFileOnDisk.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.io.RandomAccessFile; -import net.runelite.mapping.Import; - -public interface RSFileOnDisk -{ - @Import("file") - RandomAccessFile getFile(); - - @Import("position") - long getPosition(); - - @Import("length") - long getLength(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFont.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFont.java deleted file mode 100644 index 243193302a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFont.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2019, Ron Young - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.runelite.rs.api; - -public interface RSFont extends RSFontTypeFace -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFontTypeFace.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFontTypeFace.java deleted file mode 100644 index 36fe246e0f..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFontTypeFace.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.FontTypeFace; -import net.runelite.mapping.Import; - -public interface RSFontTypeFace extends FontTypeFace -{ - @Import("getTextWidth") - @Override - int getTextWidth(String text); - - @Import("verticalSpace") - @Override - int getBaseline(); - - @Import("drawTextLeftAligned") - void drawTextLeftAligned(String text, int x, int y, int fontColor, int shadowColor); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFrame.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFrame.java deleted file mode 100644 index 6169518500..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFrame.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSFrame -{ - @Import("skin") - RSFrameMap getSkin(); - - @Import("transformCount") - int getTransformCount(); - - @Import("transformTypes") - int[] getTransformTypes(); - - @Import("translator_x") - int[] getTranslatorX(); - - @Import("translator_y") - int[] getTranslatorY(); - - @Import("translator_z") - int[] getTranslatorZ(); - - @Import("showing") - boolean isShowing(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFrameMap.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFrameMap.java deleted file mode 100644 index 215f3be17b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFrameMap.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSFrameMap extends RSNode -{ - @Import("count") - int getCount(); - - @Import("types") - int[] getTypes(); - - @Import("list") - int[][] getList(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFrames.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFrames.java deleted file mode 100644 index 947549248d..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFrames.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSFrames extends RSCacheableNode -{ - @Import("skeletons") - RSFrame[] getFrames(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFriend.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFriend.java deleted file mode 100644 index 0948c5fc85..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFriend.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Friend; - -public interface RSFriend extends Friend, RSChatPlayer -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFriendContainer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFriendContainer.java deleted file mode 100644 index 2b3793f478..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFriendContainer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSFriendContainer extends RSNameableContainer -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSFriendManager.java b/runescape-api/src/main/java/net/runelite/rs/api/RSFriendManager.java deleted file mode 100644 index 4ff789bc5b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSFriendManager.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.FriendManager; -import net.runelite.mapping.Import; - -public interface RSFriendManager extends FriendManager -{ - @Import("friendContainer") - RSFriendContainer getFriendContainer(); - - @Import("ignoreContainer") - RSIgnoreContainer getIgnoreContainer(); - - @Import("isFriended") - boolean isFriended(RSName var1, boolean var2); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGameCanvas.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGameCanvas.java deleted file mode 100644 index f23456261a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGameCanvas.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSGameCanvas -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGameEngine.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGameEngine.java deleted file mode 100644 index 87bc24ca15..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGameEngine.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.Canvas; -import net.runelite.api.GameEngine; -import net.runelite.mapping.Import; - -public interface RSGameEngine extends GameEngine -{ - @Import("canvas") - Canvas getCanvas(); - - @Import("post") - void post(Object canvas); - - @Import("resizeCanvas") - @Override - void resizeCanvas(); - - @Import("resizeCanvasNextFrame") - boolean isResizeCanvasNextFrame(); - - @Import("resizeCanvasNextFrame") - void setResizeCanvasNextFrame(boolean resize); - - @Import("replaceCanvasNextFrame") - boolean isReplaceCanvasNextFrame(); - - @Import("replaceCanvasNextFrame") - void setReplaceCanvasNextFrame(boolean replace); - - @Import("maxCanvasWidth") - void setMaxCanvasWidth(int width); - - @Import("maxCanvasHeight") - void setMaxCanvasHeight(int height); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGameObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGameObject.java deleted file mode 100644 index b77453c325..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGameObject.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.GameObject; -import net.runelite.mapping.Import; - -public interface RSGameObject extends GameObject -{ - @Import("renderable") - RSRenderable getRenderable(); - - @Import("plane") - int getPlane(); - - @Import("relativeX") - int getRelativeX(); - - @Import("relativeY") - int getRelativeY(); - - @Import("offsetX") - int getOffsetX(); - - @Import("offsetY") - int getOffsetY(); - - @Import("x") - @Override - int getX(); - - @Import("y") - @Override - int getY(); - - @Import("height") - int getHeight(); - - @Import("orientation") - int getRsOrientation(); - - @Import("hash") - @Override - long getHash(); - - @Import("flags") - int getFlags(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGrandExchangeOffer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGrandExchangeOffer.java deleted file mode 100644 index d88e582ef7..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGrandExchangeOffer.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.GrandExchangeOffer; -import net.runelite.mapping.Import; - -public interface RSGrandExchangeOffer extends GrandExchangeOffer -{ - @Import("quantitySold") - @Override - int getQuantitySold(); - - @Import("itemId") - @Override - int getItemId(); - - @Import("totalQuantity") - @Override - int getTotalQuantity(); - - @Import("price") - @Override - int getPrice(); - - @Import("spent") - @Override - int getSpent(); - - @Import("state") - byte getRSState(); - - -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGraphicsObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGraphicsObject.java deleted file mode 100644 index 2edde942f1..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGraphicsObject.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2018, Woox - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.GraphicsObject; -import net.runelite.mapping.Import; - -public interface RSGraphicsObject extends GraphicsObject, RSRenderable -{ - @Import("id") - @Override - int getId(); - - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("startCycle") - @Override - int getStartCycle(); - - @Import("level") - @Override - int getLevel(); - - @Import("height") - @Override - int getHeight(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSGroundObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSGroundObject.java deleted file mode 100644 index efd272cdff..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSGroundObject.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.GroundObject; -import net.runelite.mapping.Import; - -public interface RSGroundObject extends GroundObject -{ - @Import("hash") - @Override - long getHash(); - - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("renderable") - @Override - RSRenderable getRenderable(); - - void setPlane(int plane); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSHashTable.java b/runescape-api/src/main/java/net/runelite/rs/api/RSHashTable.java deleted file mode 100644 index e1462ce1dd..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSHashTable.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.HashTable; -import net.runelite.mapping.Import; - -public interface RSHashTable extends HashTable -{ - @Import("get") - @Override - RSNode get(long value); - - @Import("size") - int getSize(); - - @Import("buckets") - RSNode[] getBuckets(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSHealthBar.java b/runescape-api/src/main/java/net/runelite/rs/api/RSHealthBar.java deleted file mode 100644 index ca9ff1419f..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSHealthBar.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.HealthBar; -import net.runelite.mapping.Import; - -public interface RSHealthBar extends RSCacheableNode, HealthBar -{ - @Import("healthScale") - int getHealthScale(); - - @Import("healthBarFrontSpriteId") - @Override - int getHealthBarFrontSpriteId(); - - @Import("getHealthBarFrontSprite") - @Override - RSSpritePixels getHealthBarFrontSprite(); - - @Import("getHealthBarBackSprite") - @Override - RSSpritePixels getHealthBarBackSprite(); - - @Import("healthBarPadding") - @Override - void setPadding(int padding); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIgnore.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIgnore.java deleted file mode 100644 index f4c3c8150b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIgnore.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Ignore; - -public interface RSIgnore extends Ignore, RSNameable -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIgnoreContainer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIgnoreContainer.java deleted file mode 100644 index 74fb4d5f37..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIgnoreContainer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSIgnoreContainer extends RSNameableContainer -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexData.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIndexData.java deleted file mode 100644 index 6ec1b9d3b6..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexData.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSIndexData extends RSIndexDataBase -{ - @Import("index") - int getIndex(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexDataBase.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIndexDataBase.java deleted file mode 100644 index 26a5a507df..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexDataBase.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.IndexDataBase; -import net.runelite.mapping.Import; - -public interface RSIndexDataBase extends IndexDataBase -{ - @Import("getConfigData") - byte[] getConfigData(int archiveId, int fileId); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexedSprite.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIndexedSprite.java deleted file mode 100644 index 01988e04cc..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIndexedSprite.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.IndexedSprite; -import net.runelite.mapping.Import; - -public interface RSIndexedSprite extends IndexedSprite -{ - @Import("pixels") - @Override - byte[] getPixels(); - - @Import("pixels") - @Override - void setPixels(byte[] pixels); - - @Import("palette") - @Override - int[] getPalette(); - - @Import("palette") - @Override - void setPalette(int[] palette); - - @Import("originalWidth") - @Override - int getOriginalWidth(); - - @Import("originalWidth") - @Override - void setOriginalWidth(int originalWidth); - - @Import("originalHeight") - @Override - int getOriginalHeight(); - - @Import("originalHeight") - @Override - void setOriginalHeight(int originalHeight); - - @Import("height") - @Override - int getHeight(); - - @Import("height") - @Override - void setHeight(int height); - - @Import("offsetX") - @Override - int getOffsetX(); - - @Import("offsetX") - @Override - void setOffsetX(int offsetX); - - @Import("offsetY") - @Override - int getOffsetY(); - - @Import("offsetY") - @Override - void setOffsetY(int offsetY); - - @Import("width") - @Override - int getWidth(); - - @Import("width") - @Override - void setWidth(int width); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIntegerNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIntegerNode.java deleted file mode 100644 index 2f31190951..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIntegerNode.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.IntegerNode; -import net.runelite.mapping.Import; - -public interface RSIntegerNode extends RSNode, IntegerNode -{ - @Import("value") - @Override - int getValue(); - - @Import("value") - @Override - void setValue(int value); -} \ No newline at end of file diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSItem.java b/runescape-api/src/main/java/net/runelite/rs/api/RSItem.java deleted file mode 100644 index 4f451cf028..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSItem.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Item; -import net.runelite.api.Tile; -import net.runelite.mapping.Import; - -public interface RSItem extends RSRenderable, Item -{ - @Import("id") - @Override - int getId(); - - @Import("id") - void setId(int id); - - @Import("quantity") - @Override - int getQuantity(); - - @Import("quantity") - void setQuantity(int quantity); - - int getX(); - - void setX(int x); - - int getY(); - - void setY(int y); - - /** - * Get the tile this item is on - * @return - */ - Tile getTile(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSItemComposition.java b/runescape-api/src/main/java/net/runelite/rs/api/RSItemComposition.java deleted file mode 100644 index fcc649ca72..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSItemComposition.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ItemComposition; -import net.runelite.mapping.Import; - -/** - * ItemComposition is an interface that represents the various properties of an - * item. Imports several values from runescape-client/ItemComposition, and allows - * direct access to them by calling these methods. - */ -public interface RSItemComposition extends ItemComposition -{ - @Import("name") - @Override - String getName(); - - @Import("id") - @Override - int getId(); - - @Import("notedTemplate") - @Override - int getNote(); - - @Import("note") - @Override - int getLinkedNoteId(); - - @Import("placeholderId") - @Override - int getPlaceholderId(); - - @Import("placeholderTemplateId") - @Override - int getPlaceholderTemplateId(); - - @Import("price") - @Override - int getPrice(); - - @Import("isMembers") - @Override - boolean isMembers(); - - @Import("isTradable") - @Override - boolean isTradeable(); - - /** - * You probably want {@link #isStackable} - *

- * This is the {@code int} that client code uses internally to represent this true/false value. It appears to only ever be set to 1 or 0 - * @return 0 when this type of item isn't stackable, 1 otherwise - */ - @Import("isStackable") - int getIsStackable(); - - @Import("maleModel") - int getMaleModel(); - - @Import("inventoryActions") - @Override - String[] getInventoryActions(); - - @Import("getShiftClickActionIndex") - @Override - int getShiftClickActionIndex(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSItemContainer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSItemContainer.java deleted file mode 100644 index d84a50971b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSItemContainer.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ItemContainer; -import net.runelite.mapping.Import; - -public interface RSItemContainer extends RSNode, ItemContainer -{ - @Import("itemIds") - int[] getItemIds(); - - @Import("stackSizes") - int[] getStackSizes(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSItemLayer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSItemLayer.java deleted file mode 100644 index 4afd479296..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSItemLayer.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ItemLayer; -import net.runelite.mapping.Import; - -public interface RSItemLayer extends ItemLayer -{ - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("hash") - @Override - long getHash(); - - @Import("height") - int getHeight(); - - @Import("bottom") - @Override - RSRenderable getBottom(); - - @Import("middle") - @Override - RSRenderable getMiddle(); - - @Import("top") - @Override - RSRenderable getTop(); - - void setPlane(int plane); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSIterableHashTable.java b/runescape-api/src/main/java/net/runelite/rs/api/RSIterableHashTable.java deleted file mode 100644 index 404f2c32bb..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSIterableHashTable.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.IterableHashTable; -import net.runelite.mapping.Import; - -public interface RSIterableHashTable extends IterableHashTable -{ - @Import("get") - @Override - RSNode get(long hash); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSJagexLoginType.java b/runescape-api/src/main/java/net/runelite/rs/api/RSJagexLoginType.java deleted file mode 100644 index 5446d5d4bb..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSJagexLoginType.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSJagexLoginType -{ - -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSKeyFocusListener.java b/runescape-api/src/main/java/net/runelite/rs/api/RSKeyFocusListener.java deleted file mode 100644 index 9ef296251b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSKeyFocusListener.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.event.FocusListener; -import java.awt.event.KeyListener; -import net.runelite.api.KeyFocusListener; - -public interface RSKeyFocusListener extends KeyListener, FocusListener, KeyFocusListener -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSMainBufferProvider.java b/runescape-api/src/main/java/net/runelite/rs/api/RSMainBufferProvider.java deleted file mode 100644 index 8b27911a27..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSMainBufferProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.Component; -import java.awt.Image; -import net.runelite.api.MainBufferProvider; -import net.runelite.mapping.Import; - -public interface RSMainBufferProvider extends RSBufferProvider, MainBufferProvider -{ - @Import("image") - @Override - Image getImage(); - - @Import("image") - void setImage(Image image); - - @Import("canvas") - Component getCanvas(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSMapElementConfig.java b/runescape-api/src/main/java/net/runelite/rs/api/RSMapElementConfig.java deleted file mode 100644 index 028f5269a5..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSMapElementConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.MapElementConfig; -import net.runelite.mapping.Import; - -public interface RSMapElementConfig extends RSCacheableNode, MapElementConfig -{ - @Import("getMapIcon") - @Override - RSSpritePixels getMapIcon(boolean var1); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSMessageNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSMessageNode.java deleted file mode 100644 index f673e58c7a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSMessageNode.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.MessageNode; -import net.runelite.mapping.Import; - -public interface RSMessageNode extends MessageNode -{ - @Import("id") - @Override - int getId(); - - @Import("type") - int getRSType(); - - @Import("name") - @Override - String getName(); - - @Import("name") - @Override - void setName(String name); - - @Import("sender") - @Override - String getSender(); - - @Import("sender") - @Override - void setSender(String sender); - - @Import("value") - @Override - String getValue(); - - @Import("value") - @Override - void setValue(String value); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSModel.java b/runescape-api/src/main/java/net/runelite/rs/api/RSModel.java deleted file mode 100644 index a447b080c1..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSModel.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.Polygon; -import net.runelite.api.Model; -import net.runelite.mapping.Import; - -public interface RSModel extends RSRenderable, Model -{ - @Import("verticesCount") - @Override - int getVerticesCount(); - - @Import("verticesX") - @Override - int[] getVerticesX(); - - @Import("verticesY") - @Override - int[] getVerticesY(); - - @Import("verticesZ") - @Override - int[] getVerticesZ(); - - @Import("indicesCount") - @Override - int getTrianglesCount(); - - @Import("indices1") - @Override - int[] getTrianglesX(); - - @Import("indices2") - @Override - int[] getTrianglesY(); - - @Import("indices3") - @Override - int[] getTrianglesZ(); - - @Import("faceColors1") - @Override - int[] getFaceColors1(); - - @Import("faceColors2") - @Override - int[] getFaceColors2(); - - @Import("faceColors3") - @Override - int[] getFaceColors3(); - - @Import("triangleTransparencies") - @Override - byte[] getTriangleTransparencies(); - - @Import("faceRenderPriorities") - @Override - byte[] getFaceRenderPriorities(); - - @Import("vertexGroups") - int[][] getVertexGroups(); - - @Import("modelHeight") - @Override - int getModelHeight(); - - @Import("animate") - void animate(int type, int[] list, int x, int y, int z); - - @Import("calculateBoundsCylinder") - @Override - void calculateBoundsCylinder(); - - @Import("calculateExtreme") - @Override - void calculateExtreme(int orientation); - - @Import("resetBounds") - void resetBounds(); - - @Import("toSharedModel") - RSModel toSharedModel(boolean b); - - @Import("toSharedSpotAnimModel") - RSModel toSharedSpotAnimModel(boolean b); - - @Import("rotateY90Ccw") - void rotateY90Ccw(); - - @Import("rotateY180Ccw") - void rotateY180Ccw(); - - @Import("rotateY270Ccw") - void rotateY270Ccw(); - - @Import("isClickable") - boolean isClickable(); - - @Import("radius") - @Override - int getRadius(); - - @Import("centerX") - @Override - int getCenterX(); - - @Import("centerY") - @Override - int getCenterY(); - - @Import("centerZ") - @Override - int getCenterZ(); - - @Import("extremeX") - @Override - int getExtremeX(); - - @Import("extremeY") - @Override - int getExtremeY(); - - @Import("extremeZ") - @Override - int getExtremeZ(); - - @Import("faceTextures") - @Override - short[] getFaceTextures(); - - @Import("XYZMag") - @Override - int getXYZMag(); - - void interpolateFrames(RSFrames frames, int frameId, RSFrames nextFrames, int nextFrameId, int interval, - int intervalCount); - - /** - * Compute the convex hull of this model - */ - Polygon getConvexHull(int localX, int localY, int orientation, int tileHeight); - - float[][] getFaceTextureUCoordinates(); - void setFaceTextureUCoordinates(float[][] rl$faceTextureUCoordinates); - - float[][] getFaceTextureVCoordinates(); - void setFaceTextureVCoordinates(float[][] rl$faceTextureVCoordinates); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSModelData.java b/runescape-api/src/main/java/net/runelite/rs/api/RSModelData.java deleted file mode 100644 index 4503e75729..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSModelData.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSModelData extends RSRenderable -{ - @Import("triangleFaceCount") - int getTriangleFaceCount(); - - @Import("trianglePointsX") - int[] getTrianglePointsX(); - - @Import("trianglePointsY") - int[] getTrianglePointsY(); - - @Import("trianglePointsZ") - int[] getTrianglePointsZ(); - - @Import("vertexX") - int[] getVertexX(); - - @Import("vertexY") - int[] getVertexY(); - - @Import("vertexZ") - int[] getVertexZ(); - - @Import("texTriangleX") - short[] getTexTriangleX(); - - @Import("texTriangleY") - short[] getTexTriangleY(); - - @Import("texTriangleZ") - short[] getTexTriangleZ(); - - @Import("faceTextures") - short[] getFaceTextures(); - - @Import("textureCoords") - byte[] getTextureCoords(); - - @Import("textureRenderTypes") - byte[] getTextureRenderTypes(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSMouseInput.java b/runescape-api/src/main/java/net/runelite/rs/api/RSMouseInput.java deleted file mode 100644 index 7db688d071..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSMouseInput.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.event.FocusListener; -import java.awt.event.MouseListener; -import java.awt.event.MouseMotionListener; - -public interface RSMouseInput extends MouseListener, MouseMotionListener, FocusListener -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSMouseWheelHandler.java b/runescape-api/src/main/java/net/runelite/rs/api/RSMouseWheelHandler.java deleted file mode 100644 index bd50e7a428..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSMouseWheelHandler.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.awt.event.MouseWheelListener; - -public interface RSMouseWheelHandler extends MouseWheelListener -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNPC.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNPC.java deleted file mode 100644 index fc4bfcc714..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNPC.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.NPC; -import net.runelite.mapping.Import; - -public interface RSNPC extends RSActor, NPC -{ - @Import("composition") - @Override - RSNPCComposition getComposition(); - - @Override - int getIndex(); - - void setIndex(int id); - - void setDead(boolean dead); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNPCComposition.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNPCComposition.java deleted file mode 100644 index 87c781cea8..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNPCComposition.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.NPCComposition; -import net.runelite.mapping.Import; - -public interface RSNPCComposition extends NPCComposition -{ - @Import("name") - @Override - String getName(); - - @Import("models") - @Override - int[] getModels(); - - @Import("actions") - @Override - String[] getActions(); - - @Import("isClickable") - @Override - boolean isClickable(); - - @Import("isMinimapVisible") - @Override - boolean isMinimapVisible(); - - @Import("isVisible") - @Override - boolean isVisible(); - - @Import("id") - @Override - int getId(); - - @Import("combatLevel") - @Override - int getCombatLevel(); - - @Import("configs") - @Override - int[] getConfigs(); - - @Import("transform") - @Override - RSNPCComposition transform(); - - @Import("size") - @Override - int getSize(); - - @Import("headIcon") - int getRsOverheadIcon(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSName.java b/runescape-api/src/main/java/net/runelite/rs/api/RSName.java deleted file mode 100644 index 4b2c83abfe..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSName.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSName extends Comparable -{ - @Import("name") - String getName(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNameable.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNameable.java deleted file mode 100644 index 6b7feef4ab..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNameable.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Nameable; -import net.runelite.mapping.Import; - -public interface RSNameable extends Nameable, Comparable -{ - @Import("name") - RSName getRsName(); - - @Import("prevName") - RSName getRsPrevName(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNameableContainer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNameableContainer.java deleted file mode 100644 index 33f2070048..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNameableContainer.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSNameableContainer -{ - @Import("count") - int getCount(); - - @Import("nameables") - T[] getNameables(); - - @Import("isMember") - boolean isMember(RSName var1); - - @Import("findByName") - T findByName(RSName name); - - /** - * Method called by the container when an element is added - * @param name - * @param prevName - */ - void rl$add(RSName name, RSName prevName); - - /** - * Method called by the container when an element is removed - * @param nameable - */ - void rl$remove(RSNameable nameable); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNode.java deleted file mode 100644 index ab24b70dda..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNode.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Node; -import net.runelite.mapping.Import; - -public interface RSNode extends Node -{ - @Import("next") - @Override - RSNode getNext(); - - @Import("hash") - @Override - long getHash(); - - @Import("previous") - @Override - RSNode getPrevious(); - - @Import("unlink") - void unlink(); - - /** - * Called when this node is unlinked - */ - void onUnlink(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSNodeCache.java b/runescape-api/src/main/java/net/runelite/rs/api/RSNodeCache.java deleted file mode 100644 index 6a7eb9e2ec..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSNodeCache.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.NodeCache; -import net.runelite.mapping.Import; - -public interface RSNodeCache extends NodeCache -{ - @Import("get") - RSCacheableNode get(long id); - - @Import("reset") - @Override - void reset(); - - @Import("capacity") - @Override - void setCapacity(int capacity); - - @Import("remainingCapacity") - @Override - void setRemainingCapacity(int remainingCapacity); -} \ No newline at end of file diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSObjectComposition.java b/runescape-api/src/main/java/net/runelite/rs/api/RSObjectComposition.java deleted file mode 100644 index 3df00175f5..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSObjectComposition.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ObjectComposition; -import net.runelite.mapping.Import; - -public interface RSObjectComposition extends ObjectComposition -{ - @Import("id") - @Override - int getId(); - - @Import("name") - @Override - String getName(); - - @Import("actions") - @Override - String[] getActions(); - - @Import("mapSceneId") - @Override - int getMapSceneId(); - - @Import("mapIconId") - @Override - int getMapIconId(); - - @Import("impostorIds") - @Override - int[] getImpostorIds(); - - @Import("getImpostor") - @Override - RSObjectComposition getImpostor(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSPacketBuffer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSPacketBuffer.java deleted file mode 100644 index 2a79d8983b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSPacketBuffer.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.PacketBuffer; - -public interface RSPacketBuffer extends PacketBuffer -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSPlayer.java b/runescape-api/src/main/java/net/runelite/rs/api/RSPlayer.java deleted file mode 100644 index ec8db1f005..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSPlayer.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Player; -import net.runelite.mapping.Import; - -public interface RSPlayer extends RSActor, Player -{ - @Import("name") - RSName getRsName(); - - @Import("playerId") - int getPlayerId(); - - @Import("composition") - @Override - RSPlayerComposition getPlayerComposition(); - - @Import("combatLevel") - @Override - int getCombatLevel(); - - @Import("totalLevel") - int getTotalLevel(); - - @Import("team") - @Override - int getTeam(); - - @Import("isClanMember") - @Override - boolean isClanMember(); - - @Import("isFriend") - @Override - boolean isFriend(); - - @Import("overheadIcon") - int getRsOverheadIcon(); - - @Import("skullIcon") - int getRsSkullIcon(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSPlayerComposition.java b/runescape-api/src/main/java/net/runelite/rs/api/RSPlayerComposition.java deleted file mode 100644 index 15a3fb0e58..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSPlayerComposition.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.PlayerComposition; -import net.runelite.mapping.Import; - -public interface RSPlayerComposition extends PlayerComposition -{ - @Import("isFemale") - boolean isFemale(); - - @Import("bodyPartColours") - int[] getBodyPartColours(); - - @Import("equipmentIds") - @Override - int[] getEquipmentIds(); - - @Import("transformedNpcId") - @Override - void setTransformedNpcId(int id); - - @Import("setHash") - @Override - void setHash(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSPreferences.java b/runescape-api/src/main/java/net/runelite/rs/api/RSPreferences.java deleted file mode 100644 index eca6b3d5bb..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSPreferences.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Preferences; -import net.runelite.mapping.Import; - -public interface RSPreferences extends Preferences -{ - @Import("rememberedUsername") - @Override - String getRememberedUsername(); - - @Import("rememberedUsername") - @Override - void setRememberedUsername(String username); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSProjectile.java b/runescape-api/src/main/java/net/runelite/rs/api/RSProjectile.java deleted file mode 100644 index c25a698539..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSProjectile.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Projectile; -import net.runelite.mapping.Import; - -public interface RSProjectile extends RSRenderable, Projectile -{ - @Import("id") - @Override - int getId(); - - @Import("height") - @Override - int getHeight(); - - @Import("endHeight") - @Override - int getEndHeight(); - - @Import("x1") - @Override - int getX1(); - - @Import("y1") - @Override - int getY1(); - - @Import("floor") - @Override - int getFloor(); - - @Import("startMovementCycle") - @Override - int getStartMovementCycle(); - - @Import("endCycle") - @Override - int getEndCycle(); - - @Import("slope") - @Override - int getSlope(); - - @Import("startHeight") - @Override - int getStartHeight(); - - @Import("x") - @Override - double getX(); - - @Import("y") - @Override - double getY(); - - @Import("z") - @Override - double getZ(); - - @Import("scalar") - @Override - double getScalar(); - - @Import("velocityX") - @Override - double getVelocityX(); - - @Import("velocityY") - @Override - double getVelocityY(); - - @Import("velocityZ") - @Override - double getVelocityZ(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSRawAudioNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSRawAudioNode.java deleted file mode 100644 index 5c51c394da..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSRawAudioNode.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSRawAudioNode -{ - @Import("applyResampler") - RSRawAudioNode applyResampler(RSResampler resampler); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSRenderOverview.java b/runescape-api/src/main/java/net/runelite/rs/api/RSRenderOverview.java deleted file mode 100644 index ddc348a11b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSRenderOverview.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.RenderOverview; -import net.runelite.api.WorldMapData; -import net.runelite.mapping.Import; - -public interface RSRenderOverview extends RenderOverview -{ - @Import("worldMapX") - int getWorldMapX(); - - @Import("worldMapY") - int getWorldMapY(); - - @Import("worldMapZoom") - float getWorldMapZoom(); - - @Import("worldMapTargetX") - int getWorldMapTargetX(); - - @Import("worldMapTargetY") - int getWorldMapTargetY(); - - @Import("worldMapDisplayWidth") - int getWorldMapDisplayWidth(); - - @Import("worldMapDisplayHeight") - int getWorldMapDisplayHeight(); - - @Import("worldMapDisplayX") - int getWorldMapDisplayX(); - - @Import("worldMapDisplayY") - int getWorldMapDisplayY(); - - @Import("setWorldMapPosition") - void setWorldMapPosition(int worldMapX, int worldMapY, boolean changedSurface); - - @Import("setWorldMapPositionTargetWorldPoint") - void setWorldMapPositionTarget(int worldPointX, int worldPointY); - - @Import("worldMapManager") - @Override - RSWorldMapManager getWorldMapManager(); - - @Import("initializeWorldMap") - @Override - void initializeWorldMap(WorldMapData var1); - - @Import("worldMapData") - @Override - RSWorldMapData getWorldMapData(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSRenderable.java b/runescape-api/src/main/java/net/runelite/rs/api/RSRenderable.java deleted file mode 100644 index 398c68088a..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSRenderable.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Renderable; -import net.runelite.mapping.Import; - -public interface RSRenderable extends RSNode, Renderable -{ - @Import("modelHeight") - int getModelHeight(); - - @Import("modelHeight") - @Override - void setModelHeight(int modelHeight); - - @Import("getModel") - @Override - RSModel getModel(); - - @Import("draw") - @Override - void draw(int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z, long hash); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSResampler.java b/runescape-api/src/main/java/net/runelite/rs/api/RSResampler.java deleted file mode 100644 index 6b75c34f09..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSResampler.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSResampler -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSRunException.java b/runescape-api/src/main/java/net/runelite/rs/api/RSRunException.java deleted file mode 100644 index de6f6e670b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSRunException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, Lotto - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSRunException -{ - @Import("parent") - Throwable getParent(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSScene.java b/runescape-api/src/main/java/net/runelite/rs/api/RSScene.java deleted file mode 100644 index 3cfeed4fe5..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSScene.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Scene; -import net.runelite.api.Tile; -import net.runelite.mapping.Import; - -public interface RSScene extends Scene -{ - @Import("objects") - RSGameObject[] getObjects(); - - @Import("tiles") - @Override - RSTile[][][] getTiles(); - - @Import("draw") - void draw(Tile tile, boolean var2); - - @Import("tileHeights") - int[][][] getTileHeights(); - - @Import("drawTile") - void drawTile(int[] pixels, int pixelOffset, int width, int z, int x, int y); - - @Import("updateOccluders") - void updateOccluders(); - - @Import("maxX") - int getMaxX(); - - @Import("maxY") - int getMaxY(); - - @Import("maxZ") - int getMaxZ(); - - @Import("minLevel") - int getMinLevel(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTileModel.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTileModel.java deleted file mode 100644 index 35c3fa6e5c..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTileModel.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.SceneTileModel; -import net.runelite.mapping.Import; - -public interface RSSceneTileModel extends SceneTileModel -{ - @Import("underlay") - @Override - int getModelUnderlay(); - - @Import("overlay") - @Override - int getModelOverlay(); - - @Import("shape") - @Override - int getShape(); - - @Import("rotation") - @Override - int getRotation(); - - @Import("faceX") - @Override - int[] getFaceX(); - - @Import("faceY") - @Override - int[] getFaceY(); - - @Import("faceZ") - @Override - int[] getFaceZ(); - - @Import("vertexX") - @Override - int[] getVertexX(); - - @Import("vertexY") - @Override - int[] getVertexY(); - - @Import("vertexZ") - @Override - int[] getVertexZ(); - - @Import("triangleColorA") - @Override - int[] getTriangleColorA(); - - @Import("triangleColorB") - @Override - int[] getTriangleColorB(); - - @Import("triangleColorC") - @Override - int[] getTriangleColorC(); - - @Import("triangleTextureId") - @Override - int[] getTriangleTextureId(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTilePaint.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTilePaint.java deleted file mode 100644 index 99c6b9f763..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSceneTilePaint.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.SceneTilePaint; -import net.runelite.mapping.Import; - -public interface RSSceneTilePaint extends SceneTilePaint -{ - @Import("rgb") - @Override - int getRBG(); - - @Import("swColor") - @Override - int getSwColor(); - - @Import("seColor") - @Override - int getSeColor(); - - @Import("nwColor") - @Override - int getNwColor(); - - @Import("neColor") - @Override - int getNeColor(); - - @Import("texture") - @Override - int getTexture(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSScript.java b/runescape-api/src/main/java/net/runelite/rs/api/RSScript.java deleted file mode 100644 index 5bf9a0d094..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSScript.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Script; -import net.runelite.mapping.Import; - -public interface RSScript extends Script, RSCacheableNode -{ - @Import("intOperands") - @Override - int[] getIntOperands(); - - @Import("instructions") - @Override - int[] getInstructions(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSScriptEvent.java b/runescape-api/src/main/java/net/runelite/rs/api/RSScriptEvent.java deleted file mode 100644 index a2f293b417..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSScriptEvent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.ScriptEvent; -import net.runelite.api.widgets.Widget; -import net.runelite.mapping.Import; - -public interface RSScriptEvent extends ScriptEvent -{ - @Import("params") - Object[] getArguments(); - - @Import("params") - void setArguments(Object[] args); - - @Import("source") - Widget getSource(); - - @Import("op") - int getOp(); - - @Import("opbase") - String getOpbase(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSequence.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSequence.java deleted file mode 100644 index 0bea230793..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSequence.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSSequence -{ - @Import("stretches") - boolean getStretches(); - - @Import("maxLoops") - int getMaxLoops(); - - @Import("precedenceAnimating") - int getPrecedenceAnimating(); - - @Import("replyMode") - int getReplyMode(); - - @Import("interleaveLeave") - int[] getInterleaveLeave(); - - @Import("frameIDs") - int[] getFrameIDs(); - - @Import("frameLengths") - int[] getFrameLenths(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSoundEffect.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSoundEffect.java deleted file mode 100644 index c1f6002bf8..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSoundEffect.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2018, SomeoneWithAnInternetConnection - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSSoundEffect -{ - @Import("toRawAudioNode") - RSRawAudioNode toRawAudioNode(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSprite.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSprite.java deleted file mode 100644 index 6f6cd9b67c..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSprite.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSSprite -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSSpritePixels.java b/runescape-api/src/main/java/net/runelite/rs/api/RSSpritePixels.java deleted file mode 100644 index f69f90ed35..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSSpritePixels.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.SpritePixels; -import net.runelite.mapping.Import; - -public interface RSSpritePixels extends SpritePixels -{ - @Import("drawAt") - @Override - void drawAt(int x, int y); - - @Import("height") - @Override - int getHeight(); - - @Import("width") - @Override - int getWidth(); - - @Import("pixels") - @Override - int[] getPixels(); - - @Import("setRaster") - void setRaster(); - - @Import("maxWidth") - void setMaxWidth(int maxWidth); - - @Import("maxHeight") - void setMaxHeight(int maxHeight); - - @Import("offsetX") - void setOffsetX(int offsetX); - - @Import("offsetY") - void setOffsetY(int offsetY); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSTaskDataNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSTaskDataNode.java deleted file mode 100644 index bcc61f9684..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSTaskDataNode.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, trimbe - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -public interface RSTaskDataNode -{ -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSTexture.java b/runescape-api/src/main/java/net/runelite/rs/api/RSTexture.java deleted file mode 100644 index 60cbe94b03..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSTexture.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.Texture; -import net.runelite.mapping.Import; - -public interface RSTexture extends Texture, RSNode -{ - @Import("pixels") - @Override - int[] getPixels(); - - @Import("animationDirection") - @Override - int getAnimationDirection(); - - @Import("animationSpeed") - @Override - int getAnimationSpeed(); - - @Import("loaded") - @Override - boolean isLoaded(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSTextureProvider.java b/runescape-api/src/main/java/net/runelite/rs/api/RSTextureProvider.java deleted file mode 100644 index 2651367376..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSTextureProvider.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.TextureProvider; -import net.runelite.mapping.Import; - -public interface RSTextureProvider extends TextureProvider -{ - @Import("brightness") - @Override - double getBrightness(); - - @Import("setBrightness") - @Override - void setBrightness(double brightness); - - @Import("maxSize") - void setMaxSize(int maxSize); - - @Import("size") - void setSize(int size); - - @Import("textures") - @Override - RSTexture[] getTextures(); - - @Import("load") - @Override - int[] load(int textureId); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSTile.java b/runescape-api/src/main/java/net/runelite/rs/api/RSTile.java deleted file mode 100644 index 30a81196a5..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSTile.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.DecorativeObject; -import net.runelite.api.GameObject; -import net.runelite.api.GroundObject; -import net.runelite.api.ItemLayer; -import net.runelite.api.SceneTileModel; -import net.runelite.api.SceneTilePaint; -import net.runelite.api.Tile; -import net.runelite.api.WallObject; -import net.runelite.mapping.Import; - -public interface RSTile extends Tile -{ - @Import("objects") - @Override - GameObject[] getGameObjects(); - - @Import("itemLayer") - @Override - ItemLayer getItemLayer(); - - @Import("decorativeObject") - @Override - DecorativeObject getDecorativeObject(); - - @Import("groundObject") - @Override - GroundObject getGroundObject(); - - @Import("wallObject") - @Override - WallObject getWallObject(); - - @Import("paint") - @Override - SceneTilePaint getSceneTilePaint(); - - @Import("overlay") - @Override - SceneTileModel getSceneTileModel(); - - @Import("x") - int getX(); - - @Import("y") - int getY(); - - @Import("plane") - @Override - int getPlane(); - - @Import("renderLevel") - @Override - int getRenderLevel(); - - @Import("physicalLevel") - int getPhysicalLevel(); - - @Import("flags") - int getFlags(); - - @Import("bridge") - @Override - RSTile getBridge(); - - @Import("draw") - boolean isDraw(); - - @Import("draw") - void setDraw(boolean draw); - - @Import("visible") - boolean isVisible(); - - @Import("visible") - void setVisible(boolean visible); - - @Import("drawEntities") - void setDrawEntities(boolean drawEntities); - - @Import("wallCullDirection") - void setWallCullDirection(int wallCullDirection); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSVarbit.java b/runescape-api/src/main/java/net/runelite/rs/api/RSVarbit.java deleted file mode 100644 index 94990d561e..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSVarbit.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.mapping.Import; - -public interface RSVarbit extends RSCacheableNode -{ - @Import("configId") - int getIndex(); - - @Import("leastSignificantBit") - int getLeastSignificantBit(); - - @Import("mostSignificantBit") - int getMostSignificantBit(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSVarcs.java b/runescape-api/src/main/java/net/runelite/rs/api/RSVarcs.java deleted file mode 100644 index 527377ae7b..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSVarcs.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import java.util.Map; -import net.runelite.mapping.Import; - -public interface RSVarcs -{ - @Import("varcMap") - Map getVarcMap(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWallObject.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWallObject.java deleted file mode 100644 index 1406f49e5d..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWallObject.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.WallObject; -import net.runelite.mapping.Import; - -public interface RSWallObject extends WallObject -{ - @Import("hash") - @Override - long getHash(); - - @Import("x") - @Override - int getX(); - - @Import("y") - @Override - int getY(); - - @Import("orientationA") - @Override - int getOrientationA(); - - @Import("orientationB") - @Override - int getOrientationB(); - - @Import("renderable1") - @Override - RSRenderable getRenderable1(); - - @Import("renderable2") - @Override - RSRenderable getRenderable2(); - - @Import("config") - @Override - int getConfig(); - - void setPlane(int plane); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWidget.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWidget.java deleted file mode 100644 index 0dd5b24d4f..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWidget.java +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.widgets.Widget; -import net.runelite.mapping.Import; - -public interface RSWidget extends Widget -{ - @Import("children") - @Override - RSWidget[] getChildren(); - - @Import("children") - @Override - void setChildren(Widget[] children); - - @Import("id") - @Override - int getId(); - - void setRenderParentId(int parentId); - - void setRenderX(int x); - - void setRenderY(int y); - - @Import("id") - void setId(int id); - - @Import("parentId") - int getRSParentId(); - - @Import("parentId") - void setParentId(int id); - - @Import("clickMask") - int getClickMask(); - - @Import("clickMask") - void setClickMask(int mask); - - @Import("boundsIndex") - int getBoundsIndex(); - - @Import("modelId") - @Override - int getModelId(); - - @Import("itemIds") - int[] getItemIds(); - - @Import("itemQuantities") - int[] getItemQuantities(); - - @Import("modelType") - int getModelType(); - - @Import("actions") - @Override - String[] getActions(); - - @Import("text") - String getRSText(); - - @Import("name") - String getRSName(); - - @Import("name") - void setRSName(String name); - - @Import("text") - @Override - void setText(String text); - - @Import("textColor") - @Override - int getTextColor(); - - @Import("textColor") - @Override - void setTextColor(int textColor); - - @Import("opacity") - @Override - int getOpacity(); - - @Import("opacity") - @Override - void setOpacity(int opacity); - - @Import("relativeX") - @Override - int getRelativeX(); - - @Import("relativeX") - @Override - void setRelativeX(int x); - - @Import("relativeY") - @Override - int getRelativeY(); - - @Import("relativeY") - @Override - void setRelativeY(int y); - - @Import("width") - @Override - int getWidth(); - - @Import("width") - @Override - void setWidth(int width); - - @Import("height") - @Override - int getHeight(); - - @Import("height") - @Override - void setHeight(int height); - - @Import("isHidden") - @Override - boolean isSelfHidden(); - - @Import("isHidden") - void setHidden(boolean hidden); - - @Import("index") - int getIndex(); - - @Import("index") - void setIndex(int index); - - @Import("rotationX") - int getRotationX(); - - @Import("rotationY") - int getRotationY(); - - @Import("rotationZ") - int getRotationZ(); - - @Import("contentType") - @Override - int getContentType(); - - @Import("contentType") - @Override - void setContentType(int contentType); - - @Import("type") - @Override - int getType(); - - @Import("type") - @Override - void setType(int type); - - @Import("scrollX") - @Override - int getScrollX(); - - @Import("scrollX") - @Override - void setScrollX(int scrollX); - - @Import("scrollY") - @Override - int getScrollY(); - - @Import("scrollY") - @Override - void setScrollY(int scrollY); - - @Import("scrollWidth") - @Override - int getScrollWidth(); - - @Import("scrollWidth") - @Override - void setScrollWidth(int width); - - @Import("scrollHeight") - @Override - int getScrollHeight(); - - @Import("scrollHeight") - @Override - void setScrollHeight(int height); - - @Import("spriteId") - @Override - int getSpriteId(); - - @Import("spriteId") - @Override - void setSpriteId(int spriteId); - - @Import("borderType") - @Override - int getBorderType(); - - @Import("borderType") - @Override - void setBorderType(int type); - - @Import("itemId") - @Override - int getItemId(); - - @Import("itemId") - @Override - void setItemId(int itemId); - - @Import("itemQuantity") - @Override - int getItemQuantity(); - - @Import("itemQuantity") - @Override - void setItemQuantity(int quantity); - - @Import("originalX") - @Override - int getOriginalX(); - - @Import("originalX") - @Override - void setOriginalX(int originalX); - - @Import("originalY") - @Override - int getOriginalY(); - - @Import("originalY") - @Override - void setOriginalY(int originalY); - - @Import("originalHeight") - @Override - int getOriginalHeight(); - - @Import("originalHeight") - @Override - void setOriginalHeight(int originalHeight); - - @Import("originalWidth") - @Override - int getOriginalWidth(); - - @Import("originalWidth") - @Override - void setOriginalWidth(int originalWidth); - - @Import("xPitch") - int getXPitch(); - - @Import("yPitch") - int getYPitch(); - - void broadcastHidden(boolean hidden); - - @Import("onOpListener") - @Override - void setOnOpListener(Object... args); - - @Import("setAction") - @Override - void setAction(int idx, String action); - - @Import("isIf3") - @Override - boolean isIf3(); - - @Import("isIf3") - void setIsIf3(boolean isIf3); - - @Import("hasListener") - @Override - boolean hasListener(); - - @Import("hasListener") - @Override - void setHasListener(boolean hasListener); - - @Import("onKeyListener") - @Override - Object[] getOnKeyListener(); - - @Import("onLoadListener") - @Override - Object[] getOnLoadListener(); - - @Import("onDialogAbortListener") - @Override - void setOnDialogAbortListener(Object... args); - - @Import("onKeyListener") - @Override - void setOnKeyListener(Object... args); - - @Import("onMouseOverListener") - @Override - void setOnMouseOverListener(Object... args); - - @Import("onMouseRepeatListener") - @Override - void setOnMouseRepeatListener(Object... args); - - @Import("onMouseLeaveListener") - @Override - void setOnMouseLeaveListener(Object... args); - - @Import("onTimerListener") - @Override - void setOnTimerListener(Object... args); - - @Import("onTargetEnterListener") - @Override - void setOnTargetEnterListener(Object... args); - - @Import("onTargetLeaveListener") - @Override - void setOnTargetLeaveListener(Object... args); - - @Import("fontId") - @Override - int getFontId(); - - @Import("fontId") - @Override - void setFontId(int id); - - @Import("textShadowed") - @Override - boolean getTextShadowed(); - - @Import("textShadowed") - @Override - void setTextShadowed(boolean shadowed); - - @Import("dragDeadZone") - @Override - int getDragDeadZone(); - - @Import("dragDeadZone") - @Override - void setDragDeadZone(int deadZone); - - @Import("dragDeadTime") - @Override - int getDragDeadTime(); - - @Import("dragDeadTime") - @Override - void setDragDeadTime(int deadTime); - - @Import("itemQuantityMode") - @Override - int getItemQuantityMode(); - - @Import("itemQuantityMode") - @Override - void setItemQuantityMode(int itemQuantityMode); - - @Import("xPositionMode") - @Override - int getXPositionMode(); - - @Import("xPositionMode") - @Override - void setXPositionMode(int xpm); - - @Import("yPositionMode") - @Override - int getYPositionMode(); - - @Import("yPositionMode") - @Override - void setYPositionMode(int ypm); - - @Import("xTextAlignment") - @Override - int getXTextAlignment(); - - @Import("xTextAlignment") - @Override - void setXTextAlignment(int xta); - - @Import("yTextAlignment") - @Override - int getYTextAlignment(); - - @Import("yTextAlignment") - @Override - void setYTextAlignment(int yta); - - @Import("widthMode") - @Override - int getWidthMode(); - - @Import("widthMode") - @Override - void setWidthMode(int widthMode); - - @Import("heightMode") - @Override - int getHeightMode(); - - @Import("heightMode") - @Override - void setHeightMode(int heightMode); - - @Import("getFont") - @Override - RSFontTypeFace getFont(); - - @Import("filled") - @Override - boolean isFilled(); - - @Import("filled") - @Override - void setFilled(boolean filled); - - @Import("targetVerb") - @Override - String getTargetVerb(); - - @Import("targetVerb") - @Override - void setTargetVerb(String targetVerb); - - @Import("noClickThrough") - @Override - boolean getNoClickThrough(); - - @Import("noClickThrough") - @Override - void setNoClickThrough(boolean noClickThrough); - - @Import("noScrollThrough") - @Override - boolean getNoScrollThrough(); - - @Import("noScrollThrough") - @Override - void setNoScrollThrough(boolean noScrollThrough); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWidgetNode.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWidgetNode.java deleted file mode 100644 index 9c08a5a977..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWidgetNode.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.WidgetNode; -import net.runelite.mapping.Import; - -public interface RSWidgetNode extends RSNode, WidgetNode -{ - @Import("id") - @Override - int getId(); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWorld.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWorld.java deleted file mode 100644 index 2a4a8c4925..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWorld.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.World; -import net.runelite.mapping.Import; - -public interface RSWorld extends World -{ - @Import("mask") - int getMask(); - - @Import("mask") - void setMask(int mask); - - @Import("playerCount") - @Override - int getPlayerCount(); - - @Import("playerCount") - @Override - void setPlayerCount(int playerCount); - - @Import("location") - @Override - int getLocation(); - - @Import("location") - @Override - void setLocation(int location); - - @Import("index") - @Override - int getIndex(); - - @Import("index") - @Override - void setIndex(int index); - - @Import("id") - @Override - int getId(); - - @Import("id") - @Override - void setId(int id); - - @Import("activity") - @Override - String getActivity(); - - @Import("activity") - @Override - void setActivity(String activity); - - @Import("address") - @Override - String getAddress(); - - @Import("address") - @Override - void setAddress(String address); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapData.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapData.java deleted file mode 100644 index 5638d6813c..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapData.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.WorldMapData; -import net.runelite.mapping.Import; - -public interface RSWorldMapData extends WorldMapData -{ - @Import("surfaceContainsPosition") - boolean surfaceContainsPosition(int x, int y); -} diff --git a/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapManager.java b/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapManager.java deleted file mode 100644 index 60377bc659..0000000000 --- a/runescape-api/src/main/java/net/runelite/rs/api/RSWorldMapManager.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.rs.api; - -import net.runelite.api.WorldMapManager; -import net.runelite.mapping.Import; - -public interface RSWorldMapManager extends WorldMapManager -{ - @Import("loaded") - @Override - boolean isLoaded(); - - @Import("mapSurfaceBaseOffsetX") - int getSurfaceOffsetX(); - - @Import("mapSurfaceBaseOffsetY") - int getSurfaceOffsetY(); - - @Import("getPixelsPerTile") - float getPixelsPerTile(int graphicsDiff, int worldDiff); -}