Skip to content

Commit 6137882

Browse files
committed
refactor: move last statics from Class55
1 parent 7a428a3 commit 6137882

File tree

6 files changed

+10
-16
lines changed

6 files changed

+10
-16
lines changed

src/main/java/org/runejs/client/Class55.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/main/java/org/runejs/client/Game.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public class Game {
9090
public static Class39 mouseCapturer;
9191
public static int anInt2591 = 0;
9292
public static int anInt874;
93+
public static int destinationY = 0;
9394
private static int gameServerPort;
9495
private static int duplicateClickCount = 0;
9596
private static int lastClickY = 0;
@@ -708,7 +709,7 @@ public static void setConfigToDefaults() {
708709
Game.playerCamera.setYaw(0x7ff & -10 + (int) (20.0 * Math.random()));
709710
Minimap.minimapState = 0;
710711
Player.localPlayerCount = 0;
711-
Class55.destinationY = 0;
712+
destinationY = 0;
712713
for (int i = 0; i < 2048; i++) {
713714
Player.trackedPlayers[i] = null;
714715
Player.trackedPlayerAppearanceCache[i] = null;
@@ -1840,7 +1841,7 @@ private static void renderNPCs(boolean arg0) {
18401841
}
18411842

18421843
private static void renderPlayers(int arg0, boolean arg1) {
1843-
if(Player.localPlayer.worldX >> 7 == MovedStatics.destinationX && Player.localPlayer.worldY >> 7 == Class55.destinationY) {
1844+
if(Player.localPlayer.worldX >> 7 == MovedStatics.destinationX && Player.localPlayer.worldY >> 7 == destinationY) {
18441845
MovedStatics.destinationX = 0;
18451846

18461847
DebugTools.walkpathX = null;

src/main/java/org/runejs/client/frame/Minimap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ else if(isTeammate)
168168
}
169169
if(MovedStatics.destinationX != 0) {
170170
int flagX = 2 + MovedStatics.destinationX * 4 + -(Player.localPlayer.worldX / 32);
171-
int flagY = 2 + 4 * Class55.destinationY + -(Player.localPlayer.worldY / 32);
171+
int flagY = 2 + 4 * Game.destinationY + -(Player.localPlayer.worldY / 32);
172172
drawOnMinimap(flagY, flagX, minimapMarkers[0]);
173173
}
174174
Rasterizer.drawFilledRectangle(97, 78, 3, 3, 16777215);
@@ -363,7 +363,7 @@ else if(isTeammate)
363363
}
364364
if(MovedStatics.destinationX != 0) {
365365
int flagX = 2 + MovedStatics.destinationX * 4 + -(Player.localPlayer.worldX / 32);
366-
int flagY = 2 + 4 * Class55.destinationY + -(Player.localPlayer.worldY / 32);
366+
int flagY = 2 + 4 * Game.destinationY + -(Player.localPlayer.worldY / 32);
367367
drawOnResizableMinimap(flagX, flagY, minimapMarkers[0]);
368368
}
369369
}

src/main/java/org/runejs/client/input/MouseHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
3535
public static int cursorY;
3636
public static int cursorX;
3737
public static boolean gameScreenClickable;
38+
private static volatile int eventClickX = 0;
3839
private static volatile long lastClick = 0L;
3940
public boolean mouseWheelDown;
4041
public int mouseWheelX;
@@ -156,7 +157,7 @@ public static void method1015() {
156157
mouseX = eventMouseX;
157158
mouseY = eventMouseY;
158159
clickType = eventMouseButtonPressed;
159-
clickX = Class55.eventClickX;
160+
clickX = eventClickX;
160161
clickY = MovedStatics.eventClickY;
161162
aLong2561 = lastClick;
162163
eventMouseButtonPressed = 0;
@@ -232,7 +233,7 @@ public synchronized void mousePressed(MouseEvent event) {
232233
int mouseX = event.getX();
233234
int mouseY = event.getY();
234235
LinkedList.anInt1073 = 0;
235-
Class55.eventClickX = mouseX;
236+
eventClickX = mouseX;
236237
MovedStatics.eventClickY = mouseY;
237238
lastClick = System.currentTimeMillis();
238239
if(event.getButton() == MouseEvent.BUTTON2) {

src/main/java/org/runejs/client/media/renderable/actor/Actor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public static void method789(int chunkLocalX, int chunkY, int chunkX, int chunkL
350350
Buffer.anInt1985 = -1;
351351
if(MovedStatics.destinationX != 0) {
352352
MovedStatics.destinationX -= i_34_;
353-
Class55.destinationY -= i_35_;
353+
Game.destinationY -= i_35_;
354354
}
355355
Player.cutsceneActive = false;
356356
SoundSystem.reset();

src/main/java/org/runejs/client/media/renderable/actor/Pathfinding.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ else if(clickType == 2) {
298298
);
299299

300300
MovedStatics.destinationX = walkingQueueX[0];
301-
Class55.destinationY = walkingQueueY[0];
301+
Game.destinationY = walkingQueueY[0];
302302

303303
return true;
304304
}

0 commit comments

Comments
 (0)