Collapse @Copy, @Replace mixin methods
This commit is contained in:
@@ -100,10 +100,8 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
private static boolean hideDeadNPCs;
|
||||
|
||||
@Copy("newGameObject")
|
||||
abstract boolean addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSEntity entity, int var10, boolean var11, long var12, int var13);
|
||||
|
||||
@Replace("newGameObject")
|
||||
boolean rl$addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSEntity entity, int var10, boolean var11, long var12, int var13)
|
||||
boolean copy$addEntityMarker(int var1, int var2, int var3, int var4, int var5, int x, int y, int var8, RSEntity entity, int var10, boolean var11, long var12, int var13)
|
||||
{
|
||||
final boolean shouldDraw = shouldDraw(entity, false);
|
||||
|
||||
@@ -119,21 +117,16 @@ public abstract class EntityHiderMixin implements RSScene
|
||||
}
|
||||
|
||||
return shouldDraw &&
|
||||
addEntityMarker(var1, var2, var3, var4, var5, x, y, var8, entity, var10, var11, var12, var13);
|
||||
copy$addEntityMarker(var1, var2, var3, var4, var5, x, y, var8, entity, var10, var11, var12, var13);
|
||||
}
|
||||
|
||||
@Copy("drawActor2d")
|
||||
private static void draw2DExtras(RSActor actor, int var1, int var2, int var3, int var4, int var5)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("drawActor2d")
|
||||
private static void rl$draw2DExtras(RSActor actor, int var1, int var2, int var3, int var4, int var5)
|
||||
private static void copy$draw2DExtras(RSActor actor, int var1, int var2, int var3, int var4, int var5)
|
||||
{
|
||||
if (shouldDraw(actor, true))
|
||||
{
|
||||
draw2DExtras(actor, var1, var2, var3, var4, var5);
|
||||
copy$draw2DExtras(actor, var1, var2, var3, var4, var5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class ProcessClientErrorMixin implements RSClient
|
||||
private static RSClient client;
|
||||
|
||||
@Replace("RunException_sendStackTrace")
|
||||
static void rl$processClientError(String string, Throwable throwable)
|
||||
static void processClientError(String string, Throwable throwable)
|
||||
{
|
||||
if (throwable != null)
|
||||
{
|
||||
|
||||
@@ -33,13 +33,12 @@ public abstract class RSAbstractArchiveMixin implements RSAbstractArchive
|
||||
return overlayOutdated;
|
||||
}
|
||||
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
@Copy("takeFile")
|
||||
abstract byte[] rs$getConfigData(int archiveId, int fileId);
|
||||
|
||||
@Replace("takeFile")
|
||||
public byte[] rl$getConfigData(int groupId, int fileId)
|
||||
public byte[] copy$getConfigData(int groupId, int fileId)
|
||||
{
|
||||
final byte[] rsData = rs$getConfigData(groupId, fileId);
|
||||
final byte[] rsData = copy$getConfigData(groupId, fileId);
|
||||
final int archiveId = ((RSArchive) this).getIndex();
|
||||
|
||||
if (!OverlayIndex.hasOverlay(archiveId, groupId))
|
||||
|
||||
@@ -42,16 +42,15 @@ public abstract class RSBufferMixin implements RSBuffer
|
||||
private static BigInteger modulus;
|
||||
|
||||
@Copy("encryptRsa")
|
||||
abstract void rs$encryptRsa(BigInteger var1, BigInteger var2);
|
||||
|
||||
@Replace("encryptRsa")
|
||||
public void rl$encryptRsa(BigInteger exp, BigInteger mod)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$encryptRsa(BigInteger exp, BigInteger mod)
|
||||
{
|
||||
if (modulus != null)
|
||||
{
|
||||
mod = modulus;
|
||||
}
|
||||
|
||||
rs$encryptRsa(exp, mod);
|
||||
copy$encryptRsa(exp, mod);
|
||||
}
|
||||
}
|
||||
@@ -957,15 +957,11 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("runWidgetOnLoadListener")
|
||||
public static void rs$runWidgetOnLoadListener(int groupId)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("runWidgetOnLoadListener")
|
||||
public static void rl$runWidgetOnLoadListener(int groupId)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public static void copy$runWidgetOnLoadListener(int groupId)
|
||||
{
|
||||
rs$runWidgetOnLoadListener(groupId);
|
||||
copy$runWidgetOnLoadListener(groupId);
|
||||
|
||||
RSWidget[][] widgets = client.getWidgets();
|
||||
boolean loaded = widgets != null && widgets[groupId] != null;
|
||||
@@ -1147,19 +1143,14 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("findItemDefinitions")
|
||||
public static void rs$findItemDefinitions(String var0, boolean var1)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("findItemDefinitions")
|
||||
public static void rl$findItemDefinitions(String var0, boolean var1)
|
||||
public static void copy$findItemDefinitions(String var0, boolean var1)
|
||||
{
|
||||
GrandExchangeSearched event = new GrandExchangeSearched();
|
||||
client.getCallbacks().post(GrandExchangeSearched.class, event);
|
||||
if (!event.isConsumed())
|
||||
{
|
||||
rs$findItemDefinitions(var0, var1);
|
||||
copy$findItemDefinitions(var0, var1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1379,13 +1370,8 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@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 param0, int param1, int opcode, int id, String option, String target, int canvasX, int canvasY)
|
||||
static void copy$menuAction(int param0, int param1, int opcode, int id, String option, String target, int canvasX, int canvasY)
|
||||
{
|
||||
boolean authentic = true;
|
||||
if (target != null && target.startsWith("!AUTHENTIC"))
|
||||
@@ -1429,7 +1415,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
return;
|
||||
}
|
||||
|
||||
rs$menuAction(menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), menuOptionClicked.getOpcode(),
|
||||
copy$menuAction(menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), menuOptionClicked.getOpcode(),
|
||||
menuOptionClicked.getIdentifier(), menuOptionClicked.getOption(), menuOptionClicked.getTarget(), canvasX, canvasY);
|
||||
}
|
||||
|
||||
@@ -1697,15 +1683,11 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("shouldLeftClickOpenMenu")
|
||||
boolean rs$shouldLeftClickOpenMenu()
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("shouldLeftClickOpenMenu")
|
||||
boolean rl$shouldLeftClickOpenMenu()
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
boolean copy$shouldLeftClickOpenMenu()
|
||||
{
|
||||
if (rs$shouldLeftClickOpenMenu())
|
||||
if (copy$shouldLeftClickOpenMenu())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1729,20 +1711,15 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("menu")
|
||||
void rs$menu()
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("menu")
|
||||
void rl$menu()
|
||||
void copy$menu()
|
||||
{
|
||||
Menu menu = Menu.MENU;
|
||||
menu.reset();
|
||||
getCallbacks().post(Menu.class, menu);
|
||||
if (menu.shouldRun())
|
||||
{
|
||||
rs$menu();
|
||||
copy$menu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1810,14 +1787,11 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("forceDisconnect")
|
||||
static void rs$forceDisconnect(int reason)
|
||||
{
|
||||
}
|
||||
|
||||
@Replace("forceDisconnect")
|
||||
static void forceDisconnect(int reason)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
static void copy$forceDisconnect(int reason)
|
||||
{
|
||||
rs$forceDisconnect(reason);
|
||||
copy$forceDisconnect(reason);
|
||||
|
||||
if (hideDisconnect && reason == 1)
|
||||
{
|
||||
@@ -1844,15 +1818,11 @@ public abstract class RSClientMixin implements RSClient
|
||||
|
||||
|
||||
@Copy("changeGameOptions")
|
||||
public static void rs$changeGameOptions(int var0)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("changeGameOptions")
|
||||
public static void changeGameOptions(int var0)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public static void copy$changeGameOptions(int var0)
|
||||
{
|
||||
rs$changeGameOptions(var0);
|
||||
copy$changeGameOptions(var0);
|
||||
|
||||
int type = client.getVarpDefinition(var0).getType();
|
||||
if (type == 3 || type == 4 || type == 10)
|
||||
|
||||
@@ -46,11 +46,10 @@ public abstract class RSDynamicObjectMixin implements RSDynamicObject
|
||||
@Inject
|
||||
public int animationID;
|
||||
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
@Copy("getModel")
|
||||
public abstract RSModel rs$getModel();
|
||||
|
||||
@Replace("getModel")
|
||||
public RSModel rl$getModel()
|
||||
public RSModel copy$getModel()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -61,7 +60,7 @@ public abstract class RSDynamicObjectMixin implements RSDynamicObject
|
||||
{
|
||||
setAnimFrame((animFrame ^ Integer.MIN_VALUE) & 0xFFFF);
|
||||
}
|
||||
return rs$getModel();
|
||||
return copy$getModel();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -52,12 +52,10 @@ public abstract class RSItemDefinitionMixin implements RSItemDefinition
|
||||
}
|
||||
|
||||
@Copy("getShiftClickIndex")
|
||||
abstract int rs$getShiftClickActionIndex();
|
||||
|
||||
@Replace("getShiftClickIndex")
|
||||
public int getShiftClickActionIndex()
|
||||
public int copy$getShiftClickActionIndex()
|
||||
{
|
||||
return shiftClickActionIndex == DEFAULT_CUSTOM_SHIFT_CLICK_INDEX ? rs$getShiftClickActionIndex() : shiftClickActionIndex;
|
||||
return shiftClickActionIndex == DEFAULT_CUSTOM_SHIFT_CLICK_INDEX ? copy$getShiftClickActionIndex() : shiftClickActionIndex;
|
||||
}
|
||||
|
||||
@Inject
|
||||
@@ -77,14 +75,12 @@ public abstract class RSItemDefinitionMixin implements RSItemDefinition
|
||||
}
|
||||
|
||||
@Copy("getModel")
|
||||
public abstract RSModel rs$getModel(int quantity);
|
||||
|
||||
@Replace("getModel")
|
||||
public RSModel getModel(int quantity)
|
||||
public RSModel copy$getModel(int quantity)
|
||||
{
|
||||
if (modelOverride == -1)
|
||||
{
|
||||
return rs$getModel(quantity);
|
||||
return copy$getModel(quantity);
|
||||
}
|
||||
|
||||
return client.getRSItemDefinition(modelOverride).getModel(quantity);
|
||||
|
||||
@@ -18,45 +18,39 @@ public abstract class RSKeyHandlerMixin implements RSKeyHandler
|
||||
@Shadow("client")
|
||||
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
|
||||
@Copy("keyPressed")
|
||||
@Replace("keyPressed")
|
||||
public final synchronized void keyPressed(KeyEvent keyEvent)
|
||||
{
|
||||
client.getCallbacks().keyPressed(keyEvent);
|
||||
if (!keyEvent.isConsumed())
|
||||
{
|
||||
rs$keyPressed(keyEvent);
|
||||
keyPressed(keyEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("keyReleased")
|
||||
@Replace("keyReleased")
|
||||
public final synchronized void keyReleased(KeyEvent keyEvent)
|
||||
{
|
||||
client.getCallbacks().keyReleased(keyEvent);
|
||||
if (!keyEvent.isConsumed())
|
||||
{
|
||||
rs$keyReleased(keyEvent);
|
||||
keyReleased(keyEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("keyTyped")
|
||||
@Replace("keyTyped")
|
||||
public final void keyTyped(KeyEvent keyEvent)
|
||||
{
|
||||
client.getCallbacks().keyTyped(keyEvent);
|
||||
if (!keyEvent.isConsumed())
|
||||
{
|
||||
rs$keyTyped(keyEvent);
|
||||
keyTyped(keyEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,17 +38,12 @@ public abstract class RSLoginScreenAnimationMixin implements RSLoginScreenAnimat
|
||||
private static RSClient client;
|
||||
|
||||
@Copy("draw")
|
||||
void rs$draw(int var1, int var2)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("draw")
|
||||
void rl$draw(int var1, int var2)
|
||||
void copy$draw(int var1, int var2)
|
||||
{
|
||||
if (client.shouldRenderLoginScreenFire())
|
||||
{
|
||||
rs$draw(var1, var2);
|
||||
copy$draw(var1, var2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +47,13 @@ public abstract class RSModelDataMixin implements RSModelData
|
||||
private float[][] faceTextureVCoordinates;
|
||||
|
||||
@Copy("toModel")
|
||||
public abstract Model rs$light(int ambient, int contrast, int var3, int var4, int var5);
|
||||
|
||||
@Replace("toModel")
|
||||
public Model rl$light(int ambient, int contrast, int var3, int var4, int var5)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public Model copy$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);
|
||||
Model model = copy$light(ambient, contrast, var3, var4, var5);
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -160,13 +160,12 @@ public abstract class RSModelMixin implements RSModel
|
||||
}
|
||||
|
||||
@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)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public Model copy$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);
|
||||
Model model = copy$contourGround(tileHeights, packedX, height, packedY, copy, contouredGround);
|
||||
if (model != null && model != this)
|
||||
{
|
||||
RSModel rsModel = (RSModel) model;
|
||||
@@ -177,15 +176,13 @@ public abstract class RSModelMixin implements RSModel
|
||||
}
|
||||
|
||||
@Copy("drawFace")
|
||||
public abstract void rs$drawFace(int face);
|
||||
|
||||
@Replace("drawFace")
|
||||
public void rl$drawFace(int face)
|
||||
public void copy$drawFace(int face)
|
||||
{
|
||||
DrawCallbacks callbacks = client.getDrawCallbacks();
|
||||
if (callbacks == null || !callbacks.drawFace(this, face))
|
||||
{
|
||||
rs$drawFace(face);
|
||||
copy$drawFace(face);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,28 +18,8 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
@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
|
||||
@Copy("mousePressed")
|
||||
@Replace("mousePressed")
|
||||
public synchronized void mousePressed(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -52,7 +32,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mousePressed(mouseEvent);
|
||||
mousePressed(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -62,6 +42,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("mouseReleased")
|
||||
@Replace("mouseReleased")
|
||||
public synchronized void mouseReleased(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -74,7 +55,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mouseReleased(mouseEvent);
|
||||
mouseReleased(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -84,17 +65,19 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("mouseClicked")
|
||||
@Replace("mouseClicked")
|
||||
public void mouseClicked(MouseEvent event)
|
||||
{
|
||||
event = client.getCallbacks().mouseClicked(event);
|
||||
if (!event.isConsumed())
|
||||
{
|
||||
rs$mouseClicked(event);
|
||||
mouseClicked(event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("mouseEntered")
|
||||
@Replace("mouseEntered")
|
||||
public synchronized void mouseEntered(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -107,7 +90,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mouseEntered(mouseEvent);
|
||||
mouseEntered(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -118,6 +101,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
|
||||
|
||||
@Override
|
||||
@Copy("mouseExited")
|
||||
@Replace("mouseExited")
|
||||
public synchronized void mouseExited(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -130,7 +114,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mouseExited(mouseEvent);
|
||||
mouseExited(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -140,6 +124,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("mouseDragged")
|
||||
@Replace("mouseDragged")
|
||||
public synchronized void mouseDragged(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -152,7 +137,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mouseDragged(mouseEvent);
|
||||
mouseDragged(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -162,6 +147,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
@Copy("mouseMoved")
|
||||
@Replace("mouseMoved")
|
||||
public synchronized void mouseMoved(MouseEvent mouseEvent)
|
||||
{
|
||||
@@ -174,7 +160,7 @@ public abstract class RSMouseHandlerMixin implements RSMouseHandler
|
||||
isInEvent++;
|
||||
try
|
||||
{
|
||||
rs$mouseMoved(mouseEvent);
|
||||
mouseMoved(mouseEvent);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -38,17 +38,15 @@ public abstract class RSMouseWheelHandlerMixin implements RSMouseWheelHandler
|
||||
@Shadow("client")
|
||||
private static RSClient client;
|
||||
|
||||
@Copy("mouseWheelMoved")
|
||||
abstract void rs$mouseWheelMoved(MouseWheelEvent event);
|
||||
|
||||
@Override
|
||||
@Copy("mouseWheelMoved")
|
||||
@Replace("mouseWheelMoved")
|
||||
public void mouseWheelMoved(MouseWheelEvent event)
|
||||
{
|
||||
event = client.getCallbacks().mouseWheelMoved(event);
|
||||
if (!event.isConsumed())
|
||||
{
|
||||
rs$mouseWheelMoved(event);
|
||||
mouseWheelMoved(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,15 +119,14 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
}
|
||||
|
||||
@Copy("getModel")
|
||||
public abstract RSModel rs$getModel();
|
||||
|
||||
@Replace("getModel")
|
||||
public RSModel rl$getModel()
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public RSModel copy$getModel()
|
||||
{
|
||||
if (!client.isInterpolateNpcAnimations()
|
||||
|| getAnimation() == AnimationID.HELLHOUND_DEFENCE)
|
||||
{
|
||||
return rs$getModel();
|
||||
return copy$getModel();
|
||||
}
|
||||
int actionFrame = getActionFrame();
|
||||
int poseFrame = getPoseFrame();
|
||||
@@ -139,7 +138,7 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
setActionFrame(Integer.MIN_VALUE | getActionFrameCycle() << 16 | actionFrame);
|
||||
setPoseFrame(Integer.MIN_VALUE | getPoseFrameCycle() << 16 | poseFrame);
|
||||
setSpotAnimationFrame(Integer.MIN_VALUE | getSpotAnimationFrameCycle() << 16 | spotAnimFrame);
|
||||
return rs$getModel();
|
||||
return copy$getModel();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -245,15 +245,14 @@ public abstract class RSPlayerMixin implements RSPlayer
|
||||
return model.getConvexHull(getX(), getY(), getOrientation(), tileHeight);
|
||||
}
|
||||
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
@Copy("getModel")
|
||||
public abstract RSModel rs$getModel();
|
||||
|
||||
@Replace("getModel")
|
||||
public RSModel rl$getModel()
|
||||
public RSModel copy$getModel()
|
||||
{
|
||||
if (!client.isInterpolatePlayerAnimations())
|
||||
{
|
||||
return rs$getModel();
|
||||
return copy$getModel();
|
||||
}
|
||||
int actionFrame = getActionFrame();
|
||||
int poseFrame = getPoseFrame();
|
||||
@@ -265,7 +264,7 @@ public abstract class RSPlayerMixin implements RSPlayer
|
||||
setActionFrame(Integer.MIN_VALUE | getActionFrameCycle() << 16 | actionFrame);
|
||||
setPoseFrame(Integer.MIN_VALUE | getPoseFrameCycle() << 16 | poseFrame);
|
||||
setSpotAnimationFrame(Integer.MIN_VALUE | getSpotAnimationFrameCycle() << 16 | spotAnimFrame);
|
||||
return rs$getModel();
|
||||
return copy$getModel();
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -290,14 +289,13 @@ public abstract class RSPlayerMixin implements RSPlayer
|
||||
}
|
||||
|
||||
@Copy("read")
|
||||
public abstract void rs$read(RSBuffer buffer);
|
||||
|
||||
@Replace("read")
|
||||
public void rl$read(RSBuffer buffer)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$read(RSBuffer buffer)
|
||||
{
|
||||
final long appearanceHash = getPlayerAppearance() == null ? 0 : getPlayerAppearance().getHash();
|
||||
|
||||
rs$read(buffer);
|
||||
this.copy$read(buffer);
|
||||
|
||||
if (getPlayerAppearance().getHash() != appearanceHash)
|
||||
{
|
||||
|
||||
@@ -28,13 +28,8 @@ public abstract class RSRasterizer2DMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("Rasterizer2D_fillRectangleGradientAlpha")
|
||||
private static void rs$drawGradientAlpha(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("Rasterizer2D_fillRectangleGradientAlpha")
|
||||
private static void rl$drawGradientAlpha(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7)
|
||||
private static void copy$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();
|
||||
@@ -45,7 +40,7 @@ public abstract class RSRasterizer2DMixin implements RSClient
|
||||
|
||||
if (!client.isGpu())
|
||||
{
|
||||
rs$drawGradientAlpha(var0, var1, var2, var3, var4, var5, var6, var7);
|
||||
copy$drawGradientAlpha(var0, var1, var2, var3, var4, var5, var6, var7);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -110,13 +105,8 @@ public abstract class RSRasterizer2DMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("Rasterizer2D_drawGradientPixels")
|
||||
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("Rasterizer2D_drawGradientPixels")
|
||||
public static void rl$raster2d7(int var0, int var1, int var2, int var3, int var4, int var5, byte[] var6, int var7)
|
||||
public static void copy$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();
|
||||
@@ -124,7 +114,7 @@ public abstract class RSRasterizer2DMixin implements RSClient
|
||||
|
||||
if (!client.isGpu())
|
||||
{
|
||||
rs$raster2d7(var0, var1, var2, var3, var4, var5, var6, var7);
|
||||
copy$raster2d7(var0, var1, var2, var3, var4, var5, var6, var7);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public abstract class RSSceneMixin implements RSScene
|
||||
private static int rl$drawDistance;
|
||||
|
||||
@Replace("draw")
|
||||
void rl$drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane)
|
||||
void drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane)
|
||||
{
|
||||
final DrawCallbacks drawCallbacks = client.getDrawCallbacks();
|
||||
if (drawCallbacks != null)
|
||||
@@ -410,12 +410,11 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("newWallDecoration")
|
||||
abstract public void rs$addBoundaryDecoration(int plane, int x, int y, int floor, Entity var5, Entity var6, int var7, int var8, int var9, int var10, long hash, int var12);
|
||||
|
||||
@Replace("newWallDecoration")
|
||||
public void rl$addBoundaryDecoration(int plane, int x, int y, int floor, Entity var5, Entity var6, int var7, int var8, int var9, int var10, long hash, int var12)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$addBoundaryDecoration(int plane, int x, int y, int floor, Entity var5, Entity 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);
|
||||
copy$addBoundaryDecoration(plane, x, y, floor, var5, var6, var7, var8, var9, var10, hash, var12);
|
||||
Tile tile = getTiles()[plane][x][y];
|
||||
if (tile != null)
|
||||
{
|
||||
@@ -428,12 +427,11 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("newGroundItemPile")
|
||||
abstract public void rs$addItemPile(int plane, int x, int y, int hash, Entity var5, long var6, Entity var7, Entity var8);
|
||||
|
||||
@Replace("newGroundItemPile")
|
||||
public void rl$addItemPile(int plane, int x, int y, int hash, Entity var5, long var6, Entity var7, Entity var8)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$addItemPile(int plane, int x, int y, int hash, Entity var5, long var6, Entity var7, Entity var8)
|
||||
{
|
||||
rs$addItemPile(plane, x, y, hash, var5, var6, var7, var8);
|
||||
copy$addItemPile(plane, x, y, hash, var5, var6, var7, var8);
|
||||
Tile tile = getTiles()[plane][x][y];
|
||||
if (tile != null)
|
||||
{
|
||||
@@ -446,12 +444,11 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("newFloorDecoration")
|
||||
abstract public void rs$groundObjectSpawned(int plane, int x, int y, int floor, Entity var5, long hash, int var7);
|
||||
|
||||
@Replace("newFloorDecoration")
|
||||
public void rl$groundObjectSpawned(int plane, int x, int y, int floor, Entity var5, long hash, int var7)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$groundObjectSpawned(int plane, int x, int y, int floor, Entity var5, long hash, int var7)
|
||||
{
|
||||
rs$groundObjectSpawned(plane, x, y, floor, var5, hash, var7);
|
||||
copy$groundObjectSpawned(plane, x, y, floor, var5, hash, var7);
|
||||
Tile tile = getTiles()[plane][x][y];
|
||||
if (tile != null)
|
||||
{
|
||||
@@ -464,12 +461,11 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("newBoundaryObject")
|
||||
abstract public void rs$addBoundary(int plane, int x, int y, int floor, Entity var5, Entity var6, int var7, int var8, long hash, int var10);
|
||||
|
||||
@Replace("newBoundaryObject")
|
||||
public void rl$addBoundary(int plane, int x, int y, int floor, Entity var5, Entity var6, int var7, int var8, long hash, int var10)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$addBoundary(int plane, int x, int y, int floor, Entity var5, Entity var6, int var7, int var8, long hash, int var10)
|
||||
{
|
||||
rs$addBoundary(plane, x, y, floor, var5, var6, var7, var8, hash, var10);
|
||||
copy$addBoundary(plane, x, y, floor, var5, var6, var7, var8, hash, var10);
|
||||
Tile tile = getTiles()[plane][x][y];
|
||||
if (tile != null)
|
||||
{
|
||||
@@ -482,16 +478,14 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("drawTileUnderlay")
|
||||
abstract public void rs$drawTileUnderlay(TilePaint tile, int z, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y);
|
||||
|
||||
@Replace("drawTileUnderlay")
|
||||
public void rl$drawTileUnderlay(TilePaint tile, int z, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y)
|
||||
public void copy$drawTileUnderlay(TilePaint 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);
|
||||
copy$drawTileUnderlay(tile, z, pitchSin, pitchCos, yawSin, yawCos, x, y);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -609,14 +603,12 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("drawTileOverlay")
|
||||
abstract public void rs$drawTileOverlay(TileModel tile, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y);
|
||||
|
||||
@Replace("drawTileOverlay")
|
||||
public void rl$drawTileOverlay(TileModel tile, int pitchSin, int pitchCos, int yawSin, int yawCos, int tileX, int tileY)
|
||||
public void copy$drawTileOverlay(TileModel 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);
|
||||
copy$drawTileOverlay(tile, pitchSin, pitchCos, yawSin, yawCos, tileX, tileY);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -829,14 +821,12 @@ public abstract class RSSceneMixin implements RSScene
|
||||
}
|
||||
|
||||
@Copy("drawTileMinimap")
|
||||
abstract void rs$drawTile(int[] pixels, int pixelOffset, int width, int z, int x, int y);
|
||||
|
||||
@Replace("drawTileMinimap")
|
||||
public void rl$drawTile(int[] pixels, int pixelOffset, int width, int z, int x, int y)
|
||||
public void copy$drawTile(int[] pixels, int pixelOffset, int width, int z, int x, int y)
|
||||
{
|
||||
if (!hdMinimapEnabled)
|
||||
{
|
||||
rs$drawTile(pixels, pixelOffset, width, z, x, y);
|
||||
copy$drawTile(pixels, pixelOffset, width, z, x, y);
|
||||
return;
|
||||
}
|
||||
Tile tile = getTiles()[z][x][y];
|
||||
|
||||
@@ -16,10 +16,9 @@ public abstract class RSSequenceDefinitionMixin implements RSSequenceDefinition
|
||||
private static RSClient client;
|
||||
|
||||
@Copy("applyTransformations")
|
||||
public abstract RSModel rs$applyTransformations(RSModel model, int actionFrame, RSSequenceDefinition poseSeq, int poseFrame);
|
||||
|
||||
@Replace("applyTransformations")
|
||||
public RSModel rl$applyTransformations(RSModel model, int actionFrame, RSSequenceDefinition poseSeq, int poseFrame)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public RSModel copy$applyTransformations(RSModel model, int actionFrame, RSSequenceDefinition poseSeq, int poseFrame)
|
||||
{
|
||||
// reset frame ids because we're not interpolating this
|
||||
if (actionFrame < 0)
|
||||
@@ -32,19 +31,17 @@ public abstract class RSSequenceDefinitionMixin implements RSSequenceDefinition
|
||||
int packed = poseFrame ^ Integer.MIN_VALUE;
|
||||
poseFrame = packed & 0xFFFF;
|
||||
}
|
||||
return rs$applyTransformations(model, actionFrame, poseSeq, poseFrame);
|
||||
return copy$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)
|
||||
public RSModel copy$transformActorModel(RSModel model, int frame)
|
||||
{
|
||||
// check if the frame has not been modified
|
||||
if (frame >= 0)
|
||||
{
|
||||
return rs$transformActorModel(model, frame);
|
||||
return copy$transformActorModel(model, frame);
|
||||
}
|
||||
|
||||
// remove flag to check if the frame has been modified
|
||||
@@ -84,15 +81,13 @@ public abstract class RSSequenceDefinitionMixin implements RSSequenceDefinition
|
||||
}
|
||||
|
||||
@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)
|
||||
public RSModel copy$transformObjectModel(RSModel model, int frame, int rotation)
|
||||
{
|
||||
// check if the frame has not been modified
|
||||
if (frame >= 0)
|
||||
{
|
||||
return rs$transformObjectModel(model, frame, rotation);
|
||||
return copy$transformObjectModel(model, frame, rotation);
|
||||
}
|
||||
|
||||
// remove flag to check if the frame has been modified
|
||||
@@ -159,15 +154,13 @@ public abstract class RSSequenceDefinitionMixin implements RSSequenceDefinition
|
||||
}
|
||||
|
||||
@Copy("transformSpotAnimationModel")
|
||||
public abstract RSModel rs$transformSpotAnimationModel(RSModel model, int frame);
|
||||
|
||||
@Replace("transformSpotAnimationModel")
|
||||
public RSModel rl$transformSpotAnimationModel(RSModel model, int frame)
|
||||
public RSModel copy$transformSpotAnimationModel(RSModel model, int frame)
|
||||
{
|
||||
// check if the frame has not been modified
|
||||
if (frame >= 0)
|
||||
{
|
||||
return rs$transformSpotAnimationModel(model, frame);
|
||||
return copy$transformSpotAnimationModel(model, frame);
|
||||
}
|
||||
|
||||
// remove flag to check if the frame has been modified
|
||||
@@ -206,15 +199,13 @@ public abstract class RSSequenceDefinitionMixin implements RSSequenceDefinition
|
||||
}
|
||||
|
||||
@Copy("transformWidgetModel")
|
||||
public abstract RSModel rs$transformWidgetModel(RSModel model, int frame);
|
||||
|
||||
@Replace("transformWidgetModel")
|
||||
public RSModel rl$transformWidgetModel(RSModel model, int frame)
|
||||
public RSModel copy$transformWidgetModel(RSModel model, int frame)
|
||||
{
|
||||
// check if the frame has not been modified
|
||||
if (frame >= 0)
|
||||
{
|
||||
return rs$transformWidgetModel(model, frame);
|
||||
return copy$transformWidgetModel(model, frame);
|
||||
}
|
||||
|
||||
// remove flag to check if the frame has been modified
|
||||
|
||||
@@ -147,16 +147,13 @@ public abstract class RSSpriteMixin implements RSSprite
|
||||
}
|
||||
|
||||
@Copy("drawRotatedMaskedCenteredAround")
|
||||
abstract void rs$drawAlphaMapped(int x, int y, int width, int height, int xOffset, int yOffset,
|
||||
int rotation, int zoom, int[] xOffsets, int[] yOffsets);
|
||||
|
||||
@Replace("drawRotatedMaskedCenteredAround")
|
||||
public void rl$drawAlphaMapped(int x, int y, int width, int height, int xOffset, int yOffset, int rotation,
|
||||
public void copy$drawAlphaMapped(int x, int y, int width, int height, int xOffset, int yOffset, int rotation,
|
||||
int zoom, int[] xOffsets, int[] yOffsets)
|
||||
{
|
||||
if (!hdMinimapEnabled)
|
||||
{
|
||||
rs$drawAlphaMapped(x, y, width, height, xOffset, yOffset, rotation, zoom, xOffsets, yOffsets);
|
||||
copy$drawAlphaMapped(x, y, width, height, xOffset, yOffset, rotation, zoom, xOffsets, yOffsets);
|
||||
return;
|
||||
}
|
||||
try
|
||||
|
||||
@@ -45,17 +45,15 @@ public abstract class RSTextureMixin implements RSTexture
|
||||
private float rl$v;
|
||||
|
||||
@Copy("animate")
|
||||
public abstract void rs$animate(int diff);
|
||||
|
||||
@Replace("animate")
|
||||
public void rl$animate(int diff)
|
||||
public void copy$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);
|
||||
copy$animate(diff);
|
||||
return;
|
||||
}
|
||||
assert client.getDrawCallbacks() != null;
|
||||
|
||||
@@ -583,16 +583,15 @@ public abstract class RSWidgetMixin implements RSWidget
|
||||
}
|
||||
|
||||
@Copy("getModel")
|
||||
public abstract RSModel rs$getModel(RSSequenceDefinition sequence, int frame, boolean alternate, RSPlayerAppearance playerComposition);
|
||||
|
||||
@Replace("getModel")
|
||||
public RSModel rl$getModel(RSSequenceDefinition sequence, int frame, boolean alternate, RSPlayerAppearance playerComposition)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public RSModel copy$getModel(RSSequenceDefinition sequence, int frame, boolean alternate, RSPlayerAppearance playerComposition)
|
||||
{
|
||||
if (frame != -1 && client.isInterpolateWidgetAnimations())
|
||||
{
|
||||
frame = frame | getModelFrameCycle() << 16 | Integer.MIN_VALUE;
|
||||
}
|
||||
return rs$getModel(sequence, frame, alternate, playerComposition);
|
||||
return copy$getModel(sequence, frame, alternate, playerComposition);
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -138,13 +138,8 @@ public abstract class ScriptVMMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("runScript")
|
||||
static void rs$runScript(RSScriptEvent event, int maxExecutionTime)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("runScript")
|
||||
static void rl$runScript(RSScriptEvent event, int maxExecutionTime)
|
||||
static void copy$runScript(RSScriptEvent event, int maxExecutionTime)
|
||||
{
|
||||
Object[] arguments = event.getArguments();
|
||||
assert arguments != null && arguments.length > 0;
|
||||
@@ -164,7 +159,7 @@ public abstract class ScriptVMMixin implements RSClient
|
||||
try
|
||||
{
|
||||
rootScriptEvent = event;
|
||||
rs$runScript(event, maxExecutionTime);
|
||||
copy$runScript(event, maxExecutionTime);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -57,13 +57,9 @@ public abstract class SoundEffectMixin implements RSClient
|
||||
private static int lastSoundEffectSourceNPCid;
|
||||
|
||||
@Copy("updateActorSequence")
|
||||
public static void rs$updateActorSequence(RSActor actor, int size)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("updateActorSequence")
|
||||
public static void rl$updateActorSequence(RSActor actor, int size)
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public static void copy$updateActorSequence(RSActor actor, int size)
|
||||
{
|
||||
if (actor instanceof RSNPC)
|
||||
{
|
||||
@@ -71,7 +67,7 @@ public abstract class SoundEffectMixin implements RSClient
|
||||
}
|
||||
lastSoundEffectSourceActor = actor;
|
||||
|
||||
rs$updateActorSequence(actor, size);
|
||||
copy$updateActorSequence(actor, size);
|
||||
|
||||
lastSoundEffectSourceActor = null;
|
||||
}
|
||||
|
||||
@@ -35,13 +35,8 @@ public abstract class SpriteMixin implements RSClient
|
||||
}
|
||||
|
||||
@Copy("SpriteBuffer_getSprite")
|
||||
public static RSSprite rs$loadSprite(RSAbstractArchive var0, int var1, int var2)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("SpriteBuffer_getSprite")
|
||||
public static RSSprite rl$loadSprite(RSAbstractArchive var0, int var1, int var2)
|
||||
public static RSSprite copy$loadSprite(RSAbstractArchive var0, int var1, int var2)
|
||||
{
|
||||
Sprite sprite = spriteOverrides.get(var1);
|
||||
|
||||
@@ -50,6 +45,6 @@ public abstract class SpriteMixin implements RSClient
|
||||
return (RSSprite) sprite;
|
||||
}
|
||||
|
||||
return rs$loadSprite(var0, var1, var2);
|
||||
return copy$loadSprite(var0, var1, var2);
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,9 @@ public abstract class StretchedModeMaxSizeMixin implements RSGameShell
|
||||
private static RSClient client;
|
||||
|
||||
@Copy("resizeCanvas")
|
||||
abstract void rs$resizeCanvas();
|
||||
|
||||
@Replace("resizeCanvas")
|
||||
public void rl$resizeCanvas()
|
||||
@SuppressWarnings("InfiniteRecursion")
|
||||
public void copy$resizeCanvas()
|
||||
{
|
||||
if (client.isStretchedEnabled())
|
||||
{
|
||||
@@ -33,20 +32,18 @@ public abstract class StretchedModeMaxSizeMixin implements RSGameShell
|
||||
}
|
||||
}
|
||||
|
||||
rs$resizeCanvas();
|
||||
copy$resizeCanvas();
|
||||
}
|
||||
|
||||
@Copy("setMaxCanvasSize")
|
||||
abstract void rs$setMaxCanvasSize(int width, int height);
|
||||
|
||||
@Replace("setMaxCanvasSize")
|
||||
public void rl$setMaxCanvasSize(int width, int height)
|
||||
public void copy$setMaxCanvasSize(int width, int height)
|
||||
{
|
||||
if (client.isStretchedEnabled() && client.isResized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rs$setMaxCanvasSize(width, height);
|
||||
copy$setMaxCanvasSize(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,8 @@ public abstract class WidgetSpriteMixin implements RSWidget
|
||||
private static Map<Integer, Sprite> widgetSpriteOverrides;
|
||||
|
||||
@Copy("getSprite")
|
||||
public RSSprite rs$getWidgetSprite(boolean var1)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
@Replace("getSprite")
|
||||
public RSSprite rl$getWidgetSprite(boolean var1)
|
||||
public RSSprite copy$getWidgetSprite(boolean var1)
|
||||
{
|
||||
if (getSpriteId() != -1)
|
||||
{
|
||||
@@ -35,7 +30,7 @@ public abstract class WidgetSpriteMixin implements RSWidget
|
||||
}
|
||||
}
|
||||
|
||||
return rs$getWidgetSprite(var1);
|
||||
return copy$getWidgetSprite(var1);
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
||||
Reference in New Issue
Block a user