mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-13 01:51:39 -07:00
Moved around more static methods, nothing final
Some of these are "incorrect" - I wanted to decrease the # of static classes first by grouping them if they're slightly related. Then I'll do a second pass in each class to reorganize later.
This commit is contained in:
parent
c988509e8e
commit
ba4debb0d3
150 changed files with 2805 additions and 3034 deletions
|
|
@ -24,7 +24,11 @@ public final class client extends GameShell {
|
|||
public static final Js5CachedResourceProvider[] js5Providers = new Js5CachedResourceProvider[28];
|
||||
@OriginalMember(owner = "client!d", name = "S", descriptor = "Ljava/util/Random;")
|
||||
public static final Random aRandom1 = new Random();
|
||||
@OriginalMember(owner = "client!jm", name = "A", descriptor = "Lclient!na;")
|
||||
@OriginalMember(owner = "client!nh", name = "fb", descriptor = "[I")
|
||||
public static final int[] JS5_ARCHIVE_WEIGHTS = new int[] { 4, 4, 1, 2, 6, 4, 2, 49, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
@OriginalMember(owner = "client!si", name = "gb", descriptor = "Lclient!na;")
|
||||
public static final JagString aClass100_974 = JagString.parse("<br>(X");
|
||||
@OriginalMember(owner = "client!jm", name = "A", descriptor = "Lclient!na;")
|
||||
static final JagString aClass100_603 = JagString.parse("");
|
||||
@OriginalMember(owner = "client!jm", name = "z", descriptor = "Lclient!na;")
|
||||
public static JagString mainLoadSecondaryText = aClass100_603;
|
||||
|
|
@ -297,7 +301,7 @@ public final class client extends GameShell {
|
|||
Static233.aClass95_4 = null;
|
||||
}
|
||||
if (arg0 == 25 || arg0 == 28) {
|
||||
Static271.anInt5804 = 0;
|
||||
ClientProt.anInt5804 = 0;
|
||||
Static230.anInt5150 = 1;
|
||||
Static233.loadingScreenState = 0;
|
||||
Static38.anInt1196 = 1;
|
||||
|
|
@ -453,7 +457,7 @@ public final class client extends GameShell {
|
|||
MiniMap.sprite = null;
|
||||
Static107.anInt2875 = -1;
|
||||
method3768();
|
||||
Static255.cache.clear();
|
||||
DeadClass.cache.clear();
|
||||
LocType.aClass139_1 = new Loc_Class139();
|
||||
((Js5GlTextureProvider) Rasteriser.textureProvider).clear();
|
||||
LightingManager.lightCount = 0;
|
||||
|
|
@ -477,7 +481,7 @@ public final class client extends GameShell {
|
|||
Sprites.load(js5Archive8);
|
||||
Static204.aClass3_Sub2_Sub1_10 = null;
|
||||
Static39.aClass3_Sub2_Sub1_1 = null;
|
||||
Static92.aClass3_Sub2_Sub1_6 = null;
|
||||
Static112.aClass3_Sub2_Sub1_6 = null;
|
||||
Static165.aClass3_Sub2_Sub1_8 = null;
|
||||
Static181.aClass3_Sub2_Sub1_9 = null;
|
||||
if (gameState == 5) {
|
||||
|
|
@ -520,7 +524,7 @@ public final class client extends GameShell {
|
|||
}
|
||||
MiniMenu.anInt5014 = 0;
|
||||
Static132.anInt3291 = (int) (Math.random() * 100.0D) - 50;
|
||||
Static84.anInt2255 = 0;
|
||||
LoginManager.mapFlagZ = 0;
|
||||
Camera.yawTarget = (int) (Math.random() * 20.0D) - 10 & 0x7FF;
|
||||
Static107.anInt2875 = -1;
|
||||
PlayerList.size = 0;
|
||||
|
|
@ -529,8 +533,8 @@ public final class client extends GameShell {
|
|||
Static241.aBoolean302 = false;
|
||||
MiniMap.anInt4130 = (int) (Math.random() * 30.0D) - 20;
|
||||
SoundPlayer.anInt4451 = 0;
|
||||
Static115.mapFlagX = 0;
|
||||
Static59.anInt1814 = (int) (Math.random() * 120.0D) - 60;
|
||||
LoginManager.mapFlagX = 0;
|
||||
MiniMap.anInt1814 = (int) (Math.random() * 120.0D) - 60;
|
||||
Chat.size = 0;
|
||||
Static230.anInt5161 = (int) (Math.random() * 80.0D) - 40;
|
||||
NpcList.size = 0;
|
||||
|
|
@ -560,12 +564,12 @@ public final class client extends GameShell {
|
|||
DelayedStateChange.clear();
|
||||
Static133.anInt5230 = 0;
|
||||
Static233.anInt5217 = 0;
|
||||
Static265.anInt5765 = 0;
|
||||
Camera.anInt5765 = 0;
|
||||
Static231.anInt5203 = 0;
|
||||
Static248.anInt4232 = 0;
|
||||
Static245.anInt5375 = 0;
|
||||
Camera.anInt4232 = 0;
|
||||
Camera.anInt5375 = 0;
|
||||
Static260.anInt1744 = 0;
|
||||
Static251.anInt5449 = 0;
|
||||
Camera.anInt5449 = 0;
|
||||
Static113.anInt4612 = 0;
|
||||
Static233.anInt5225 = 0;
|
||||
for (local3506 = 0; local3506 < VarcDomain.varcs.length; local3506++) {
|
||||
|
|
@ -618,7 +622,22 @@ public final class client extends GameShell {
|
|||
ClientProt.method1373();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V")
|
||||
@OriginalMember(owner = "client!rc", name = "d", descriptor = "(I)V")
|
||||
public static void method930() {
|
||||
if (musicChannel != null) {
|
||||
musicChannel.quit();
|
||||
}
|
||||
if (soundChannel != null) {
|
||||
soundChannel.quit();
|
||||
}
|
||||
AudioChannel.init(Preferences.stereo);
|
||||
musicChannel = AudioChannel.create(22050, signLink, canvas, 0);
|
||||
musicChannel.setStream(musicStream);
|
||||
soundChannel = AudioChannel.create(2048, signLink, canvas, 1);
|
||||
soundChannel.setStream(soundStream);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!client", name = "f", descriptor = "(I)V")
|
||||
@Override
|
||||
protected final void mainRedraw() {
|
||||
if (gameState == 1000) {
|
||||
|
|
@ -650,7 +669,7 @@ public final class client extends GameShell {
|
|||
local84 -= local90.top + local90.bottom;
|
||||
}
|
||||
if (local80 != GameShell.frameWidth || local84 != GameShell.frameHeight) {
|
||||
Static203.method3662();
|
||||
GameShell.method3662();
|
||||
Static97.aLong89 = MonotonicClock.currentTimeMillis() + 500L;
|
||||
}
|
||||
}
|
||||
|
|
@ -682,13 +701,13 @@ public final class client extends GameShell {
|
|||
Static230.anInt5150 = Static175.mapFilesMissingCount;
|
||||
}
|
||||
local80 = (Static230.anInt5150 - Static175.mapFilesMissingCount) * 50 / Static230.anInt5150;
|
||||
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, Static229.aClass100_974, JagString.parseInt(local80), Static14.aClass100_80 }));
|
||||
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static14.aClass100_80 }));
|
||||
} else if (Static233.loadingScreenState == 2) {
|
||||
if (Static38.anInt1196 < Static271.anInt5804) {
|
||||
Static38.anInt1196 = Static271.anInt5804;
|
||||
if (Static38.anInt1196 < ClientProt.anInt5804) {
|
||||
Static38.anInt1196 = ClientProt.anInt5804;
|
||||
}
|
||||
local80 = (Static38.anInt1196 - Static271.anInt5804) * 50 / Static38.anInt1196 + 50;
|
||||
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, Static229.aClass100_974, JagString.parseInt(local80), Static14.aClass100_80 }));
|
||||
local80 = (Static38.anInt1196 - ClientProt.anInt5804) * 50 / Static38.anInt1196 + 50;
|
||||
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[] { LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static14.aClass100_80 }));
|
||||
} else {
|
||||
Static114.drawTextOnScreen(false, LocalizedText.LOADING);
|
||||
}
|
||||
|
|
@ -870,7 +889,7 @@ public final class client extends GameShell {
|
|||
@OriginalMember(owner = "client!client", name = "g", descriptor = "(I)V")
|
||||
@Override
|
||||
protected final void mainInit() {
|
||||
Static203.method3662();
|
||||
GameShell.method3662();
|
||||
js5CacheQueue = new Js5CacheQueue();
|
||||
js5NetQueue = new Js5NetQueue();
|
||||
if (modeWhat != 0) {
|
||||
|
|
@ -1260,7 +1279,7 @@ public final class client extends GameShell {
|
|||
} else if (mainLoadState == 40) {
|
||||
percentage = 0;
|
||||
for (i = 0; i < 28; i++) {
|
||||
percentage += js5Providers[i].getIndexPercentageComplete() * Static170.JS5_ARCHIVE_WEIGHTS[i] / 100;
|
||||
percentage += js5Providers[i].getIndexPercentageComplete() * JS5_ARCHIVE_WEIGHTS[i] / 100;
|
||||
}
|
||||
if (percentage == 100) {
|
||||
mainLoadPercentage = 20;
|
||||
|
|
@ -1542,7 +1561,7 @@ public final class client extends GameShell {
|
|||
if (LoginManager.reply == 15) {
|
||||
Static44.method1146();
|
||||
} else if (LoginManager.reply != 2) {
|
||||
Static278.processLogout();
|
||||
LoginManager.processLogout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue