Merge pull request #3201 from open-osrs/upstream-1805

This commit is contained in:
Owain van Brakel
2022-05-18 17:28:29 +02:00
committed by GitHub
23 changed files with 547 additions and 461 deletions
+2 -2
View File
@@ -25,9 +25,9 @@
object ProjectVersions {
const val launcherVersion = "3.0.0"
const val rlVersion = "1.8.19"
const val rlVersion = "1.8.20"
const val openosrsVersion = "4.26.1"
const val openosrsVersion = "4.27.0"
const val rsversion = 205
const val cacheversion = 165
@@ -12665,5 +12665,17 @@ public final class ItemID
public static final int AMULET_OF_THE_EYE_26990 = 26990;
public static final int AMULET_OF_THE_EYE_26992 = 26992;
public static final int AMULET_OF_THE_EYE_26994 = 26994;
public static final int ENSOULED_HELLHOUND_HEAD = 26996;
public static final int ENSOULED_HELLHOUND_HEAD_26997 = 26997;
public static final int VOID_KNIGHT_TOP_LOR = 27000;
public static final int VOID_KNIGHT_ROBE_LOR = 27001;
public static final int VOID_KNIGHT_GLOVES_LOR = 27002;
public static final int ELITE_VOID_TOP_LOR = 27003;
public static final int ELITE_VOID_ROBE_LOR = 27004;
public static final int VOID_MAGE_HELM_LOR = 27005;
public static final int VOID_RANGER_HELM_LOR = 27006;
public static final int VOID_MELEE_HELM_LOR = 27007;
public static final int DRAGON_DEFENDER_LT = 27008;
public static final int RUNE_DEFENDER_LT = 27009;
/* This file is automatically generated. Do not edit. */
}
@@ -9648,6 +9648,7 @@ public final class NpcID
public static final int THE_GREAT_GUARDIAN_11455 = 11455;
public static final int THE_GREAT_GUARDIAN_11456 = 11456;
public static final int MENAPHITE_SHADOW = 11462;
public static final int REANIMATED_HELLHOUND = 11463;
public static final int TARIK_11473 = 11473;
public static final int MAISA_11474 = 11474;
public static final int MAISA_11475 = 11475;
@@ -14120,5 +14120,7 @@ public final class NullItemID
public static final int NULL_26991 = 26991;
public static final int NULL_26993 = 26993;
public static final int NULL_26995 = 26995;
public static final int NULL_26998 = 26998;
public static final int NULL_26999 = 26999;
/* This file is automatically generated. Do not edit. */
}
@@ -21640,6 +21640,9 @@ public final class NullObjectID
public static final int NULL_43847 = 43847;
public static final int NULL_43848 = 43848;
public static final int NULL_43850 = 43850;
public static final int NULL_43851 = 43851;
public static final int NULL_43852 = 43852;
public static final int NULL_43853 = 43853;
public static final int NULL_43871 = 43871;
public static final int NULL_43872 = 43872;
public static final int NULL_43874 = 43874;
@@ -197,7 +197,7 @@ public interface ChatCommandsConfig extends Config
)
default Keybind clearSingleWord()
{
return new Keybind(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK);
return new Keybind(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_DOWN_MASK);
}
@ConfigItem(
@@ -208,6 +208,6 @@ public interface ChatCommandsConfig extends Config
)
default Keybind clearChatBox()
{
return new Keybind(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_DOWN_MASK);
return Keybind.NOT_SET;
}
}
@@ -48,6 +48,7 @@ import net.runelite.api.VarbitComposition;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.CommandExecuted;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.ScriptCallbackEvent;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.kit.KitType;
@@ -492,4 +493,13 @@ public class DevToolsPlugin extends Plugin
entry.setTarget(entry.getTarget() + " " + ColorUtil.prependColorTag("(" + info + ")", JagexColors.MENU_TARGET));
}
}
@Subscribe
public void onScriptCallbackEvent(ScriptCallbackEvent ev)
{
if ("devtoolsEnabled".equals(ev.getEventName()))
{
client.getIntStack()[client.getIntStackSize() - 1] = 1;
}
}
}
@@ -48,6 +48,7 @@ public enum FairyRings
BIP("(Island) South-west of Mort Myre"),
BIQ("Kalphite Hive"),
BIS("Ardougne Zoo - Unicorns"),
BJP("(Island) Isle of Souls"),
BJR("Realm of the Fisher King"),
BJS("(Island) Near Zul-Andra", "zulrah"),
BKP("South of Castle Wars"),
@@ -308,6 +308,11 @@ enum ItemWithCharge
ROW3(TELEPORT, RING_OF_WEALTH_3, 3),
ROW4(TELEPORT, RING_OF_WEALTH_4, 4),
ROW5(TELEPORT, RING_OF_WEALTH_5, 5),
ROWI1(TELEPORT, RING_OF_WEALTH_I1, 1),
ROWI2(TELEPORT, RING_OF_WEALTH_I2, 2),
ROWI3(TELEPORT, RING_OF_WEALTH_I3, 3),
ROWI4(TELEPORT, RING_OF_WEALTH_I4, 4),
ROWI5(TELEPORT, RING_OF_WEALTH_I5, 5),
SACK_CABBAGES1(SACK, CABBAGES1, 1),
SACK_CABBAGES2(SACK, CABBAGES2, 2),
SACK_CABBAGES3(SACK, CABBAGES3, 3),
@@ -42,9 +42,10 @@ class ScreenMarkerCreationOverlay extends Overlay
private ScreenMarkerCreationOverlay(final ScreenMarkerPlugin plugin)
{
this.plugin = plugin;
setPosition(OverlayPosition.DETACHED);
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
setPriority(OverlayPriority.HIGH);
setMovable(true);
}
@Override
@@ -45,9 +45,10 @@ public class ScreenMarkerOverlay extends Overlay
{
this.marker = marker;
this.screenMarkerRenderable = new ScreenMarkerRenderable();
setPosition(OverlayPosition.DETACHED);
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ALWAYS_ON_TOP);
setPriority(OverlayPriority.HIGH);
setMovable(true);
setResizable(true);
setMinimumSize(16);
setResettable(false);
@@ -51,9 +51,10 @@ class ScreenMarkerWidgetHighlightOverlay extends Overlay
{
this.plugin = plugin;
this.client = client;
setPosition(OverlayPosition.DETACHED);
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
setPriority(OverlayPriority.HIGH);
setMovable(true);
}
@Override
@@ -64,12 +64,25 @@ public abstract class Overlay implements LayoutableRenderableEntity
@Setter(AccessLevel.PROTECTED)
private boolean dragTargetable;
/**
* Whether this overlay can be moved with alt
*/
@Setter(AccessLevel.PROTECTED)
private boolean movable = true;
/**
* Whether this overlay can be moved to a snap corner
* and have its preferredPosition changed
*/
@Setter(AccessLevel.PROTECTED)
private boolean snappable = true;
protected Overlay()
{
plugin = null;
}
protected Overlay(Plugin plugin)
protected Overlay(@Nullable Plugin plugin)
{
this.plugin = plugin;
}
@@ -169,4 +182,25 @@ public abstract class Overlay implements LayoutableRenderableEntity
public void revalidate()
{
}
public void setPosition(OverlayPosition position)
{
this.position = position;
switch (position)
{
case TOOLTIP:
case DYNAMIC:
movable = false;
snappable = false;
break;
case DETACHED:
movable = true;
snappable = false;
break;
default:
movable = true;
snappable = true;
}
}
}
@@ -313,21 +313,29 @@ public class OverlayManager
private void loadOverlay(final Overlay overlay)
{
final Point location = loadOverlayLocation(overlay);
overlay.setPreferredLocation(location);
final Dimension size = loadOverlaySize(overlay);
overlay.setPreferredSize(size);
final OverlayPosition position = loadOverlayPosition(overlay);
if (position != null)
if (overlay.isMovable())
{
if (overlay.getPosition() != OverlayPosition.DYNAMIC && overlay.getPosition() != OverlayPosition.TOOLTIP)
{
overlay.setPreferredPosition(position);
}
else
{
log.info("Resetting preferred position of dynamic overlay {}", overlay.getClass().getSimpleName());
saveOverlayPosition(overlay);
}
overlay.setPreferredLocation(location);
}
else
{
log.info("Resetting preferred location of non-movable overlay {} (class {})", overlay.getName(), overlay.getClass().getName());
saveOverlayLocation(overlay);
}
overlay.setPreferredSize(size);
if (overlay.isSnappable())
{
overlay.setPreferredPosition(position);
}
else
{
log.info("Resetting preferred position of non-snappable overlay {} (class {})", overlay.getName(), overlay.getClass().getName());
saveOverlayPosition(overlay);
}
}
@@ -28,7 +28,9 @@ public enum OverlayPosition
{
/**
* Not attached anywhere, but still movable
* Deprecated. Use DYNAMIC and setMovable(true)
*/
@Deprecated
DETACHED,
/**
* Overlay places itself where it wants
@@ -25,7 +25,6 @@
package net.runelite.client.ui.overlay;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Ints;
import java.awt.Color;
import java.awt.Composite;
@@ -41,7 +40,6 @@ import java.awt.event.MouseEvent;
import java.awt.geom.AffineTransform;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
@@ -67,7 +65,6 @@ import net.runelite.client.input.MouseAdapter;
import net.runelite.client.input.MouseManager;
import net.runelite.client.ui.ClientUI;
import net.runelite.client.ui.JagexColors;
import net.runelite.client.ui.overlay.tooltip.Tooltip;
import net.runelite.client.ui.overlay.tooltip.TooltipManager;
import net.runelite.client.util.ColorUtil;
import net.runelite.client.util.HotkeyListener;
@@ -107,7 +104,8 @@ public class OverlayRenderer extends MouseAdapter
private boolean inOverlayResizingMode;
private boolean inOverlayDraggingMode;
private boolean startedMovingOverlay;
private Overlay hoveredOverlay; // for building menu entries
private Overlay curHoveredOverlay; // for building menu entries
private Overlay lastHoveredOverlay; // for off-thread access
// Overlay state validation
private Rectangle viewportBounds;
@@ -175,14 +173,16 @@ public class OverlayRenderer extends MouseAdapter
resetOverlayManagementMode();
}
hoveredOverlay = null;
curHoveredOverlay = null;
}
}
@Subscribe
protected void onClientTick(ClientTick t)
{
final Overlay overlay = hoveredOverlay;
lastHoveredOverlay = curHoveredOverlay;
final Overlay overlay = curHoveredOverlay;
if (overlay == null || client.isMenuOpen())
{
return;
@@ -216,7 +216,7 @@ public class OverlayRenderer extends MouseAdapter
@Subscribe
public void onBeforeRender(BeforeRender event)
{
hoveredOverlay = null;
curHoveredOverlay = null;
if (focusedOverlay == null && prevFocusedOverlay != null)
{
@@ -261,7 +261,7 @@ public class OverlayRenderer extends MouseAdapter
overlayManager.setWidgetItems(Collections.emptyList());
}
private void renderOverlays(Graphics2D graphics, Collection<Overlay> overlays, OverlayLayer layer)
private void renderOverlays(final Graphics2D graphics, Collection<Overlay> overlays, final OverlayLayer layer)
{
if (overlays == null
|| overlays.isEmpty()
@@ -273,7 +273,7 @@ public class OverlayRenderer extends MouseAdapter
OverlayUtil.setGraphicProperties(graphics);
// Draw snap corners
if (inOverlayDraggingMode && layer == OverlayLayer.UNDER_WIDGETS && currentManagedOverlay != null && currentManagedOverlay.getPosition() != OverlayPosition.DETACHED)
if (inOverlayDraggingMode && layer == OverlayLayer.UNDER_WIDGETS && currentManagedOverlay != null && currentManagedOverlay.isSnappable())
{
final OverlayBounds translatedSnapCorners = snapCorners.translated(
-SNAP_CORNER_SIZE.width,
@@ -290,10 +290,6 @@ public class OverlayRenderer extends MouseAdapter
graphics.setColor(previous);
}
// Get mouse position
final net.runelite.api.Point mouseCanvasPosition = client.getMouseCanvasPosition();
final Point mouse = new Point(mouseCanvasPosition.getX(), mouseCanvasPosition.getY());
// Save graphics2d properties so we can restore them later
final AffineTransform transform = graphics.getTransform();
final Stroke stroke = graphics.getStroke();
@@ -302,126 +298,97 @@ public class OverlayRenderer extends MouseAdapter
final RenderingHints renderingHints = graphics.getRenderingHints();
final Color background = graphics.getBackground();
final Rectangle clip = clipBounds(layer);
graphics.setClip(clip);
for (Overlay overlay : overlays)
{
final OverlayPosition overlayPosition = getCorrectedOverlayPosition(overlay);
final Rectangle bounds = overlay.getBounds();
final Dimension dimension = bounds.getSize();
final Point preferredLocation = overlay.getPreferredLocation();
Point location;
Rectangle snapCorner = null;
if (overlayPosition == OverlayPosition.DYNAMIC || overlayPosition == OverlayPosition.TOOLTIP)
// If the final position is not modified, layout it
if (overlayPosition != OverlayPosition.DYNAMIC && overlayPosition != OverlayPosition.TOOLTIP
&& overlayPosition != OverlayPosition.DETACHED && preferredLocation == null)
{
safeRender(client, overlay, layer, graphics, new Point());
// Restore graphics2d properties
graphics.setTransform(transform);
graphics.setStroke(stroke);
graphics.setComposite(composite);
graphics.setPaint(paint);
graphics.setRenderingHints(renderingHints);
graphics.setBackground(background);
snapCorner = snapCorners.forPosition(overlayPosition);
final Point translation = OverlayUtil.transformPosition(overlayPosition, dimension); // offset from corner
// Target x/y to draw the overlay
int destX = snapCorner.x + translation.x;
int destY = snapCorner.y + translation.y;
// Clamp the target position to ensure it is on screen or within parent bounds
location = clampOverlayLocation(destX, destY, dimension.width, dimension.height, overlay);
}
else
{
final Rectangle bounds = overlay.getBounds();
final Dimension dimension = bounds.getSize();
final Point preferredLocation = overlay.getPreferredLocation();
Point location;
Rectangle snapCorner = null;
location = preferredLocation != null ? preferredLocation : bounds.getLocation();
// If the final position is not modified, layout it
if (overlayPosition != OverlayPosition.DETACHED && (preferredLocation == null || overlay.getPreferredPosition() != null))
// Clamp the overlay position to ensure it is on screen or within parent bounds
location = clampOverlayLocation(location.x, location.y, dimension.width, dimension.height, overlay);
}
if (overlay.getPreferredSize() != null)
{
bounds.setSize(overlay.getPreferredSize());
}
safeRender(overlay, graphics, location);
// Adjust snap corner based on where the overlay was drawn
if (snapCorner != null && bounds.width + bounds.height > 0)
{
OverlayUtil.shiftSnapCorner(overlayPosition, snapCorner, bounds, PADDING);
}
// Restore graphics2d properties prior to drawing bounds
graphics.setTransform(transform);
graphics.setStroke(stroke);
graphics.setComposite(composite);
graphics.setPaint(paint);
graphics.setRenderingHints(renderingHints);
graphics.setBackground(background);
if (!graphics.getClip().equals(clip))
{
graphics.setClip(clip);
}
if (!bounds.isEmpty())
{
if (inOverlayManagingMode)
{
snapCorner = snapCorners.forPosition(overlayPosition);
final Point translation = OverlayUtil.transformPosition(overlayPosition, dimension); // offset from corner
// Target x/y to draw the overlay
int destX = snapCorner.x + translation.x;
int destY = snapCorner.y + translation.y;
// Clamp the target position to ensure it is on screen or within parent bounds
location = clampOverlayLocation(destX, destY, dimension.width, dimension.height, overlay);
}
else
{
location = preferredLocation != null ? preferredLocation : bounds.getLocation();
// Clamp the overlay position to ensure it is on screen or within parent bounds
location = clampOverlayLocation(location.x, location.y, dimension.width, dimension.height, overlay);
}
if (overlay.getPreferredSize() != null)
{
bounds.setSize(overlay.getPreferredSize());
}
safeRender(client, overlay, layer, graphics, location);
// Adjust snap corner based on where the overlay was drawn
if (snapCorner != null && bounds.width + bounds.height > 0)
{
OverlayUtil.shiftSnapCorner(overlayPosition, snapCorner, bounds, PADDING);
}
// Restore graphics2d properties prior to drawing bounds
graphics.setTransform(transform);
graphics.setStroke(stroke);
graphics.setComposite(composite);
graphics.setPaint(paint);
graphics.setRenderingHints(renderingHints);
graphics.setBackground(background);
if (!bounds.isEmpty())
{
if (inOverlayManagingMode)
Color boundsColor;
if (inOverlayResizingMode && currentManagedOverlay == overlay)
{
Color boundsColor;
if (inOverlayResizingMode && currentManagedOverlay == overlay)
{
boundsColor = MOVING_OVERLAY_RESIZING_COLOR;
}
else if (inOverlayDraggingMode && currentManagedOverlay == overlay)
{
boundsColor = MOVING_OVERLAY_ACTIVE_COLOR;
}
else if (inOverlayDraggingMode && overlay.isDragTargetable() && currentManagedOverlay.isDragTargetable()
&& currentManagedOverlay.getBounds().intersects(bounds))
{
boundsColor = MOVING_OVERLAY_TARGET_COLOR;
assert currentManagedOverlay != overlay;
dragTargetOverlay = overlay;
}
else
{
boundsColor = MOVING_OVERLAY_COLOR;
}
graphics.setColor(boundsColor);
graphics.draw(bounds);
graphics.setPaint(paint);
boundsColor = MOVING_OVERLAY_RESIZING_COLOR;
}
else if (inOverlayDraggingMode && currentManagedOverlay == overlay)
{
boundsColor = MOVING_OVERLAY_ACTIVE_COLOR;
}
else if (inOverlayDraggingMode && overlay.isDragTargetable() && currentManagedOverlay.isDragTargetable()
&& currentManagedOverlay.getBounds().intersects(bounds))
{
boundsColor = MOVING_OVERLAY_TARGET_COLOR;
assert currentManagedOverlay != overlay;
dragTargetOverlay = overlay;
}
else
{
boundsColor = MOVING_OVERLAY_COLOR;
}
if (!client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mouse))
{
hoveredOverlay = overlay;
graphics.setColor(boundsColor);
graphics.draw(bounds);
graphics.setPaint(paint);
}
if (inOverlayManagingMode)
{
String tooltipText = overlay.getPlugin() == null ? overlay.getName() : overlay.getPlugin().getName();
tooltipManager.add(new Tooltip(tooltipText));
}
if (focusedOverlay == null)
{
focusedOverlay = overlay;
if (focusedOverlay != prevFocusedOverlay)
{
if (prevFocusedOverlay != null)
{
prevFocusedOverlay.onMouseExit();
}
overlay.onMouseEnter();
}
}
overlay.onMouseOver();
}
if (!client.isMenuOpen() && !client.getSpellSelected() && bounds.contains(mousePosition))
{
curHoveredOverlay = overlay;
overlay.onMouseOver();
}
}
}
@@ -430,17 +397,16 @@ public class OverlayRenderer extends MouseAdapter
@Override
public MouseEvent mousePressed(MouseEvent mouseEvent)
{
final Point mousePoint = mouseEvent.getPoint();
mousePosition.setLocation(mousePoint);
if (!inOverlayManagingMode)
{
return mouseEvent;
}
final Point mousePoint = mouseEvent.getPoint();
mousePosition.setLocation(mousePoint);
// See if we've clicked on an overlay
currentManagedOverlay = findMangedOverlay(mousePoint);
currentManagedOverlay = lastHoveredOverlay;
if (currentManagedOverlay == null)
{
return mouseEvent;
@@ -476,17 +442,17 @@ public class OverlayRenderer extends MouseAdapter
@Override
public MouseEvent mouseMoved(MouseEvent mouseEvent)
{
final Point mousePoint = mouseEvent.getPoint();
mousePosition.setLocation(mousePoint);
if (!inOverlayManagingMode)
{
return mouseEvent;
}
final Point mousePoint = mouseEvent.getPoint();
mousePosition.setLocation(mousePoint);
if (!inOverlayResizingMode && !inOverlayDraggingMode)
{
currentManagedOverlay = findMangedOverlay(mousePoint);
currentManagedOverlay = lastHoveredOverlay;
}
if (currentManagedOverlay == null || !currentManagedOverlay.isResizable())
@@ -533,47 +499,17 @@ public class OverlayRenderer extends MouseAdapter
return mouseEvent;
}
/**
* Find an overlay to manage which is under the given mouse point
*
* @param mousePoint
* @return
*/
private Overlay findMangedOverlay(Point mousePoint)
{
synchronized (overlayManager)
{
// render order is roughly: under -> manual -> above -> always on top
final List<OverlayLayer> layerOrder = ImmutableList.of(OverlayLayer.UNDER_WIDGETS, OverlayLayer.MANUAL, OverlayLayer.ABOVE_WIDGETS, OverlayLayer.ALWAYS_ON_TOP);
return overlayManager.getOverlays()
.stream()
// ABOVE_SCENE overlays aren't managed
.filter(c -> layerOrder.contains(c.getLayer()))
// never allow moving dynamic or tooltip overlays
.filter(c -> c.getPosition() != OverlayPosition.DYNAMIC && c.getPosition() != OverlayPosition.TOOLTIP)
.sorted(
Comparator.<Overlay>comparingInt(c -> layerOrder.indexOf(c.getLayer()))
.thenComparing(OverlayManager.OVERLAY_COMPARATOR)
// pick order is reversed from render order
.reversed()
)
.filter(o -> o.getBounds().contains(mousePoint))
.findFirst()
.orElse(null);
}
}
@Override
public MouseEvent mouseDragged(MouseEvent mouseEvent)
{
final Point p = mouseEvent.getPoint();
mousePosition.setLocation(p);
if (!inOverlayManagingMode)
{
return mouseEvent;
}
final Point p = mouseEvent.getPoint();
mousePosition.setLocation(p);
if (currentManagedOverlay == null)
{
return mouseEvent;
@@ -708,13 +644,14 @@ public class OverlayRenderer extends MouseAdapter
@Override
public MouseEvent mouseReleased(MouseEvent mouseEvent)
{
final Point mousePoint = mouseEvent.getPoint();
mousePosition.setLocation(mousePoint);
if (!inOverlayManagingMode || currentManagedOverlay == null || (!inOverlayDraggingMode && !inOverlayResizingMode))
{
return mouseEvent;
}
mousePosition.setLocation(-1, -1);
if (dragTargetOverlay != null)
{
if (dragTargetOverlay.onDrag(currentManagedOverlay))
@@ -725,14 +662,14 @@ public class OverlayRenderer extends MouseAdapter
}
}
// Check if the overlay is over a snapcorner and move it if so, unless it is a detached overlay
if (currentManagedOverlay.getPosition() != OverlayPosition.DETACHED && inOverlayDraggingMode)
// Check if the overlay is over a snapcorner and snap it if so
if (currentManagedOverlay.isSnappable() && inOverlayDraggingMode)
{
final OverlayBounds snapCorners = this.emptySnapCorners.translated(-SNAP_CORNER_SIZE.width, -SNAP_CORNER_SIZE.height);
for (Rectangle snapCorner : snapCorners.getBounds())
{
if (snapCorner.contains(mouseEvent.getPoint()))
if (snapCorner.contains(mousePoint))
{
OverlayPosition position = snapCorners.fromBounds(snapCorner);
@@ -756,20 +693,23 @@ public class OverlayRenderer extends MouseAdapter
return mouseEvent;
}
private void safeRender(Client client, Overlay overlay, OverlayLayer layer, Graphics2D graphics, Point point)
private Rectangle clipBounds(OverlayLayer layer)
{
if (!isResizeable && (layer == OverlayLayer.ABOVE_SCENE || layer == OverlayLayer.UNDER_WIDGETS))
{
graphics.setClip(client.getViewportXOffset(),
return new Rectangle(client.getViewportXOffset(),
client.getViewportYOffset(),
client.getViewportWidth(),
client.getViewportHeight());
}
else
{
graphics.setClip(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
return new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
}
}
private void safeRender(Overlay overlay, Graphics2D graphics, Point point)
{
final OverlayPosition position = overlay.getPosition();
// Set font based on configuration
@@ -213,19 +213,19 @@ public class OverlayUtil
switch (overlayPosition)
{
case BOTTOM_LEFT:
sX = bounds.x + bounds.width + padding;
sX = Math.max(sX, bounds.x + bounds.width + padding);
break;
case BOTTOM_RIGHT:
sX = bounds.x - padding;
sX = Math.min(sX, bounds.x - padding);
break;
case TOP_LEFT:
case TOP_CENTER:
case CANVAS_TOP_RIGHT:
case TOP_RIGHT:
sY = bounds.y + bounds.height + padding;
sY = Math.max(sY, bounds.y + bounds.height + padding);
break;
case ABOVE_CHATBOX_RIGHT:
sY = bounds.y - padding;
sY = Math.min(sY, bounds.y - padding);
break;
default:
throw new IllegalArgumentException();
@@ -240,8 +240,6 @@ public class OverlayUtil
switch (position)
{
case DYNAMIC:
case TOOLTIP:
case TOP_LEFT:
break;
case TOP_CENTER:
@@ -258,6 +256,8 @@ public class OverlayUtil
case TOP_RIGHT:
result.x = -dimension.width;
break;
default:
throw new IllegalArgumentException();
}
return result;
@@ -42,16 +42,16 @@ public class WidgetOverlay extends Overlay
public static Collection<WidgetOverlay> createOverlays(final OverlayManager overlayManager, final Client client)
{
return Arrays.asList(
// classic resizable
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_CHATBOX_PARENT, OverlayPosition.DETACHED, OverlayPriority.HIGH),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT, OverlayPosition.DETACHED, OverlayPriority.HIGH),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.DETACHED, OverlayPriority.MED),
// classic resizable - these are in render order for managed overlay picking
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_CHATBOX_PARENT, OverlayPosition.DYNAMIC),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_INVENTORY_PARENT, OverlayPosition.DYNAMIC),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
// modern resizable
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT, OverlayPosition.DETACHED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.DETACHED, OverlayPriority.MED),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_CHATBOX_PARENT, OverlayPosition.DYNAMIC),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS1, OverlayPosition.DYNAMIC),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_TABS2, OverlayPosition.DYNAMIC),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_VIEWPORT_BOTTOM_LINE_INVENTORY_PARENT, OverlayPosition.DYNAMIC),
// The client forces the oxygen bar below the xp tracker, so set its priority lower
new WidgetOverlay(client, WidgetInfo.FOSSIL_ISLAND_OXYGENBAR, OverlayPosition.TOP_CENTER, OverlayPriority.HIGH),
new XpTrackerWidgetOverlay(overlayManager, client, WidgetInfo.EXPERIENCE_TRACKER_WIDGET, OverlayPosition.TOP_RIGHT),
@@ -84,7 +84,7 @@ public class WidgetOverlay extends Overlay
new WidgetOverlay(client, WidgetInfo.TEMPOROSS_STATUS_INDICATOR, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.BA_HEAL_TEAMMATES, OverlayPosition.BOTTOM_LEFT),
new WidgetOverlay(client, WidgetInfo.BA_TEAM, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.PVP_WILDERNESS_SKULL_CONTAINER, OverlayPosition.DETACHED)
new WidgetOverlay(client, WidgetInfo.PVP_WILDERNESS_SKULL_CONTAINER, OverlayPosition.DYNAMIC)
);
}
@@ -105,6 +105,8 @@ public class WidgetOverlay extends Overlay
setPriority(overlayPriority);
setLayer(OverlayLayer.UNDER_WIDGETS);
setPosition(overlayPosition);
setMovable(true);
setSnappable(true);
// It's almost possible to drawAfterInterface(widgetInfo.getGroupId()) here, but that fires
// *after* the native components are drawn, which is too late.
}
@@ -31,6 +31,7 @@ import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.Area;
import java.awt.image.BufferedImage;
import java.util.List;
@@ -119,10 +120,10 @@ public class WorldMapOverlay extends Overlay
bottomBar.setHasListener(true);
final Rectangle worldMapRectangle = widget.getBounds();
final Area mapViewArea = getWorldMapClipArea(worldMapRectangle);
final Shape mapViewArea = getWorldMapClipArea(worldMapRectangle);
final Rectangle canvasBounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
final Area canvasViewArea = getWorldMapClipArea(canvasBounds);
Area currentClip = null;
final Shape canvasViewArea = getWorldMapClipArea(canvasBounds);
Shape currentClip = null;
Point mousePos = client.getMouseCanvasPosition();
if (!mapViewArea.contains(mousePos.getX(), mousePos.getY()))
@@ -297,24 +298,29 @@ public class WorldMapOverlay extends Overlay
* @return An {@link Area} representing <code>baseRectangle</code>, with the area
* of visible widgets overlaying the world map clipped from it.
*/
private Area getWorldMapClipArea(Rectangle baseRectangle)
private Shape getWorldMapClipArea(Rectangle baseRectangle)
{
final Widget overview = client.getWidget(WidgetInfo.WORLD_MAP_OVERVIEW_MAP);
final Widget surfaceSelector = client.getWidget(WidgetInfo.WORLD_MAP_SURFACE_SELECTOR);
Area clipArea = new Area(baseRectangle);
boolean subtracted = false;
if (overview != null && !overview.isHidden())
{
clipArea.subtract(new Area(overview.getBounds()));
subtracted = true;
}
if (surfaceSelector != null && !surfaceSelector.isHidden())
{
clipArea.subtract(new Area(surfaceSelector.getBounds()));
subtracted = true;
}
return clipArea;
// The sun g2d implementation is much more efficient at applying clips which are subclasses of rectangle2d,
// so use that as the clip shape if possible
return subtracted ? clipArea : baseRectangle;
}
private void drawTooltip(Graphics2D graphics, WorldMapPoint worldPoint)
@@ -336,7 +342,7 @@ public class WorldMapOverlay extends Overlay
drawPoint = new Point(drawPoint.getX() + TOOLTIP_OFFSET_WIDTH, drawPoint.getY() + TOOLTIP_OFFSET_HEIGHT);
final Rectangle bounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
final Area mapArea = getWorldMapClipArea(bounds);
final Shape mapArea = getWorldMapClipArea(bounds);
graphics.setClip(mapArea);
graphics.setColor(JagexColors.TOOLTIP_BACKGROUND);
graphics.setFont(FontManager.getRunescapeFont());
@@ -6239,13 +6239,15 @@
8839,
20465,
24177,
26463
26463,
27000
],
"void knight robe": [
8840,
20469,
24179,
26465
26465,
27001
],
"void knight mace": [
8841,
@@ -6256,7 +6258,8 @@
8842,
20475,
24182,
26467
26467,
27002
],
"bronze defender": [
8844,
@@ -6292,7 +6295,8 @@
8850,
20461,
23230,
24142
24142,
27009
],
"zanik": [
8870,
@@ -7397,19 +7401,22 @@
11663,
20477,
24183,
26473
26473,
27005
],
"void ranger helm": [
11664,
20479,
24184,
26475
26475,
27006
],
"void melee helm": [
11665,
20481,
24185,
26477
26477,
27007
],
"void seal": [
11666,
@@ -8076,7 +8083,8 @@
19722,
20463,
23597,
24143
24143,
27008
],
"bronze set": [
12960,
@@ -8190,13 +8198,15 @@
13072,
20467,
24178,
26469
26469,
27003
],
"elite void robe": [
13073,
20471,
24180,
26471
26471,
27004
],
"crystal halberd": [
13080,
@@ -10673,5 +10683,9 @@
"circlet of water": [
26967,
26969
],
"ensouled hellhound head": [
26996,
26997
]
}
@@ -870,6 +870,9 @@ LABEL724:
if_icmpgt LABEL728
jump LABEL791
LABEL728:
; move chatout_add under if ($length2 > 2) to only add for :: commands
get_varc_string 335
invoke 77 ; chatout_add
get_varc_string 335
sconst "::toggleroof"
iconst 0
@@ -962,8 +965,11 @@ LABEL798:
iload 9
invoke 5517
LABEL804:
; see comment above
jump AFTER_CHATOUT_ADD
get_varc_string 335
invoke 77
AFTER_CHATOUT_ADD:
sconst ""
set_varc_string 335
LABEL808:
@@ -975,6 +981,8 @@ LABEL809:
jump LABEL819
LABEL813:
iload 3
sconst "devtoolsEnabled"
runelite_callback
iconst 1
if_icmpeq LABEL817
jump LABEL818
@@ -989,6 +997,8 @@ LABEL819:
jump LABEL829
LABEL823:
iload 3
sconst "devtoolsEnabled"
runelite_callback
iconst 1
if_icmpeq LABEL827
jump LABEL828
@@ -1 +1 @@
DE7A8C35396859C56E56307E45F4C3DC35EBA1FAAEBE871FAEC01E47C479AF43
C0218EBB7488D74689407A1A1E7C23F18E6B9C92F27BF184AA7EEE839DBEBA29
@@ -1,7 +1,7 @@
.id 909
.int_stack_count 2
.string_stack_count 0
.int_var_count 21
.int_var_count 23
.string_var_count 0
iconst 73
iconst 73
@@ -27,31 +27,31 @@
iconst 10551311
enum
istore 5
iconst -1
istore 6
iconst 103
iconst 105
iconst 1960
iload 1
enum
istore 6
istore 7
iconst 103
iconst 105
iconst 1961
iload 1
enum
istore 7
istore 8
iconst 103
iconst 105
iconst 1135
iload 1
enum
istore 8
istore 9
iconst 103
iconst 105
iconst 1136
iload 1
enum
istore 9
iconst 0
istore 10
iconst 0
istore 11
@@ -63,42 +63,71 @@
istore 14
iconst 0
istore 15
iload 0
if_getwidth
iconst 0
istore 16
iload 0
if_getheight
if_getwidth
istore 17
iload 0
if_getheight
istore 18
iconst 0
istore 19
iload 1
iconst 1745
if_icmpeq LABEL70
jump LABEL84
LABEL70:
iconst 0
iload 16
iconst 39387155
if_getwidth
sub
invoke 1045
istore 14
if_icmpeq LABEL74
jump LABEL111
LABEL74:
iconst 0
iload 17
iconst 39387155
if_getheight
if_getwidth
sub
invoke 1045
istore 15
LABEL84:
iconst 0
iload 18
iconst 39387155
if_getheight
sub
invoke 1045
istore 16
iconst 73
iconst 73
iload 1
iconst 10551329
enum
istore 6
iload 6
iconst -1
if_icmpne LABEL98
jump LABEL111
LABEL98:
iconst -1
invoke 5357
iconst 1
if_icmpeq LABEL103
jump LABEL111
LABEL103:
get_varc_int 381
iconst 16384
iload 6
if_getwidth
scale
iconst 42
add
istore 19
LABEL111:
get_varbit 4606
iconst 0
if_icmpne LABEL88
jump LABEL279
LABEL88:
if_icmpne LABEL115
jump LABEL308
LABEL115:
get_varbit 4606
iconst 2
if_icmpeq LABEL92
jump LABEL101
LABEL92:
if_icmpeq LABEL119
jump LABEL128
LABEL119:
iconst 512
iconst 220
viewport_setfov
@@ -107,36 +136,36 @@ LABEL92:
iconst 0
iconst 0
viewport_clampfov
jump LABEL132
LABEL101:
jump LABEL159
LABEL128:
get_varbit 4606
iconst 3
if_icmpeq LABEL105
jump LABEL124
LABEL105:
if_icmpeq LABEL132
jump LABEL151
LABEL132:
iconst 256
iconst 256
viewport_setfov
iload 1
iconst 1129
if_icmpeq LABEL112
jump LABEL118
LABEL112:
if_icmpeq LABEL139
jump LABEL145
LABEL139:
iconst 512
iconst 512
iconst 512
iconst 512
viewport_clampfov
jump LABEL123
LABEL118:
jump LABEL150
LABEL145:
iconst 640
iconst 768
iconst 512
iconst 512
viewport_clampfov
LABEL123:
jump LABEL132
LABEL124:
LABEL150:
jump LABEL159
LABEL151:
iconst 256
iconst 256
viewport_setfov
@@ -145,52 +174,54 @@ LABEL124:
iconst 512
iconst 512
viewport_clampfov
LABEL132:
LABEL159:
iconst 50
cam_setfollowheight
iload 2
iconst -1
if_icmpne LABEL138
jump LABEL278
LABEL138:
if_icmpne LABEL165
jump LABEL307
LABEL165:
iload 3
iconst -1
if_icmpne LABEL142
jump LABEL278
LABEL142:
if_icmpne LABEL169
jump LABEL307
LABEL169:
viewport_geteffectivesize
istore 12
istore 11
istore 10
iconst 0
iload 16
iload 10
sub
invoke 1045
iconst 0
iload 17
iload 11
sub
invoke 1045
iconst 0
iload 18
iload 12
sub
invoke 1045
istore 14
istore 13
istore 12
iload 10
iload 11
iload 12
iconst 0
iconst 0
iload 2
if_setsize
iload 10
iconst 0
iload 14
iload 12
sub
invoke 1045
sub
iload 11
iconst 0
iload 15
iload 13
sub
iload 19
sub
invoke 1045
sub
iload 12
iconst 0
iload 16
iload 14
sub
invoke 1045
sub
iconst 0
@@ -199,38 +230,26 @@ LABEL142:
if_setsize
iload 4
iconst -1
if_icmpne LABEL185
jump LABEL268
LABEL185:
if_icmpne LABEL214
jump LABEL297
LABEL214:
iload 5
iconst -1
if_icmpne LABEL189
jump LABEL268
LABEL189:
iload 12
iload 14
sub
iconst 2
div
if_icmpne LABEL218
jump LABEL297
LABEL218:
iload 13
iload 15
sub
iconst 2
div
iload 14
iload 16
sub
iconst 2
div
istore 14
istore 13
istore 12
iconst 0
iload 6
iload 12
sub
invoke 1045
iconst 0
iload 8
iload 12
sub
invoke 1045
istore 8
istore 6
iconst 0
iload 7
iload 13
@@ -243,34 +262,46 @@ LABEL189:
invoke 1045
istore 9
istore 7
iload 6
iconst 0
iload 8
iload 14
sub
invoke 1045
iconst 0
iload 10
iload 14
sub
invoke 1045
istore 10
istore 8
iload 7
iload 8
iconst 0
iconst 0
iload 4
if_setposition
iload 6
iload 7
iload 8
iconst 0
iconst 0
iload 5
if_setposition
iload 6
iload 8
add
iload 7
iload 9
add
iload 8
iload 10
add
iconst 1
iconst 1
iload 4
if_setsize
iload 6
iload 8
add
iload 7
iload 9
add
iload 8
iload 10
add
iconst 1
iconst 1
iload 5
@@ -282,11 +313,11 @@ LABEL189:
iconst 10551310
enum
iload 5
iload 8
iload 9
iload 10
invoke 910
jump LABEL278
LABEL268:
jump LABEL307
LABEL297:
iload 1
iconst 73
iconst 73
@@ -297,9 +328,9 @@ LABEL268:
iconst 0
iconst 0
invoke 910
LABEL278:
jump LABEL395
LABEL279:
LABEL307:
jump LABEL426
LABEL308:
iconst 0
iconst 0
iconst 0
@@ -309,106 +340,108 @@ LABEL279:
iconst 128
sconst "outerZoomLimit"
runelite_callback
if_icmpge LABEL288
jump LABEL304
LABEL288:
if_icmpge LABEL317
jump LABEL333
LABEL317:
get_varc_int 73
iconst 896
sconst "innerZoomLimit"
runelite_callback
if_icmple LABEL292
jump LABEL304
LABEL292:
if_icmple LABEL321
jump LABEL333
LABEL321:
get_varc_int 74
iconst 128
sconst "outerZoomLimit"
runelite_callback
if_icmpge LABEL296
jump LABEL304
LABEL296:
if_icmpge LABEL325
jump LABEL333
LABEL325:
get_varc_int 74
iconst 896
sconst "innerZoomLimit"
runelite_callback
if_icmple LABEL300
jump LABEL304
LABEL300:
if_icmple LABEL329
jump LABEL333
LABEL329:
get_varc_int 73
get_varc_int 74
invoke 42
jump LABEL307
LABEL304:
jump LABEL336
LABEL333:
iconst 512
iconst 512
invoke 42
LABEL307:
LABEL336:
viewport_geteffectivesize
istore 12
istore 11
istore 10
iload 2
iconst -1
if_icmpne LABEL314
jump LABEL395
LABEL314:
if_icmpne LABEL343
jump LABEL426
LABEL343:
iload 3
iconst -1
if_icmpne LABEL318
jump LABEL395
LABEL318:
iload 10
if_icmpne LABEL347
jump LABEL426
LABEL347:
iload 11
iload 12
iconst 0
iconst 0
iload 2
if_setsize
iload 10
iload 14
sub
iload 11
iload 15
sub
iload 19
sub
iload 12
iload 16
sub
iconst 0
iconst 0
iload 3
if_setsize
iload 4
iconst -1
if_icmpne LABEL338
jump LABEL385
LABEL338:
if_icmpne LABEL369
jump LABEL416
LABEL369:
iload 5
iconst -1
if_icmpne LABEL342
jump LABEL385
LABEL342:
iload 6
if_icmpne LABEL373
jump LABEL416
LABEL373:
iload 7
iload 8
iconst 0
iconst 0
iload 4
if_setposition
iload 6
iload 7
iload 8
iconst 0
iconst 0
iload 5
if_setposition
iload 6
iload 8
add
iload 7
iload 9
add
iload 8
iload 10
add
iconst 1
iconst 1
iload 4
if_setsize
iload 6
iload 8
add
iload 7
iload 9
add
iload 8
iload 10
add
iconst 1
iconst 1
iload 5
@@ -420,11 +453,11 @@ LABEL342:
iconst 10551310
enum
iload 5
iload 8
iload 9
iload 10
invoke 910
jump LABEL395
LABEL385:
jump LABEL426
LABEL416:
iload 1
iconst 73
iconst 73
@@ -435,86 +468,86 @@ LABEL385:
iconst 0
iconst 0
invoke 910
LABEL395:
LABEL426:
iconst 73
iconst 73
iload 1
iconst 10551312
enum
istore 18
iload 18
istore 20
iload 20
iconst -1
if_icmpne LABEL405
jump LABEL449
LABEL405:
if_icmpne LABEL436
jump LABEL480
LABEL436:
invoke 1972
iconst 0
if_icmpeq LABEL409
jump LABEL443
LABEL409:
iload 18
if_icmpeq LABEL440
jump LABEL474
LABEL440:
iload 20
if_hassub
iconst 1
if_icmpeq LABEL414
jump LABEL443
LABEL414:
if_icmpeq LABEL445
jump LABEL474
LABEL445:
get_varc_int 173
iconst -2
if_icmpeq LABEL418
jump LABEL425
LABEL418:
if_icmpeq LABEL449
jump LABEL456
LABEL449:
iconst 512
iconst 0
iconst 0
iconst 1
iload 18
iload 20
if_setsize
jump LABEL442
LABEL425:
jump LABEL473
LABEL456:
get_varc_int 173
iconst -3
if_icmpeq LABEL429
jump LABEL436
LABEL429:
if_icmpeq LABEL460
jump LABEL467
LABEL460:
iconst 0
iconst 0
iconst 1
iconst 1
iload 18
iload 20
if_setsize
jump LABEL442
LABEL436:
jump LABEL473
LABEL467:
iconst 512
iconst 334
iconst 0
iconst 0
iload 18
iload 20
if_setsize
LABEL442:
jump LABEL449
LABEL443:
LABEL473:
jump LABEL480
LABEL474:
iconst 512
iconst 334
iconst 0
iconst 0
iload 18
iload 20
if_setsize
LABEL449:
LABEL480:
iconst 73
iconst 73
iload 1
iconst 10551314
enum
istore 18
iconst 0
istore 19
iconst 0
istore 20
iload 18
iconst 0
istore 21
iconst 0
istore 22
iload 20
iconst -1
if_icmpne LABEL463
jump LABEL511
LABEL463:
if_icmpne LABEL494
jump LABEL542
LABEL494:
iconst 73
iconst 73
iload 1
@@ -522,101 +555,101 @@ LABEL463:
enum
if_hassub
iconst 1
if_icmpeq LABEL472
jump LABEL481
LABEL472:
if_icmpeq LABEL503
jump LABEL512
LABEL503:
get_varbit 4692
iconst 0
if_icmpne LABEL476
jump LABEL479
LABEL476:
if_icmpne LABEL507
jump LABEL510
LABEL507:
iconst 0
istore 20
jump LABEL481
LABEL479:
istore 22
jump LABEL512
LABEL510:
iconst 38
istore 20
LABEL481:
istore 22
LABEL512:
invoke 1972
iconst 1
if_icmpeq LABEL485
jump LABEL503
LABEL485:
if_icmpeq LABEL516
jump LABEL534
LABEL516:
get_varbit 542
iconst 0
if_icmpeq LABEL489
jump LABEL503
LABEL489:
if_icmpeq LABEL520
jump LABEL534
LABEL520:
get_varbit 6254
iconst 0
if_icmpeq LABEL493
jump LABEL498
LABEL493:
if_icmpeq LABEL524
jump LABEL529
LABEL524:
iconst 182
iconst 4
add
istore 19
jump LABEL502
LABEL498:
istore 21
jump LABEL533
LABEL529:
iconst 120
iconst 4
add
istore 19
LABEL502:
jump LABEL505
LABEL503:
istore 21
LABEL533:
jump LABEL536
LABEL534:
iconst 0
istore 19
LABEL505:
iload 19
iload 20
istore 21
LABEL536:
iload 21
iload 22
iconst 2
iconst 0
iload 18
iload 20
if_setposition
LABEL511:
LABEL542:
iconst 73
iconst 73
iload 1
iconst 10551305
enum
istore 18
istore 20
iconst 0
istore 19
iload 18
istore 21
iload 20
iconst -1
if_icmpne LABEL523
jump LABEL545
LABEL523:
if_icmpne LABEL554
jump LABEL576
LABEL554:
invoke 1972
iconst 1
if_icmpeq LABEL527
jump LABEL537
LABEL527:
if_icmpeq LABEL558
jump LABEL568
LABEL558:
get_varbit 6254
iconst 0
if_icmpeq LABEL531
jump LABEL534
LABEL531:
if_icmpeq LABEL562
jump LABEL565
LABEL562:
iconst 182
istore 19
jump LABEL536
LABEL534:
istore 21
jump LABEL567
LABEL565:
iconst 120
istore 19
LABEL536:
jump LABEL539
LABEL537:
istore 21
LABEL567:
jump LABEL570
LABEL568:
iconst 0
istore 19
LABEL539:
iload 19
istore 21
LABEL570:
iload 21
iconst 0
iconst 1
iconst 1
iload 18
iload 20
if_setsize
LABEL545:
LABEL576:
iconst 73
iconst 73
iload 1