camera: remove our compass look op config
this is now in vanilla
This commit is contained in:
@@ -148,17 +148,6 @@ public interface CameraConfig extends Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "compassLook",
|
|
||||||
name = "Compass options",
|
|
||||||
description = "Adds Look South, East, and West options to the compass",
|
|
||||||
position = 10
|
|
||||||
)
|
|
||||||
default boolean compassLook()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "compassLookPreservePitch",
|
keyName = "compassLookPreservePitch",
|
||||||
name = "Preserve pitch on compass look",
|
name = "Preserve pitch on compass look",
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import com.google.common.primitives.Ints;
|
|||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.util.Arrays;
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
@@ -44,7 +43,6 @@ import net.runelite.api.events.BeforeRender;
|
|||||||
import net.runelite.api.events.ClientTick;
|
import net.runelite.api.events.ClientTick;
|
||||||
import net.runelite.api.events.FocusChanged;
|
import net.runelite.api.events.FocusChanged;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
|
||||||
import net.runelite.api.events.ScriptCallbackEvent;
|
import net.runelite.api.events.ScriptCallbackEvent;
|
||||||
import net.runelite.api.events.ScriptPreFired;
|
import net.runelite.api.events.ScriptPreFired;
|
||||||
import net.runelite.api.events.WidgetLoaded;
|
import net.runelite.api.events.WidgetLoaded;
|
||||||
@@ -77,11 +75,6 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
|||||||
private static final int DEFAULT_OUTER_ZOOM_LIMIT = 128;
|
private static final int DEFAULT_OUTER_ZOOM_LIMIT = 128;
|
||||||
static final int DEFAULT_INNER_ZOOM_LIMIT = 896;
|
static final int DEFAULT_INNER_ZOOM_LIMIT = 896;
|
||||||
|
|
||||||
private static final String LOOK_NORTH = "Look North";
|
|
||||||
private static final String LOOK_SOUTH = "Look South";
|
|
||||||
private static final String LOOK_EAST = "Look East";
|
|
||||||
private static final String LOOK_WEST = "Look West";
|
|
||||||
|
|
||||||
private boolean controlDown;
|
private boolean controlDown;
|
||||||
// flags used to store the mousedown states
|
// flags used to store the mousedown states
|
||||||
private boolean rightClick;
|
private boolean rightClick;
|
||||||
@@ -180,39 +173,6 @@ public class CameraPlugin extends Plugin implements KeyListener, MouseListener
|
|||||||
client.setInvertPitch(config.invertPitch());
|
client.setInvertPitch(config.invertPitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
|
||||||
{
|
|
||||||
if (menuEntryAdded.getType() == MenuAction.CC_OP.getId() && menuEntryAdded.getOption().equals(LOOK_NORTH) && config.compassLook())
|
|
||||||
{
|
|
||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
|
||||||
int len = menuEntries.length;
|
|
||||||
MenuEntry north = menuEntries[len - 1];
|
|
||||||
|
|
||||||
menuEntries = Arrays.copyOf(menuEntries, len + 3);
|
|
||||||
|
|
||||||
// The handling for these entries is done in ToplevelCompassOp.rs2asm
|
|
||||||
menuEntries[--len] = createCameraLookEntry(menuEntryAdded, 4, LOOK_WEST);
|
|
||||||
menuEntries[++len] = createCameraLookEntry(menuEntryAdded, 3, LOOK_EAST);
|
|
||||||
menuEntries[++len] = createCameraLookEntry(menuEntryAdded, 2, LOOK_SOUTH);
|
|
||||||
menuEntries[++len] = north;
|
|
||||||
|
|
||||||
client.setMenuEntries(menuEntries);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private MenuEntry createCameraLookEntry(MenuEntryAdded lookNorth, int identifier, String option)
|
|
||||||
{
|
|
||||||
MenuEntry m = new MenuEntry();
|
|
||||||
m.setOption(option);
|
|
||||||
m.setTarget(lookNorth.getTarget());
|
|
||||||
m.setIdentifier(identifier);
|
|
||||||
m.setType(MenuAction.CC_OP.getId());
|
|
||||||
m.setParam0(lookNorth.getActionParam0());
|
|
||||||
m.setParam1(lookNorth.getActionParam1());
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onScriptCallbackEvent(ScriptCallbackEvent event)
|
public void onScriptCallbackEvent(ScriptCallbackEvent event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
6A53DA1D918405E3F314E4350A9CF4002988E5C45E06D37A00AA725003FAD064
|
9365BC83CB2365C7BC3FBFC90C01232DD242740014E14D456BBAA0622D5570F0
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
.id 1050
|
.id 1050
|
||||||
.int_stack_count 1
|
.int_stack_count 1
|
||||||
.string_stack_count 0
|
.string_stack_count 0
|
||||||
.int_var_count 2 ; +1 for saving target angle
|
.int_var_count 1
|
||||||
.string_var_count 0
|
.string_var_count 0
|
||||||
; Remove check of op index
|
iload 0
|
||||||
; iload 0
|
iconst 4
|
||||||
; iconst 1
|
if_icmpgt LABEL10
|
||||||
; if_icmpne LABEL10
|
|
||||||
get_varbit 542
|
get_varbit 542
|
||||||
iconst 1
|
iconst 1
|
||||||
if_icmpeq LABEL10
|
if_icmpeq LABEL10
|
||||||
@@ -17,41 +16,55 @@
|
|||||||
LABEL10:
|
LABEL10:
|
||||||
return
|
return
|
||||||
LABEL11:
|
LABEL11:
|
||||||
; switch on op index
|
|
||||||
iload 0
|
|
||||||
switch
|
|
||||||
1: LOOK_NORTH
|
|
||||||
2: LOOK_SOUTH
|
|
||||||
3: LOOK_EAST
|
|
||||||
4: LOOK_WEST
|
|
||||||
jump LABEL10
|
|
||||||
LOOK_NORTH:
|
|
||||||
iconst 0
|
|
||||||
istore 1
|
|
||||||
jump LOOK
|
|
||||||
LOOK_SOUTH:
|
|
||||||
iconst 1024
|
|
||||||
istore 1
|
|
||||||
jump LOOK
|
|
||||||
LOOK_EAST:
|
|
||||||
iconst 1536
|
|
||||||
istore 1
|
|
||||||
jump LOOK
|
|
||||||
LOOK_WEST:
|
|
||||||
iconst 512
|
|
||||||
istore 1
|
|
||||||
jump LOOK
|
|
||||||
LOOK:
|
|
||||||
iconst 2266
|
iconst 2266
|
||||||
iconst 1
|
iconst 1
|
||||||
iconst 0
|
iconst 0
|
||||||
sound_synth
|
sound_synth
|
||||||
|
iload 0
|
||||||
|
switch
|
||||||
|
1: LABEL18
|
||||||
|
2: LABEL25
|
||||||
|
3: LABEL32
|
||||||
|
4: LABEL39
|
||||||
|
jump LABEL45
|
||||||
|
LABEL18:
|
||||||
iconst 225
|
iconst 225
|
||||||
iconst 5
|
iconst 5
|
||||||
randominc
|
randominc
|
||||||
add
|
add
|
||||||
sconst "lookPreservePitch"
|
sconst "lookPreservePitch"
|
||||||
runelite_callback
|
runelite_callback
|
||||||
iload 1 ; load target angle
|
iconst 0
|
||||||
cam_forceangle
|
cam_forceangle
|
||||||
|
jump LABEL45
|
||||||
|
LABEL25:
|
||||||
|
iconst 225
|
||||||
|
iconst 5
|
||||||
|
randominc
|
||||||
|
add
|
||||||
|
sconst "lookPreservePitch"
|
||||||
|
runelite_callback
|
||||||
|
iconst 1536
|
||||||
|
cam_forceangle
|
||||||
|
jump LABEL45
|
||||||
|
LABEL32:
|
||||||
|
iconst 225
|
||||||
|
iconst 5
|
||||||
|
randominc
|
||||||
|
add
|
||||||
|
sconst "lookPreservePitch"
|
||||||
|
runelite_callback
|
||||||
|
iconst 1024
|
||||||
|
cam_forceangle
|
||||||
|
jump LABEL45
|
||||||
|
LABEL39:
|
||||||
|
iconst 225
|
||||||
|
iconst 5
|
||||||
|
randominc
|
||||||
|
add
|
||||||
|
sconst "lookPreservePitch"
|
||||||
|
runelite_callback
|
||||||
|
iconst 512
|
||||||
|
cam_forceangle
|
||||||
|
LABEL45:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user