Skip to content

Commit c482c62

Browse files
committed
more deob
1 parent edebe51 commit c482c62

39 files changed

+506
-541
lines changed

src/main/java/com/jagex/runescape/Class13.java

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,40 @@
1414
import com.jagex.runescape.scene.tile.Wall;
1515

1616
public class Class13 {
17-
public static NodeCache aClass9_406 = new NodeCache(64);
17+
public static NodeCache varPlayerConfigCache = new NodeCache(64);
1818
public static boolean[] playerArray = new boolean[5];
1919
public static IndexedImage aClass40_Sub5_Sub14_Sub2_418;
2020
public static int anInt419 = 2;
2121
public static int mouseX = 0;
2222
public static int[] anIntArray421;
2323

24-
public static void method241(Actor arg0, byte arg2) {
25-
if(arg0.worldX < 128 || arg0.worldY < 128 || arg0.worldX >= 13184 || arg0.worldY >= 13184) {
26-
arg0.playingAnimation = -1;
27-
arg0.anInt3112 = 0;
28-
arg0.anInt3107 = 0;
29-
arg0.graphicId = -1;
30-
arg0.worldX = arg0.anInt3096 * 64 + 128 * arg0.pathY[0];
31-
arg0.worldY = arg0.pathX[0] * 128 + 64 * arg0.anInt3096;
32-
arg0.method790(0);
24+
public static void handleActorAnimation(Actor actor) {
25+
if(actor.worldX < 128 || actor.worldY < 128 || actor.worldX >= 13184 || actor.worldY >= 13184) {
26+
actor.playingAnimation = -1;
27+
actor.anInt3112 = 0;
28+
actor.anInt3107 = 0;
29+
actor.graphicId = -1;
30+
actor.worldX = actor.anInt3096 * 64 + 128 * actor.pathY[0];
31+
actor.worldY = actor.pathX[0] * 128 + 64 * actor.anInt3096;
32+
actor.method790(0);
3333
}
34-
if(arg0 == Player.localPlayer && (arg0.worldX < 1536 || arg0.worldY < 1536 || arg0.worldX >= 11776 || arg0.worldY >= 11776)) {
35-
arg0.graphicId = -1;
36-
arg0.anInt3107 = 0;
37-
arg0.anInt3112 = 0;
38-
arg0.playingAnimation = -1;
39-
arg0.worldX = arg0.pathY[0] * 128 + arg0.anInt3096 * 64;
40-
arg0.worldY = 64 * arg0.anInt3096 + arg0.pathX[0] * 128;
41-
arg0.method790(0);
34+
if(actor == Player.localPlayer && (actor.worldX < 1536 || actor.worldY < 1536 || actor.worldX >= 11776 || actor.worldY >= 11776)) {
35+
actor.graphicId = -1;
36+
actor.anInt3107 = 0;
37+
actor.anInt3112 = 0;
38+
actor.playingAnimation = -1;
39+
actor.worldX = actor.pathY[0] * 128 + actor.anInt3096 * 64;
40+
actor.worldY = 64 * actor.anInt3096 + actor.pathX[0] * 128;
41+
actor.method790(0);
4242
}
43-
if(arg0.anInt3112 > MovedStatics.pulseCycle)
44-
Class40_Sub5_Sub11.method631(arg0);
45-
else if(arg0.anInt3107 < MovedStatics.pulseCycle)
46-
Class44.method898(255, arg0);
43+
if(actor.anInt3112 > MovedStatics.pulseCycle)
44+
method631(actor);
45+
else if(actor.anInt3107 < MovedStatics.pulseCycle)
46+
Class44.method898(255, actor);
4747
else
48-
PlayerAppearance.method381(arg0);
49-
Class40_Sub5_Sub17_Sub1.method762(arg0);
50-
Class40_Sub5_Sub15.method736(true, arg0);
51-
if(arg2 != 107)
52-
method249(false);
48+
PlayerAppearance.method381(actor);
49+
Class40_Sub5_Sub17_Sub1.method762(actor);
50+
Class40_Sub5_Sub15.method736(true, actor);
5351
}
5452

5553
public static void method242(byte arg0) {
@@ -141,4 +139,21 @@ public static void method249(boolean arg0) {
141139
}
142140
}
143141
}
142+
143+
public static void method631(Actor actor) {
144+
int i = actor.anInt3125 * 128 + 64 * actor.anInt3096;
145+
int i_0_ = actor.anInt3112 + -MovedStatics.pulseCycle;
146+
if(actor.anInt3073 == 0)
147+
actor.initialFaceDirection = 1024;
148+
if(actor.anInt3073 == 1)
149+
actor.initialFaceDirection = 1536;
150+
if(actor.anInt3073 == 2)
151+
actor.initialFaceDirection = 0;
152+
int i_1_ = actor.anInt3096 * 64 + 128 * actor.anInt3081;
153+
actor.worldX += (i - actor.worldX) / i_0_;
154+
if(actor.anInt3073 == 3)
155+
actor.initialFaceDirection = 512;
156+
actor.anInt3074 = 0;
157+
actor.worldY += (-actor.worldY + i_1_) / i_0_;
158+
}
144159
}

src/main/java/com/jagex/runescape/Class17.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ public static void method275(long arg1) {
115115
}
116116
}
117117

118-
public static void method276(int arg0) {
119-
for(int i = arg0; Player.localPlayerCount > i; i++) {
120-
int i_0_;
121-
if(i == -1)
122-
i_0_ = 2047;
118+
public static void animatePlayers(int playerIndex) {
119+
for(int currentPlayerIndex = playerIndex; Player.localPlayerCount > currentPlayerIndex; currentPlayerIndex++) {
120+
int actualIndex;
121+
if(currentPlayerIndex == -1)
122+
actualIndex = 2047;
123123
else
124-
i_0_ = Player.trackedPlayerIndices[i];
125-
Player class40_sub5_sub17_sub4_sub1 = Player.trackedPlayers[i_0_];
126-
if(class40_sub5_sub17_sub4_sub1 != null)
127-
Class13.method241(class40_sub5_sub17_sub4_sub1, (byte) 107);
124+
actualIndex = Player.trackedPlayerIndices[currentPlayerIndex];
125+
Player player = Player.trackedPlayers[actualIndex];
126+
if(player != null)
127+
Class13.handleActorAnimation(player);
128128
}
129129
}
130130

src/main/java/com/jagex/runescape/Class22.java

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -117,44 +117,44 @@ public static void method308() {
117117
RSString.method56(false, null, 0);
118118
}
119119

120-
public static void method309(int arg0, int arg1) {
120+
public static void method309(int varPlayerIndex) {
121121
do {
122122
AnimationSequence.anInt2480 = MovedStatics.pulseCycle;
123123
HuffmanEncoding.method1030((byte) 127);
124-
int i = Npc.method795((byte) -70, arg1).anInt2633;
125-
if(i != 0) {
126-
int i_21_ = GroundItemTile.varPlayers[arg1];
127-
if(i == 1) {
128-
if(i_21_ == 1) {
124+
int varPlayerType = Npc.getVarPlayerConfig(varPlayerIndex).type;
125+
if(varPlayerType != 0) {
126+
int varPlayerValue = GroundItemTile.varPlayers[varPlayerIndex];
127+
if(varPlayerType == 1) {
128+
if(varPlayerValue == 1) {
129129
Rasterizer3D.method711(0.9);
130130
((Class35) Rasterizer3D.anInterface3_2939).method424(0.9);
131131
}
132-
if(i_21_ == 2) {
132+
if(varPlayerValue == 2) {
133133
Rasterizer3D.method711(0.8);
134134
((Class35) Rasterizer3D.anInterface3_2939).method424(0.8);
135135
}
136-
if(i_21_ == 3) {
136+
if(varPlayerValue == 3) {
137137
Rasterizer3D.method711(0.7);
138138
((Class35) Rasterizer3D.anInterface3_2939).method424(0.7);
139139
}
140-
if(i_21_ == 4) {
140+
if(varPlayerValue == 4) {
141141
Rasterizer3D.method711(0.6);
142142
((Class35) Rasterizer3D.anInterface3_2939).method424(0.6);
143143
}
144-
GameObject.method774((byte) -96);
145-
Class40_Sub5_Sub11.clearScreen = true;
144+
GameObject.clearImageCache();
145+
VarPlayerConfig.clearScreen = true;
146146
}
147-
if(i == 3) {
147+
if(varPlayerType == 3) {
148148
int i_22_ = 0;
149-
if(i_21_ == 0)
149+
if(varPlayerValue == 0)
150150
i_22_ = 255;
151-
if(i_21_ == 1)
151+
if(varPlayerValue == 1)
152152
i_22_ = 192;
153-
if(i_21_ == 2)
153+
if(varPlayerValue == 2)
154154
i_22_ = 128;
155-
if(i_21_ == 3)
155+
if(varPlayerValue == 3)
156156
i_22_ = 64;
157-
if(i_21_ == 4)
157+
if(varPlayerValue == 4)
158158
i_22_ = 0;
159159
if(i_22_ != RSCanvas.anInt60) {
160160
if(RSCanvas.anInt60 != 0 || MouseHandler.anInt1457 == -1) {
@@ -170,43 +170,41 @@ public static void method309(int arg0, int arg1) {
170170
RSCanvas.anInt60 = i_22_;
171171
}
172172
}
173-
if(i == 9)
174-
Class43.bankInsertMode = i_21_;
175-
if(i == 10) {
176-
if(i_21_ == 0)
173+
if(varPlayerType == 9)
174+
Class43.bankInsertMode = varPlayerValue;
175+
if(varPlayerType == 10) {
176+
if(varPlayerValue == 0)
177177
RSCanvas.anInt65 = 127;
178-
if(i_21_ == 1)
178+
if(varPlayerValue == 1)
179179
RSCanvas.anInt65 = 96;
180-
if(i_21_ == 2)
180+
if(varPlayerValue == 2)
181181
RSCanvas.anInt65 = 64;
182-
if(i_21_ == 3)
182+
if(varPlayerValue == 3)
183183
RSCanvas.anInt65 = 32;
184-
if(i_21_ == 4)
184+
if(varPlayerValue == 4)
185185
RSCanvas.anInt65 = 0;
186186
}
187-
if(i == 8) {
187+
if(varPlayerType == 8) {
188188
ChatBox.redrawChatbox = true;
189-
CollisionMap.anInt165 = i_21_;
189+
CollisionMap.anInt165 = varPlayerValue;
190190
}
191-
if(i == 4) {
192-
if(i_21_ == 0)
191+
if(varPlayerType == 4) {
192+
if(varPlayerValue == 0)
193193
MovedStatics.anInt200 = 127;
194-
if(i_21_ == 1)
194+
if(varPlayerValue == 1)
195195
MovedStatics.anInt200 = 96;
196-
if(i_21_ == 2)
196+
if(varPlayerValue == 2)
197197
MovedStatics.anInt200 = 64;
198-
if(i_21_ == 3)
198+
if(varPlayerValue == 3)
199199
MovedStatics.anInt200 = 32;
200-
if(i_21_ == 4)
200+
if(varPlayerValue == 4)
201201
MovedStatics.anInt200 = 0;
202202
}
203-
if(i == 6)
204-
MovedStatics.anInt2280 = i_21_;
205-
if(arg0 != -1)
206-
method309(74, -85);
207-
if(i != 5)
203+
if(varPlayerType == 6)
204+
MovedStatics.anInt2280 = varPlayerValue;
205+
if(varPlayerType != 5)
208206
break;
209-
ProducingGraphicsBuffer.oneMouseButton = i_21_;
207+
ProducingGraphicsBuffer.oneMouseButton = varPlayerValue;
210208
}
211209

212210
break;

src/main/java/com/jagex/runescape/Class22_Sub2.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,9 @@ public static IndexedImage[] method315() {
3535
return class40_sub5_sub14_sub2s;
3636
}
3737

38-
public static void method316(int arg0) {
39-
do {
40-
Class43.aClass9_1014.clear();
41-
MovedStatics.aClass9_851.clear();
42-
if(arg0 == -11965)
43-
break;
44-
method323(-25);
45-
46-
break;
47-
} while(false);
38+
public static void method316() {
39+
Class43.aClass9_1014.clear();
40+
MovedStatics.aClass9_851.clear();
4841
}
4942

5043
public static ImageRGB[] method319(byte arg0) {

0 commit comments

Comments
 (0)