mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
JagString toString function, a few extra renames
This commit is contained in:
parent
0a6c38d78e
commit
08fa329cf9
7 changed files with 82 additions and 80 deletions
|
|
@ -105,8 +105,8 @@ public final class BasType {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!ck", name = "a", descriptor = "(IBLclient!wa;)V")
|
||||
private void method881(@OriginalArg(0) int arg0, @OriginalArg(2) Buffer arg1) {
|
||||
if (arg0 == 1) {
|
||||
private void method881(@OriginalArg(0) int opcode, @OriginalArg(2) Buffer arg1) {
|
||||
if (opcode == 1) {
|
||||
this.idleAnimationId = arg1.g2();
|
||||
this.walkAnimation = arg1.g2();
|
||||
if (this.walkAnimation == 65535) {
|
||||
|
|
@ -115,26 +115,26 @@ public final class BasType {
|
|||
if (this.idleAnimationId == 65535) {
|
||||
this.idleAnimationId = -1;
|
||||
}
|
||||
} else if (arg0 == 2) {
|
||||
} else if (opcode == 2) {
|
||||
this.anInt1062 = arg1.g2();
|
||||
} else if (arg0 == 3) {
|
||||
} else if (opcode == 3) {
|
||||
this.anInt1042 = arg1.g2();
|
||||
} else if (arg0 == 4) {
|
||||
} else if (opcode == 4) {
|
||||
this.anInt1066 = arg1.g2();
|
||||
} else if (arg0 == 5) {
|
||||
} else if (opcode == 5) {
|
||||
this.anInt1048 = arg1.g2();
|
||||
} else if (arg0 == 6) {
|
||||
} else if (opcode == 6) {
|
||||
this.runAnimationId = arg1.g2();
|
||||
} else if (arg0 == 7) {
|
||||
} else if (opcode == 7) {
|
||||
this.runAnimationId2 = arg1.g2();
|
||||
} else if (arg0 == 8) {
|
||||
} else if (opcode == 8) {
|
||||
this.runAnimationId3 = arg1.g2();
|
||||
} else if (arg0 == 9) {
|
||||
} else if (opcode == 9) {
|
||||
this.runAnimationId4 = arg1.g2();
|
||||
} else if (arg0 == 26) {
|
||||
} else if (opcode == 26) {
|
||||
this.anInt1059 = (short) (arg1.g1() * 4);
|
||||
this.anInt1050 = (short) (arg1.g1() * 4);
|
||||
} else if (arg0 == 27) {
|
||||
} else if (opcode == 27) {
|
||||
if (this.modelRotateTranslate == null) {
|
||||
this.modelRotateTranslate = new int[12][];
|
||||
}
|
||||
|
|
@ -143,39 +143,39 @@ public final class BasType {
|
|||
for (@Pc(314) int type = 0; type < 6; type++) {
|
||||
this.modelRotateTranslate[bodyId][type] = arg1.g2s();
|
||||
}
|
||||
} else if (arg0 == 29) {
|
||||
} else if (opcode == 29) {
|
||||
this.anInt1038 = arg1.g1();
|
||||
} else if (arg0 == 30) {
|
||||
} else if (opcode == 30) {
|
||||
this.anInt1031 = arg1.g2();
|
||||
} else if (arg0 == 31) {
|
||||
} else if (opcode == 31) {
|
||||
this.anInt1055 = arg1.g1();
|
||||
} else if (arg0 == 32) {
|
||||
} else if (opcode == 32) {
|
||||
this.anInt1040 = arg1.g2();
|
||||
} else if (arg0 == 33) {
|
||||
} else if (opcode == 33) {
|
||||
this.anInt1064 = arg1.g2s();
|
||||
} else if (arg0 == 34) {
|
||||
} else if (opcode == 34) {
|
||||
this.anInt1065 = arg1.g1();
|
||||
} else if (arg0 == 35) {
|
||||
} else if (opcode == 35) {
|
||||
this.anInt1063 = arg1.g2();
|
||||
} else if (arg0 == 36) {
|
||||
} else if (opcode == 36) {
|
||||
this.anInt1041 = arg1.g2s();
|
||||
} else if (arg0 == 37) {
|
||||
} else if (opcode == 37) {
|
||||
this.anInt1032 = arg1.g1();
|
||||
} else if (arg0 == 38) {
|
||||
} else if (opcode == 38) {
|
||||
this.anInt1036 = arg1.g2();
|
||||
} else if (arg0 == 39) {
|
||||
} else if (opcode == 39) {
|
||||
this.anInt1067 = arg1.g2();
|
||||
} else if (arg0 == 40) {
|
||||
} else if (opcode == 40) {
|
||||
this.turnAnimation1 = arg1.g2();
|
||||
} else if (arg0 == 41) {
|
||||
} else if (opcode == 41) {
|
||||
this.turnAnimation2 = arg1.g2();
|
||||
} else if (arg0 == 42) {
|
||||
} else if (opcode == 42) {
|
||||
this.turnAnimation3 = arg1.g2();
|
||||
} else if (arg0 == 43) {
|
||||
} else if (opcode == 43) {
|
||||
arg1.g2();
|
||||
} else if (arg0 == 44) {
|
||||
} else if (opcode == 44) {
|
||||
arg1.g2();
|
||||
} else if (arg0 == 45) {
|
||||
} else if (opcode == 45) {
|
||||
arg1.g2();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
public static int frameHeight;
|
||||
|
||||
@OriginalMember(owner = "client!kd", name = "pb", descriptor = "I")
|
||||
public static int anInt3252;
|
||||
public static int clientBuild;
|
||||
|
||||
@OriginalMember(owner = "client!fl", name = "U", descriptor = "I")
|
||||
public static int frameWidth;
|
||||
|
|
@ -582,12 +582,12 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
@OriginalMember(owner = "client!rc", name = "a", descriptor = "(IIZILjava/lang/String;III)V")
|
||||
protected final void startApplication(@OriginalArg(0) int cacheId, @OriginalArg(4) String cacheSubDir) {
|
||||
try {
|
||||
canvasHeight = 768;
|
||||
frameHeight = 768;
|
||||
leftMargin = 0;
|
||||
anInt3252 = 530;
|
||||
canvasWidth = 1024;
|
||||
frameWidth = 1024;
|
||||
clientBuild = 530;
|
||||
frameWidth = 2500;
|
||||
frameHeight = 1400;
|
||||
canvasWidth = frameWidth;
|
||||
canvasHeight = frameHeight;
|
||||
topMargin = 0;
|
||||
instance = this;
|
||||
frame = new Frame();
|
||||
|
|
@ -637,7 +637,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
}
|
||||
instance = this;
|
||||
topMargin = 0;
|
||||
anInt3252 = 1530;
|
||||
clientBuild = 1530;
|
||||
canvasWidth = 765;
|
||||
frameWidth = 765;
|
||||
leftMargin = 0;
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ public final class GlRenderer {
|
|||
}
|
||||
|
||||
@OriginalMember(owner = "client!tf", name = "h", descriptor = "()V")
|
||||
public static void method4160() {
|
||||
public static void draw() {
|
||||
@Pc(2) int[] local2 = new int[2];
|
||||
gl.glGetIntegerv(GL2.GL_DRAW_BUFFER, local2, 0);
|
||||
gl.glGetIntegerv(GL2.GL_READ_BUFFER, local2, 1);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import java.awt.Graphics;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.openrs2.deob.annotation.OriginalArg;
|
||||
import org.openrs2.deob.annotation.OriginalClass;
|
||||
import org.openrs2.deob.annotation.OriginalMember;
|
||||
|
|
@ -498,8 +500,8 @@ public final class JagString implements StringInterface {
|
|||
|
||||
@OriginalMember(owner = "client!na", name = "toString", descriptor = "()Ljava/lang/String;")
|
||||
@Override
|
||||
public final String toString() {
|
||||
throw new RuntimeException();
|
||||
public String toString() {
|
||||
return new String(this.chars, 0, this.length, StandardCharsets.ISO_8859_1);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!na", name = "a", descriptor = "(ZLjava/applet/Applet;)V")
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class NpcType {
|
|||
public int id;
|
||||
|
||||
@OriginalMember(owner = "client!me", name = "cb", descriptor = "[I")
|
||||
private int[] anIntArray356;
|
||||
private int[] modelIndices;
|
||||
|
||||
@OriginalMember(owner = "client!me", name = "hb", descriptor = "[I")
|
||||
public int[] multiNpcs;
|
||||
|
|
@ -237,18 +237,18 @@ public final class NpcType {
|
|||
@Pc(330) int local330;
|
||||
if (local40 == null) {
|
||||
local46 = false;
|
||||
for (@Pc(48) int local48 = 0; local48 < this.anIntArray356.length; local48++) {
|
||||
if (this.anIntArray356[local48] != -1 && !NpcTypeList.modelsArchive.isFileReady(0, this.anIntArray356[local48])) {
|
||||
for (@Pc(48) int local48 = 0; local48 < this.modelIndices.length; local48++) {
|
||||
if (this.modelIndices[local48] != -1 && !NpcTypeList.modelsArchive.isFileReady(0, this.modelIndices[local48])) {
|
||||
local46 = true;
|
||||
}
|
||||
}
|
||||
if (local46) {
|
||||
return null;
|
||||
}
|
||||
@Pc(84) RawModel[] local84 = new RawModel[this.anIntArray356.length];
|
||||
for (@Pc(86) int local86 = 0; local86 < this.anIntArray356.length; local86++) {
|
||||
if (this.anIntArray356[local86] != -1) {
|
||||
local84[local86] = Static77.create(NpcTypeList.modelsArchive, this.anIntArray356[local86]);
|
||||
@Pc(84) RawModel[] local84 = new RawModel[this.modelIndices.length];
|
||||
for (@Pc(86) int local86 = 0; local86 < this.modelIndices.length; local86++) {
|
||||
if (this.modelIndices[local86] != -1) {
|
||||
local84[local86] = Static77.create(NpcTypeList.modelsArchive, this.modelIndices[local86]);
|
||||
if (this.anIntArrayArray29 != null && this.anIntArrayArray29[local86] != null && local84[local86] != null) {
|
||||
local84[local86].translate(this.anIntArrayArray29[local86][0], this.anIntArrayArray29[local86][1], this.anIntArrayArray29[local86][2]);
|
||||
}
|
||||
|
|
@ -557,15 +557,15 @@ public final class NpcType {
|
|||
|
||||
@OriginalMember(owner = "client!me", name = "a", descriptor = "(IILclient!wa;)V")
|
||||
private void decode(@OriginalArg(1) int arg0, @OriginalArg(2) Buffer arg1) {
|
||||
@Pc(12) int local12;
|
||||
@Pc(12) int count;
|
||||
@Pc(18) int local18;
|
||||
if (arg0 == 1) {
|
||||
local12 = arg1.g1();
|
||||
this.anIntArray356 = new int[local12];
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
this.anIntArray356[local18] = arg1.g2();
|
||||
if (this.anIntArray356[local18] == 65535) {
|
||||
this.anIntArray356[local18] = -1;
|
||||
count = arg1.g1();
|
||||
this.modelIndices = new int[count];
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
this.modelIndices[local18] = arg1.g2();
|
||||
if (this.modelIndices[local18] == 65535) {
|
||||
this.modelIndices[local18] = -1;
|
||||
}
|
||||
}
|
||||
} else if (arg0 == 2) {
|
||||
|
|
@ -578,31 +578,31 @@ public final class NpcType {
|
|||
this.ops[arg0 - 30] = null;
|
||||
}
|
||||
} else if (arg0 == 40) {
|
||||
local12 = arg1.g1();
|
||||
this.recolorSource = new short[local12];
|
||||
this.recolorDestination = new short[local12];
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
count = arg1.g1();
|
||||
this.recolorSource = new short[count];
|
||||
this.recolorDestination = new short[count];
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
this.recolorDestination[local18] = (short) arg1.g2();
|
||||
this.recolorSource[local18] = (short) arg1.g2();
|
||||
}
|
||||
} else if (arg0 == 41) {
|
||||
local12 = arg1.g1();
|
||||
this.retextureSource = new short[local12];
|
||||
this.retextureDestination = new short[local12];
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
count = arg1.g1();
|
||||
this.retextureSource = new short[count];
|
||||
this.retextureDestination = new short[count];
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
this.retextureDestination[local18] = (short) arg1.g2();
|
||||
this.retextureSource[local18] = (short) arg1.g2();
|
||||
}
|
||||
} else if (arg0 == 42) {
|
||||
local12 = arg1.g1();
|
||||
this.aByteArray51 = new byte[local12];
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
count = arg1.g1();
|
||||
this.aByteArray51 = new byte[count];
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
this.aByteArray51[local18] = arg1.g1s();
|
||||
}
|
||||
} else if (arg0 == 60) {
|
||||
local12 = arg1.g1();
|
||||
this.anIntArray354 = new int[local12];
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
count = arg1.g1();
|
||||
this.anIntArray354 = new int[count];
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
this.anIntArray354[local18] = arg1.g2();
|
||||
}
|
||||
} else if (arg0 == 93) {
|
||||
|
|
@ -627,7 +627,7 @@ public final class NpcType {
|
|||
@Pc(297) int local297;
|
||||
if (arg0 == 106 || arg0 == 118) {
|
||||
this.multiNpcVarbit = arg1.g2();
|
||||
local12 = -1;
|
||||
count = -1;
|
||||
if (this.multiNpcVarbit == 65535) {
|
||||
this.multiNpcVarbit = -1;
|
||||
}
|
||||
|
|
@ -636,9 +636,9 @@ public final class NpcType {
|
|||
this.multiNpcVarp = -1;
|
||||
}
|
||||
if (arg0 == 118) {
|
||||
local12 = arg1.g2();
|
||||
if (local12 == 65535) {
|
||||
local12 = -1;
|
||||
count = arg1.g2();
|
||||
if (count == 65535) {
|
||||
count = -1;
|
||||
}
|
||||
}
|
||||
local18 = arg1.g1();
|
||||
|
|
@ -649,7 +649,7 @@ public final class NpcType {
|
|||
this.multiNpcs[local297] = -1;
|
||||
}
|
||||
}
|
||||
this.multiNpcs[local18 + 1] = local12;
|
||||
this.multiNpcs[local18 + 1] = count;
|
||||
} else if (arg0 == 107) {
|
||||
this.aBoolean183 = false;
|
||||
} else if (arg0 == 109) {
|
||||
|
|
@ -668,9 +668,9 @@ public final class NpcType {
|
|||
} else if (arg0 == 119) {
|
||||
this.aByte10 = arg1.g1s();
|
||||
} else if (arg0 == 121) {
|
||||
this.anIntArrayArray29 = new int[this.anIntArray356.length][];
|
||||
local12 = arg1.g1();
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
this.anIntArrayArray29 = new int[this.modelIndices.length][];
|
||||
count = arg1.g1();
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
local297 = arg1.g1();
|
||||
@Pc(439) int[] local439 = this.anIntArrayArray29[local297] = new int[3];
|
||||
local439[0] = arg1.g1s();
|
||||
|
|
@ -716,12 +716,12 @@ public final class NpcType {
|
|||
} else if (arg0 == 137) {
|
||||
this.anInt3752 = arg1.g2();
|
||||
} else if (arg0 == 249) {
|
||||
local12 = arg1.g1();
|
||||
count = arg1.g1();
|
||||
if (this.params == null) {
|
||||
local18 = Static165.clp2(local12);
|
||||
local18 = Static165.clp2(count);
|
||||
this.params = new HashTable(local18);
|
||||
}
|
||||
for (local18 = 0; local18 < local12; local18++) {
|
||||
for (local18 = 0; local18 < count; local18++) {
|
||||
@Pc(592) boolean local592 = arg1.g1() == 1;
|
||||
@Pc(596) int local596 = arg1.g3();
|
||||
@Pc(605) Node local605;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public final class TracingException extends RuntimeException {
|
|||
if (Static69.signLink.applet == null) {
|
||||
return;
|
||||
}
|
||||
@Pc(109) PrivilegedRequest local109 = Static69.signLink.openUrlStream(new URL(Static69.signLink.applet.getCodeBase(), "clienterror.ws?c=" + GameShell.anInt3252 + "&u=" + Static101.aLong98 + "&v1=" + SignLink.javaVendor + "&v2=" + SignLink.javaVersion + "&e=" + local13));
|
||||
@Pc(109) PrivilegedRequest local109 = Static69.signLink.openUrlStream(new URL(Static69.signLink.applet.getCodeBase(), "clienterror.ws?c=" + GameShell.clientBuild + "&u=" + Static101.aLong98 + "&v1=" + SignLink.javaVendor + "&v2=" + SignLink.javaVersion + "&e=" + local13));
|
||||
while (local109.status == 0) {
|
||||
ThreadUtils.sleep(1L);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ public final class client extends GameShell {
|
|||
}
|
||||
}
|
||||
if (GlRenderer.enabled && (arg0 == 25 || arg0 == 28 || arg0 == 40)) {
|
||||
GlRenderer.method4160();
|
||||
GlRenderer.draw();
|
||||
}
|
||||
gameState = arg0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue