mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-19 21:10:19 -07:00
Renamed part of PlayerAppearance
This commit is contained in:
parent
df0796dc23
commit
a941543566
9 changed files with 180 additions and 156 deletions
|
|
@ -41,6 +41,9 @@ public class Buffer extends Node {
|
|||
@OriginalMember(owner = "client!dc", name = "db", descriptor = "[[B")
|
||||
public static final byte[][] allocatedMax = new byte[50][];
|
||||
|
||||
@OriginalMember(owner = "client!qj", name = "a", descriptor = "[J")
|
||||
public static final long[] CRC64_TABLE = new long[256];
|
||||
|
||||
@OriginalMember(owner = "client!ja", name = "j", descriptor = "I")
|
||||
public static int allocatedMinCount = 0;
|
||||
|
||||
|
|
@ -56,6 +59,20 @@ public class Buffer extends Node {
|
|||
@OriginalMember(owner = "client!wa", name = "T", descriptor = "I")
|
||||
public int offset;
|
||||
|
||||
static {
|
||||
for (@Pc(4) int local4 = 0; local4 < 256; local4++) {
|
||||
@Pc(10) long local10 = local4;
|
||||
for (@Pc(12) int local12 = 0; local12 < 8; local12++) {
|
||||
if ((local10 & 0x1L) == 1L) {
|
||||
local10 = local10 >>> 1 ^ 0xC96C5795D7870F42L;
|
||||
} else {
|
||||
local10 >>>= 0x1;
|
||||
}
|
||||
}
|
||||
CRC64_TABLE[local4] = local10;
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!wa", name = "<init>", descriptor = "(I)V")
|
||||
public Buffer(@OriginalArg(0) int size) {
|
||||
this.data = allocate(size);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public class Cheat {
|
|||
Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_1093, JagString.parseInt(local38), DEBUG_MEM_UNIT}));
|
||||
}
|
||||
if (arg0.equalsIgnoreCase(PCACHESIZE)) {
|
||||
Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_335, JagString.parseInt(PlayerAppearance.method1029())}));
|
||||
Chat.add(null, 0, JagString.concatenate(new JagString[]{aClass100_335, JagString.parseInt(PlayerAppearance.getModelCacheSize())}));
|
||||
}
|
||||
if (GlRenderer.enabled && arg0.equalsIgnoreCase(CARDMEM)) {
|
||||
System.out.println("oncard_geometry:" + GlCleaner.onCardGeometry);
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ public final class Player extends PathingEntity {
|
|||
@OriginalMember(owner = "client!e", name = "c", descriptor = "(B)I")
|
||||
@Override
|
||||
public final int getSize() {
|
||||
return this.appearance == null || this.appearance.anInt2492 == -1 ? super.getSize() : NpcTypeList.get(this.appearance.anInt2492).size;
|
||||
return this.appearance == null || this.appearance.npcId == -1 ? super.getSize() : NpcTypeList.get(this.appearance.npcId).size;
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!e", name = "b", descriptor = "(I)I")
|
||||
|
|
@ -351,7 +351,7 @@ public final class Player extends PathingEntity {
|
|||
@Pc(197) int[] local197 = new int[5];
|
||||
for (local111 = 0; local111 < 5; local111++) {
|
||||
local127 = arg0.g1();
|
||||
if (local127 < 0 || local127 >= PlayerAppearance.aShortArrayArray2[local111].length) {
|
||||
if (local127 < 0 || local127 >= PlayerAppearance.destinationBodyColors[local111].length) {
|
||||
local127 = 0;
|
||||
}
|
||||
local197[local111] = local127;
|
||||
|
|
@ -392,8 +392,8 @@ public final class Player extends PathingEntity {
|
|||
if (this.appearance == null) {
|
||||
this.appearance = new PlayerAppearance();
|
||||
}
|
||||
local175 = this.appearance.anInt2492;
|
||||
this.appearance.method1950(local197, local22, local26 == 1, local44, this.anInt3365);
|
||||
local175 = this.appearance.npcId;
|
||||
this.appearance.set(local197, local22, local26 == 1, local44, this.anInt3365);
|
||||
if (local175 != local22) {
|
||||
this.xFine = this.movementQueueX[0] * 128 + this.getSize() * 64;
|
||||
this.zFine = this.movementQueueZ[0] * 128 + this.getSize() * 64;
|
||||
|
|
@ -412,7 +412,7 @@ public final class Player extends PathingEntity {
|
|||
@Pc(25) SeqType local25 = this.seqId != -1 && this.anInt3420 == 0 ? SeqTypeList.get(this.seqId) : null;
|
||||
@Pc(54) SeqType local54 = this.movementSeqId == -1 || this.aBoolean98 || this.movementSeqId == this.getBasType().idleAnimationId && local25 != null ? null : SeqTypeList.get(this.movementSeqId);
|
||||
@Pc(76) Model local76 = this.appearance.method1954(this.aClass147Array3, this.anInt3373, local54, local25, this.anInt3396, this.anInt3388, this.anInt3360, this.anInt3425, this.anInt3407);
|
||||
@Pc(79) int local79 = PlayerAppearance.method1029();
|
||||
@Pc(79) int local79 = PlayerAppearance.getModelCacheSize();
|
||||
if (GlRenderer.enabled && GameShell.maxMemory < 96 && local79 > 50) {
|
||||
method501();
|
||||
}
|
||||
|
|
@ -433,7 +433,7 @@ public final class Player extends PathingEntity {
|
|||
}
|
||||
this.minY = local76.getMinY();
|
||||
@Pc(184) Model local184;
|
||||
if (Preferences.characterShadowsOn && (this.appearance.anInt2492 == -1 || NpcTypeList.get(this.appearance.anInt2492).shadow)) {
|
||||
if (Preferences.characterShadowsOn && (this.appearance.npcId == -1 || NpcTypeList.get(this.appearance.npcId).shadow)) {
|
||||
local184 = ShadowModelList.method1043(160, this.aBoolean171, local54 == null ? local25 : local54, this.xFine, 0, this.zFine, 0, 1, local76, arg0, local54 == null ? this.anInt3425 : this.anInt3407, this.anInt3424, 240);
|
||||
if (GlRenderer.enabled) {
|
||||
@Pc(188) float local188 = GlRenderer.method4179();
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -18,7 +18,7 @@ public final class ProjAnim extends Entity {
|
|||
private double aDouble4;
|
||||
|
||||
@OriginalMember(owner = "client!ra", name = "Q", descriptor = "Lclient!ga;")
|
||||
private ParticleSystem aClass47_Sub1_6;
|
||||
private ParticleSystem particleSystem;
|
||||
|
||||
@OriginalMember(owner = "client!ra", name = "U", descriptor = "D")
|
||||
private double aDouble5;
|
||||
|
|
@ -54,7 +54,7 @@ public final class ProjAnim extends Entity {
|
|||
private int anInt4820 = 0;
|
||||
|
||||
@OriginalMember(owner = "client!ra", name = "T", descriptor = "I")
|
||||
private int anInt4814 = -32768;
|
||||
private int minY = -32768;
|
||||
|
||||
@OriginalMember(owner = "client!ra", name = "z", descriptor = "I")
|
||||
public final int anInt4800;
|
||||
|
|
@ -200,14 +200,14 @@ public final class ProjAnim extends Entity {
|
|||
public final void render(@OriginalArg(0) int 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) long arg8, @OriginalArg(9) int arg9, @OriginalArg(10) ParticleSystem arg10) {
|
||||
@Pc(3) Model local3 = this.method3703();
|
||||
if (local3 != null) {
|
||||
local3.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.aClass47_Sub1_6);
|
||||
this.anInt4814 = local3.getMinY();
|
||||
local3.render(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, this.particleSystem);
|
||||
this.minY = local3.getMinY();
|
||||
}
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!ra", name = "b", descriptor = "()I")
|
||||
@Override
|
||||
public final int getMinY() {
|
||||
return this.anInt4814;
|
||||
return this.minY;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ import org.openrs2.deob.annotation.OriginalMember;
|
|||
public final class ProjAnimNode extends SecondaryNode {
|
||||
|
||||
@OriginalMember(owner = "client!ud", name = "R", descriptor = "Lclient!ra;")
|
||||
public final ProjAnim aClass8_Sub6_1;
|
||||
public final ProjAnim value;
|
||||
|
||||
@OriginalMember(owner = "client!ud", name = "<init>", descriptor = "(Lclient!ra;)V")
|
||||
public ProjAnimNode(@OriginalArg(0) ProjAnim arg0) {
|
||||
this.aClass8_Sub6_1 = arg0;
|
||||
public ProjAnimNode(@OriginalArg(0) ProjAnim value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ public final class ScriptRunner {
|
|||
@OriginalMember(owner = "client!pk", name = "i", descriptor = "(I)V")
|
||||
public static void method3532() {
|
||||
for (@Pc(16) ProjAnimNode local16 = (ProjAnimNode) SceneGraph.projectiles.head(); local16 != null; local16 = (ProjAnimNode) SceneGraph.projectiles.next()) {
|
||||
@Pc(21) ProjAnim local21 = local16.aClass8_Sub6_1;
|
||||
@Pc(21) ProjAnim local21 = local16.value;
|
||||
if (Player.level != local21.anInt4810 || local21.anInt4800 < client.loop) {
|
||||
local16.unlink();
|
||||
} else if (client.loop >= local21.anInt4822) {
|
||||
|
|
@ -2038,7 +2038,7 @@ public final class ScriptRunner {
|
|||
int1 = intStack[isp];
|
||||
for (int2 = 0; int2 < PlayerAppearance.MALE_FEATURES.length; int2++) {
|
||||
if (int1 == PlayerAppearance.MALE_FEATURES[int2]) {
|
||||
PlayerList.self.appearance.method1953(int2, int3);
|
||||
PlayerList.self.appearance.setIdentikit(int2, int3);
|
||||
continue nextOp;
|
||||
}
|
||||
}
|
||||
|
|
@ -2048,7 +2048,7 @@ public final class ScriptRunner {
|
|||
continue nextOp;
|
||||
}
|
||||
if (int1 == PlayerAppearance.FEMALE_FEATURES[int2]) {
|
||||
PlayerList.self.appearance.method1953(int2, int3);
|
||||
PlayerList.self.appearance.setIdentikit(int2, int3);
|
||||
continue nextOp;
|
||||
}
|
||||
int2++;
|
||||
|
|
@ -2058,13 +2058,13 @@ public final class ScriptRunner {
|
|||
isp -= 2;
|
||||
int1 = intStack[isp];
|
||||
int3 = intStack[isp + 1];
|
||||
PlayerList.self.appearance.setBaseColor(int1, int3);
|
||||
PlayerList.self.appearance.setColor(int1, int3);
|
||||
continue;
|
||||
}
|
||||
if (opcode == Cs2Opcodes.setFemale) {
|
||||
isp--;
|
||||
local12388 = intStack[isp] != 0;
|
||||
PlayerList.self.appearance.setFemale(local12388);
|
||||
PlayerList.self.appearance.setGender(local12388);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ import org.openrs2.deob.annotation.Pc;
|
|||
@OriginalClass("client!qj")
|
||||
public final class TriangleNormal {
|
||||
|
||||
@OriginalMember(owner = "client!qj", name = "a", descriptor = "[J")
|
||||
public static final long[] aLongArray7 = new long[256];
|
||||
|
||||
@OriginalMember(owner = "client!qj", name = "c", descriptor = "I")
|
||||
public int anInt4767;
|
||||
|
||||
|
|
@ -19,17 +16,4 @@ public final class TriangleNormal {
|
|||
@OriginalMember(owner = "client!qj", name = "f", descriptor = "I")
|
||||
public int anInt4770;
|
||||
|
||||
static {
|
||||
for (@Pc(4) int local4 = 0; local4 < 256; local4++) {
|
||||
@Pc(10) long local10 = local4;
|
||||
for (@Pc(12) int local12 = 0; local12 < 8; local12++) {
|
||||
if ((local10 & 0x1L) == 1L) {
|
||||
local10 = local10 >>> 1 ^ 0xC96C5795D7870F42L;
|
||||
} else {
|
||||
local10 >>>= 0x1;
|
||||
}
|
||||
}
|
||||
aLongArray7[local4] = local10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ public final class client extends GameShell {
|
|||
Static44.aClass13_10 = null;
|
||||
Static40.aBoolean108 = false;
|
||||
MiniMenu.size = 0;
|
||||
PlayerAppearance.DEFAULT.method1950(new int[]{0, 0, 0, 0, 0}, -1, false, null, -1);
|
||||
PlayerAppearance.DEFAULT.set(new int[]{0, 0, 0, 0, 0}, -1, false, null, -1);
|
||||
for (local3506 = 0; local3506 < 8; local3506++) {
|
||||
Player.options[local3506] = null;
|
||||
Player.secondaryOptions[local3506] = false;
|
||||
|
|
@ -931,15 +931,15 @@ public final class client extends GameShell {
|
|||
Cheat.shiftClick = true;
|
||||
FogManager.defaultLightColorRgb = 16777215;
|
||||
FogManager.defaulFogColorRgb = 0;
|
||||
PlayerAppearance.aShortArrayArray2 = PlayerAppearance.aShortArrayArray4;
|
||||
PlayerAppearance.aShortArrayArray7 = PlayerAppearance.aShortArrayArray1;
|
||||
PlayerAppearance.aShortArray65 = PlayerAppearance.aShortArray1;
|
||||
PlayerAppearance.aShortArray41 = PlayerAppearance.aShortArray5;
|
||||
PlayerAppearance.destinationBodyColors = PlayerAppearance.GAME1_DESTINATION_BODY_COLORS;
|
||||
PlayerAppearance.destinationSkinColors = PlayerAppearance.GAME1_DESTINATION_SKIN_COLORS;
|
||||
PlayerAppearance.aShortArray65 = PlayerAppearance.GAME1_SOURCE_BODY_COLORS;
|
||||
PlayerAppearance.aShortArray41 = PlayerAppearance.GAME1_SOURCE_SKIN_COLORS;
|
||||
} else {
|
||||
PlayerAppearance.aShortArrayArray2 = PlayerAppearance.aShortArrayArray6;
|
||||
PlayerAppearance.aShortArray41 = PlayerAppearance.aShortArray64;
|
||||
PlayerAppearance.aShortArrayArray7 = PlayerAppearance.aShortArrayArray5;
|
||||
PlayerAppearance.aShortArray65 = PlayerAppearance.aShortArray71;
|
||||
PlayerAppearance.destinationBodyColors = PlayerAppearance.GAME0_DESTINATION_BODY_COLORS;
|
||||
PlayerAppearance.aShortArray41 = PlayerAppearance.GAME0_SOURCE_SKIN_COLORS;
|
||||
PlayerAppearance.destinationSkinColors = PlayerAppearance.GAME0_DESTINATION_SKIN_COLORS;
|
||||
PlayerAppearance.aShortArray65 = PlayerAppearance.GAME0_SOURCE_BODY_COLORS;
|
||||
}
|
||||
|
||||
alternatePort = worldListAlternatePort;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue