Consolidated a few more static classes

This commit is contained in:
Pazaz 2022-06-27 21:04:45 -04:00
parent dce7c0aede
commit cb4eae0fbd
28 changed files with 465 additions and 487 deletions

View file

@ -13,8 +13,6 @@ public class ClientProt {
public static final JagString COMPLETE_PERCENT = JagString.parse("<br>(X100(U(Y");
@OriginalMember(owner = "client!wc", name = "g", descriptor = "I")
public static int anInt5804 = 0;
@OriginalMember(owner = "client!nm", name = "U", descriptor = "I")
public static int mapFilesMissingCount = 0;
@OriginalMember(owner = "client!vg", name = "a", descriptor = "(Lclient!na;IIBI)V")
public static void method4512(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) {
@ -169,259 +167,6 @@ public class ClientProt {
}
}
@OriginalMember(owner = "client!gd", name = "c", descriptor = "(I)V")
public static void rebuildMap() {
ping(false);
mapFilesMissingCount = 0;
@Pc(12) boolean fileExists = true;
@Pc(14) int id;
for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) {
if (LoginManager.mapFileIds[id] != -1 && LoginManager.mapFilesBuffer[id] == null) {
LoginManager.mapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.mapFileIds[id], 0);
if (LoginManager.mapFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
if (LoginManager.locationsMapFileIds[id] != -1 && LoginManager.locationMapFilesBuffer[id] == null) {
LoginManager.locationMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.locationsMapFileIds[id], LoginManager.regionsXteaKeys[id], 0);
if (LoginManager.locationMapFilesBuffer[id] == null) {
fileExists = false;
mapFilesMissingCount++;
}
}
if (GlRenderer.enabled) {
if (LoginManager.underWaterMapFileIds[id] != -1 && LoginManager.underWaterMapFilesBuffer[id] == null) {
LoginManager.underWaterMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterMapFileIds[id], 0);
if (LoginManager.underWaterMapFilesBuffer[id] == null) {
fileExists = false;
mapFilesMissingCount++;
}
}
if (LoginManager.underWaterLocationsMapFileIds[id] != -1 && LoginManager.underWaterLocationsMapFilesBuffer[id] == null) {
LoginManager.underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.underWaterLocationsMapFileIds[id], 0);
if (LoginManager.underWaterLocationsMapFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
}
if (LoginManager.npcSpawnsFileIds != null && LoginManager.npcSpawnsFilesBuffer[id] == null && LoginManager.npcSpawnsFileIds[id] != -1) {
LoginManager.npcSpawnsFilesBuffer[id] = client.js5Archive5.fetchFile(LoginManager.npcSpawnsFileIds[id], LoginManager.regionsXteaKeys[id], 0);
if (LoginManager.npcSpawnsFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
}
if (LoginManager.mapElementList == null) {
if (LoginManager.map == null || !client.js5Archive23.isGroupNameValid(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}))) {
LoginManager.mapElementList = new MapElementList(0);
} else if (client.js5Archive23.isGroupReady(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}))) {
LoginManager.mapElementList = MapElementList.create(JagString.concatenate(new JagString[]{LoginManager.map.group, aClass100_363}), client.js5Archive23);
} else {
fileExists = false;
mapFilesMissingCount++;
}
}
if (!fileExists) {
Static233.loadingScreenState = 1;
return;
}
anInt5804 = 0;
fileExists = true;
@Pc(320) int chunkX;
@Pc(309) int chunkZ;
for (id = 0; id < LoginManager.mapFilesBuffer.length; id++) {
@Pc(294) byte[] local294 = LoginManager.locationMapFilesBuffer[id];
if (local294 != null) {
chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ;
chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX;
if (LoginManager.dynamicMapRegion) {
chunkZ = 10;
chunkX = 10;
}
fileExists &= Static49.method1201(chunkX, chunkZ, local294);
}
if (GlRenderer.enabled) {
local294 = LoginManager.underWaterLocationsMapFilesBuffer[id];
if (local294 != null) {
chunkX = (LoginManager.regionBitPacked[id] >> 8) * 64 - Camera.originX;
chunkZ = (LoginManager.regionBitPacked[id] & 0xFF) * 64 - Camera.originZ;
if (LoginManager.dynamicMapRegion) {
chunkZ = 10;
chunkX = 10;
}
fileExists &= Static49.method1201(chunkX, chunkZ, local294);
}
}
}
if (!fileExists) {
Static233.loadingScreenState = 2;
return;
}
if (Static233.loadingScreenState != 0) {
Static114.drawTextOnScreen(true, JagString.concatenate(new JagString[]{LocalizedText.LOADING, COMPLETE_PERCENT}));
}
client.audioLoop();
client.method3768();
@Pc(420) boolean hasUnderWaterMap = false;
@Pc(427) int i;
if (GlRenderer.enabled && Preferences.highWaterDetail) {
for (i = 0; i < LoginManager.mapFilesBuffer.length; i++) {
if (LoginManager.underWaterLocationsMapFilesBuffer[i] != null || LoginManager.underWaterMapFilesBuffer[i] != null) {
hasUnderWaterMap = true;
break;
}
}
}
SceneGraph.init(GlRenderer.enabled ? GlobalConfig.TILE_DISTANCE : 25, hasUnderWaterMap);
for (i = 0; i < 4; i++) {
PathFinder.collisionMaps[i].clear();
}
for (i = 0; i < 4; i++) {
for (chunkX = 0; chunkX < 104; chunkX++) {
for (chunkZ = 0; chunkZ < 104; chunkZ++) {
SceneGraph.tileFlags[i][chunkX][chunkZ] = 0;
}
}
}
AreaSoundManager.clear(false);
if (GlRenderer.enabled) {
ShadowManager.shadowMapImage.clear();
for (i = 0; i < 13; i++) {
for (chunkX = 0; chunkX < 13; chunkX++) {
ShadowManager.shadows[i][chunkX].outputToSprite = true;
}
}
}
if (GlRenderer.enabled) {
LightingManager.method2404();
}
if (GlRenderer.enabled) {
setDefaultChunksAtmosphere();
}
client.audioLoop();
System.gc();
ping(true);
SceneGraph.load(false);
if (!LoginManager.dynamicMapRegion) {
Static87.method1805(false);
ping(true);
if (GlRenderer.enabled) {
i = PlayerList.self.movementQueueX[0] >> 3;
chunkX = PlayerList.self.movementQueueZ[0] >> 3;
FogManager.setLightPosition(chunkX, i);
}
LoginManager.method743(false);
if (LoginManager.npcSpawnsFilesBuffer != null) {
Static158.decodeNpcFiles();
}
}
if (LoginManager.dynamicMapRegion) {
Static89.method1835(false);
ping(true);
if (GlRenderer.enabled) {
i = PlayerList.self.movementQueueX[0] >> 3;
chunkX = PlayerList.self.movementQueueZ[0] >> 3;
FogManager.setLightPosition(chunkX, i);
}
Static233.method4002(false);
}
client.method3768();
ping(true);
SceneGraph.method1169(PathFinder.collisionMaps, false);
if (GlRenderer.enabled) {
LightingManager.method2395();
}
ping(true);
i = SceneGraph.firstVisibleLevel;
if (i > Player.level) {
i = Player.level;
}
if (i < Player.level - 1) {
}
if (SceneGraph.allLevelsAreVisible()) {
SceneGraph.method2750(0);
} else {
SceneGraph.method2750(SceneGraph.firstVisibleLevel);
}
SceneGraph.unload();
if (GlRenderer.enabled && hasUnderWaterMap) {
SceneGraph.setUnderwater(true);
SceneGraph.load(true);
if (!LoginManager.dynamicMapRegion) {
Static87.method1805(true);
ping(true);
LoginManager.method743(true);
}
if (LoginManager.dynamicMapRegion) {
Static89.method1835(true);
ping(true);
Static233.method4002(true);
}
client.method3768();
ping(true);
SceneGraph.method1169(PathFinder.collisionMaps, true);
ping(true);
SceneGraph.unload();
SceneGraph.setUnderwater(false);
}
if (GlRenderer.enabled) {
for (chunkX = 0; chunkX < 13; chunkX++) {
for (chunkZ = 0; chunkZ < 13; chunkZ++) {
ShadowManager.shadows[chunkX][chunkZ].method4676(SceneGraph.tileHeights[0], chunkX * 8, chunkZ * 8);
}
}
}
for (chunkX = 0; chunkX < 104; chunkX++) {
for (chunkZ = 0; chunkZ < 104; chunkZ++) {
Protocol.spawnGroundObject(chunkZ, chunkX);
}
}
ScriptRunner.method2218();
client.audioLoop();
ChangeLocRequest.flush();
client.method3768();
Static231.aBoolean252 = false;
if (GameShell.frame != null && Protocol.socket != null && client.gameState == 25) {
Protocol.outboundBuffer.p1isaac(20);
Protocol.outboundBuffer.p4(1057001181);
}
if (!LoginManager.dynamicMapRegion) {
@Pc(815) int local815 = (LoginManager.centralZoneZ + 6) / 8;
@Pc(821) int local821 = (LoginManager.centralZoneZ - 6) / 8;
chunkX = (LoginManager.centralZoneX - 6) / 8;
chunkZ = (LoginManager.centralZoneX + 6) / 8;
for (@Pc(837) int local837 = chunkX - 1; local837 <= chunkZ + 1; local837++) {
for (@Pc(850) int local850 = local821 - 1; local850 <= local815 + 1; local850++) {
if (local837 < chunkX || local837 > chunkZ || local850 < local821 || local850 > local815) {
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{LoginManager.aClass100_558, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850)}));
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{LoginManager.aClass100_1090, JagString.parseInt(local837), LoginManager.UNDERSCORE, JagString.parseInt(local850)}));
}
}
}
}
if (client.gameState == 28) {
client.setGameState(10);
} else {
client.setGameState(30);
if (Protocol.socket != null) {
Protocol.outboundBuffer.p1isaac(110);
}
}
WorldMap.method2720();
client.audioLoop();
GameShell.resetTimer();
}
@OriginalMember(owner = "client!ej", name = "i", descriptor = "(I)V")
public static void method1373() {
Protocol.outboundBuffer.p1isaac(243);

View file

@ -159,7 +159,7 @@ public final class DisplayMode {
if (client.gameState == 5) {
LoadingBar.render(true, Fonts.b12Full);
} else {
Static114.drawTextOnScreen(false, LocalizedText.LOADING);
Fonts.drawTextOnScreen(false, LocalizedText.LOADING);
}
try {
@Pc(269) Graphics local269 = GameShell.canvas.getGraphics();

View file

@ -220,7 +220,7 @@ public abstract class Font extends SecondaryNode {
}
@OriginalMember(owner = "client!rk", name = "a", descriptor = "(Lclient!na;IIIIIIIII)I")
public final int method2852(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9) {
public final int drawInterfaceText(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4, @OriginalArg(5) int arg5, @OriginalArg(6) int arg6, @OriginalArg(7) int arg7, @OriginalArg(8) int arg8, @OriginalArg(9) int arg9) {
return this.renderParagraphAlpha(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}

View file

@ -4,6 +4,8 @@ import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
import java.awt.*;
public class Fonts {
@OriginalMember(owner = "client!j", name = "x", descriptor = "Lclient!rk;")
public static Font p11Full;
@ -54,4 +56,31 @@ public class Fonts {
p12Full = Font.method2462(Sprites.p12FullId, arg1, arg0);
b12Full = Font.method2462(Sprites.b12FullId, arg1, arg0);
}
@OriginalMember(owner = "client!j", name = "a", descriptor = "(BZLclient!na;)V")
public static void drawTextOnScreen(@OriginalArg(1) boolean arg0, @OriginalArg(2) JagString arg1) {
@Pc(24) int local24 = p12Full.getMaxLineWidth(arg1, 250);
@Pc(31) int local31 = p12Full.getParagraphLineCount(arg1, 250) * 13;
if (GlRenderer.enabled) {
GlRaster.fillRect(6, 6, local24 + 4 + 4, local31 + 8, 0);
GlRaster.drawRect(6, 6, local24 + 4 + 4, local31 + 4 + 4, 16777215);
} else {
SoftwareRaster.fillRect(6, 6, local24 + 4 + 4, local31 + 8, 0);
SoftwareRaster.drawRect(6, 6, local24 + 8, 4 + 4 + local31, 16777215);
}
p12Full.drawInterfaceText(arg1, 10, 10, local24, local31, 16777215, -1, 1, 1, 0);
InterfaceList.redrawScreen(6, local24 + 8, 6, local31 + 4 + 4);
if (!arg0) {
Static121.redrawScreen(10, 10, local31, local24);
} else if (GlRenderer.enabled) {
GlRenderer.swapBuffers();
} else {
try {
@Pc(159) Graphics local159 = GameShell.canvas.getGraphics();
SoftwareRaster.frameBuffer.draw(local159);
} catch (@Pc(167) Exception local167) {
GameShell.canvas.repaint();
}
}
}
}

View file

@ -75,7 +75,7 @@ public final class GlRaster {
}
@OriginalMember(owner = "client!dj", name = "a", descriptor = "(IIIII)V")
public static void method1179(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
public static void drawRect(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
GlRenderer.method4162();
@Pc(5) float local5 = (float) arg0 + 0.3F;
@Pc(12) float local12 = local5 + (float) (arg2 - 1);
@ -220,7 +220,7 @@ public final class GlRaster {
}
@OriginalMember(owner = "client!dj", name = "c", descriptor = "(IIIII)V")
public static void method1186(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
public static void fillRect(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3, @OriginalArg(4) int arg4) {
GlRenderer.method4162();
@Pc(3) float local3 = (float) arg0;
@Pc(8) float local8 = local3 + (float) arg2;

View file

@ -349,9 +349,9 @@ public class InterfaceList {
}
if (MiniMenu.size == 1) {
Static40.aBoolean108 = false;
method4012(anInt4271, anInt761, anInt5138, anInt436);
redrawScreen(anInt4271, anInt761, anInt5138, anInt436);
} else {
method4012(anInt4271, anInt761, anInt5138, anInt436);
redrawScreen(anInt4271, anInt761, anInt5138, anInt436);
local43 = Fonts.b12Full.getStringWidth(LocalizedText.CHOOSE_OPTION);
for (@Pc(75) int local75 = 0; local75 < MiniMenu.size; local75++) {
@Pc(88) int local88 = Fonts.b12Full.getStringWidth(MiniMenu.getOp(local75));
@ -502,7 +502,7 @@ public class InterfaceList {
}
@OriginalMember(owner = "client!kf", name = "a", descriptor = "(IIBII)V")
public static void method4012(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
public static void redrawScreen(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
for (@Pc(12) int local12 = 0; local12 < rectangles; local12++) {
if (rectangleWidth[local12] + rectangleX[local12] > arg0 && arg1 + arg0 > rectangleX[local12] && arg2 < rectangleHeight[local12] + rectangleY[local12] && rectangleY[local12] < arg2 + arg3) {
aBooleanArray100[local12] = true;

View file

@ -295,6 +295,7 @@ public final class Js5 {
try {
uncompressed = Js5Compression.uncompress(compressed);
} catch (@Pc(142) RuntimeException ex) {
ex.printStackTrace();
System.out.println("T3 - " + (key != null) + "," + group + "," + compressed.length + "," + Buffer.crc32(compressed, compressed.length) + "," + Buffer.crc32(compressed, compressed.length - 2) + "," + this.index.groupChecksums[group] + "," + this.index.checksum);
uncompressed = new byte[]{0};
}

View file

@ -17,10 +17,10 @@ public class LoadingBar {
arg1.renderCenter(LocalizedText.GAME0_LOADING, GameShell.canvasWidth / 2, GameShell.canvasHeight / 2 - 26, 16777215, -1);
local9 = GameShell.canvasHeight / 2 - 18;
if (GlRenderer.enabled) {
GlRaster.method1179(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409);
GlRaster.method1179(GameShell.canvasWidth / 2 - 151, local9 - -1, 302, 32, 0);
GlRaster.method1186(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409);
GlRaster.method1186(GameShell.canvasWidth / 2 + client.mainLoadPercentage * 3 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0);
GlRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409);
GlRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 - -1, 302, 32, 0);
GlRaster.fillRect(GameShell.canvasWidth / 2 - 150, local9 + 2, client.mainLoadPercentage * 3, 30, 9179409);
GlRaster.fillRect(GameShell.canvasWidth / 2 + client.mainLoadPercentage * 3 - 150, local9 + 2, 300 - client.mainLoadPercentage * 3, 30, 0);
} else {
SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 152, local9, 304, 34, 9179409);
SoftwareRaster.drawRect(GameShell.canvasWidth / 2 - 151, local9 + 1, 302, 32, 0);

View file

@ -112,6 +112,10 @@ public class LoginManager {
public static int anInt1862 = 0;
@OriginalMember(owner = "client!sj", name = "u", descriptor = "Z")
public static boolean dynamicMapRegion = false;
@OriginalMember(owner = "client!nm", name = "U", descriptor = "I")
public static int mapFilesMissingCount = 0;
@OriginalMember(owner = "client!t", name = "y", descriptor = "I")
public static int loadingScreenState = 0;
@OriginalMember(owner = "client!dm", name = "d", descriptor = "(I)V")
public static void clear() {
@ -497,7 +501,6 @@ public class LoginManager {
centralZoneX = -1;
Protocol.readRebuildPacket(false);
Protocol.opcode = -1;
return;
}
} catch (@Pc(977) IOException ex) {
if (Protocol.socket != null) {
@ -667,7 +670,7 @@ public class LoginManager {
} else {
client.setGameState(25);
}
Static114.drawTextOnScreen(true, LocalizedText.LOADING);
Fonts.drawTextOnScreen(true, LocalizedText.LOADING);
@Pc(53) int local53 = Camera.originZ;
@Pc(55) int local55 = Camera.originX;
Camera.originZ = arg1 * 8 - 48;
@ -838,4 +841,313 @@ public class LoginManager {
}
}
@OriginalMember(owner = "client!gd", name = "c", descriptor = "(I)V")
public static void rebuildMap() {
ClientProt.ping(false);
mapFilesMissingCount = 0;
@Pc(12) boolean fileExists = true;
@Pc(14) int id;
for (id = 0; id < mapFilesBuffer.length; id++) {
if (mapFileIds[id] != -1 && mapFilesBuffer[id] == null) {
mapFilesBuffer[id] = client.js5Archive5.fetchFile(mapFileIds[id], 0);
if (mapFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
if (locationsMapFileIds[id] != -1 && locationMapFilesBuffer[id] == null) {
locationMapFilesBuffer[id] = client.js5Archive5.fetchFile(locationsMapFileIds[id], regionsXteaKeys[id], 0);
if (locationMapFilesBuffer[id] == null) {
fileExists = false;
mapFilesMissingCount++;
}
}
if (GlRenderer.enabled) {
if (underWaterMapFileIds[id] != -1 && underWaterMapFilesBuffer[id] == null) {
underWaterMapFilesBuffer[id] = client.js5Archive5.fetchFile(underWaterMapFileIds[id], 0);
if (underWaterMapFilesBuffer[id] == null) {
fileExists = false;
mapFilesMissingCount++;
}
}
if (underWaterLocationsMapFileIds[id] != -1 && underWaterLocationsMapFilesBuffer[id] == null) {
underWaterLocationsMapFilesBuffer[id] = client.js5Archive5.fetchFile(underWaterLocationsMapFileIds[id], 0);
if (underWaterLocationsMapFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
}
if (npcSpawnsFileIds != null && npcSpawnsFilesBuffer[id] == null && npcSpawnsFileIds[id] != -1) {
npcSpawnsFilesBuffer[id] = client.js5Archive5.fetchFile(npcSpawnsFileIds[id], regionsXteaKeys[id], 0);
if (npcSpawnsFilesBuffer[id] == null) {
mapFilesMissingCount++;
fileExists = false;
}
}
}
if (mapElementList == null) {
if (map == null || !client.js5Archive23.isGroupNameValid(JagString.concatenate(new JagString[]{map.group, ClientProt.aClass100_363}))) {
mapElementList = new MapElementList(0);
} else if (client.js5Archive23.isGroupReady(JagString.concatenate(new JagString[]{map.group, ClientProt.aClass100_363}))) {
mapElementList = MapElementList.create(JagString.concatenate(new JagString[]{map.group, ClientProt.aClass100_363}), client.js5Archive23);
} else {
fileExists = false;
mapFilesMissingCount++;
}
}
if (!fileExists) {
loadingScreenState = 1;
return;
}
ClientProt.anInt5804 = 0;
fileExists = true;
@Pc(320) int chunkX;
@Pc(309) int chunkZ;
for (id = 0; id < mapFilesBuffer.length; id++) {
@Pc(294) byte[] local294 = locationMapFilesBuffer[id];
if (local294 != null) {
chunkZ = (regionBitPacked[id] & 0xFF) * 64 - Camera.originZ;
chunkX = (regionBitPacked[id] >> 8) * 64 - Camera.originX;
if (dynamicMapRegion) {
chunkZ = 10;
chunkX = 10;
}
fileExists &= method1201(chunkX, chunkZ, local294);
}
if (GlRenderer.enabled) {
local294 = underWaterLocationsMapFilesBuffer[id];
if (local294 != null) {
chunkX = (regionBitPacked[id] >> 8) * 64 - Camera.originX;
chunkZ = (regionBitPacked[id] & 0xFF) * 64 - Camera.originZ;
if (dynamicMapRegion) {
chunkZ = 10;
chunkX = 10;
}
fileExists &= method1201(chunkX, chunkZ, local294);
}
}
}
if (!fileExists) {
loadingScreenState = 2;
return;
}
if (loadingScreenState != 0) {
Fonts.drawTextOnScreen(true, JagString.concatenate(new JagString[]{LocalizedText.LOADING, ClientProt.COMPLETE_PERCENT}));
}
client.audioLoop();
client.method3768();
@Pc(420) boolean hasUnderWaterMap = false;
@Pc(427) int i;
if (GlRenderer.enabled && Preferences.highWaterDetail) {
for (i = 0; i < mapFilesBuffer.length; i++) {
if (underWaterLocationsMapFilesBuffer[i] != null || underWaterMapFilesBuffer[i] != null) {
hasUnderWaterMap = true;
break;
}
}
}
SceneGraph.init(GlRenderer.enabled ? GlobalConfig.TILE_DISTANCE : 25, hasUnderWaterMap);
for (i = 0; i < 4; i++) {
PathFinder.collisionMaps[i].clear();
}
for (i = 0; i < 4; i++) {
for (chunkX = 0; chunkX < 104; chunkX++) {
for (chunkZ = 0; chunkZ < 104; chunkZ++) {
SceneGraph.tileFlags[i][chunkX][chunkZ] = 0;
}
}
}
AreaSoundManager.clear(false);
if (GlRenderer.enabled) {
ShadowManager.shadowMapImage.clear();
for (i = 0; i < 13; i++) {
for (chunkX = 0; chunkX < 13; chunkX++) {
ShadowManager.shadows[i][chunkX].outputToSprite = true;
}
}
}
if (GlRenderer.enabled) {
LightingManager.method2404();
}
if (GlRenderer.enabled) {
ClientProt.setDefaultChunksAtmosphere();
}
client.audioLoop();
System.gc();
ClientProt.ping(true);
SceneGraph.load(false);
if (!dynamicMapRegion) {
Static87.method1805(false);
ClientProt.ping(true);
if (GlRenderer.enabled) {
i = PlayerList.self.movementQueueX[0] >> 3;
chunkX = PlayerList.self.movementQueueZ[0] >> 3;
FogManager.setLightPosition(chunkX, i);
}
method743(false);
if (npcSpawnsFilesBuffer != null) {
Static158.decodeNpcFiles();
}
}
if (dynamicMapRegion) {
Static89.method1835(false);
ClientProt.ping(true);
if (GlRenderer.enabled) {
i = PlayerList.self.movementQueueX[0] >> 3;
chunkX = PlayerList.self.movementQueueZ[0] >> 3;
FogManager.setLightPosition(chunkX, i);
}
Static233.method4002(false);
}
client.method3768();
ClientProt.ping(true);
SceneGraph.method1169(PathFinder.collisionMaps, false);
if (GlRenderer.enabled) {
LightingManager.method2395();
}
ClientProt.ping(true);
i = SceneGraph.firstVisibleLevel;
if (i > Player.level) {
i = Player.level;
}
if (i < Player.level - 1) {
}
if (SceneGraph.allLevelsAreVisible()) {
SceneGraph.method2750(0);
} else {
SceneGraph.method2750(SceneGraph.firstVisibleLevel);
}
SceneGraph.unload();
if (GlRenderer.enabled && hasUnderWaterMap) {
SceneGraph.setUnderwater(true);
SceneGraph.load(true);
if (!dynamicMapRegion) {
Static87.method1805(true);
ClientProt.ping(true);
method743(true);
}
if (dynamicMapRegion) {
Static89.method1835(true);
ClientProt.ping(true);
Static233.method4002(true);
}
client.method3768();
ClientProt.ping(true);
SceneGraph.method1169(PathFinder.collisionMaps, true);
ClientProt.ping(true);
SceneGraph.unload();
SceneGraph.setUnderwater(false);
}
if (GlRenderer.enabled) {
for (chunkX = 0; chunkX < 13; chunkX++) {
for (chunkZ = 0; chunkZ < 13; chunkZ++) {
ShadowManager.shadows[chunkX][chunkZ].method4676(SceneGraph.tileHeights[0], chunkX * 8, chunkZ * 8);
}
}
}
for (chunkX = 0; chunkX < 104; chunkX++) {
for (chunkZ = 0; chunkZ < 104; chunkZ++) {
Protocol.spawnGroundObject(chunkZ, chunkX);
}
}
ScriptRunner.method2218();
client.audioLoop();
ChangeLocRequest.flush();
client.method3768();
Static231.aBoolean252 = false;
if (GameShell.frame != null && Protocol.socket != null && client.gameState == 25) {
Protocol.outboundBuffer.p1isaac(20);
Protocol.outboundBuffer.p4(1057001181);
}
if (!dynamicMapRegion) {
@Pc(815) int local815 = (centralZoneZ + 6) / 8;
@Pc(821) int local821 = (centralZoneZ - 6) / 8;
chunkX = (centralZoneX - 6) / 8;
chunkZ = (centralZoneX + 6) / 8;
for (@Pc(837) int local837 = chunkX - 1; local837 <= chunkZ + 1; local837++) {
for (@Pc(850) int local850 = local821 - 1; local850 <= local815 + 1; local850++) {
if (local837 < chunkX || local837 > chunkZ || local850 < local821 || local850 > local815) {
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{aClass100_558, JagString.parseInt(local837), UNDERSCORE, JagString.parseInt(local850)}));
client.js5Archive5.prefetchGroup(JagString.concatenate(new JagString[]{aClass100_1090, JagString.parseInt(local837), UNDERSCORE, JagString.parseInt(local850)}));
}
}
}
}
if (client.gameState == 28) {
client.setGameState(10);
} else {
client.setGameState(30);
if (Protocol.socket != null) {
Protocol.outboundBuffer.p1isaac(110);
}
}
WorldMap.method2720();
client.audioLoop();
GameShell.resetTimer();
}
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(BII[B)Z")
public static boolean method1201(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) byte[] arg2) {
@Pc(15) boolean local15 = true;
@Pc(17) int local17 = -1;
@Pc(22) Buffer local22 = new Buffer(arg2);
label70:
while (true) {
@Pc(26) int local26 = local22.gVarSmart();
if (local26 == 0) {
return local15;
}
@Pc(33) int local33 = 0;
local17 += local26;
@Pc(39) boolean local39 = false;
while (true) {
@Pc(78) int local78;
@Pc(95) LocType local95;
do {
@Pc(72) int local72;
@Pc(68) int local68;
do {
do {
do {
do {
@Pc(45) int local45;
while (local39) {
local45 = local22.gsmarts();
if (local45 == 0) {
continue label70;
}
local22.g1();
}
local45 = local22.gsmarts();
if (local45 == 0) {
continue label70;
}
local33 += local45 - 1;
@Pc(58) int local58 = local33 & 0x3F;
@Pc(64) int local64 = local33 >> 6 & 0x3F;
local68 = arg1 + local58;
local72 = arg0 + local64;
local78 = local22.g1() >> 2;
} while (local72 <= 0);
} while (local68 <= 0);
} while (local72 >= 103);
} while (local68 >= 103);
local95 = LocTypeList.get(local17);
} while (local78 == 22 && !Preferences.showGroundDecorations && local95.anInt4429 == 0 && local95.anInt4435 != 1 && !local95.aBoolean206);
local39 = true;
if (!local95.isReady()) {
local15 = false;
ClientProt.anInt5804++;
}
}
}
}
}

View file

@ -396,7 +396,7 @@ public class MiniMap {
method1446(arg3, Sprites.mapflags, local181, local146, arg1, arg2);
}
if (GlRenderer.enabled) {
GlRaster.method1186(arg2 + arg3.width / 2 - 1, arg1 + -1 - -(arg3.height / 2), 3, 3, 16777215);
GlRaster.fillRect(arg2 + arg3.width / 2 - 1, arg1 + -1 - -(arg3.height / 2), 3, 3, 16777215);
} else {
SoftwareRaster.fillRect(arg3.width / 2 + arg2 - 1, arg3.height / 2 + -1 + arg1, 3, 3, 16777215);
}

View file

@ -73,6 +73,8 @@ public class MiniMenu {
public static final JagString aClass100_1008 = JagString.parse("<col=00ffff>");
@OriginalMember(owner = "client!uf", name = "q", descriptor = "Lclient!na;")
public static final JagString aClass100_1042 = JagString.parse("Null");
@OriginalMember(owner = "client!e", name = "pc", descriptor = "[I")
public static final int[] anIntArray132 = new int[4];
@OriginalMember(owner = "client!ck", name = "D", descriptor = "Lclient!na;")
public static JagString aClass100_203 = null;
@OriginalMember(owner = "client!hn", name = "W", descriptor = "Lclient!na;")
@ -129,6 +131,8 @@ public class MiniMenu {
public static boolean aBoolean302 = false;
@OriginalMember(owner = "client!bh", name = "t", descriptor = "I")
public static int clickedInventoryIndex = 0;
@OriginalMember(owner = "client!em", name = "D", descriptor = "I")
public static int gregorianDateSeed;
@OriginalMember(owner = "client!va", name = "a", descriptor = "(IZILclient!be;)V")
public static void addComponentEntries(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component component) {
@ -1544,4 +1548,23 @@ public class MiniMenu {
anInt1092 = arg5;
InterfaceList.redraw(local8);
}
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(Lclient!be;III)V")
public static void method1207(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) {
if (size < 2 && anInt5014 == 0 && !aBoolean302) {
return;
}
@Pc(24) JagString local24 = method471();
if (arg0 == null) {
@Pc(40) int local40 = Fonts.b12Full.method2859(local24, arg2 + 4, arg1 - -15, client.aRandom1, gregorianDateSeed);
InterfaceList.redrawScreen(arg2 + 4, Fonts.b12Full.getStringWidth(local24) + local40, arg1, 15);
return;
}
@Pc(59) Font local59 = arg0.method491(Sprites.nameIcons);
if (local59 == null) {
local59 = Fonts.b12Full;
}
local59.method2878(local24, arg2, arg1, arg0.width, arg0.height, arg0.color, arg0.shadowColor, arg0.anInt460, arg0.anInt478, client.aRandom1, gregorianDateSeed, anIntArray132);
InterfaceList.redrawScreen(anIntArray132[0], anIntArray132[2], anIntArray132[1], anIntArray132[3]);
}
}

View file

@ -14,6 +14,8 @@ public class SceneGraph {
public static final int[] anIntArray469 = new int[]{0, -1, 0, 1};
@OriginalMember(owner = "client!fb", name = "q", descriptor = "[I")
public static final int[] anIntArray154 = new int[]{-1, -1, 1, 1};
@OriginalMember(owner = "client!j", name = "O", descriptor = "[I")
public static final int[] anIntArray565 = new int[]{1, -1, -1, 1};
@OriginalMember(owner = "client!kc", name = "o", descriptor = "[[[Lclient!bj;")
public static Tile[][][] tiles;
@ -1409,7 +1411,7 @@ public class SceneGraph {
if (local100 instanceof Loc) {
((Loc) local100).method1046();
} else {
Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4);
Loc.method181(type, anIntArray154[angle] * 8, angle + 4, anIntArray565[angle] * 8, 4, x, z, arg4);
}
} else if (shape == 7) {
if (local100 instanceof Loc) {
@ -1421,12 +1423,12 @@ public class SceneGraph {
if (local100 instanceof Loc) {
((Loc) local100).method1046();
} else {
Loc.method181(type, anIntArray154[angle] * 8, angle + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4);
Loc.method181(type, anIntArray154[angle] * 8, angle + 4, anIntArray565[angle] * 8, 4, x, z, arg4);
}
if (local102 instanceof Loc) {
((Loc) local102).method1046();
} else {
Loc.method181(type, anIntArray154[angle] * 8, (angle + 2 & 0x3) + 4, Static114.anIntArray565[angle] * 8, 4, x, z, arg4);
Loc.method181(type, anIntArray154[angle] * 8, (angle + 2 & 0x3) + 4, anIntArray565[angle] * 8, 4, x, z, arg4);
}
} else if (shape == 11) {
if (local100 instanceof Loc) {
@ -2647,13 +2649,13 @@ public class SceneGraph {
if (local62.anInt4430 == -1 && local62.multiLocs == null && !local62.aBoolean214) {
local1950 = local62.method3428(arg9 + 4, local165, local153, 4, local199, local213, arg1, null, local330, local173);
if (GlRenderer.enabled && local330) {
ShadowManager.method4211(local1950.aClass36_Sub1_3, local165 - Static114.anIntArray565[arg9] * 8, local201, local173 - anIntArray154[arg9] * 8);
ShadowManager.method4211(local1950.aClass36_Sub1_3, local165 - anIntArray565[arg9] * 8, local201, local173 - anIntArray154[arg9] * 8);
}
local1934 = local1950.aClass8_10;
} else {
local1934 = new Loc(arg5, 4, arg9 + 4, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null);
}
setWallDecor(arg2, arg7, arg8, local199, local1934, null, 256, arg9, local1226 * Static114.anIntArray565[arg9], local1226 * anIntArray154[arg9], local261);
setWallDecor(arg2, arg7, arg8, local199, local1934, null, 256, arg9, local1226 * anIntArray565[arg9], local1226 * anIntArray154[arg9], local261);
} else if (arg6 == 7) {
@Pc(2137) int local2137 = arg9 + 2 & 0x3;
if (local62.anInt4430 == -1 && local62.multiLocs == null && !local62.aBoolean214) {
@ -2676,7 +2678,7 @@ public class SceneGraph {
@Pc(2289) Entity local2289;
if (local62.anInt4430 == -1 && local62.multiLocs == null && !local62.aBoolean214) {
@Pc(2297) int local2297 = anIntArray154[arg9] * 8;
@Pc(2303) int local2303 = Static114.anIntArray565[arg9] * 8;
@Pc(2303) int local2303 = anIntArray565[arg9] * 8;
@Pc(2319) Loc_Class139 local2319 = local62.method3428(arg9 + 4, local165, local153, 4, local199, local213, arg1, null, local330, local173);
if (GlRenderer.enabled && local330) {
ShadowManager.method4211(local2319.aClass36_Sub1_3, local165 - local2303, local201, local173 - local2297);
@ -2691,7 +2693,7 @@ public class SceneGraph {
local1934 = new Loc(arg5, 4, arg9 + 4, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null);
local2289 = new Loc(arg5, 4, local2244 + 4, arg0, arg7, arg8, local62.anInt4430, local62.aBoolean209, null);
}
setWallDecor(arg2, arg7, arg8, local199, local1934, local2289, 256, arg9, local1226 * Static114.anIntArray565[arg9], anIntArray154[arg9] * local1226, local261);
setWallDecor(arg2, arg7, arg8, local199, local1934, local2289, 256, arg9, local1226 * anIntArray565[arg9], anIntArray154[arg9] * local1226, local261);
}
}
}

View file

@ -171,8 +171,8 @@ public final class ScriptRunner {
local122 = (arg0 - local115) / 2;
if (arg4) {
GlRaster.method1177();
GlRaster.method1186(arg3, arg1, local122, arg2, 0);
GlRaster.method1186(arg0 + arg3 - local122, arg1, local122, arg2, 0);
GlRaster.fillRect(arg3, arg1, local122, arg2, 0);
GlRaster.fillRect(arg0 + arg3 - local122, arg1, local122, arg2, 0);
}
arg3 += local122;
arg0 -= local122 * 2;
@ -186,8 +186,8 @@ public final class ScriptRunner {
local122 = (arg2 - local115) / 2;
if (arg4) {
GlRaster.method1177();
GlRaster.method1186(arg3, arg1, arg0, local122, 0);
GlRaster.method1186(arg3, arg1 + arg2 - local122, arg0, local122, 0);
GlRaster.fillRect(arg3, arg1, arg0, local122, 0);
GlRaster.fillRect(arg3, arg1 + arg2 - local122, arg0, local122, 0);
}
arg2 -= local122 * 2;
arg1 += local122;
@ -338,11 +338,11 @@ public final class ScriptRunner {
}
if (aBoolean43) {
if (GlRenderer.enabled) {
GlRaster.method1186(arg2, arg4, arg3, arg0, 0);
GlRaster.fillRect(arg2, arg4, arg3, arg0, 0);
} else {
SoftwareRaster.fillRect(arg2, arg4, arg3, arg0, 0);
}
Static114.drawTextOnScreen(false, LocalizedText.LOADING);
Fonts.drawTextOnScreen(false, LocalizedText.LOADING);
}
if (!arg1 && !aBoolean43 && !Static40.aBoolean108 && arg2 <= anInt3751 && arg3 + arg2 > anInt3751 && arg4 <= anInt1892 && arg0 + arg4 > anInt1892) {
MiniMenu.addEntries(arg4, arg3, arg0, arg2, anInt1892, anInt3751);

View file

@ -539,7 +539,7 @@ public final class Static1 {
public static void method4(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) {
if (GlRenderer.enabled) {
GlRaster.setClip(arg0, arg3, arg2 + arg0, arg1 + arg3);
GlRaster.method1186(arg0, arg3, arg2, arg1, 0);
GlRaster.fillRect(arg0, arg3, arg2, arg1, 0);
} else {
SoftwareRaster.setClip(arg0, arg3, arg2 + arg0, arg3 + arg1);
SoftwareRaster.fillRect(arg0, arg3, arg2, arg1, 0);
@ -573,7 +573,7 @@ public final class Static1 {
}
if (GlRenderer.enabled) {
GlRaster.fillRectAlpha(local161, local147, local167, local153, local169, 128);
GlRaster.method1179(local161, local147, local167, local153, local169);
GlRaster.drawRect(local161, local147, local167, local153, local169);
} else {
SoftwareRaster.fillRectAlpha(local161, local147, local167, local153, local169, 128);
SoftwareRaster.drawRect(local161, local147, local167, local153, local169);

View file

@ -116,7 +116,7 @@ public final class Static112 {
}
Fonts.b12Full.renderLeft(MiniMenu.getOp(local203), local3 + 3, local219, local418, 0);
}
Static121.method2407(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761);
Static121.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761);
}
}

View file

@ -1,41 +0,0 @@
package rt4;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
import java.awt.*;
public final class Static114 {
@OriginalMember(owner = "client!j", name = "O", descriptor = "[I")
public static final int[] anIntArray565 = new int[]{1, -1, -1, 1};
@OriginalMember(owner = "client!j", name = "a", descriptor = "(BZLclient!na;)V")
public static void drawTextOnScreen(@OriginalArg(1) boolean arg0, @OriginalArg(2) JagString arg1) {
@Pc(24) int local24 = Fonts.p12Full.getMaxLineWidth(arg1, 250);
@Pc(31) int local31 = Fonts.p12Full.getParagraphLineCount(arg1, 250) * 13;
if (GlRenderer.enabled) {
GlRaster.method1186(6, 6, local24 + 4 + 4, local31 + 8, 0);
GlRaster.method1179(6, 6, local24 + 4 + 4, local31 + 4 + 4, 16777215);
} else {
SoftwareRaster.fillRect(6, 6, local24 + 4 + 4, local31 + 8, 0);
SoftwareRaster.drawRect(6, 6, local24 + 8, 4 + 4 + local31, 16777215);
}
Fonts.p12Full.method2852(arg1, 10, 10, local24, local31, 16777215, -1, 1, 1, 0);
InterfaceList.method4012(6, local24 + 8, 6, local31 + 4 + 4);
if (!arg0) {
Static121.method2407(10, 10, local31, local24);
} else if (GlRenderer.enabled) {
GlRenderer.swapBuffers();
} else {
try {
@Pc(159) Graphics local159 = GameShell.canvas.getGraphics();
SoftwareRaster.frameBuffer.draw(local159);
} catch (@Pc(167) Exception local167) {
GameShell.canvas.repaint();
}
}
}
}

View file

@ -13,7 +13,7 @@ public final class Static121 {
public static boolean qaOpTest = false;
@OriginalMember(owner = "client!jg", name = "a", descriptor = "(IBIII)V")
public static void method2407(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
public static void redrawScreen(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
for (@Pc(3) int local3 = 0; local3 < InterfaceList.rectangles; local3++) {
if (arg0 < InterfaceList.rectangleX[local3] + InterfaceList.rectangleWidth[local3] && arg0 + arg3 > InterfaceList.rectangleX[local3] && InterfaceList.rectangleY[local3] + InterfaceList.rectangleHeight[local3] > arg1 && InterfaceList.rectangleY[local3] < arg2 + arg1) {
InterfaceList.rectangleRedraw[local3] = true;

View file

@ -73,9 +73,9 @@ public final class Static145 {
@Pc(11) int local11 = InterfaceList.anInt4271;
@Pc(15) int local15 = InterfaceList.anInt436;
if (GlRenderer.enabled) {
GlRaster.method1186(local11, local3, local9, local15, 6116423);
GlRaster.method1186(local11 + 1, local3 + 1, local9 - 2, 16, 0);
GlRaster.method1179(local11 + 1, local3 + 18, local9 - 2, local15 + -19, 0);
GlRaster.fillRect(local11, local3, local9, local15, 6116423);
GlRaster.fillRect(local11 + 1, local3 + 1, local9 - 2, 16, 0);
GlRaster.drawRect(local11 + 1, local3 + 18, local9 - 2, local15 + -19, 0);
} else {
SoftwareRaster.fillRect(local11, local3, local9, local15, 6116423);
SoftwareRaster.fillRect(local11 + 1, local3 + 1, local9 - 2, 16, 0);
@ -92,7 +92,7 @@ public final class Static145 {
}
Fonts.b12Full.renderLeft(MiniMenu.getOp(local107), local11 + 3, local127, local129, 0);
}
Static121.method2407(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761);
Static121.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt5138, InterfaceList.anInt436, InterfaceList.anInt761);
}
@OriginalMember(owner = "client!fh", name = "a", descriptor = "(BLclient!ek;)V")

View file

@ -63,7 +63,7 @@ public final class Static165 {
@OriginalMember(owner = "client!gi", name = "a", descriptor = "(IIIIB)V")
public static void method1760(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(3) int arg3) {
if (arg1 - arg0 >= TextureOp29.anInt4164 && TextureOp29.anInt5063 >= arg0 + arg1 && arg3 - arg0 >= TextureOp29.anInt5773 && TextureOp29.anInt2869 >= arg0 + arg3) {
Static49.method1206(arg1, arg0, arg2, arg3);
TextureOp29SubOp4.method1206(arg1, arg0, arg2, arg3);
} else {
Static89.method1843(arg2, arg3, arg0, arg1);
}

View file

@ -12,9 +12,6 @@ public final class Static233 {
@OriginalMember(owner = "client!t", name = "A", descriptor = "I")
public static int anInt5225;
@OriginalMember(owner = "client!t", name = "y", descriptor = "I")
public static int loadingScreenState = 0;
@OriginalMember(owner = "client!t", name = "a", descriptor = "(IIIZIII)V")
public static void method4000(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3, @OriginalArg(5) int arg4, @OriginalArg(6) int arg5) {
@Pc(3) int local3 = 0;

View file

@ -38,9 +38,9 @@ public final class Static44 {
}
if (MiniMenu.size == 1) {
Static40.aBoolean108 = false;
InterfaceList.method4012(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
InterfaceList.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
} else {
InterfaceList.method4012(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
InterfaceList.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
local53 = Fonts.b12Full.getStringWidth(LocalizedText.CHOOSE_OPTION);
for (@Pc(95) int local95 = 0; local95 < MiniMenu.size; local95++) {
@Pc(104) int local104 = Fonts.b12Full.getStringWidth(MiniMenu.getOp(local95));

View file

@ -1,120 +0,0 @@
package rt4;
import org.openrs2.deob.annotation.OriginalArg;
import org.openrs2.deob.annotation.OriginalMember;
import org.openrs2.deob.annotation.Pc;
public final class Static49 {
@OriginalMember(owner = "client!e", name = "pc", descriptor = "[I")
public static final int[] anIntArray132 = new int[4];
@OriginalMember(owner = "client!em", name = "D", descriptor = "I")
public static int gregorianDateSeed;
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(BII[B)Z")
public static boolean method1201(@OriginalArg(1) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) byte[] arg2) {
@Pc(15) boolean local15 = true;
@Pc(17) int local17 = -1;
@Pc(22) Buffer local22 = new Buffer(arg2);
label70:
while (true) {
@Pc(26) int local26 = local22.gVarSmart();
if (local26 == 0) {
return local15;
}
@Pc(33) int local33 = 0;
local17 += local26;
@Pc(39) boolean local39 = false;
while (true) {
@Pc(78) int local78;
@Pc(95) LocType local95;
do {
@Pc(72) int local72;
@Pc(68) int local68;
do {
do {
do {
do {
@Pc(45) int local45;
while (local39) {
local45 = local22.gsmarts();
if (local45 == 0) {
continue label70;
}
local22.g1();
}
local45 = local22.gsmarts();
if (local45 == 0) {
continue label70;
}
local33 += local45 - 1;
@Pc(58) int local58 = local33 & 0x3F;
@Pc(64) int local64 = local33 >> 6 & 0x3F;
local68 = arg1 + local58;
local72 = arg0 + local64;
local78 = local22.g1() >> 2;
} while (local72 <= 0);
} while (local68 <= 0);
} while (local72 >= 103);
} while (local68 >= 103);
local95 = LocTypeList.get(local17);
} while (local78 == 22 && !Preferences.showGroundDecorations && local95.anInt4429 == 0 && local95.anInt4435 != 1 && !local95.aBoolean206);
local39 = true;
if (!local95.isReady()) {
local15 = false;
ClientProt.anInt5804++;
}
}
}
}
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(IBIII)V")
public static void method1206(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
@Pc(15) int local15 = 0;
TextureOp29SubOp4.method2576(TextureOp29SubOp4.anIntArrayArray10[arg3], arg0 - arg1, arg0 - -arg1, arg2);
@Pc(32) int local32 = -arg1;
@Pc(34) int local34 = arg1;
@Pc(36) int local36 = -1;
while (local15 < local34) {
local15++;
local36 += 2;
local32 += local36;
if (local32 >= 0) {
local34--;
local32 -= local34 << 1;
@Pc(65) int[] local65 = TextureOp29SubOp4.anIntArrayArray10[arg3 + local34];
@Pc(71) int[] local71 = TextureOp29SubOp4.anIntArrayArray10[arg3 - local34];
@Pc(76) int local76 = arg0 + local15;
@Pc(81) int local81 = arg0 - local15;
TextureOp29SubOp4.method2576(local65, local81, local76, arg2);
TextureOp29SubOp4.method2576(local71, local81, local76, arg2);
}
@Pc(97) int local97 = local34 + arg0;
@Pc(102) int local102 = arg0 - local34;
@Pc(109) int[] local109 = TextureOp29SubOp4.anIntArrayArray10[arg3 + local15];
@Pc(116) int[] local116 = TextureOp29SubOp4.anIntArrayArray10[arg3 - local15];
TextureOp29SubOp4.method2576(local109, local102, local97, arg2);
TextureOp29SubOp4.method2576(local116, local102, local97, arg2);
}
}
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(Lclient!be;III)V")
public static void method1207(@OriginalArg(0) Component arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2) {
if (MiniMenu.size < 2 && MiniMenu.anInt5014 == 0 && !MiniMenu.aBoolean302) {
return;
}
@Pc(24) JagString local24 = MiniMenu.method471();
if (arg0 == null) {
@Pc(40) int local40 = Fonts.b12Full.method2859(local24, arg2 + 4, arg1 - -15, client.aRandom1, gregorianDateSeed);
InterfaceList.method4012(arg2 + 4, Fonts.b12Full.getStringWidth(local24) + local40, arg1, 15);
return;
}
@Pc(59) Font local59 = arg0.method491(Sprites.nameIcons);
if (local59 == null) {
local59 = Fonts.b12Full;
}
local59.method2878(local24, arg2, arg1, arg0.width, arg0.height, arg0.color, arg0.shadowColor, arg0.anInt460, arg0.anInt478, client.aRandom1, gregorianDateSeed, anIntArray132);
InterfaceList.method4012(anIntArray132[0], anIntArray132[2], anIntArray132[1], anIntArray132[3]);
}
}

View file

@ -59,7 +59,7 @@ public final class Static7 {
local204 = Mouse.lastMouseX;
if (local204 < InterfaceList.anInt4271 - 10 || local204 > InterfaceList.anInt761 + InterfaceList.anInt4271 + 10 || InterfaceList.anInt5138 - 10 > local93 || local93 > InterfaceList.anInt436 + InterfaceList.anInt5138 + 10) {
Static40.aBoolean108 = false;
InterfaceList.method4012(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
InterfaceList.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
}
}
if (local20 != 1) {
@ -86,6 +86,6 @@ public final class Static7 {
MiniMenu.doAction(local269);
}
Static40.aBoolean108 = false;
InterfaceList.method4012(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
InterfaceList.redrawScreen(InterfaceList.anInt4271, InterfaceList.anInt761, InterfaceList.anInt5138, InterfaceList.anInt436);
}
}

View file

@ -527,12 +527,12 @@ public final class Static87 {
if (alpha == 0) {
if (component.filled) {
if (GlRenderer.enabled) {
GlRaster.method1186(local123, local114, component.width, component.height, local270);
GlRaster.fillRect(local123, local114, component.width, component.height, local270);
} else {
SoftwareRaster.fillRect(local123, local114, component.width, component.height, local270);
}
} else if (GlRenderer.enabled) {
GlRaster.method1179(local123, local114, component.width, component.height, local270);
GlRaster.drawRect(local123, local114, component.width, component.height, local270);
} else {
SoftwareRaster.drawRect(local123, local114, component.width, component.height, local270);
}
@ -584,7 +584,7 @@ public final class Static87 {
if (!component.if3) {
local1934 = JagString.method2465(component, local1934);
}
local1921.method2852(local1934, local123, local114, component.width, component.height, local276, component.textAntiMacro ? 0 : -1, component.anInt460, component.anInt478, component.anInt467);
local1921.drawInterfaceText(local1934, local123, local114, component.width, component.height, local276, component.textAntiMacro ? 0 : -1, component.anInt460, component.anInt478, component.anInt467);
} else if (Component.aBoolean72) {
InterfaceList.redraw(component);
}
@ -862,8 +862,8 @@ public final class Static87 {
cardMemory = arg4 - local270;
}
if (GlRenderer.enabled) {
GlRaster.method1186(cardMemory, local556, local270, local276, 16777120);
GlRaster.method1179(cardMemory, local556, local270, local276, 0);
GlRaster.fillRect(cardMemory, local556, local270, local276, 16777120);
GlRaster.drawRect(cardMemory, local556, local270, local276, 0);
} else {
SoftwareRaster.fillRect(cardMemory, local556, local270, local276, 16777120);
SoftwareRaster.drawRect(cardMemory, local556, local270, local276, 0);
@ -939,8 +939,8 @@ public final class Static87 {
SoftwareRaster.drawHorizontalLine(arg2 + 1, local35 + arg3 - (-local54 + -14), 15, anInt671);
return;
}
GlRaster.method1186(arg2, arg3 + 16, 16, arg4 - 32, anInt4306);
GlRaster.method1186(arg2, arg3 + local54 + 16, 16, local35, anInt1704);
GlRaster.fillRect(arg2, arg3 + 16, 16, arg4 - 32, anInt4306);
GlRaster.fillRect(arg2, arg3 + local54 + 16, 16, local35, anInt1704);
GlRaster.method1176(arg2, local54 + arg3 + 16, local35, anInt4938);
GlRaster.method1176(arg2 + 1, local54 + 16 + arg3, local35, anInt4938);
GlRaster.method1174(arg2, local54 + arg3 + 16, 16, anInt4938);

View file

@ -141,9 +141,9 @@ public final class Static89 {
Static145.method2744();
}
} else if (Static87.aClass13_13 != null) {
Static49.method1207(Static87.aClass13_13, Static87.anInt3484, Static131.anInt3260);
MiniMenu.method1207(Static87.aClass13_13, Static87.anInt3484, Static131.anInt3260);
} else if (Static87.anInt2503 != -1) {
Static49.method1207(null, Static126.anInt5574, Static87.anInt2503);
MiniMenu.method1207(null, Static126.anInt5574, Static87.anInt2503);
}
local60 = Static40.aBoolean108 ? -1 : method4044();
if (local60 == -1) {

View file

@ -147,6 +147,36 @@ public final class TextureOp29SubOp4 extends TextureOp29SubOp {
return new TextureOp29SubOp4(arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g2b(), arg0.g3(), arg0.g3(), arg0.g1());
}
@OriginalMember(owner = "client!dm", name = "a", descriptor = "(IBIII)V")
public static void method1206(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) int arg3) {
@Pc(15) int local15 = 0;
method2576(anIntArrayArray10[arg3], arg0 - arg1, arg0 - -arg1, arg2);
@Pc(32) int local32 = -arg1;
@Pc(34) int local34 = arg1;
@Pc(36) int local36 = -1;
while (local15 < local34) {
local15++;
local36 += 2;
local32 += local36;
if (local32 >= 0) {
local34--;
local32 -= local34 << 1;
@Pc(65) int[] local65 = anIntArrayArray10[arg3 + local34];
@Pc(71) int[] local71 = anIntArrayArray10[arg3 - local34];
@Pc(76) int local76 = arg0 + local15;
@Pc(81) int local81 = arg0 - local15;
method2576(local65, local81, local76, arg2);
method2576(local71, local81, local76, arg2);
}
@Pc(97) int local97 = local34 + arg0;
@Pc(102) int local102 = arg0 - local34;
@Pc(109) int[] local109 = anIntArrayArray10[arg3 + local15];
@Pc(116) int[] local116 = anIntArrayArray10[arg3 - local15];
method2576(local109, local102, local97, arg2);
method2576(local116, local102, local97, arg2);
}
}
@OriginalMember(owner = "client!ta", name = "a", descriptor = "(IZI)V")
@Override
public final void method4009(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1) {

View file

@ -1614,11 +1614,11 @@ public class WorldMap {
local50 = arg0 + arg3 / 2;
local61 = arg2 / 2 + arg1 - 18 - 20;
if (GlRenderer.enabled) {
GlRaster.method1186(arg0, arg1, arg3, arg2, 0);
GlRaster.method1179(local50 - 152, local61, 304, 34, 9179409);
GlRaster.method1179(local50 - 151, local61 + 1, 302, 32, 0);
GlRaster.method1186(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409);
GlRaster.method1186(local50 + loadPercentage * 3 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0);
GlRaster.fillRect(arg0, arg1, arg3, arg2, 0);
GlRaster.drawRect(local50 - 152, local61, 304, 34, 9179409);
GlRaster.drawRect(local50 - 151, local61 + 1, 302, 32, 0);
GlRaster.fillRect(local50 - 150, local61 + 2, loadPercentage * 3, 30, 9179409);
GlRaster.fillRect(local50 + loadPercentage * 3 - 150, local61 - -2, 300 - loadPercentage * 3, 30, 0);
} else {
SoftwareRaster.fillRect(arg0, arg1, arg3, arg2, 0);
SoftwareRaster.drawRect(local50 - 152, local61, 304, 34, 9179409);

View file

@ -318,9 +318,9 @@ public final class client extends GameShell {
if (arg0 == 25 || arg0 == 28) {
ClientProt.anInt5804 = 0;
anInt5150 = 1;
Static233.loadingScreenState = 0;
LoginManager.loadingScreenState = 0;
Static38.anInt1196 = 1;
ClientProt.mapFilesMissingCount = 0;
LoginManager.mapFilesMissingCount = 0;
WorldMap.clear(true);
}
if (arg0 == 25 || arg0 == 10) {
@ -720,25 +720,25 @@ public final class client extends GameShell {
} else if (gameState == 10) {
Static126.method2460();
} else if (gameState == 25 || gameState == 28) {
if (Static233.loadingScreenState == 1) {
if (anInt5150 < ClientProt.mapFilesMissingCount) {
anInt5150 = ClientProt.mapFilesMissingCount;
if (LoginManager.loadingScreenState == 1) {
if (anInt5150 < LoginManager.mapFilesMissingCount) {
anInt5150 = LoginManager.mapFilesMissingCount;
}
local80 = (anInt5150 - ClientProt.mapFilesMissingCount) * 50 / anInt5150;
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80}));
} else if (Static233.loadingScreenState == 2) {
local80 = (anInt5150 - LoginManager.mapFilesMissingCount) * 50 / anInt5150;
Fonts.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80}));
} else if (LoginManager.loadingScreenState == 2) {
if (Static38.anInt1196 < ClientProt.anInt5804) {
Static38.anInt1196 = ClientProt.anInt5804;
}
local80 = (Static38.anInt1196 - ClientProt.anInt5804) * 50 / Static38.anInt1196 + 50;
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80}));
Fonts.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.LOADING, aClass100_974, JagString.parseInt(local80), Static87.aClass100_80}));
} else {
Static114.drawTextOnScreen(false, LocalizedText.LOADING);
Fonts.drawTextOnScreen(false, LocalizedText.LOADING);
}
} else if (gameState == 30) {
Static89.method1841();
} else if (gameState == 40) {
Static114.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.CONLOST, Static87.aClass100_556, LocalizedText.ATTEMPT_TO_REESTABLISH}));
Fonts.drawTextOnScreen(false, JagString.concatenate(new JagString[]{LocalizedText.CONLOST, Static87.aClass100_556, LocalizedText.ATTEMPT_TO_REESTABLISH}));
}
if (GlRenderer.enabled && gameState != 0) {
GlRenderer.swapBuffers();
@ -1546,8 +1546,8 @@ public final class client extends GameShell {
loop++;
if (loop % 1000 == 1) {
@Pc(24) GregorianCalendar gregorianCalendar = new GregorianCalendar();
Static49.gregorianDateSeed = gregorianCalendar.get(Calendar.HOUR_OF_DAY) * 600 + gregorianCalendar.get(Calendar.MINUTE) * 10 + gregorianCalendar.get(Calendar.SECOND) / 6;
aRandom1.setSeed(Static49.gregorianDateSeed);
MiniMenu.gregorianDateSeed = gregorianCalendar.get(Calendar.HOUR_OF_DAY) * 600 + gregorianCalendar.get(Calendar.MINUTE) * 10 + gregorianCalendar.get(Calendar.SECOND) / 6;
aRandom1.setSeed(MiniMenu.gregorianDateSeed);
}
this.js5NetworkLoop();
if (js5MasterIndex != null) {
@ -1571,7 +1571,7 @@ public final class client extends GameShell {
this.mainLoad();
GameShell.resetTimer();
} else if (gameState == 25 || gameState == 28) {
ClientProt.rebuildMap();
LoginManager.rebuildMap();
}
if (gameState == 10) {
this.mainUpdate();