Fix api for upstream merge
This commit is contained in:
@@ -249,13 +249,11 @@ public interface Client extends GameShell
|
||||
|
||||
/**
|
||||
* Gets the canvas height
|
||||
* @return
|
||||
*/
|
||||
int getCanvasHeight();
|
||||
|
||||
/**
|
||||
* Gets the canvas width
|
||||
* @return
|
||||
*/
|
||||
int getCanvasWidth();
|
||||
|
||||
@@ -707,7 +705,7 @@ public interface Client extends GameShell
|
||||
* @param varps passed varbits
|
||||
* @param varbitId the variable ID
|
||||
* @return the value
|
||||
* @see Varbits#id
|
||||
* @see Varbits
|
||||
*/
|
||||
int getVarbitValue(int[] varps, int varbitId);
|
||||
|
||||
@@ -737,7 +735,7 @@ public interface Client extends GameShell
|
||||
* @param varps passed varbits
|
||||
* @param varbit the variable
|
||||
* @param value the value
|
||||
* @see Varbits#id
|
||||
* @see Varbits
|
||||
*/
|
||||
void setVarbitValue(int[] varps, int varbit, int value);
|
||||
|
||||
@@ -781,8 +779,6 @@ public interface Client extends GameShell
|
||||
|
||||
/**
|
||||
* Get the total experience of the player
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long getOverallExperience();
|
||||
|
||||
@@ -1083,15 +1079,11 @@ public interface Client extends GameShell
|
||||
|
||||
/**
|
||||
* Gets the clan owner of the currently joined clan chat
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getClanOwner();
|
||||
|
||||
/**
|
||||
* Gets the clan chat name of the currently joined clan chat
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getClanChatName();
|
||||
|
||||
@@ -1104,22 +1096,16 @@ public interface Client extends GameShell
|
||||
|
||||
/**
|
||||
* Gets the number of friends on the friends list.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getFriendsCount();
|
||||
|
||||
/**
|
||||
* Gets an array of players on the ignore list.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Ignore[] getIgnores();
|
||||
|
||||
/**
|
||||
* Gets the number of ignored players on the ignore list.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getIgnoreCount();
|
||||
|
||||
@@ -1623,14 +1609,11 @@ public interface Client extends GameShell
|
||||
|
||||
/**
|
||||
* Get the if1 widget whose item is being dragged
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Widget getIf1DraggedWidget();
|
||||
|
||||
/**
|
||||
* Get the item index of the item being dragged on an if1 widget
|
||||
* @return
|
||||
*/
|
||||
int getIf1DraggedItemIndex();
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.Constants;
|
||||
import net.runelite.api.MainBufferProvider;
|
||||
import net.runelite.api.NullItemID;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.RenderOverview;
|
||||
import net.runelite.api.Renderable;
|
||||
import net.runelite.api.WorldMapManager;
|
||||
@@ -375,9 +374,6 @@ public class Hooks implements Callbacks
|
||||
|
||||
/**
|
||||
* Copy an image
|
||||
*
|
||||
* @param src
|
||||
* @return
|
||||
*/
|
||||
private static Image copy(Image src)
|
||||
{
|
||||
@@ -397,18 +393,6 @@ public class Hooks implements Callbacks
|
||||
BufferedImage image = (BufferedImage) bufferProvider.getImage();
|
||||
Graphics2D graphics2d = image.createGraphics();
|
||||
|
||||
// Update selected scene tile
|
||||
if (!client.isMenuOpen())
|
||||
{
|
||||
Point p = client.getMouseCanvasPosition();
|
||||
p = new Point(
|
||||
p.getX() - client.getViewportXOffset(),
|
||||
p.getY() - client.getViewportYOffset());
|
||||
|
||||
client.setCheckClick(true);
|
||||
client.setMouseCanvasHoverPosition(p);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
renderer.render(graphics2d, OverlayLayer.ABOVE_SCENE);
|
||||
|
||||
@@ -130,8 +130,8 @@ public class DevToolsPlugin extends Plugin
|
||||
private DevToolsButton detachedCamera;
|
||||
private DevToolsButton widgetInspector;
|
||||
private DevToolsButton varInspector;
|
||||
private DevToolsButton soundEffects;
|
||||
private DevToolsButton logMenuActions;
|
||||
private DevToolsButton soundEffects;
|
||||
private NavigationButton navButton;
|
||||
|
||||
@Provides
|
||||
@@ -158,22 +158,27 @@ public class DevToolsPlugin extends Plugin
|
||||
|
||||
location = new DevToolsButton("Location");
|
||||
worldMapLocation = new DevToolsButton("World Map Location");
|
||||
|
||||
tileLocation = new DevToolsButton("Tile Location");
|
||||
cursorPos = new DevToolsButton("Cursor Position");
|
||||
|
||||
cameraPosition = new DevToolsButton("Camera Position");
|
||||
|
||||
chunkBorders = new DevToolsButton("Chunk Borders");
|
||||
mapSquares = new DevToolsButton("Map Squares");
|
||||
|
||||
mapSquares = new DevToolsButton("Map Squares");
|
||||
lineOfSight = new DevToolsButton("Line Of Sight");
|
||||
|
||||
validMovement = new DevToolsButton("Valid Movement");
|
||||
interacting = new DevToolsButton("Interacting");
|
||||
examine = new DevToolsButton("Examine");
|
||||
|
||||
examine = new DevToolsButton("Examine");
|
||||
detachedCamera = new DevToolsButton("Detached Camera");
|
||||
|
||||
widgetInspector = new DevToolsButton("Widget Inspector");
|
||||
varInspector = new DevToolsButton("Var Inspector");
|
||||
|
||||
soundEffects = new DevToolsButton("Sound Effects");
|
||||
logMenuActions = new DevToolsButton("Menu Actions");
|
||||
|
||||
overlayManager.add(overlay);
|
||||
overlayManager.add(locationOverlay);
|
||||
@@ -183,8 +188,6 @@ public class DevToolsPlugin extends Plugin
|
||||
overlayManager.add(mapRegionOverlay);
|
||||
overlayManager.add(soundEffectOverlay);
|
||||
|
||||
logMenuActions = new DevToolsButton("Menu Actions");
|
||||
|
||||
final DevToolsPanel panel = injector.getInstance(DevToolsPanel.class);
|
||||
|
||||
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(getClass(), "devtools_icon.png");
|
||||
|
||||
@@ -88,7 +88,6 @@ public class WidgetField<T>
|
||||
}
|
||||
else
|
||||
{
|
||||
setter.accept(widget, (T) value);
|
||||
log.warn("Type {} is not supported for editing", type);
|
||||
}
|
||||
setter.accept(widget, (T) value);
|
||||
|
||||
@@ -47,7 +47,7 @@ class WorldMapRegionOverlay extends Overlay
|
||||
private static final int LABEL_PADDING = 4;
|
||||
private static final int REGION_SIZE = 1 << 6;
|
||||
// Bitmask to return first coordinate in region
|
||||
private static final int REGION_TRUNCATE = -(1 << 6);
|
||||
private static final int REGION_TRUNCATE = ~((1 << 6) - 1);
|
||||
private final Client client;
|
||||
private final DevToolsPlugin plugin;
|
||||
|
||||
|
||||
@@ -31,16 +31,16 @@ 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.RSRawPcmStream;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
import net.runelite.rs.api.RSRawAudioNode;
|
||||
import net.runelite.rs.api.RSRawSound;
|
||||
import net.runelite.rs.api.RSSoundEffect;
|
||||
import net.runelite.rs.api.RSTaskDataNode;
|
||||
import net.runelite.rs.api.RSPcmStream;
|
||||
|
||||
@Mixin(RSClient.class)
|
||||
public abstract class SoundEffectMixin implements RSClient
|
||||
{
|
||||
@Shadow("clientInstance")
|
||||
@Shadow("client")
|
||||
private static RSClient client;
|
||||
|
||||
@Inject
|
||||
@@ -99,14 +99,14 @@ public abstract class SoundEffectMixin implements RSClient
|
||||
volume = soundEffectVolume;
|
||||
}
|
||||
|
||||
RSRawAudioNode rawAudioNode = soundEffect.toRawAudioNode().applyResampler(getSoundEffectResampler());
|
||||
RSAudioTaskNode audioTaskNode = createSoundEffectAudioTaskNode(rawAudioNode, 100, volume);
|
||||
audioTaskNode.setNumLoops(1);
|
||||
RSRawSound rawAudioNode = soundEffect.toRawAudioNode().applyResampler(getSoundEffectResampler());
|
||||
RSRawPcmStream rawPcmStream = createRawPcmStream(rawAudioNode, 100, volume);
|
||||
rawPcmStream.setNumLoops(1);
|
||||
|
||||
getSoundEffectAudioQueue().queueAudioTaskNode((RSTaskDataNode) audioTaskNode);
|
||||
getSoundEffectAudioQueue().addSubStream((RSPcmStream) rawPcmStream);
|
||||
}
|
||||
|
||||
@FieldHook("queuedSoundEffectCount")
|
||||
@FieldHook("soundEffectCount")
|
||||
@Inject
|
||||
public static void queuedSoundEffectCountChanged(int idx)
|
||||
{
|
||||
|
||||
@@ -1014,23 +1014,20 @@ public interface RSClient extends RSGameShell, Client
|
||||
@Import("isSpellSelected")
|
||||
boolean getIsSpellSelected();
|
||||
|
||||
@Import("healthBarSpriteCache")
|
||||
RSNodeCache getHealthBarSpriteCache();
|
||||
@Import("readSoundEffect")
|
||||
RSSoundEffect getTrack(RSAbstractIndexCache indexData, int id, int var0);
|
||||
|
||||
@Import("getTrack")
|
||||
RSSoundEffect getTrack(RSIndexData indexData, int id, int var0);
|
||||
@Import("createRawPcmStream")
|
||||
RSRawPcmStream createRawPcmStream(RSRawSound audioNode, int var0, int volume);
|
||||
|
||||
@Import("createSoundEffectAudioTaskNode")
|
||||
RSAudioTaskNode createSoundEffectAudioTaskNode(RSRawAudioNode audioNode, int var0, int volume);
|
||||
|
||||
@Import("soundEffectAudioQueue")
|
||||
RSAudioTaskNodeQueue getSoundEffectAudioQueue();
|
||||
@Import("pcmStreamMixer")
|
||||
RSPcmStreamMixer getSoundEffectAudioQueue();
|
||||
|
||||
@Import("indexCache4")
|
||||
RSIndexData getIndexCache4();
|
||||
RSAbstractIndexCache getIndexCache4();
|
||||
|
||||
@Import("soundEffectResampler")
|
||||
RSResampler getSoundEffectResampler();
|
||||
@Import("decimator")
|
||||
RSDecimator getSoundEffectResampler();
|
||||
|
||||
@Import("soundEffectVolume")
|
||||
int getSoundEffectVolume();
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
*/
|
||||
package net.runelite.rs.api;
|
||||
|
||||
public interface RSResampler
|
||||
public interface RSDecimator
|
||||
{
|
||||
}
|
||||
@@ -24,6 +24,6 @@
|
||||
*/
|
||||
package net.runelite.rs.api;
|
||||
|
||||
public interface RSTaskDataNode
|
||||
public interface RSPcmStream
|
||||
{
|
||||
}
|
||||
@@ -26,8 +26,8 @@ package net.runelite.rs.api;
|
||||
|
||||
import net.runelite.mapping.Import;
|
||||
|
||||
public interface RSRawAudioNode
|
||||
public interface RSPcmStreamMixer
|
||||
{
|
||||
@Import("applyResampler")
|
||||
RSRawAudioNode applyResampler(RSResampler resampler);
|
||||
@Import("addSubStream")
|
||||
void addSubStream(RSPcmStream taskDataNode);
|
||||
}
|
||||
@@ -26,7 +26,7 @@ package net.runelite.rs.api;
|
||||
|
||||
import net.runelite.mapping.Import;
|
||||
|
||||
public interface RSAudioTaskNode
|
||||
public interface RSRawPcmStream
|
||||
{
|
||||
@Import("setNumLoops")
|
||||
void setNumLoops(int numLoops);
|
||||
@@ -26,8 +26,8 @@ package net.runelite.rs.api;
|
||||
|
||||
import net.runelite.mapping.Import;
|
||||
|
||||
public interface RSAudioTaskNodeQueue
|
||||
public interface RSRawSound
|
||||
{
|
||||
@Import("queueAudioTaskNode")
|
||||
void queueAudioTaskNode(RSTaskDataNode taskDataNode);
|
||||
@Import("resample")
|
||||
RSRawSound applyResampler(RSDecimator resampler);
|
||||
}
|
||||
@@ -1,9 +1,33 @@
|
||||
/*
|
||||
* 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();
|
||||
@Import("toRawSound")
|
||||
RSRawSound toRawAudioNode();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ public final class Bzip2State {
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1860254567
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@Export("__i")
|
||||
|
||||
@@ -296,8 +296,8 @@ public final class Client extends GameShell implements Usernamed {
|
||||
@Export("indexCacheLoaderIndex")
|
||||
static int indexCacheLoaderIndex;
|
||||
@ObfuscatedName("qn")
|
||||
@Export("unknownSoundValues1")
|
||||
static int[] unknownSoundValues1;
|
||||
@Export("queuedSoundEffectLoops")
|
||||
static int[] queuedSoundEffectLoops;
|
||||
@ObfuscatedName("qd")
|
||||
@Export("queuedSoundEffectDelays")
|
||||
static int[] queuedSoundEffectDelays;
|
||||
@@ -380,8 +380,8 @@ public final class Client extends GameShell implements Usernamed {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1352723865
|
||||
)
|
||||
@Export("__client_qp")
|
||||
static int __client_qp;
|
||||
@Export("soundEffectVolume")
|
||||
static int soundEffectVolume;
|
||||
@ObfuscatedName("rm")
|
||||
@Export("__client_rm")
|
||||
static short __client_rm;
|
||||
@@ -1602,11 +1602,11 @@ public final class Client extends GameShell implements Usernamed {
|
||||
__client_qf = 255;
|
||||
__client_qy = -1;
|
||||
__client_qq = false;
|
||||
__client_qp = 127;
|
||||
soundEffectVolume = 127;
|
||||
__client_qc = 127;
|
||||
soundEffectCount = 0;
|
||||
soundEffectIds = new int[50];
|
||||
unknownSoundValues1 = new int[50];
|
||||
queuedSoundEffectLoops = new int[50];
|
||||
queuedSoundEffectDelays = new int[50];
|
||||
soundLocations = new int[50];
|
||||
soundEffects = new SoundEffect[50];
|
||||
@@ -4803,8 +4803,8 @@ public final class Client extends GameShell implements Usernamed {
|
||||
SoundEffect var16 = SoundEffect.readSoundEffect(class25.indexCache4, var15.soundEffectId, 0);
|
||||
if(var16 != null) {
|
||||
RawSound var17 = var16.toRawSound().resample(MilliClock.decimator);
|
||||
RawPcmStream var18 = RawPcmStream.method2497(var17, 100, var7);
|
||||
var18.__x_181(-1);
|
||||
RawPcmStream var18 = RawPcmStream.createRawPcmStream(var17, 100, var7);
|
||||
var18.setNumLoops(-1);
|
||||
TaskHandler.pcmStreamMixer.addSubStream(var18);
|
||||
var15.stream1 = var18;
|
||||
}
|
||||
@@ -4820,8 +4820,8 @@ public final class Client extends GameShell implements Usernamed {
|
||||
SoundEffect var20 = SoundEffect.readSoundEffect(class25.indexCache4, var15.soundEffectIds[var8], 0);
|
||||
if(var20 != null) {
|
||||
RawSound var21 = var20.toRawSound().resample(MilliClock.decimator);
|
||||
RawPcmStream var19 = RawPcmStream.method2497(var21, 100, var7);
|
||||
var19.__x_181(0);
|
||||
RawPcmStream var19 = RawPcmStream.createRawPcmStream(var21, 100, var7);
|
||||
var19.setNumLoops(0);
|
||||
TaskHandler.pcmStreamMixer.addSubStream(var19);
|
||||
var15.stream2 = var19;
|
||||
var15.__n = var15.__x + (int)(Math.random() * (double)(var15.__d - var15.__x));
|
||||
|
||||
@@ -53,7 +53,6 @@ public class HitSplatDefinition extends DualNode {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1151968735
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
public int __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
|
||||
@@ -48,9 +48,9 @@ public class Ignored extends User {
|
||||
)
|
||||
@Export("queueSoundEffect")
|
||||
static void queueSoundEffect(int var0, int var1, int var2) {
|
||||
if(Client.__client_qp != 0 && var1 != 0 && Client.soundEffectCount < 50) {
|
||||
if(Client.soundEffectVolume != 0 && var1 != 0 && Client.soundEffectCount < 50) {
|
||||
Client.soundEffectIds[Client.soundEffectCount] = var0;
|
||||
Client.unknownSoundValues1[Client.soundEffectCount] = var1;
|
||||
Client.queuedSoundEffectLoops[Client.soundEffectCount] = var1;
|
||||
Client.queuedSoundEffectDelays[Client.soundEffectCount] = var2;
|
||||
Client.soundEffects[Client.soundEffectCount] = null;
|
||||
Client.soundLocations[Client.soundEffectCount] = 0;
|
||||
|
||||
@@ -480,23 +480,23 @@ public class IndexCache extends AbstractIndexCache {
|
||||
|
||||
if(var4 == 4) {
|
||||
if(var2 == 0) {
|
||||
Client.__client_qp = 127;
|
||||
Client.soundEffectVolume = 127;
|
||||
}
|
||||
|
||||
if(var2 == 1) {
|
||||
Client.__client_qp = 96;
|
||||
Client.soundEffectVolume = 96;
|
||||
}
|
||||
|
||||
if(var2 == 2) {
|
||||
Client.__client_qp = 64;
|
||||
Client.soundEffectVolume = 64;
|
||||
}
|
||||
|
||||
if(var2 == 3) {
|
||||
Client.__client_qp = 32;
|
||||
Client.soundEffectVolume = 32;
|
||||
}
|
||||
|
||||
if(var2 == 4) {
|
||||
Client.__client_qp = 0;
|
||||
Client.soundEffectVolume = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ public class MidiPcmStream extends PcmStream {
|
||||
@Export("__k")
|
||||
int[] __k;
|
||||
@ObfuscatedName("n")
|
||||
@Export("surfaceOffsetY")
|
||||
int[] __n;
|
||||
@ObfuscatedName("y")
|
||||
@Export("__y")
|
||||
@@ -435,7 +434,7 @@ public class MidiPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
if(var9.__q[var2] < 0) {
|
||||
var6.stream.__x_181(-1);
|
||||
var6.stream.setNumLoops(-1);
|
||||
}
|
||||
|
||||
if(var6.__o >= 0) {
|
||||
|
||||
@@ -89,7 +89,6 @@ public class MusicPatchNode extends Node {
|
||||
@ObfuscatedGetter(
|
||||
intValue = 476852577
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MusicPatchPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
if(var1.patch.__q[var1.__u] < 0) {
|
||||
var1.stream.__x_181(-1);
|
||||
var1.stream.setNumLoops(-1);
|
||||
}
|
||||
|
||||
var10.__v_192(var8);
|
||||
@@ -112,7 +112,7 @@ public class MusicPatchPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
if(var1.patch.__q[var1.__u] < 0) {
|
||||
var1.stream.__x_181(-1);
|
||||
var1.stream.setNumLoops(-1);
|
||||
}
|
||||
|
||||
var2 = var1.__b / var3;
|
||||
|
||||
@@ -86,7 +86,6 @@ public final class ObjectSound extends Node {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1041508847
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedSignature(
|
||||
|
||||
@@ -83,7 +83,6 @@ public final class Occluder {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -407777817
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
|
||||
@@ -87,7 +87,6 @@ public class PacketWriter {
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lge;"
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
ServerPacket __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedSignature(
|
||||
|
||||
@@ -28,8 +28,8 @@ public class RawPcmStream extends PcmStream {
|
||||
@Export("__l")
|
||||
int __l;
|
||||
@ObfuscatedName("e")
|
||||
@Export("__e")
|
||||
int __e;
|
||||
@Export("numLoops")
|
||||
int numLoops;
|
||||
@ObfuscatedName("x")
|
||||
@Export("start")
|
||||
int start;
|
||||
@@ -40,7 +40,6 @@ public class RawPcmStream extends PcmStream {
|
||||
@Export("__k")
|
||||
boolean __k;
|
||||
@ObfuscatedName("n")
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@Export("__i")
|
||||
@@ -122,7 +121,7 @@ public class RawPcmStream extends PcmStream {
|
||||
int var7 = var4.samples.length << 8;
|
||||
int var8 = var6 - var5;
|
||||
if(var8 <= 0) {
|
||||
this.__e = 0;
|
||||
this.numLoops = 0;
|
||||
}
|
||||
|
||||
int var9 = var2;
|
||||
@@ -147,7 +146,7 @@ public class RawPcmStream extends PcmStream {
|
||||
this.__m = var7 - 1;
|
||||
}
|
||||
|
||||
if(this.__e < 0) {
|
||||
if(this.numLoops < 0) {
|
||||
if(this.__k) {
|
||||
if(this.__f < 0) {
|
||||
var9 = this.__ap_203(var1, var2, var5, var3, var4.samples[this.start]);
|
||||
@@ -195,7 +194,7 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(this.__e > 0) {
|
||||
if(this.numLoops > 0) {
|
||||
if(this.__k) {
|
||||
label140: {
|
||||
if(this.__f < 0) {
|
||||
@@ -206,7 +205,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var5 + var5 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
if(--this.__e == 0) {
|
||||
if(--this.numLoops == 0) {
|
||||
break label140;
|
||||
}
|
||||
}
|
||||
@@ -219,7 +218,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var6 + var6 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
if(--this.__e == 0) {
|
||||
if(--this.numLoops == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -230,7 +229,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var5 + var5 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
} while(--this.__e != 0);
|
||||
} while(--this.numLoops != 0);
|
||||
}
|
||||
} else {
|
||||
int var10;
|
||||
@@ -242,14 +241,14 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
var10 = (var6 - 1 - this.__m) / var8;
|
||||
if(var10 >= this.__e) {
|
||||
this.__m += var8 * this.__e;
|
||||
this.__e = 0;
|
||||
if(var10 >= this.numLoops) {
|
||||
this.__m += var8 * this.numLoops;
|
||||
this.numLoops = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
this.__m += var8 * var10;
|
||||
this.__e -= var10;
|
||||
this.numLoops -= var10;
|
||||
}
|
||||
} else {
|
||||
while(true) {
|
||||
@@ -259,14 +258,14 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
var10 = (this.__m - var5) / var8;
|
||||
if(var10 >= this.__e) {
|
||||
this.__m -= var8 * this.__e;
|
||||
this.__e = 0;
|
||||
if(var10 >= this.numLoops) {
|
||||
this.__m -= var8 * this.numLoops;
|
||||
this.numLoops = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
this.__m -= var8 * var10;
|
||||
this.__e -= var10;
|
||||
this.numLoops -= var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,9 +292,9 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
@ObfuscatedName("x")
|
||||
@Export("__x_181")
|
||||
public synchronized void __x_181(int var1) {
|
||||
this.__e = var1;
|
||||
@Export("setNumLoops")
|
||||
public synchronized void setNumLoops(int var1) {
|
||||
this.numLoops = var1;
|
||||
}
|
||||
|
||||
@ObfuscatedName("d")
|
||||
@@ -327,7 +326,7 @@ public class RawPcmStream extends PcmStream {
|
||||
int var5 = var2.samples.length << 8;
|
||||
int var6 = var4 - var3;
|
||||
if(var6 <= 0) {
|
||||
this.__e = 0;
|
||||
this.numLoops = 0;
|
||||
}
|
||||
|
||||
if(this.__m < 0) {
|
||||
@@ -351,7 +350,7 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
this.__m += this.__f * var1;
|
||||
if(this.__e < 0) {
|
||||
if(this.numLoops < 0) {
|
||||
if(!this.__k) {
|
||||
if(this.__f < 0) {
|
||||
if(this.__m >= var3) {
|
||||
@@ -390,7 +389,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
}
|
||||
} else {
|
||||
if(this.__e > 0) {
|
||||
if(this.numLoops > 0) {
|
||||
if(this.__k) {
|
||||
label123: {
|
||||
if(this.__f < 0) {
|
||||
@@ -400,7 +399,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var3 + var3 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
if(--this.__e == 0) {
|
||||
if(--this.numLoops == 0) {
|
||||
break label123;
|
||||
}
|
||||
}
|
||||
@@ -412,7 +411,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var4 + var4 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
if(--this.__e == 0) {
|
||||
if(--this.numLoops == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -422,7 +421,7 @@ public class RawPcmStream extends PcmStream {
|
||||
|
||||
this.__m = var3 + var3 - 1 - this.__m;
|
||||
this.__f = -this.__f;
|
||||
} while(--this.__e != 0);
|
||||
} while(--this.numLoops != 0);
|
||||
}
|
||||
} else {
|
||||
int var7;
|
||||
@@ -432,28 +431,28 @@ public class RawPcmStream extends PcmStream {
|
||||
}
|
||||
|
||||
var7 = (var4 - 1 - this.__m) / var6;
|
||||
if(var7 < this.__e) {
|
||||
if(var7 < this.numLoops) {
|
||||
this.__m += var6 * var7;
|
||||
this.__e -= var7;
|
||||
this.numLoops -= var7;
|
||||
return;
|
||||
}
|
||||
|
||||
this.__m += var6 * this.__e;
|
||||
this.__e = 0;
|
||||
this.__m += var6 * this.numLoops;
|
||||
this.numLoops = 0;
|
||||
} else {
|
||||
if(this.__m < var4) {
|
||||
return;
|
||||
}
|
||||
|
||||
var7 = (this.__m - var3) / var6;
|
||||
if(var7 < this.__e) {
|
||||
if(var7 < this.numLoops) {
|
||||
this.__m -= var6 * var7;
|
||||
this.__e -= var7;
|
||||
this.numLoops -= var7;
|
||||
return;
|
||||
}
|
||||
|
||||
this.__m -= var6 * this.__e;
|
||||
this.__e = 0;
|
||||
this.__m -= var6 * this.numLoops;
|
||||
this.numLoops = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -779,9 +778,9 @@ public class RawPcmStream extends PcmStream {
|
||||
int __az_179() {
|
||||
int var1 = this.__u * 3 >> 6;
|
||||
var1 = (var1 ^ var1 >> 31) + (var1 >>> 31);
|
||||
if(this.__e == 0) {
|
||||
if(this.numLoops == 0) {
|
||||
var1 -= var1 * this.__m / (((RawSound)super.sound).samples.length << 8);
|
||||
} else if(this.__e >= 0) {
|
||||
} else if(this.numLoops >= 0) {
|
||||
var1 -= var1 * this.start / ((RawSound)super.sound).samples.length;
|
||||
}
|
||||
|
||||
@@ -872,7 +871,8 @@ public class RawPcmStream extends PcmStream {
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lcx;II)Lds;"
|
||||
)
|
||||
public static RawPcmStream method2497(RawSound var0, int var1, int var2) {
|
||||
@Export("createRawPcmStream")
|
||||
public static RawPcmStream createRawPcmStream(RawSound var0, int var1, int var2) {
|
||||
return var0.samples != null && var0.samples.length != 0?new RawPcmStream(var0, (int)((long)var0.sampleRate * 256L * (long)var1 / (long)(class309.PcmPlayer_sampleRate * 100)), var2 << 6):null;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ public class Scene {
|
||||
@Export("Scene_selectedY")
|
||||
public static int Scene_selectedY;
|
||||
@ObfuscatedName("ab")
|
||||
@Export("__em_ab")
|
||||
static boolean __em_ab;
|
||||
@Export("viewportWalking")
|
||||
static boolean viewportWalking;
|
||||
@ObfuscatedName("ad")
|
||||
@Export("Scene_planesCount")
|
||||
static int Scene_planesCount;
|
||||
@@ -207,7 +207,7 @@ public class Scene {
|
||||
Scene_selectedScreenY = 0;
|
||||
Scene_selectedX = -1;
|
||||
Scene_selectedY = -1;
|
||||
__em_ab = false;
|
||||
viewportWalking = false;
|
||||
Scene_planesCount = 4;
|
||||
Scene_planeOccluderCounts = new int[Scene_planesCount];
|
||||
Scene_planeOccluders = new Occluder[Scene_planesCount][500];
|
||||
@@ -1066,7 +1066,7 @@ public class Scene {
|
||||
public void menuOpen(int var1, int var2, int var3, boolean var4) {
|
||||
if(!method3187() || var4) {
|
||||
checkClick = true;
|
||||
__em_ab = var4;
|
||||
viewportWalking = var4;
|
||||
Scene_selectedPlane = var1;
|
||||
Scene_selectedScreenX = var2;
|
||||
Scene_selectedScreenY = var3;
|
||||
@@ -1078,7 +1078,7 @@ public class Scene {
|
||||
@ObfuscatedName("as")
|
||||
@Export("__as_250")
|
||||
public void __as_250() {
|
||||
__em_ab = true;
|
||||
viewportWalking = true;
|
||||
}
|
||||
|
||||
@ObfuscatedName("az")
|
||||
@@ -2561,13 +2561,13 @@ public class Scene {
|
||||
|
||||
@ObfuscatedName("am")
|
||||
public static boolean method3187() {
|
||||
return __em_ab && Scene_selectedX != -1;
|
||||
return viewportWalking && Scene_selectedX != -1;
|
||||
}
|
||||
|
||||
@ObfuscatedName("an")
|
||||
public static void method3103() {
|
||||
Scene_selectedX = -1;
|
||||
__em_ab = false;
|
||||
viewportWalking = false;
|
||||
}
|
||||
|
||||
@ObfuscatedName("ax")
|
||||
|
||||
@@ -124,7 +124,7 @@ public class Script extends DualNode {
|
||||
int var6 = var4 >> 4 & 7;
|
||||
int var7 = var4 & 15;
|
||||
Client.soundEffectIds[Client.soundEffectCount] = var5;
|
||||
Client.unknownSoundValues1[Client.soundEffectCount] = var6;
|
||||
Client.queuedSoundEffectLoops[Client.soundEffectCount] = var6;
|
||||
Client.queuedSoundEffectDelays[Client.soundEffectCount] = 0;
|
||||
Client.soundEffects[Client.soundEffectCount] = null;
|
||||
int var8 = (var2 - 64) / 128;
|
||||
|
||||
@@ -10,13 +10,10 @@ import net.runelite.mapping.ObfuscatedSignature;
|
||||
@Implements("WorldMapAreaData")
|
||||
public class WorldMapAreaData extends WorldMapArea {
|
||||
@ObfuscatedName("n")
|
||||
@Export("surfaceOffsetY")
|
||||
HashSet __n;
|
||||
@ObfuscatedName("i")
|
||||
@Export("__i")
|
||||
HashSet __i;
|
||||
@ObfuscatedName("a")
|
||||
@Export("__a")
|
||||
List __a;
|
||||
|
||||
@ObfuscatedName("ce")
|
||||
|
||||
@@ -171,13 +171,13 @@ public class WorldMapIcon1 extends AbstractWorldMapIcon {
|
||||
|
||||
var2 = (var3 - var8) * Client.__client_qc / var3;
|
||||
} else {
|
||||
var2 = Client.__client_qp;
|
||||
var2 = Client.soundEffectVolume;
|
||||
}
|
||||
|
||||
if(var2 > 0) {
|
||||
RawSound var10 = var9.toRawSound().resample(MilliClock.decimator);
|
||||
RawPcmStream var11 = RawPcmStream.method2497(var10, 100, var2);
|
||||
var11.__x_181(Client.unknownSoundValues1[var0] - 1);
|
||||
RawPcmStream var11 = RawPcmStream.createRawPcmStream(var10, 100, var2);
|
||||
var11.setNumLoops(Client.queuedSoundEffectLoops[var0] - 1);
|
||||
TaskHandler.pcmStreamMixer.addSubStream(var11);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public class WorldMapIcon1 extends AbstractWorldMapIcon {
|
||||
for(int var1 = var0; var1 < Client.soundEffectCount; ++var1) {
|
||||
Client.soundEffectIds[var1] = Client.soundEffectIds[var1 + 1];
|
||||
Client.soundEffects[var1] = Client.soundEffects[var1 + 1];
|
||||
Client.unknownSoundValues1[var1] = Client.unknownSoundValues1[var1 + 1];
|
||||
Client.queuedSoundEffectLoops[var1] = Client.queuedSoundEffectLoops[var1 + 1];
|
||||
Client.queuedSoundEffectDelays[var1] = Client.queuedSoundEffectDelays[var1 + 1];
|
||||
Client.soundLocations[var1] = Client.soundLocations[var1 + 1];
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ public class WorldMapSection0 implements WorldMapSection {
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1657956317
|
||||
)
|
||||
@Export("surfaceOffsetY")
|
||||
int __n;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
|
||||
@@ -208,7 +208,7 @@ public class class16 {
|
||||
var10 = var7 + 1;
|
||||
if(Canvas.localPlayer.pathX[0] >= var3 - var10 && Canvas.localPlayer.pathX[0] <= var10 + var3 && Canvas.localPlayer.pathY[0] >= var38 - var10 && Canvas.localPlayer.pathY[0] <= var10 + var38 && Client.__client_qc != 0 && var8 > 0 && Client.soundEffectCount < 50) {
|
||||
Client.soundEffectIds[Client.soundEffectCount] = var9;
|
||||
Client.unknownSoundValues1[Client.soundEffectCount] = var8;
|
||||
Client.queuedSoundEffectLoops[Client.soundEffectCount] = var8;
|
||||
Client.queuedSoundEffectDelays[Client.soundEffectCount] = var5;
|
||||
Client.soundEffects[Client.soundEffectCount] = null;
|
||||
Client.soundLocations[Client.soundEffectCount] = var7 + (var38 << 8) + (var3 << 16);
|
||||
|
||||
Reference in New Issue
Block a user