Identified some more Loc and Npc opcodes

This commit is contained in:
Pazaz 2022-08-16 02:18:59 -04:00
parent efba04cbe4
commit 904c0a3e97
14 changed files with 220 additions and 220 deletions

View file

@ -301,7 +301,7 @@ public final class Loc extends Entity {
this.aClass144_2 = SeqTypeList.get(local69);
}
if (this.aClass144_2 != null) {
if (local19.aBoolean209 && this.aClass144_2.replayoff != -1) {
if (local19.allowrandomizedanimation && this.aClass144_2.replayoff != -1) {
this.anInt1297 = (int) (Math.random() * (double) this.aClass144_2.frames.length);
this.anInt1320 -= (int) (Math.random() * (double) this.aClass144_2.frameDelay[this.anInt1297]);
} else {
@ -325,7 +325,7 @@ public final class Loc extends Entity {
@Pc(192) int local192 = (local157 >> 1) + this.anInt1300;
@Pc(201) int local201 = (local157 + 1 >> 1) + this.anInt1300;
this.method1047(local192 * 128, local185 * 128);
@Pc(256) boolean local256 = !local12 && local19.aBoolean212 && (local19.id != this.anInt1321 || (this.anInt1297 != this.anInt1322 || this.aClass144_2 != null && (this.aClass144_2.aBoolean280 || SeqType.applyTweening) && this.anInt1297 != this.anInt1304) && Preferences.sceneryShadowsType >= 2);
@Pc(256) boolean local256 = !local12 && local19.castshadow && (local19.id != this.anInt1321 || (this.anInt1297 != this.anInt1322 || this.aClass144_2 != null && (this.aClass144_2.aBoolean280 || SeqType.applyTweening) && this.anInt1297 != this.anInt1304) && Preferences.sceneryShadowsType >= 2);
if (arg0 && !local256) {
return null;
}

View file

@ -97,7 +97,7 @@ public final class LocType {
public JagString name = aClass100_475;
@OriginalMember(owner = "client!pb", name = "D", descriptor = "Z")
public boolean aBoolean212 = true;
public boolean castshadow = true;
@OriginalMember(owner = "client!pb", name = "t", descriptor = "I")
public int cursor1Op = -1;
@ -145,7 +145,7 @@ public final class LocType {
private int resizex = 128;
@OriginalMember(owner = "client!pb", name = "s", descriptor = "Z")
public boolean aBoolean209 = true;
public boolean allowrandomizedanimation = true;
@OriginalMember(owner = "client!pb", name = "o", descriptor = "I")
private int resizey = 128;
@ -157,7 +157,7 @@ public final class LocType {
public int interactable = -1;
@OriginalMember(owner = "client!pb", name = "lb", descriptor = "Z")
public boolean aBoolean216 = false;
public boolean render = false;
@OriginalMember(owner = "client!pb", name = "fb", descriptor = "Z")
public boolean active = true;
@ -199,7 +199,7 @@ public final class LocType {
public int anim = -1;
@OriginalMember(owner = "client!pb", name = "I", descriptor = "Z")
public boolean aBoolean213 = false;
public boolean hasanimation = false;
@OriginalMember(owner = "client!pb", name = "O", descriptor = "I")
public int bgsound = -1;
@ -214,7 +214,7 @@ public final class LocType {
private int multiLocVarbit = -1;
@OriginalMember(owner = "client!pb", name = "yb", descriptor = "I")
public int anInt4438 = -1;
public int supportitems = -1;
@OriginalMember(owner = "client!pb", name = "zb", descriptor = "Z")
private boolean computeVertexColors = false;
@ -382,8 +382,8 @@ public final class LocType {
}
}
}
if (this.anInt4438 == -1) {
this.anInt4438 = this.blockwalk == 0 ? 0 : 1;
if (this.supportitems == -1) {
this.supportitems = this.blockwalk == 0 ? 0 : 1;
}
}
@ -540,7 +540,7 @@ public final class LocType {
} else if (opcode == 74) {
this.breakroutefinding = true;
} else if (opcode == 75) {
this.anInt4438 = buffer.g1();
this.supportitems = buffer.g1();
} else if (opcode == 77 || opcode == 92) {
count = -1;
this.multiLocVarbit = buffer.g2();
@ -579,15 +579,15 @@ public final class LocType {
for (len = 0; len < count; len++) {
this.bgsounds[len] = buffer.g2();
}
} else if (opcode == 81) {
} else if (opcode == 81) { // sethillskew
this.hillskew = 2;
this.aShort26 = (short) (buffer.g1() * 256);
} else if (opcode == 82) {
this.aBoolean216 = true;
this.render = true;
} else if (opcode == 88) {
this.aBoolean212 = false;
this.castshadow = false;
} else if (opcode == 89) {
this.aBoolean209 = false;
this.allowrandomizedanimation = false;
} else if (opcode == 90) {
this.aBoolean211 = true;
} else if (opcode == 91) {
@ -600,7 +600,7 @@ public final class LocType {
} else if (opcode == 95) {
this.hillskew = 5;
} else if (opcode == 96) {
this.aBoolean213 = true;
this.hasanimation = true;
} else if (opcode == 97) {
this.mapSceneRotated = true;
} else if (opcode == 98) {

View file

@ -1335,19 +1335,19 @@ public class LoginManager {
@Pc(129) int local129 = local103 & 0x3F;
@Pc(142) int local142 = local129 + (regionBitPacked[local16] & 0xFF) * 64 - Camera.originZ;
@Pc(148) NpcType local148 = NpcTypeList.get(local74.g2());
if (NpcList.npcs[local97] == null && (local148.aByte10 & 0x1) > 0 && local107 == SceneGraph.centralPlane && local125 >= 0 && local148.size + local125 < 104 && local142 >= 0 && local142 + local148.size < 104) {
if (NpcList.npcs[local97] == null && (local148.loginscreenproperties & 0x1) > 0 && local107 == SceneGraph.centralPlane && local125 >= 0 && local148.size + local125 < 104 && local142 >= 0 && local142 + local148.size < 104) {
NpcList.npcs[local97] = new Npc();
@Pc(198) Npc local198 = NpcList.npcs[local97];
NpcList.ids[NpcList.size++] = local97;
local198.lastSeenLoop = client.loop;
local198.setNpcType(local148);
local198.setSize(local198.type.size);
local198.anInt3400 = local198.anInt3381 = PathingEntity.ANGLES[local198.type.aByte11];
local198.anInt3376 = local198.type.anInt3733;
local198.anInt3400 = local198.anInt3381 = PathingEntity.ANGLES[local198.type.spawndirection];
local198.anInt3376 = local198.type.rotationspeed;
if (local198.anInt3376 == 0) {
local198.anInt3381 = 0;
}
local198.anInt3365 = local198.type.basId;
local198.anInt3365 = local198.type.bastypeid;
local198.method2683(local198.getSize(), local125, local142, true);
}
}

View file

@ -320,13 +320,13 @@ public class MiniMap {
if (local507 != null && local507.multiNpcs != null) {
local507 = local507.getMultiNpc();
}
if (local507 != null && local507.aBoolean184 && local507.aBoolean183) {
if (local507 != null && local507.minimapdisplay && local507.interactive) {
local154 = local498.xFine / 32 - PlayerList.self.xFine / 32;
local231 = local498.zFine / 32 - PlayerList.self.zFine / 32;
if (local507.anInt3739 == -1) {
if (local507.minimapmarkerobjectentry == -1) {
method1446(arg3, Sprites.mapdots[1], local231, local154, arg1, arg2);
} else {
method1446(arg3, Sprites.mapfuncs[local507.anInt3739], local231, local154, arg1, arg2);
method1446(arg3, Sprites.mapfuncs[local507.minimapmarkerobjectentry], local231, local154, arg1, arg2);
}
}
}

View file

@ -1323,7 +1323,7 @@ public class MiniMenu {
if (arg0.multiNpcs != null) {
arg0 = arg0.getMultiNpc();
}
if (arg0 == null || !arg0.aBoolean183) {
if (arg0 == null || !arg0.interactive) {
return;
}
@Pc(35) JagString local35 = arg0.name;

View file

@ -64,8 +64,8 @@ public final class Npc extends PathingEntity {
}
@Pc(140) Model model;
if (Preferences.characterShadowsOn && local84.shadow) {
model = ShadowModelList.method1043(this.type.aByte13, this.aBoolean171, local53 == null ? local29 : local53, this.xFine, this.type.aShort23, this.zFine, this.type.aShort24, this.type.size, body, orientation, local53 == null ? this.anInt3425 : this.anInt3407, this.anInt3424, this.type.aByte12);
if (Preferences.characterShadowsOn && local84.hasshadow) {
model = ShadowModelList.method1043(this.type.shadowcolormodifier1, this.aBoolean171, local53 == null ? local29 : local53, this.xFine, this.type.shadowcolor2, this.zFine, this.type.shadowcolor1, this.type.size, body, orientation, local53 == null ? this.anInt3425 : this.anInt3407, this.anInt3424, this.type.shadowcolormodifier2);
if (GlRenderer.enabled) {
@Pc(144) float local144 = GlRenderer.method4179();
@Pc(146) float local146 = GlRenderer.method4166();
@ -135,8 +135,8 @@ public final class Npc extends PathingEntity {
protected final int getBasId() {
if (client.game != 0 && this.type.multiNpcs != null) {
@Pc(17) NpcType local17 = this.type.getMultiNpc();
if (local17 != null && local17.basId != -1) {
return local17.basId;
if (local17 != null && local17.bastypeid != -1) {
return local17.bastypeid;
}
}
return this.anInt3365;

View file

@ -173,7 +173,7 @@ public class NpcList {
}
arg0.movementSeqId = local227;
if (arg0 instanceof Npc) {
local233 = ((Npc) arg0).type.aBoolean181;
local233 = ((Npc) arg0).type.rotationflag;
}
if (local233) {
if (arg0.anInt3381 != arg0.anInt3400 && arg0.faceEntity == -1 && arg0.anInt3376 != 0) {

View file

@ -41,7 +41,7 @@ public final class NpcType {
private int[][] anIntArrayArray28;
@OriginalMember(owner = "client!me", name = "z", descriptor = "[[I")
private int[][] anIntArrayArray29;
private int[][] modeloffsets;
@OriginalMember(owner = "client!me", name = "J", descriptor = "[S")
private short[] retextureDestination;
@ -62,19 +62,19 @@ public final class NpcType {
public int idleSound = -1;
@OriginalMember(owner = "client!me", name = "I", descriptor = "Z")
public boolean aBoolean183 = true;
public boolean interactive = true;
@OriginalMember(owner = "client!me", name = "a", descriptor = "I")
public int size = 1;
@OriginalMember(owner = "client!me", name = "q", descriptor = "Z")
public boolean aBoolean181 = true;
public boolean rotationflag = true;
@OriginalMember(owner = "client!me", name = "O", descriptor = "I")
public int runSound = -1;
@OriginalMember(owner = "client!me", name = "r", descriptor = "S")
public short aShort23 = 0;
public short shadowcolor2 = 0;
@OriginalMember(owner = "client!vk", name = "d", descriptor = "Lclient!na;")
public static final JagString aClass100_1010 = JagString.parse("null");
@ -85,34 +85,34 @@ public final class NpcType {
public int combatLevel = -1;
@OriginalMember(owner = "client!me", name = "Z", descriptor = "Z")
public boolean aBoolean184 = true;
public boolean minimapdisplay = true;
@OriginalMember(owner = "client!me", name = "l", descriptor = "I")
public int cursor1 = -1;
@OriginalMember(owner = "client!me", name = "U", descriptor = "I")
private int anInt3738 = 0;
private int contrast = 0;
@OriginalMember(owner = "client!me", name = "V", descriptor = "I")
public int anInt3739 = -1;
public int minimapmarkerobjectentry = -1;
@OriginalMember(owner = "client!me", name = "C", descriptor = "I")
private int anInt3729 = 128;
private int resizeX = 128;
@OriginalMember(owner = "client!me", name = "N", descriptor = "B")
public byte aByte12 = -16;
public byte shadowcolormodifier2 = -16;
@OriginalMember(owner = "client!me", name = "H", descriptor = "I")
public int prayerIcon = -1;
public int headicon = -1;
@OriginalMember(owner = "client!me", name = "F", descriptor = "B")
public byte aByte10 = 0;
public byte loginscreenproperties = 0;
@OriginalMember(owner = "client!me", name = "e", descriptor = "Z")
public boolean shadow = true;
public boolean hasshadow = true;
@OriginalMember(owner = "client!me", name = "ab", descriptor = "S")
public short aShort24 = 0;
public short shadowcolor1 = 0;
@OriginalMember(owner = "client!me", name = "db", descriptor = "I")
public int cursor2Op = -1;
@ -121,13 +121,13 @@ public final class NpcType {
public int hitBarId = -1;
@OriginalMember(owner = "client!me", name = "h", descriptor = "I")
private int anInt3715 = 0;
private int ambient = 0;
@OriginalMember(owner = "client!me", name = "B", descriptor = "Z")
public boolean aBoolean182 = false;
public boolean toprenderpriority = false;
@OriginalMember(owner = "client!me", name = "M", descriptor = "I")
public int anInt3733 = 32;
public int rotationspeed = 32;
@OriginalMember(owner = "client!me", name = "u", descriptor = "[Lclient!na;")
public final JagString[] ops = new JagString[5];
@ -136,13 +136,13 @@ public final class NpcType {
public int walkSound = -1;
@OriginalMember(owner = "client!me", name = "bb", descriptor = "B")
public byte aByte13 = -96;
public byte shadowcolormodifier1 = -96;
@OriginalMember(owner = "client!me", name = "G", descriptor = "B")
public byte aByte11 = 7;
public byte spawndirection = 7;
@OriginalMember(owner = "client!me", name = "S", descriptor = "I")
public int basId = -1;
public int bastypeid = -1;
@OriginalMember(owner = "client!me", name = "mb", descriptor = "I")
public int cursor1Op = -1;
@ -151,7 +151,7 @@ public final class NpcType {
public int soundRadius = 0;
@OriginalMember(owner = "client!me", name = "E", descriptor = "I")
private int anInt3731 = 128;
private int resizeY = 128;
@OriginalMember(owner = "client!me", name = "s", descriptor = "I")
private int multiNpcVarbit = -1;
@ -160,7 +160,7 @@ public final class NpcType {
public int crawlSound = -1;
@OriginalMember(owner = "client!me", name = "D", descriptor = "I")
public int anInt3730 = -1;
public int iconHeight = -1;
@OriginalMember(owner = "client!me", name = "Q", descriptor = "I")
public int cursor2 = -1;
@ -265,14 +265,14 @@ public final class NpcType {
for (@Pc(86) int local86 = 0; local86 < this.modelIndices.length; local86++) {
if (this.modelIndices[local86] != -1) {
local84[local86] = RawModel.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]);
if (this.modeloffsets != null && this.modeloffsets[local86] != null && local84[local86] != null) {
local84[local86].translate(this.modeloffsets[local86][0], this.modeloffsets[local86][1], this.modeloffsets[local86][2]);
}
}
}
@Pc(156) BasType local156 = null;
if (this.basId != -1) {
local156 = BasTypeList.get(this.basId);
if (this.bastypeid != -1) {
local156 = BasTypeList.get(this.bastypeid);
}
if (local156 != null && local156.modelRotateTranslate != null) {
for (local173 = 0; local173 < local156.modelRotateTranslate.length; local173++) {
@ -348,7 +348,7 @@ public final class NpcType {
local593.retexture(this.retextureDestination[local173], this.retextureSource[local173]);
}
}
local40 = local593.createModel(this.anInt3715 + 64, this.anInt3738 + 850, -30, -50, -30);
local40 = local593.createModel(this.ambient + 64, this.contrast + 850, -30, -50, -30);
if (GlRenderer.enabled) {
((GlModel) local40).method4111(false, false, false, false, false, true);
}
@ -398,8 +398,8 @@ public final class NpcType {
}
if (!local46 && seqType2 == null && seqType1 == null) {
@Pc(933) Model local933 = local40.method4572(true, true, true);
if (this.anInt3729 != 128 || this.anInt3731 != 128) {
local933.resize(this.anInt3729, this.anInt3731, this.anInt3729);
if (this.resizeX != 128 || this.resizeY != 128) {
local933.resize(this.resizeX, this.resizeY, this.resizeX);
}
return local933;
}
@ -486,8 +486,8 @@ public final class NpcType {
aClass3_Sub2_Sub7Array5[local318] = null;
aClass144Array1[local318] = null;
}
if (this.anInt3729 != 128 || this.anInt3731 != 128) {
local1218.resize(this.anInt3729, this.anInt3731, this.anInt3729);
if (this.resizeX != 128 || this.resizeY != 128) {
local1218.resize(this.resizeX, this.resizeY, this.resizeX);
}
return local1218;
}
@ -572,179 +572,179 @@ 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) {
private void decode(@OriginalArg(1) int opcode, @OriginalArg(2) Buffer buffer) {
@Pc(12) int count;
@Pc(18) int local18;
if (arg0 == 1) {
count = arg1.g1();
@Pc(18) int i;
if (opcode == 1) {
count = buffer.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;
for (i = 0; i < count; i++) {
this.modelIndices[i] = buffer.g2();
if (this.modelIndices[i] == 65535) {
this.modelIndices[i] = -1;
}
}
} else if (arg0 == 2) {
this.name = arg1.gjstr();
} else if (arg0 == 12) {
this.size = arg1.g1();
} else if (arg0 >= 30 && arg0 < 35) {
this.ops[arg0 - 30] = arg1.gjstr();
if (this.ops[arg0 - 30].equalsIgnoreCase(LocalizedText.HIDDEN)) {
this.ops[arg0 - 30] = null;
} else if (opcode == 2) {
this.name = buffer.gjstr();
} else if (opcode == 12) {
this.size = buffer.g1();
} else if (opcode >= 30 && opcode < 35) {
this.ops[opcode - 30] = buffer.gjstr();
if (this.ops[opcode - 30].equalsIgnoreCase(LocalizedText.HIDDEN)) {
this.ops[opcode - 30] = null;
}
} else if (arg0 == 40) {
count = arg1.g1();
} else if (opcode == 40) {
count = buffer.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();
for (i = 0; i < count; i++) {
this.recolorDestination[i] = (short) buffer.g2();
this.recolorSource[i] = (short) buffer.g2();
}
} else if (arg0 == 41) {
count = arg1.g1();
} else if (opcode == 41) {
count = buffer.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();
for (i = 0; i < count; i++) {
this.retextureDestination[i] = (short) buffer.g2();
this.retextureSource[i] = (short) buffer.g2();
}
} else if (arg0 == 42) {
count = arg1.g1();
} else if (opcode == 42) {
count = buffer.g1();
this.aByteArray51 = new byte[count];
for (local18 = 0; local18 < count; local18++) {
this.aByteArray51[local18] = arg1.g1b();
for (i = 0; i < count; i++) {
this.aByteArray51[i] = buffer.g1b();
}
} else if (arg0 == 60) {
count = arg1.g1();
} else if (opcode == 60) {
count = buffer.g1();
this.anIntArray354 = new int[count];
for (local18 = 0; local18 < count; local18++) {
this.anIntArray354[local18] = arg1.g2();
for (i = 0; i < count; i++) {
this.anIntArray354[i] = buffer.g2();
}
} else if (arg0 == 93) {
this.aBoolean184 = false;
} else if (arg0 == 95) {
this.combatLevel = arg1.g2();
} else if (arg0 == 97) {
this.anInt3729 = arg1.g2();
} else if (arg0 == 98) {
this.anInt3731 = arg1.g2();
} else if (arg0 == 99) {
this.aBoolean182 = true;
} else if (arg0 == 100) {
this.anInt3715 = arg1.g1b();
} else if (arg0 == 101) {
this.anInt3738 = arg1.g1b() * 5;
} else if (arg0 == 102) {
this.prayerIcon = arg1.g2();
} else if (arg0 == 103) {
this.anInt3733 = arg1.g2();
} else if (opcode == 93) {
this.minimapdisplay = false;
} else if (opcode == 95) {
this.combatLevel = buffer.g2();
} else if (opcode == 97) {
this.resizeX = buffer.g2();
} else if (opcode == 98) {
this.resizeY = buffer.g2();
} else if (opcode == 99) {
this.toprenderpriority = true;
} else if (opcode == 100) {
this.ambient = buffer.g1b();
} else if (opcode == 101) {
this.contrast = buffer.g1b() * 5;
} else if (opcode == 102) {
this.headicon = buffer.g2();
} else if (opcode == 103) {
this.rotationspeed = buffer.g2();
} else {
@Pc(297) int local297;
if (arg0 == 106 || arg0 == 118) {
this.multiNpcVarbit = arg1.g2();
if (opcode == 106 || opcode == 118) {
this.multiNpcVarbit = buffer.g2();
count = -1;
if (this.multiNpcVarbit == 65535) {
this.multiNpcVarbit = -1;
}
this.multiNpcVarp = arg1.g2();
this.multiNpcVarp = buffer.g2();
if (this.multiNpcVarp == 65535) {
this.multiNpcVarp = -1;
}
if (arg0 == 118) {
count = arg1.g2();
if (opcode == 118) {
count = buffer.g2();
if (count == 65535) {
count = -1;
}
}
local18 = arg1.g1();
this.multiNpcs = new int[local18 + 2];
for (local297 = 0; local297 <= local18; local297++) {
this.multiNpcs[local297] = arg1.g2();
i = buffer.g1();
this.multiNpcs = new int[i + 2];
for (local297 = 0; local297 <= i; local297++) {
this.multiNpcs[local297] = buffer.g2();
if (this.multiNpcs[local297] == 65535) {
this.multiNpcs[local297] = -1;
}
}
this.multiNpcs[local18 + 1] = count;
} else if (arg0 == 107) {
this.aBoolean183 = false;
} else if (arg0 == 109) {
this.aBoolean181 = false;
} else if (arg0 == 111) {
this.shadow = false;
} else if (arg0 == 113) {
this.aShort24 = (short) arg1.g2();
this.aShort23 = (short) arg1.g2();
} else if (arg0 == 114) {
this.aByte13 = arg1.g1b();
this.aByte12 = arg1.g1b();
} else if (arg0 == 115) {
arg1.g1();
arg1.g1();
} else if (arg0 == 119) {
this.aByte10 = arg1.g1b();
} else if (arg0 == 121) {
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.g1b();
local439[1] = arg1.g1b();
local439[2] = arg1.g1b();
this.multiNpcs[i + 1] = count;
} else if (opcode == 107) {
this.interactive = false;
} else if (opcode == 109) {
this.rotationflag = false;
} else if (opcode == 111) {
this.hasshadow = false;
} else if (opcode == 113) {
this.shadowcolor1 = (short) buffer.g2();
this.shadowcolor2 = (short) buffer.g2();
} else if (opcode == 114) {
this.shadowcolormodifier1 = buffer.g1b();
this.shadowcolormodifier2 = buffer.g1b();
} else if (opcode == 115) {
buffer.g1();
buffer.g1();
} else if (opcode == 119) {
this.loginscreenproperties = buffer.g1b();
} else if (opcode == 121) {
this.modeloffsets = new int[this.modelIndices.length][];
count = buffer.g1();
for (i = 0; i < count; i++) {
local297 = buffer.g1();
@Pc(439) int[] local439 = this.modeloffsets[local297] = new int[3];
local439[0] = buffer.g1b();
local439[1] = buffer.g1b();
local439[2] = buffer.g1b();
}
} else if (arg0 == 122) {
this.hitBarId = arg1.g2();
} else if (arg0 == 123) {
this.anInt3730 = arg1.g2();
} else if (arg0 == 125) {
this.aByte11 = arg1.g1b();
} else if (arg0 == 126) {
this.anInt3739 = arg1.g2();
} else if (arg0 == 127) {
this.basId = arg1.g2();
} else if (arg0 == 128) {
arg1.g1();
} else if (arg0 == 134) {
this.idleSound = arg1.g2();
} else if (opcode == 122) {
this.hitBarId = buffer.g2();
} else if (opcode == 123) {
this.iconHeight = buffer.g2();
} else if (opcode == 125) {
this.spawndirection = buffer.g1b();
} else if (opcode == 126) {
this.minimapmarkerobjectentry = buffer.g2();
} else if (opcode == 127) {
this.bastypeid = buffer.g2();
} else if (opcode == 128) {
buffer.g1();
} else if (opcode == 134) {
this.idleSound = buffer.g2();
if (this.idleSound == 65535) {
this.idleSound = -1;
}
this.crawlSound = arg1.g2();
this.crawlSound = buffer.g2();
if (this.crawlSound == 65535) {
this.crawlSound = -1;
}
this.walkSound = arg1.g2();
this.walkSound = buffer.g2();
if (this.walkSound == 65535) {
this.walkSound = -1;
}
this.runSound = arg1.g2();
this.runSound = buffer.g2();
if (this.runSound == 65535) {
this.runSound = -1;
}
this.soundRadius = arg1.g1();
} else if (arg0 == 135) {
this.cursor1Op = arg1.g1();
this.cursor1 = arg1.g2();
} else if (arg0 == 136) {
this.cursor2Op = arg1.g1();
this.cursor2 = arg1.g2();
} else if (arg0 == 137) {
this.anInt3752 = arg1.g2();
} else if (arg0 == 249) {
count = arg1.g1();
this.soundRadius = buffer.g1();
} else if (opcode == 135) {
this.cursor1Op = buffer.g1();
this.cursor1 = buffer.g2();
} else if (opcode == 136) {
this.cursor2Op = buffer.g1();
this.cursor2 = buffer.g2();
} else if (opcode == 137) {
this.anInt3752 = buffer.g2();
} else if (opcode == 249) {
count = buffer.g1();
if (this.params == null) {
local18 = IntUtils.clp2(count);
this.params = new HashTable(local18);
i = IntUtils.clp2(count);
this.params = new HashTable(i);
}
for (local18 = 0; local18 < count; local18++) {
@Pc(592) boolean local592 = arg1.g1() == 1;
@Pc(596) int local596 = arg1.g3();
for (i = 0; i < count; i++) {
@Pc(592) boolean local592 = buffer.g1() == 1;
@Pc(596) int local596 = buffer.g3();
@Pc(605) Node local605;
if (local592) {
local605 = new StringNode(arg1.gjstr());
local605 = new StringNode(buffer.gjstr());
} else {
local605 = new IntNode(arg1.g4());
local605 = new IntNode(buffer.g4());
}
this.params.put(local605, local596);
}

View file

@ -433,7 +433,7 @@ public final class Player extends PathingEntity {
}
this.minY = local76.getMinY();
@Pc(184) Model local184;
if (Preferences.characterShadowsOn && (this.appearance.npcId == -1 || NpcTypeList.get(this.appearance.npcId).shadow)) {
if (Preferences.characterShadowsOn && (this.appearance.npcId == -1 || NpcTypeList.get(this.appearance.npcId).hasshadow)) {
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();

View file

@ -3090,7 +3090,7 @@ public class Protocol {
}
npc.setNpcType(NpcTypeList.get(inboundBuffer.ig2()));
npc.setSize(npc.type.size);
npc.anInt3365 = npc.type.basId;
npc.anInt3365 = npc.type.bastypeid;
if (npc.type.hasAreaSound()) {
AreaSoundManager.add(npc.movementQueueZ[0], null, 0, npc, npc.movementQueueX[0], Player.plane, null);
}
@ -3253,8 +3253,8 @@ public class Protocol {
local124 -= 32;
}
npc.setSize(npc.type.size);
npc.anInt3365 = npc.type.basId;
npc.anInt3376 = npc.type.anInt3733;
npc.anInt3365 = npc.type.bastypeid;
npc.anInt3376 = npc.type.rotationspeed;
if (npc.anInt3376 == 0) {
npc.anInt3381 = 0;
}

View file

@ -1482,7 +1482,7 @@ public class SceneGraph {
collision.unflagGroundDecor(z, x);
}
}
if (!GlRenderer.enabled || !type.aBoolean212) {
if (!GlRenderer.enabled || !type.castshadow) {
return;
}
if (shape == 2) {
@ -2399,7 +2399,7 @@ public class SceneGraph {
}
@Pc(62) LocType loc = LocTypeList.get(locIndex);
if (GlRenderer.enabled && loc.aBoolean216) {
if (GlRenderer.enabled && loc.render) {
return;
}
@ -2458,11 +2458,11 @@ public class SceneGraph {
bitset |= Long.MIN_VALUE;
}
if (loc.anInt4438 == 1) {
if (loc.supportitems == 1) {
bitset |= 0x400000L;
}
if (loc.aBoolean213) {
if (loc.hasanimation) {
bitset |= Integer.MIN_VALUE;
}
@ -2470,7 +2470,7 @@ public class SceneGraph {
AreaSoundManager.add(z, loc, orientation, null, x, plane, null);
}
@Pc(330) boolean local330 = loc.aBoolean212 & !highmem;
@Pc(330) boolean local330 = loc.castshadow & !highmem;
bitset |= (long) locIndex << 32;
@Pc(387) Entity entity;
@Pc(403) LocEntity local403;
@ -2488,7 +2488,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, LocType.GROUNDDECOR, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, LocType.GROUNDDECOR, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setGroundDecor(plane, x, z, averageY, entity, bitset, loc.aBoolean211);
@ -2505,7 +2505,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, LocType.CENTREPIECE_STRAIGHT, locType == LocType.CENTREPIECE_DIAGONAL ? orientation + 4 : orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, LocType.CENTREPIECE_STRAIGHT, locType == LocType.CENTREPIECE_DIAGONAL ? orientation + 4 : orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
if (entity != null) {
@ -2539,7 +2539,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, locType, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, locType, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
method35(plane, x, z, averageY, 1, 1, entity, bitset);
@ -2558,7 +2558,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, LocType.WALL_STRAIGHT, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, LocType.WALL_STRAIGHT, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWall(plane, x, z, averageY, entity, null, WALL_ROTATION_TYPE1[orientation], 0, bitset);
@ -2618,7 +2618,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, LocType.WALL_DIAGONALCORNER, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, LocType.WALL_DIAGONALCORNER, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWall(plane, x, z, averageY, entity, null, LoginManager.anIntArray204[orientation], 0, bitset);
@ -2653,8 +2653,8 @@ public class SceneGraph {
}
local1269 = local1287.model;
} else {
local1254 = new Loc(locIndex, LocType.WALL_L, orientation + 4, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local1269 = new Loc(locIndex, LocType.WALL_L, local1226, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local1254 = new Loc(locIndex, LocType.WALL_L, orientation + 4, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
local1269 = new Loc(locIndex, LocType.WALL_L, local1226, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWall(plane, x, z, averageY, local1254, local1269, WALL_ROTATION_TYPE1[orientation], WALL_ROTATION_TYPE1[local1226], bitset);
if (loc.occlude && lowmem) {
@ -2686,7 +2686,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, LocType.WALL_SQUARECORNER, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, LocType.WALL_SQUARECORNER, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWall(plane, x, z, averageY, entity, null, LoginManager.anIntArray204[orientation], 0, bitset);
if (loc.active && lowmem) {
@ -2711,7 +2711,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, locType, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, locType, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
method35(plane, x, z, averageY, 1, 1, entity, bitset);
if (loc.blockwalk != 0 && map != null) {
@ -2728,7 +2728,7 @@ public class SceneGraph {
}
entity = local403.model;
} else {
entity = new Loc(locIndex, 4, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, 4, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWallDecor(plane, x, z, averageY, entity, null, WALL_ROTATION_TYPE1[orientation], 0, 0, 0, bitset);
} else if (locType == LocType.WALLDECOR_STRAIGHT_ZOFFSET) {
@ -2744,7 +2744,7 @@ public class SceneGraph {
}
local1934 = local1950.model;
} else {
local1934 = new Loc(locIndex, 4, orientation, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local1934 = new Loc(locIndex, 4, orientation, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWallDecor(plane, x, z, averageY, local1934, null, WALL_ROTATION_TYPE1[orientation], 0, local1226 * WALL_DECO_ROT_SIZE_X_DIR[orientation], WALL_DECO_ROT_SIZE_Y_DIR[orientation] * local1226, bitset);
} else if (locType == LocType.WALLDECOR_DIAGONAL_XOFFSET) {
@ -2760,7 +2760,7 @@ public class SceneGraph {
}
local1934 = local1950.model;
} else {
local1934 = new Loc(locIndex, 4, orientation + 4, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local1934 = new Loc(locIndex, 4, orientation + 4, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWallDecor(plane, x, z, averageY, local1934, null, 256, orientation, local1226 * anIntArray565[orientation], local1226 * anIntArray154[orientation], bitset);
} else if (locType == LocType.WALLDECOR_DIAGONAL_ZOFFSET) {
@ -2772,7 +2772,7 @@ public class SceneGraph {
}
entity = local2183.model;
} else {
entity = new Loc(locIndex, 4, local2137 + 4, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
entity = new Loc(locIndex, 4, local2137 + 4, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWallDecor(plane, x, z, averageY, entity, null, 256, local2137, 0, 0, bitset);
} else if (locType == LocType.WALLDECOR_DIAGONAL_BOTH) {
@ -2797,8 +2797,8 @@ public class SceneGraph {
}
local2289 = local2319.model;
} else {
local1934 = new Loc(locIndex, 4, orientation + 4, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local2289 = new Loc(locIndex, 4, local2244 + 4, currentPlane, x, z, loc.anim, loc.aBoolean209, null);
local1934 = new Loc(locIndex, 4, orientation + 4, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
local2289 = new Loc(locIndex, 4, local2244 + 4, currentPlane, x, z, loc.anim, loc.allowrandomizedanimation, null);
}
setWallDecor(plane, x, z, averageY, local1934, local2289, 256, orientation, local1226 * anIntArray565[orientation], anIntArray154[orientation] * local1226, bitset);
}

View file

@ -385,25 +385,25 @@ public final class ScriptRunner {
if (local58.multiNpcs != null) {
local58 = local58.getMultiNpc();
}
if (local58.prayerIcon >= 0 && Sprites.headiconPrayers.length > local58.prayerIcon) {
if (local58.anInt3730 == -1) {
if (local58.headicon >= 0 && Sprites.headiconPrayers.length > local58.headicon) {
if (local58.iconHeight == -1) {
local265 = local17.method2691() + 15;
} else {
local265 = local58.anInt3730 + 15;
local265 = local58.iconHeight + 15;
}
method3326(arg4 >> 1, arg3, local17, arg5, local265, arg1 >> 1);
if (anInt1951 > -1) {
Sprites.headiconPrayers[local58.prayerIcon].render(arg2 + anInt1951 - 12, arg0 + -30 - -anInt548);
Sprites.headiconPrayers[local58.headicon].render(arg2 + anInt1951 - 12, arg0 + -30 - -anInt548);
}
}
@Pc(308) MapMarker[] local308 = MiniMap.hintMapMarkers;
for (local310 = 0; local310 < local308.length; local310++) {
@Pc(322) MapMarker local322 = local308[local310];
if (local322 != null && local322.type == 1 && local322.actorTargetId == NpcList.ids[local5 - PlayerList.size] && client.loop % 20 < 10) {
if (local58.anInt3730 == -1) {
if (local58.iconHeight == -1) {
local359 = local17.method2691() + 15;
} else {
local359 = local58.anInt3730 + 15;
local359 = local58.iconHeight + 15;
}
method3326(arg4 >> 1, arg3, local17, arg5, local359, arg1 >> 1);
if (anInt1951 > -1) {
@ -471,10 +471,10 @@ public final class ScriptRunner {
local508 = local528[0];
}
@Pc(571) NpcType local571 = local518.type;
if (local571.anInt3730 == -1) {
if (local571.iconHeight == -1) {
local310 = local17.method2691();
} else {
local310 = local571.anInt3730;
local310 = local571.iconHeight;
}
} else {
local310 = local17.method2691();
@ -504,10 +504,10 @@ public final class ScriptRunner {
if (local17 instanceof Npc) {
@Pc(725) Npc local725 = (Npc) local17;
@Pc(728) NpcType local728 = local725.type;
if (local728.anInt3730 == -1) {
if (local728.iconHeight == -1) {
local265 = local17.method2691() / 2;
} else {
local265 = local728.anInt3730 / 2;
local265 = local728.iconHeight / 2;
}
} else {
local265 = local17.method2691() / 2;
@ -804,7 +804,7 @@ public final class ScriptRunner {
@Pc(171) int local171;
for (local7 = 0; local7 < NpcList.size; local7++) {
local16 = NpcList.npcs[NpcList.ids[local7]];
if (local16 != null && local16.isVisible() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
if (local16 != null && local16.isVisible() && local16.type.toprenderpriority == arg0 && local16.type.isMultiNpcValid()) {
@Pc(42) int local42 = local16.getSize();
@Pc(97) int local97;
if (local42 == 1) {
@ -844,7 +844,7 @@ public final class ScriptRunner {
for (local7 = 0; local7 < NpcList.size; local7++) {
local16 = NpcList.npcs[NpcList.ids[local7]];
@Pc(262) long local262 = (long) NpcList.ids[local7] << 32 | 0x20000000L;
if (local16 != null && local16.isVisible() && local16.type.aBoolean182 == arg0 && local16.type.isMultiNpcValid()) {
if (local16 != null && local16.isVisible() && local16.type.toprenderpriority == arg0 && local16.type.isMultiNpcValid()) {
local107 = local16.getSize();
if (local107 == 1) {
if ((local16.xFine & 0x7F) == 64 && (local16.zFine & 0x7F) == 64) {
@ -899,7 +899,7 @@ public final class ScriptRunner {
}
}
}
if (!local16.type.aBoolean183) {
if (!local16.type.interactive) {
local262 |= Long.MIN_VALUE;
}
local16.anInt3424 = SceneGraph.getTileHeight(Player.plane, local16.xFine, local16.zFine);

View file

@ -1052,7 +1052,7 @@ public final class client extends GameShell {
for (@Pc(57) int local57 = 0; local57 < 32768; local57++) {
@Pc(66) Npc local66 = NpcList.npcs[local57];
if (local66 != null) {
@Pc(73) byte local73 = local66.type.aByte10;
@Pc(73) byte local73 = local66.type.loginscreenproperties;
if ((local73 & 0x2) > 0 && local66.movementQueueSize == 0 && Math.random() * 1000.0D < 10.0D) {
@Pc(98) int local98 = (int) Math.round(Math.random() * 2.0D - 1.0D);
@Pc(106) int local106 = (int) Math.round(Math.random() * 2.0D - 1.0D);

View file

@ -232,7 +232,7 @@ public class Playground extends GameShell {
public void loadNpc(int id) {
npcType = NpcTypeList.get(id);
npc = new Npc();
BasType basType = BasTypeList.get(npcType.basId);
BasType basType = BasTypeList.get(npcType.bastypeid);
npc.seqId = basType.idleAnimationId;
npc.setNpcType(npcType);
GameShell.frame.setTitle(npcType.name + " - " + id);