Skip to content

Commit

Permalink
Undo class refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatino committed Mar 25, 2021
1 parent 257103d commit 284b5be
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 47 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions runescape-client/src/main/java/AbstractWorldMapIcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -1188,23 +1188,23 @@ static final void changeGameOptions(int var0) {

if (var3 == 4) { // L: 11146
if (var2 == 0) { // L: 11147
FrameProvider.updateSoundEffectVolume(127);
class171.updateSoundEffectVolume(127);
}

if (var2 == 1) { // L: 11148
FrameProvider.updateSoundEffectVolume(96);
class171.updateSoundEffectVolume(96);
}

if (var2 == 2) { // L: 11149
FrameProvider.updateSoundEffectVolume(64);
class171.updateSoundEffectVolume(64);
}

if (var2 == 3) { // L: 11150
FrameProvider.updateSoundEffectVolume(32);
class171.updateSoundEffectVolume(32);
}

if (var2 == 4) { // L: 11151
FrameProvider.updateSoundEffectVolume(0);
class171.updateSoundEffectVolume(0);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int method1313(int var0, Script var1, boolean var2) {
return 1; // L: 1758
} else if (var0 == 3205) { // L: 1760
var3 = Math.min(Math.max(Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize], 0), 100); // L: 1761
FrameProvider.updateSoundEffectVolume(Math.round(1.27F * (float)var3)); // L: 1762
class171.updateSoundEffectVolume(Math.round(1.27F * (float)var3)); // L: 1762
return 1; // L: 1763
} else if (var0 == 3206) { // L: 1765
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Math.round((float)WorldMapSectionType.clientPreferences.soundEffectsVolume / 1.27F); // L: 1766
Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/ChatChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void changeWorld(World var0) {
Client.worldId = var0.id; // L: 1556
Client.worldProperties = var0.properties; // L: 1557
MouseRecorder.worldPort = Client.gameBuild == 0 ? 43594 : var0.id + 40000; // L: 1558
FrameProvider.js5Port = Client.gameBuild == 0 ? 443 : var0.id + 50000; // L: 1559
class171.js5Port = Client.gameBuild == 0 ? 443 : var0.id + 50000; // L: 1559
DynamicObject.currentPort = MouseRecorder.worldPort; // L: 1560
} // L: 1561
}
18 changes: 9 additions & 9 deletions runescape-client/src/main/java/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1567,12 +1567,12 @@ protected final void resizeGame() {
protected final void setUp() {
Strings.method4329(new int[]{20, 260, 10000}, new int[]{1000, 100, 500}); // L: 791
MouseRecorder.worldPort = gameBuild == 0 ? 43594 : worldId + 40000; // L: 792
FrameProvider.js5Port = gameBuild == 0 ? 443 : worldId + 50000; // L: 793
class171.js5Port = gameBuild == 0 ? 443 : worldId + 50000; // L: 793
DynamicObject.currentPort = MouseRecorder.worldPort; // L: 794
PlayerComposition.field2565 = MinimapRenderer.field2577; // L: 795
class105.field1339 = MinimapRenderer.field2573; // L: 796
HealthBar.field1143 = MinimapRenderer.field2575; // L: 797
WorldMapSprite.field259 = MinimapRenderer.field2574; // L: 798
PlayerComposition.field2565 = class224.field2577; // L: 795
class105.field1339 = class224.field2573; // L: 796
HealthBar.field1143 = class224.field2575; // L: 797
WorldMapSprite.field259 = class224.field2574; // L: 798
ScriptFrame.urlRequester = new UrlRequester(); // L: 799
this.setUpKeyboard(); // L: 800
this.setUpMouse(); // L: 801
Expand Down Expand Up @@ -2402,7 +2402,7 @@ void js5Error(int var1) {
WorldMapArea.js5Socket = null; // L: 1357
js5ConnectState = 0; // L: 1358
if (DynamicObject.currentPort == MouseRecorder.worldPort) { // L: 1359
DynamicObject.currentPort = FrameProvider.js5Port;
DynamicObject.currentPort = class171.js5Port;
} else {
DynamicObject.currentPort = MouseRecorder.worldPort; // L: 1360
}
Expand Down Expand Up @@ -2909,7 +2909,7 @@ final void doCycleLoggedOut() {
if (field696 > 2000) { // L: 2396
if (field786 < 1) { // L: 2397
if (MouseRecorder.worldPort == DynamicObject.currentPort) { // L: 2398
DynamicObject.currentPort = FrameProvider.js5Port;
DynamicObject.currentPort = class171.js5Port;
} else {
DynamicObject.currentPort = MouseRecorder.worldPort; // L: 2399
}
Expand Down Expand Up @@ -3071,7 +3071,7 @@ final void doCycleLoggedOut() {
} catch (IOException var22) { // L: 2408
if (field786 < 1) { // L: 2409
if (MouseRecorder.worldPort == DynamicObject.currentPort) { // L: 2410
DynamicObject.currentPort = FrameProvider.js5Port;
DynamicObject.currentPort = class171.js5Port;
} else {
DynamicObject.currentPort = MouseRecorder.worldPort; // L: 2411
}
Expand Down Expand Up @@ -3358,7 +3358,7 @@ final void doCycleLoggedIn() {
var2 = npcIndices[var1]; // L: 2873
NPC var23 = npcs[var2]; // L: 2874
if (var23 != null) { // L: 2875
FrameProvider.updateActorSequence(var23, var23.definition.size); // L: 2876
class171.updateActorSequence(var23, var23.definition.size); // L: 2876
}
}

Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/ClientPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static Frames getFrames(int var0) {
if (var1 != null) { // L: 188
return var1;
} else {
var1 = FrameProvider.loadFrames(SequenceDefinition.SequenceDefinition_animationsArchive, SequenceDefinition.SequenceDefinition_skeletonsArchive, var0, false); // L: 189
var1 = class171.loadFrames(SequenceDefinition.SequenceDefinition_animationsArchive, SequenceDefinition.SequenceDefinition_skeletonsArchive, var0, false); // L: 189
if (var1 != null) { // L: 190
SequenceDefinition.SequenceDefinition_cachedFrames.put(var1, (long)var0);
}
Expand Down
7 changes: 0 additions & 7 deletions runescape-client/src/main/java/FrameLoader.java

This file was deleted.

2 changes: 1 addition & 1 deletion runescape-client/src/main/java/Login.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public class Login {
worldSelectPage = 0; // L: 103
worldSelectPagesCount = 0; // L: 104
new DecimalFormat("##0.00"); // L: 107
new FrameProvider();
new class171();
field1213 = -1L; // L: 115
field1226 = -1L; // L: 116
}
Expand Down
6 changes: 3 additions & 3 deletions runescape-client/src/main/java/Projectile.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public static void findAndLoadCache(String var0, String var1, int var2, int var3
JagexCache.userHomeDirectory = "~/";
}

MinimapRenderer.cacheParentPaths = new String[]{"c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", JagexCache.userHomeDirectory, "/tmp/", ""}; // L: 65
class224.cacheParentPaths = new String[]{"c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", JagexCache.userHomeDirectory, "/tmp/", ""}; // L: 65
Timer.cacheSubPaths = new String[]{".jagex_cache_" + JagexCache.cacheGamebuild, ".file_store_" + JagexCache.cacheGamebuild}; // L: 66
int var18 = 0;

Expand Down Expand Up @@ -357,8 +357,8 @@ public static void findAndLoadCache(String var0, String var1, int var2, int var3
if (var7 == null && var18 == 0) { // L: 116
label225:
for (int var19 = 0; var19 < Timer.cacheSubPaths.length; ++var19) { // L: 117
for (int var20 = 0; var20 < MinimapRenderer.cacheParentPaths.length; ++var20) { // L: 118
File var21 = new File(MinimapRenderer.cacheParentPaths[var20] + Timer.cacheSubPaths[var19] + File.separatorChar + var0 + File.separatorChar); // L: 119
for (int var20 = 0; var20 < class224.cacheParentPaths.length; ++var20) { // L: 118
File var21 = new File(class224.cacheParentPaths[var20] + Timer.cacheSubPaths[var19] + File.separatorChar + var0 + File.separatorChar); // L: 119
if (var21.exists() && class23.isWriteable(new File(var21, "test.dat"), true)) { // L: 120 121
var7 = var21.toString(); // L: 122
var9 = true; // L: 123
Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/Renderable.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void draw(int var1, int var2, int var3, int var4, int var5, int var6, int var7,
static final void method3417() {
if (Client.field889 != class90.Client_plane) { // L: 3402
Client.field889 = class90.Client_plane; // L: 3403
MinimapRenderer.redrawMiniMapIcons(class90.Client_plane); // L: 3404
class224.redrawMiniMapIcons(class90.Client_plane); // L: 3404
}

} // L: 3406
Expand Down
4 changes: 2 additions & 2 deletions runescape-client/src/main/java/Varcs.java
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ static void findOrCreateRandomDatFile() {
} else {
label39:
for (int var1 = 0; var1 < Timer.cacheSubPaths.length; ++var1) { // L: 255
for (var2 = 0; var2 < MinimapRenderer.cacheParentPaths.length; ++var2) { // L: 256
File var3 = new File(MinimapRenderer.cacheParentPaths[var2] + Timer.cacheSubPaths[var1] + File.separatorChar + "random.dat"); // L: 257
for (var2 = 0; var2 < class224.cacheParentPaths.length; ++var2) { // L: 256
File var3 = new File(class224.cacheParentPaths[var2] + Timer.cacheSubPaths[var1] + File.separatorChar + "random.dat"); // L: 257
if (var3.exists()) { // L: 258
JagexCache.JagexCache_randomDat = new BufferedFile(new AccessFile(var3, "rw", 25L), 24, 0); // L: 259
break label39; // L: 260
Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/WorldMapRectangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static final void method354() {
for (int var2 = 0; var2 < var0; ++var2) { // L: 3495
Player var3 = Client.players[var1[var2]]; // L: 3496
if (var3 != null) { // L: 3497
FrameProvider.updateActorSequence(var3, 1); // L: 3498
class171.updateActorSequence(var3, 1); // L: 3498
}
}

Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/class13.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static final void drawEntities(int var0, int var1, int var2, int var3) {
if (!Client.isCameraLocked) { // L: 4014
var4 = AbstractWorldMapIcon.method712();
} else {
var4 = FrameProvider.method3639(); // L: 4015
var4 = class171.method3639(); // L: 4015
}

var28 = SecureRandomFuture.cameraX; // L: 4016
Expand Down
5 changes: 5 additions & 0 deletions runescape-client/src/main/java/class170.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import net.runelite.mapping.ObfuscatedName;

@ObfuscatedName("ff")
public interface class170 {
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;

@ObfuscatedName("fd")
@Implements("FrameProvider")
public class FrameProvider implements FrameLoader {
public class class171 implements class170
{
@ObfuscatedName("ee")
@ObfuscatedGetter(
intValue = -853566565
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import net.runelite.mapping.ObfuscatedSignature;

@ObfuscatedName("hn")
@Implements("MinimapRenderer")
public class MinimapRenderer {
public class class224 {
@ObfuscatedName("n")
public static final short[] field2577;
@ObfuscatedName("v")
Expand Down

0 comments on commit 284b5be

Please sign in to comment.