src
main
java
com
jagex
runescape
cache
media
net
scene
util
···
59
59
60
60
61
61
private final int[] soundVolume = new int[50];
62
62
-
private int archiveHashes[] = new int[9];
63
63
-
private byte terrainData[][];
62
62
+
private int[] archiveHashes = new int[9];
63
63
+
private byte[][] terrainData;
64
64
private String reportedName = "";
65
65
-
private int anIntArray842[] = {0xffff00, 0xff0000, 65280, 65535, 0xff00ff, 0xffffff};
66
66
-
private int skillExperience[] = new int[SkillConstants.SKILL_COUNT];
65
65
+
private int[] anIntArray842 = {0xffff00, 0xff0000, 65280, 65535, 0xff00ff, 0xffffff};
66
66
+
private int[] skillExperience = new int[SkillConstants.SKILL_COUNT];
67
67
private int anInt844;
68
68
private int anInt845;
69
69
private int anInt846;
70
70
private int anInt847;
71
71
private int anInt848;
72
72
-
private String friendUsernames[] = new String[200];
72
72
+
private String[] friendUsernames = new String[200];
73
73
private int anInt850;
74
74
public int chatboxScroll;
75
75
public static int cameraZoom = 600;
76
76
-
private int cameraAmplitude[] = new int[5];
76
76
+
private int[] cameraAmplitude = new int[5];
77
77
private int anInt853;
78
78
private int anInt854 = 2;
79
79
private int ignoresCount;
80
80
-
private int mapCoordinates[];
81
81
-
private int terrainDataIds[];
82
82
-
private int objectDataIds[];
80
80
+
private int[] mapCoordinates;
81
81
+
private int[] terrainDataIds;
82
82
+
private int[] objectDataIds;
83
83
private int friendsCount;
84
84
private int friendListStatus;
85
85
private String aString861 = "";
86
86
private int anInt862;
87
87
-
private String aStringArray863[] = new String[100];
88
88
-
private int anIntArray864[] = new int[100];
87
87
+
private String[] aStringArray863 = new String[100];
88
88
+
private int[] anIntArray864 = new int[100];
89
89
private int anInt865;
90
90
private boolean messagePromptRaised = false;
91
91
private int playerRights;
92
92
private static boolean fps;
93
93
private int packetSize;
94
94
public int opcode;
95
95
-
private int timeoutCounter;
95
95
+
private int packetReadAnticheat;
96
96
private int anInt872;
97
97
-
private int anInt873;
97
97
+
private int idleLogout;
98
98
private int anInt874;
99
99
private int anInt875;
100
100
private int anInt876;
101
101
private int anInt877;
102
102
private int anInt878;
103
103
-
private int constructedMapPalette[][][] = new int[4][13][13];
103
103
+
private int[][][] constructedMapPalette = new int[4][13][13];
104
104
private IndexedImage aClass50_Sub1_Sub1_Sub3_880;
105
105
private IndexedImage aClass50_Sub1_Sub1_Sub3_881;
106
106
private IndexedImage aClass50_Sub1_Sub1_Sub3_882;
107
107
private IndexedImage aClass50_Sub1_Sub1_Sub3_883;
108
108
private IndexedImage aClass50_Sub1_Sub1_Sub3_884;
109
109
-
private int anIntArrayArray885[][] = new int[104][104];
110
110
-
private int anIntArrayArray886[][] = new int[104][104];
109
109
+
private int[][] anIntArrayArray885 = new int[104][104];
110
110
+
private int[][] tileRenderCount = new int[104][104];
111
111
private int privateChatMode;
112
112
private Archive titleArchive;
113
113
private int chunkX;
114
114
private int chunkY;
115
115
-
private int intGroundArray[][][];
115
115
+
private int[][][] intGroundArray;
116
116
private int anInt893;
117
117
private static int anInt895;
118
118
-
private ImageRGB cursorCross[] = new ImageRGB[8];
118
118
+
private ImageRGB[] cursorCross = new ImageRGB[8];
119
119
private ISAACCipher incomingRandom;
120
120
private boolean useJaggrab = Configuration.JAGGRAB_ENABLED;
121
121
-
private long aLong902;
121
121
+
private long lastClickTime;
122
122
private int lastOpcode;
123
123
private int secondLastOpcode;
124
124
private int thirdLastOpcode;
···
134
134
private int anInt915;
135
135
private int anInt916;
136
136
private int anInt917 = 2;
137
137
-
private int anIntArray920[] = new int[151];
137
137
+
private int[] anIntArray920 = new int[151];
138
138
private int anInt921 = 8;
139
139
private static int world = 1;
140
140
public static int portOffset;
141
141
private static boolean memberServer = true;
142
142
public static boolean lowMemory;
143
143
-
private boolean customCameraActive[] = new boolean[5];
143
143
+
private boolean[] customCameraActive = new boolean[5];
144
144
private int anInt928 = -188;
145
145
private Buffer tempBuffer = Buffer.allocate(1);
146
146
private long serverSeed;
···
151
151
private String chatboxInputMessage = "";
152
152
private int anInt939;
153
153
private int anInt940 = 50;
154
154
-
private int anIntArray941[] = new int[anInt940];
155
155
-
private int anIntArray942[] = new int[anInt940];
156
156
-
private int anIntArray943[] = new int[anInt940];
157
157
-
private int anIntArray944[] = new int[anInt940];
158
158
-
private int anIntArray945[] = new int[anInt940];
159
159
-
private int anIntArray946[] = new int[anInt940];
160
160
-
private int anIntArray947[] = new int[anInt940];
161
161
-
private String aStringArray948[] = new String[anInt940];
154
154
+
private int[] anIntArray941 = new int[anInt940];
155
155
+
private int[] anIntArray942 = new int[anInt940];
156
156
+
private int[] anIntArray943 = new int[anInt940];
157
157
+
private int[] anIntArray944 = new int[anInt940];
158
158
+
private int[] anIntArray945 = new int[anInt940];
159
159
+
private int[] anIntArray946 = new int[anInt940];
160
160
+
private int[] anIntArray947 = new int[anInt940];
161
161
+
private String[] aStringArray948 = new String[anInt940];
162
162
private String inputInputMessage = "";
163
163
private boolean drawTabIcons = false;
164
164
private int tickDelta;
165
165
-
private static int SKILL_EXPERIENCE[];
165
165
+
private static int[] SKILL_EXPERIENCE;
166
166
private boolean aBoolean953 = false;
167
167
-
private ImageRGB aClass50_Sub1_Sub1_Sub1Array954[] = new ImageRGB[32];
168
168
-
private int anInt955;
167
167
+
private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array954 = new ImageRGB[32];
168
168
+
private int bankInsertMode;
169
169
private byte aByte956 = 1;
170
170
private String statusLineOne = "";
171
171
private String statusLineTwo = "";
···
179
179
private IndexedImage anIndexedImage1054;
180
180
private int anInt968 = 2048;
181
181
private int thisPlayerId = 2047;
182
182
-
private Player players[] = new Player[anInt968];
182
182
+
private Player[] players = new Player[anInt968];
183
183
private int localPlayerCount;
184
184
-
private int playerList[] = new int[anInt968];
184
184
+
private int[] playerList = new int[anInt968];
185
185
private int updatedPlayerCount;
186
186
-
private int updatedPlayers[] = new int[anInt968];
187
187
-
private Buffer cachedAppearances[] = new Buffer[anInt968];
188
188
-
private IndexedImage tabIcon[] = new IndexedImage[13];
189
189
-
private int anInt977;
186
186
+
private int[] updatedPlayers = new int[anInt968];
187
187
+
private Buffer[] cachedAppearances = new Buffer[anInt968];
188
188
+
private IndexedImage[] tabIcon = new IndexedImage[13];
189
189
+
private int loginScreenFocus;
190
190
private static int anInt978;
191
191
-
private int firstMenuOperand[] = new int[500];
192
192
-
private int secondMenuOperand[] = new int[500];
193
193
-
private int menuActionTypes[] = new int[500];
194
194
-
private int selectedMenuActions[] = new int[500];
191
191
+
private int[] firstMenuOperand = new int[500];
192
192
+
private int[] secondMenuOperand = new int[500];
193
193
+
private int[] menuActionTypes = new int[500];
194
194
+
private int[] selectedMenuActions = new int[500];
195
195
private IndexedImage aClass50_Sub1_Sub1_Sub3_983;
196
196
private IndexedImage aClass50_Sub1_Sub1_Sub3_984;
197
197
private IndexedImage aClass50_Sub1_Sub1_Sub3_985;
···
200
200
public int backDialogueId = -1;
201
201
private int placementX;
202
202
private int placementY;
203
203
-
private int cameraFrequency[] = new int[5];
203
203
+
private int[] cameraFrequency = new int[5];
204
204
private int anInt992;
205
205
private int anInt993;
206
206
private int anInt994;
···
208
208
private int anInt996;
209
209
private int anInt997;
210
210
private int anInt998;
211
211
-
private int chatboxLineOffsets[];
212
212
-
private int sidebarOffsets[];
213
213
-
private int viewportOffsets[];
214
214
-
private int anIntArray1003[];
211
211
+
private int[] chatboxLineOffsets;
212
212
+
private int[] sidebarOffsets;
213
213
+
private int[] viewportOffsets;
214
214
+
private int[] anIntArray1003;
215
215
private int anInt1004;
216
216
-
private int anIntArray1005[] = new int[2000];
216
216
+
private int[] anIntArray1005 = new int[2000];
217
217
private int publicChatMode;
218
218
-
public static final int playerColours[][] = {
218
218
+
public static final int[][] playerColours = {
219
219
{6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433, 2983, 54193},
220
220
{8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003, 25239},
221
221
{25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003},
222
222
{4626, 11146, 6439, 12, 4758, 10270}, {4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574}};
223
223
private int anInt1009;
224
224
private int anInt1010 = 2;
225
225
-
private int anInt1011;
226
226
-
private int anInt1012;
225
225
+
private int lastClickX;
226
226
+
private int lastClickY;
227
227
private boolean aBoolean1014 = false;
228
228
public int anInt1015;
229
229
-
private boolean aBoolean1016 = false;
229
229
+
private boolean rsAlreadyLoaded = false;
230
230
private ImageRGB anImageRGB1226;
231
231
private ImageRGB anImageRGB1227;
232
232
-
private int anIntArray1019[] = new int[151];
233
233
-
private int lastClickX;
234
234
-
private int lastClickY;
232
232
+
private int[] anIntArray1019 = new int[151];
233
233
+
private int crossX;
234
234
+
private int crossY;
235
235
private int crossIndex;
236
236
private int crossType;
237
237
private BufferedConnection gameConnection;
238
238
private String chatMessage = "";
239
239
private String aString1027;
240
240
-
private int skillLevel[] = new int[SkillConstants.SKILL_COUNT];
240
240
+
private int[] skillLevel = new int[SkillConstants.SKILL_COUNT];
241
241
private int userWeight;
242
242
-
private ImageRGB worldMapHintIcons[] = new ImageRGB[100];
243
243
-
private final int objectTypes[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3};
242
242
+
private ImageRGB[] worldMapHintIcons = new ImageRGB[100];
243
243
+
private final int[] objectTypes = {0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3};
244
244
private int anInt1034;
245
245
private int currentSound;
246
246
private ImageRGB mapFlagMarker;
247
247
private ImageRGB aClass50_Sub1_Sub1_Sub1_1037;
248
248
private boolean aBoolean1038 = true;
249
249
-
public int widgetSettings[] = new int[2000];
249
249
+
public int[] widgetSettings = new int[2000];
250
250
private int nextTopLeftTileX;
251
251
private int nextTopRightTileY;
252
252
private int topLeftTileX;
···
259
259
private int minimapState;
260
260
private static int anInt1052;
261
261
private int anInt1053 = -1;
262
262
-
private int skillMaxLevel[] = new int[SkillConstants.SKILL_COUNT];
262
262
+
private int[] skillMaxLevel = new int[SkillConstants.SKILL_COUNT];
263
263
private int anInt1055 = 2;
264
264
private int anInt1056 = 3;
265
265
private int systemUpdateTime;
···
274
274
private byte aByte1066 = 1;
275
275
private boolean aBoolean1067 = false;
276
276
private int playerMembers;
277
277
-
private String aStringArray1069[] = new String[5];
278
278
-
private boolean aBooleanArray1070[] = new boolean[5];
277
277
+
private String[] aStringArray1069 = new String[5];
278
278
+
private boolean[] aBooleanArray1070 = new boolean[5];
279
279
private int loadingStage;
280
280
private int anInt1072 = 20411;
281
281
-
private long ignores[] = new long[100];
281
281
+
private long[] ignores = new long[100];
282
282
private int anInt1075;
283
283
private int minimapHintCount;
284
284
-
private int minimapHintX[] = new int[1000];
285
285
-
private int minimapHintY[] = new int[1000];
286
286
-
private ImageRGB aClass50_Sub1_Sub1_Sub1Array1079[] = new ImageRGB[32];
284
284
+
private int[] minimapHintX = new int[1000];
285
285
+
private int[] minimapHintY = new int[1000];
286
286
+
private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1079 = new ImageRGB[32];
287
287
private int anInt1080 = 0x4d4233;
288
288
-
public int tabInterfaceIDs[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
288
288
+
public int[] tabInterfaceIDs = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
289
289
private static int anInt1082;
290
290
private int anInt1083;
291
291
-
private int anIntArray1084[];
292
292
-
private int anIntArray1085[];
291
291
+
private int[] anIntArray1084;
292
292
+
private int[] anIntArray1085;
293
293
private ImageRGB aClass50_Sub1_Sub1_Sub1_1086;
294
294
private CRC32 archiveCrc = new CRC32();
295
295
private int openInvOverLayId = -1;
296
296
-
public int sound[] = new int[50];
296
296
+
public int[] sound = new int[50];
297
297
public int plane;
298
298
private String username;
299
299
private String password;
300
300
private int anInt1094;
301
301
private IndexedImage scrollbarUp;
302
302
private IndexedImage scrollbarDown;
303
303
-
private boolean aBoolean1097 = false;
303
303
+
private boolean genericLoadingError = false;
304
304
private boolean reportMutePlayer = false;
305
305
-
private int characterEditColors[] = new int[5];
305
305
+
private int[] characterEditColors = new int[5];
306
306
private static int anInt1100;
307
307
private int flameCycle;
308
308
private ImageRGB aClass50_Sub1_Sub1_Sub1_1102;
309
309
private ImageRGB aClass50_Sub1_Sub1_Sub1_1103;
310
310
private String chatboxInput = "";
311
311
-
private int cameraJitter[] = new int[5];
311
311
+
private int[] cameraJitter = new int[5];
312
312
private int anInt1106;
313
313
private int chatboxScrollMax = 78;
314
314
private ProducingGraphicsBuffer aClass18_1108;
···
320
320
private int anInt1114;
321
321
private int anInt1115;
322
322
private ImageRGB minimapCompass;
323
323
-
private IndexedImage titleFlameEmblem[];
323
323
+
private IndexedImage[] titleFlameEmblem;
324
324
private int anInt1118;
325
325
private int anInt1119 = -30658;
326
326
private int destinationX;
327
327
private int destinationY;
328
328
private ImageRGB minimapImage;
329
329
-
private int anIntArray1123[] = new int[4000];
330
330
-
private int anIntArray1124[] = new int[4000];
331
331
-
private byte currentSceneTileFlags[][][];
329
329
+
private int[] anIntArray1123 = new int[4000];
330
330
+
private int[] anIntArray1124 = new int[4000];
331
331
+
private byte[][][] currentSceneTileFlags;
332
332
private int anInt1126;
333
333
private boolean aBoolean1127 = false;
334
334
private int previousSong;
335
335
private int anInt1129;
336
336
-
private long friends[] = new long[200];
336
336
+
private long[] friends = new long[200];
337
337
private Buffer chatBuffer = new Buffer(new byte[5000]);
338
338
-
private Npc npcs[] = new Npc[16384];
339
339
-
private int anInt1133;
340
340
-
private int anIntArray1134[] = new int[16384];
338
338
+
private Npc[] npcs = new Npc[16384];
339
339
+
private int npcCount;
340
340
+
private int[] npcIds = new int[16384];
341
341
private int anInt1135 = 0x766654;
342
342
public boolean loggedIn = false;
343
343
private int renderCount;
344
344
private static int anInt1139;
345
345
private int anInt1140 = -110;
346
346
private long aLong1141;
347
347
-
private ImageRGB moderatorIcon[] = new ImageRGB[2];
347
347
+
private ImageRGB[] moderatorIcon = new ImageRGB[2];
348
348
private byte aByte1143 = -80;
349
349
private boolean characterEditChangeGenger = true;
350
350
-
private int quakeTimes[] = new int[5];
350
350
+
private int[] quakeTimes = new int[5];
351
351
private int itemSelected;
352
352
private int anInt1147;
353
353
private int anInt1148;
···
355
355
private String selectedItemName;
356
356
private int otherPlayerId;
357
357
private int anInt1152;
358
358
-
private IndexedImage aClass50_Sub1_Sub1_Sub3Array1153[] = new IndexedImage[100];
359
359
-
private boolean aBoolean1155 = false;
358
358
+
private IndexedImage[] aClass50_Sub1_Sub1_Sub3Array1153 = new IndexedImage[100];
359
359
+
private boolean lastItemDragged = false;
360
360
private ProducingGraphicsBuffer tabImageProducer;
361
361
private ProducingGraphicsBuffer aClass18_1157;
362
362
private ProducingGraphicsBuffer gameScreenImageProducer;
363
363
private ProducingGraphicsBuffer chatboxProducingGraphicsBuffer;
364
364
private static int anInt1160;
365
365
private byte aByte1161 = 97;
366
366
-
private boolean aBoolean1163 = false;
366
366
+
private boolean loadGeneratedMap = false;
367
367
private Scene currentScene;
368
368
private static int anInt1165;
369
369
-
private int anIntArray1166[] = new int[256];
369
369
+
private int[] anIntArray1166 = new int[256];
370
370
public static Player localPlayer;
371
371
private static int anInt1168;
372
372
public int openInterfaceId = -1;
···
376
376
private int anInt1173;
377
377
private String selectedWidgetName;
378
378
private int anInt1175 = -89;
379
379
-
private int anIntArray1176[];
380
380
-
private int anIntArray1177[];
379
379
+
private int[] anIntArray1176;
380
380
+
private int[] anIntArray1177;
381
381
private int anInt1178 = 300;
382
382
private int anInt1257;
383
383
-
private int anIntArray1180[] = new int[33];
383
383
+
private int[] anIntArray1180 = new int[33];
384
384
public boolean redrawTabArea = false;
385
385
-
private ImageRGB aClass50_Sub1_Sub1_Sub1Array1182[] = new ImageRGB[20];
385
385
+
private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1182 = new ImageRGB[20];
386
386
private int menuActionRow;
387
387
-
private String menuActionTexts[] = new String[500];
387
387
+
private String[] menuActionTexts = new String[500];
388
388
private IndexedImage inventoryBackgroundImage;
389
389
private IndexedImage minimapBackgroundImage;
390
390
private IndexedImage chatboxBackgroundImage;
391
391
public Buffer buffer = Buffer.allocate(1);
392
392
-
private int cost[][] = new int[104][104];
392
392
+
private int[][] cost = new int[104][104];
393
393
private int dialogueId = -1;
394
394
private ImageRGB mapdotItem;
395
395
private ImageRGB mapdotActor;
···
408
408
private ProducingGraphicsBuffer aClass18_1206;
409
409
private static boolean aBoolean1207;
410
410
private int anInt1208;
411
411
-
private boolean aBoolean1209 = false;
412
412
-
private LinkedList aClass6_1210 = new LinkedList();
411
411
+
private boolean loadingMap = false;
412
412
+
private LinkedList gameAnimableObjectQueue = new LinkedList();
413
413
private boolean cutsceneActive = false;
414
414
private boolean redrawChatMode = false;
415
415
private int flashingSidebarId = -1;
416
416
-
public static int BITFIELD_MAX_VALUE[];
416
416
+
public static int[] BITFIELD_MAX_VALUE;
417
417
private int anInt1215;
418
418
private int cameraX;
419
419
private int cameraZ;
···
427
427
private int loginScreenState;
428
428
private int anInt1226;
429
429
private int tradeMode;
430
430
-
public Index stores[] = new Index[5];
431
431
-
private long aLong1229;
430
430
+
public Index[] stores = new Index[5];
431
431
+
private long loadRegionTime;
432
432
private int reportAbuseInterfaceID = -1;
433
433
-
private byte objectData[][];
433
433
+
private byte[][] objectData;
434
434
private int anInt1233;
435
435
private int anInt1234 = 1;
436
436
private static int anInt1235;
···
441
441
public boolean redrawChatbox = false;
442
442
private int lastAddress;
443
443
private static boolean aBoolean1242 = true;
444
444
-
private volatile boolean aBoolean1243 = false;
444
444
+
private volatile boolean currentlyDrawingFlames = false;
445
445
private int inputType;
446
446
-
private byte aByteArray1245[] = new byte[16384];
446
446
+
private byte[] aByteArray1245 = new byte[16384];
447
447
private boolean inTutorialIsland;
448
448
private ImageRGB minimapEdge;
449
449
private MouseCapturer mouseCapturer;
···
455
455
private int cameraVelocityVertical;
456
456
private int cameraRandomisationA;
457
457
private int anInt1256 = 1;
458
458
-
private int anIntArray1258[] = new int[100];
459
459
-
private int soundDelay[] = new int[50];
460
460
-
private CollisionMap currentCollisionMap[] = new CollisionMap[4];
458
458
+
private int[] anIntArray1258 = new int[100];
459
459
+
private int[] soundDelay = new int[50];
460
460
+
private CollisionMap[] currentCollisionMap = new CollisionMap[4];
461
461
private LinkedList spawnObjectList = new LinkedList();
462
462
private int currentCameraPositionH;
463
463
private int currentCameraPositionV;
464
464
-
private int anInt1264;
465
465
-
private boolean aBoolean1265 = false;
464
464
+
private int cameraMovedWriteDelay;
465
465
+
private boolean cameraMovedWrite = false;
466
466
private boolean musicEnabled = true;
467
467
-
private int friendWorlds[] = new int[200];
468
468
-
public static final int SKIN_COLOURS[] = {9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145, 58654,
467
467
+
private int[] friendWorlds = new int[200];
468
468
+
public static final int[] SKIN_COLOURS = {9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145, 58654,
469
469
5027, 1457, 16565, 34991, 25486};
470
470
-
private int anInt1269;
470
470
+
private int lastItemDragTime;
471
471
private int nextSong;
472
472
private boolean songChanging = true;
473
473
private int anInt1272 = -1;
474
474
private int anInt1273;
475
475
-
private boolean aBoolean1275 = true;
476
476
-
private int anInt1276 = -1;
477
477
-
private boolean aBoolean1277 = false;
478
478
-
private ImageRGB minimapHint[] = new ImageRGB[1000];
475
475
+
private boolean windowFocused = true;
476
476
+
private int lastRegionId = -1;
477
477
+
private boolean characterModelChanged = false;
478
478
+
private ImageRGB[] minimapHint = new ImageRGB[1000];
479
479
private int walkableWidgetId = -1;
480
480
private int anInt1280;
481
481
-
private LinkedList aClass6_1282 = new LinkedList();
482
482
-
private boolean aBoolean1283 = false;
481
481
+
private LinkedList projectileQueue = new LinkedList();
482
482
+
private boolean loadingError = false;
483
483
private int anInt1284;
484
484
public int currentTabId = 3;
485
485
-
private int anIntArray1286[] = new int[33];
485
485
+
private int[] anIntArray1286 = new int[33];
486
486
private int anInt1287 = 0x332d25;
487
487
-
private ImageRGB aClass50_Sub1_Sub1_Sub1Array1288[] = new ImageRGB[32];
487
487
+
private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1288 = new ImageRGB[32];
488
488
private int secondaryCameraVertical;
489
489
-
private int anIntArray1290[] = {17, 24, 34, 40};
489
489
+
private int[] anIntArray1290 = {17, 24, 34, 40};
490
490
public OnDemandRequester onDemandRequester;
491
491
private IndexedImage titleboxImage;
492
492
private IndexedImage titleboxButtonImage;
493
493
private int removePlayerCount;
494
494
-
private int removePlayers[] = new int[1000];
495
495
-
private int chatTypes[] = new int[100];
496
496
-
private String chatPlayerNames[] = new String[100];
497
497
-
private String chatMessages[] = new String[100];
494
494
+
private int[] removePlayers = new int[1000];
495
495
+
private int[] chatTypes = new int[100];
496
496
+
private String[] chatPlayerNames = new String[100];
497
497
+
private String[] chatMessages = new String[100];
498
498
private int duplicateClickCount;
499
499
-
private int anInt1300;
499
499
+
private int oneMouseButton;
500
500
private boolean aBoolean1301 = true;
501
501
private int anInt1302;
502
502
private int anInt1303;
···
506
506
private int anInt1307;
507
507
private int anInt1308;
508
508
private static int drawCycle;
509
509
-
private int anIntArray1310[];
510
510
-
private int anIntArray1311[];
511
511
-
private int anIntArray1312[];
512
512
-
private int anIntArray1313[];
509
509
+
private int[] anIntArray1310;
510
510
+
private int[] anIntArray1311;
511
511
+
private int[] anIntArray1312;
512
512
+
private int[] anIntArray1313;
513
513
private volatile boolean aBoolean1314 = false;
514
514
private int anInt1315;
515
515
private int anInt1319;
516
516
private volatile boolean aBoolean1320 = false;
517
517
-
private int soundType[] = new int[50];
517
517
+
private int[] soundType = new int[50];
518
518
private int anInt1322;
519
519
-
private LinkedList groundItems[][][] = new LinkedList[4][104][104];
519
519
+
private LinkedList[][][] groundItems = new LinkedList[4][104][104];
520
520
private int runEnergy;
521
521
public static int pulseCycle;
522
522
-
private int characterEditIdentityKits[] = new int[7];
522
522
+
private int[] characterEditIdentityKits = new int[7];
523
523
private int currentSong = -1;
524
524
private int atInventoryLoopCycle;
525
525
private int anInt1330;
···
568
568
return "@yel@";
569
569
}
570
570
571
571
-
public static void main(String args[]) {
571
571
+
public static void main(String[] args) {
572
572
try {
573
573
System.out.println("RS2 user client - release #" + 377);
574
574
Configuration.read();
···
724
724
return;
725
725
}
726
726
String s1 = s;
727
727
-
String as[] = new String[100];
727
727
+
String[] as = new String[100];
728
728
int j = 0;
729
729
do {
730
730
int k = s1.indexOf(" ");
···
837
837
int cycle = 0;
838
838
int interval = 20;
839
839
840
840
-
while (aBoolean1243) {
840
840
+
while (currentlyDrawingFlames) {
841
841
flameCycle++;
842
842
843
843
calculateFlamePositions();
···
988
988
minimapHintY = null;
989
989
minimapHint = null;
990
990
npcs = null;
991
991
-
anIntArray1134 = null;
991
991
+
npcIds = null;
992
992
aByteArray1245 = null;
993
993
chatBuffer = null;
994
994
aClass50_Sub1_Sub1_Sub3Array1153 = null;
995
995
worldMapHintIcons = null;
996
996
-
anIntArrayArray886 = null;
996
996
+
tileRenderCount = null;
997
997
tabIcon = null;
998
998
-
aClass6_1282 = null;
999
999
-
aClass6_1210 = null;
998
998
+
projectileQueue = null;
999
999
+
gameAnimableObjectQueue = null;
1000
1000
aClass50_Sub1_Sub1_Sub1_1086 = null;
1001
1001
if (onDemandRequester != null)
1002
1002
onDemandRequester.stop();
···
1224
1224
}
1225
1225
}
1226
1226
1227
1227
-
private void method24(boolean flag, byte abyte0[], int i) {
1228
1228
-
if (!musicEnabled) {
1229
1229
-
} else {
1227
1227
+
private void saveMidi(boolean flag, byte[] abyte0) {
1228
1228
+
if (musicEnabled) {
1230
1229
SignLink.fadeMidi = flag ? 1 : 0;
1231
1230
SignLink.saveMidi(abyte0, abyte0.length);
1232
1232
-
i = 71 / i;
1233
1231
}
1234
1232
}
1235
1233
1236
1236
-
private void method25() {
1237
1237
-
aBoolean1277 = true;
1238
1238
-
for (int j = 0; j < 7; j++) {
1239
1239
-
characterEditIdentityKits[j] = -1;
1240
1240
-
for (int k = 0; k < IdentityKit.count; k++) {
1241
1241
-
if (IdentityKit.cache[k].widgetDisplayed
1242
1242
-
|| IdentityKit.cache[k].partId != j + (characterEditChangeGenger ? 0 : 7))
1234
1234
+
private void changeGender() {
1235
1235
+
characterModelChanged = true;
1236
1236
+
for (int type = 0; type < 7; type++) {
1237
1237
+
characterEditIdentityKits[type] = -1;
1238
1238
+
for (int kit = 0; kit < IdentityKit.count; kit++) {
1239
1239
+
if (IdentityKit.cache[kit].widgetDisplayed
1240
1240
+
|| IdentityKit.cache[kit].partId != type + (characterEditChangeGenger ? 0 : 7))
1243
1241
continue;
1244
1244
-
characterEditIdentityKits[j] = k;
1242
1242
+
characterEditIdentityKits[type] = kit;
1245
1243
break;
1246
1244
}
1247
1245
···
1288
1286
}
1289
1287
1290
1288
1291
1291
-
private void processGame() {
1289
1289
+
private void updateGame() {
1292
1290
if (systemUpdateTime > 1)
1293
1291
systemUpdateTime--;
1294
1294
-
if (anInt873 > 0)
1295
1295
-
anInt873--;
1292
1292
+
if (idleLogout > 0)
1293
1293
+
idleLogout--;
1296
1294
for (int i = 0; i < 5; i++)
1297
1295
if (!parseIncomingPacket())
1298
1296
break;
···
1304
1302
if (super.clickType != 0 || mouseCapturer.coord >= 40) {
1305
1303
outBuffer.putOpcode(171);
1306
1304
outBuffer.putByte(0);
1307
1307
-
int i2 = outBuffer.currentPosition;
1308
1308
-
int i3 = 0;
1309
1309
-
for (int i4 = 0; i4 < mouseCapturer.coord; i4++) {
1310
1310
-
if (i2 - outBuffer.currentPosition >= 240)
1305
1305
+
int originalOffset = outBuffer.currentPosition;
1306
1306
+
int coordinateCount = 0;
1307
1307
+
for (int c = 0; c < mouseCapturer.coord; c++) {
1308
1308
+
if (originalOffset - outBuffer.currentPosition >= 240)
1311
1309
break;
1312
1312
-
i3++;
1313
1313
-
int k4 = mouseCapturer.coordsY[i4];
1314
1314
-
if (k4 < 0)
1315
1315
-
k4 = 0;
1316
1316
-
else if (k4 > 502)
1317
1317
-
k4 = 502;
1318
1318
-
int j5 = mouseCapturer.coordsX[i4];
1319
1319
-
if (j5 < 0)
1320
1320
-
j5 = 0;
1321
1321
-
else if (j5 > 764)
1322
1322
-
j5 = 764;
1323
1323
-
int l5 = k4 * 765 + j5;
1324
1324
-
if (mouseCapturer.coordsY[i4] == -1 && mouseCapturer.coordsX[i4] == -1) {
1325
1325
-
j5 = -1;
1326
1326
-
k4 = -1;
1327
1327
-
l5 = 0x7ffff;
1310
1310
+
coordinateCount++;
1311
1311
+
int y = mouseCapturer.coordsY[c];
1312
1312
+
if (y < 0)
1313
1313
+
y = 0;
1314
1314
+
else if (y > 502)
1315
1315
+
y = 502;
1316
1316
+
int x = mouseCapturer.coordsX[c];
1317
1317
+
if (x < 0)
1318
1318
+
x = 0;
1319
1319
+
else if (x > 764)
1320
1320
+
x = 764;
1321
1321
+
int pixelOffset = y * 765 + x;
1322
1322
+
if (mouseCapturer.coordsY[c] == -1 && mouseCapturer.coordsX[c] == -1) {
1323
1323
+
x = -1;
1324
1324
+
y = -1;
1325
1325
+
pixelOffset = 0x7ffff;
1328
1326
}
1329
1329
-
if (j5 == anInt1011 && k4 == anInt1012) {
1327
1327
+
if (x == lastClickX && y == lastClickY) {
1330
1328
if (duplicateClickCount < 2047)
1331
1329
duplicateClickCount++;
1332
1330
} else {
1333
1333
-
int i6 = j5 - anInt1011;
1334
1334
-
anInt1011 = j5;
1335
1335
-
int j6 = k4 - anInt1012;
1336
1336
-
anInt1012 = k4;
1337
1337
-
if (duplicateClickCount < 8 && i6 >= -32 && i6 <= 31 && j6 >= -32 && j6 <= 31) {
1338
1338
-
i6 += 32;
1339
1339
-
j6 += 32;
1340
1340
-
outBuffer.putShortBE((duplicateClickCount << 12) + (i6 << 6) + j6);
1331
1331
+
int differenceX = x - lastClickX;
1332
1332
+
lastClickX = x;
1333
1333
+
int differenceY = y - lastClickY;
1334
1334
+
lastClickY = y;
1335
1335
+
if (duplicateClickCount < 8 && differenceX >= -32 && differenceX <= 31 && differenceY >= -32 && differenceY <= 31) {
1336
1336
+
differenceX += 32;
1337
1337
+
differenceY += 32;
1338
1338
+
outBuffer.putShortBE((duplicateClickCount << 12) + (differenceX << 6) + differenceY);
1341
1339
duplicateClickCount = 0;
1342
1340
} else if (duplicateClickCount < 8) {
1343
1343
-
outBuffer.putMediumBE(0x800000 + (duplicateClickCount << 19) + l5);
1341
1341
+
outBuffer.putMediumBE(0x800000 + (duplicateClickCount << 19) + pixelOffset);
1344
1342
duplicateClickCount = 0;
1345
1343
} else {
1346
1346
-
outBuffer.putIntBE(0xc0000000 + (duplicateClickCount << 19) + l5);
1344
1344
+
outBuffer.putIntBE(0xc0000000 + (duplicateClickCount << 19) + pixelOffset);
1347
1345
duplicateClickCount = 0;
1348
1346
}
1349
1347
}
1350
1348
}
1351
1349
1352
1352
-
outBuffer.putLength(outBuffer.currentPosition - i2);
1353
1353
-
if (i3 >= mouseCapturer.coord) {
1350
1350
+
outBuffer.putLength(outBuffer.currentPosition - originalOffset);
1351
1351
+
if (coordinateCount >= mouseCapturer.coord) {
1354
1352
mouseCapturer.coord = 0;
1355
1353
} else {
1356
1356
-
mouseCapturer.coord -= i3;
1357
1357
-
for (int l4 = 0; l4 < mouseCapturer.coord; l4++) {
1358
1358
-
mouseCapturer.coordsX[l4] = mouseCapturer.coordsX[l4 + i3];
1359
1359
-
mouseCapturer.coordsY[l4] = mouseCapturer.coordsY[l4 + i3];
1354
1354
+
mouseCapturer.coord -= coordinateCount;
1355
1355
+
for (int c = 0; c < mouseCapturer.coord; c++) {
1356
1356
+
mouseCapturer.coordsX[c] = mouseCapturer.coordsX[c + coordinateCount];
1357
1357
+
mouseCapturer.coordsY[c] = mouseCapturer.coordsY[c + coordinateCount];
1360
1358
}
1361
1359
1362
1360
}
···
1366
1364
}
1367
1365
}
1368
1366
if (super.clickType != 0) {
1369
1369
-
long l = (super.clickTime - aLong902) / 50L;
1370
1370
-
if (l > 4095L)
1371
1371
-
l = 4095L;
1372
1372
-
aLong902 = super.clickTime;
1373
1373
-
int j2 = super.clickY;
1374
1374
-
if (j2 < 0)
1375
1375
-
j2 = 0;
1376
1376
-
else if (j2 > 502)
1377
1377
-
j2 = 502;
1378
1378
-
int j3 = super.clickX;
1379
1379
-
if (j3 < 0)
1380
1380
-
j3 = 0;
1381
1381
-
else if (j3 > 764)
1382
1382
-
j3 = 764;
1383
1383
-
int j4 = j2 * 765 + j3;
1384
1384
-
int i5 = 0;
1367
1367
+
long timeBetweenClicks = (super.clickTime - lastClickTime) / 50L;
1368
1368
+
if (timeBetweenClicks > 4095L)
1369
1369
+
timeBetweenClicks = 4095L;
1370
1370
+
lastClickTime = super.clickTime;
1371
1371
+
int y = super.clickY;
1372
1372
+
if (y < 0)
1373
1373
+
y = 0;
1374
1374
+
else if (y > 502)
1375
1375
+
y = 502;
1376
1376
+
int x = super.clickX;
1377
1377
+
if (x < 0)
1378
1378
+
x = 0;
1379
1379
+
else if (x > 764)
1380
1380
+
x = 764;
1381
1381
+
int pixelOffset = y * 765 + x;
1382
1382
+
int rightClick = 0;
1385
1383
if (super.clickType == 2)
1386
1386
-
i5 = 1;
1387
1387
-
int k5 = (int) l;
1384
1384
+
rightClick = 1;
1385
1385
+
int timeDifference = (int) timeBetweenClicks;
1388
1386
outBuffer.putOpcode(19);
1389
1389
-
outBuffer.putIntBE((k5 << 20) + (i5 << 19) + j4);
1387
1387
+
outBuffer.putIntBE((timeDifference << 20) + (rightClick << 19) + pixelOffset);
1390
1388
}
1391
1391
-
if (anInt1264 > 0)
1392
1392
-
anInt1264--;
1389
1389
+
if (cameraMovedWriteDelay > 0)
1390
1390
+
cameraMovedWriteDelay--;
1393
1391
if (super.keyStatus[1] == 1 || super.keyStatus[2] == 1 || super.keyStatus[3] == 1
1394
1392
|| super.keyStatus[4] == 1)
1395
1395
-
aBoolean1265 = true;
1396
1396
-
if (aBoolean1265 && anInt1264 <= 0) {
1397
1397
-
anInt1264 = 20;
1398
1398
-
aBoolean1265 = false;
1393
1393
+
cameraMovedWrite = true;
1394
1394
+
if (cameraMovedWrite && cameraMovedWriteDelay <= 0) {
1395
1395
+
cameraMovedWriteDelay = 20;
1396
1396
+
cameraMovedWrite = false;
1399
1397
outBuffer.putOpcode(140);
1400
1398
outBuffer.putShortLE(cameraVertical);
1401
1399
outBuffer.putShortLE(cameraHorizontal);
1402
1400
}
1403
1403
-
if (super.awtFocus && !aBoolean1275) {
1404
1404
-
aBoolean1275 = true;
1401
1401
+
if (super.awtFocus && !windowFocused) {
1402
1402
+
windowFocused = true;
1405
1403
outBuffer.putOpcode(187);
1406
1404
outBuffer.putByte(1);
1407
1405
}
1408
1408
-
if (!super.awtFocus && aBoolean1275) {
1409
1409
-
aBoolean1275 = false;
1406
1406
+
if (!super.awtFocus && windowFocused) {
1407
1407
+
windowFocused = false;
1410
1408
outBuffer.putOpcode(187);
1411
1409
outBuffer.putByte(0);
1412
1410
}
1413
1413
-
method143((byte) -40);
1411
1411
+
loadingStages();
1414
1412
method36();
1415
1413
method152();
1416
1416
-
timeoutCounter++;
1417
1417
-
if (timeoutCounter > 750)
1414
1414
+
packetReadAnticheat++;
1415
1415
+
if (packetReadAnticheat > 750)
1418
1416
dropClient();
1419
1417
method100(0);
1420
1418
method67(-37214);
···
1436
1434
}
1437
1435
}
1438
1436
if (activeInterfaceType != 0) {
1439
1439
-
anInt1269++;
1437
1437
+
lastItemDragTime++;
1440
1438
if (super.mouseX > anInt1114 + 5 || super.mouseX < anInt1114 - 5 || super.mouseY > anInt1115 + 5
1441
1439
|| super.mouseY < anInt1115 - 5)
1442
1442
-
aBoolean1155 = true;
1440
1440
+
lastItemDragged = true;
1443
1441
if (super.mouseButtonPressed == 0) {
1444
1442
if (activeInterfaceType == 2)
1445
1443
redrawTabArea = true;
1446
1444
if (activeInterfaceType == 3)
1447
1445
redrawChatbox = true;
1448
1446
activeInterfaceType = 0;
1449
1449
-
if (aBoolean1155 && anInt1269 >= 5) {
1447
1447
+
if (lastItemDragged && lastItemDragTime >= 5) {
1450
1448
lastActiveInvInterface = -1;
1451
1449
processRightClick(-521);
1452
1450
if (lastActiveInvInterface == modifiedWidgetId && mouseInvInterfaceIndex != selectedInventorySlot) {
1453
1451
Widget childInterface = Widget.forId(modifiedWidgetId);
1454
1454
-
int i1 = 0;
1455
1455
-
if (anInt955 == 1 && childInterface.contentType == 206)
1456
1456
-
i1 = 1;
1452
1452
+
int moveItemInsetionMode = 0;
1453
1453
+
if (bankInsertMode == 1 && childInterface.contentType == 206)
1454
1454
+
moveItemInsetionMode = 1;
1457
1455
if (childInterface.items[mouseInvInterfaceIndex] <= 0)
1458
1458
-
i1 = 0;
1456
1456
+
moveItemInsetionMode = 0;
1459
1457
if (childInterface.itemDeletesDraged) {
1460
1460
-
int k2 = selectedInventorySlot;
1461
1461
-
int k3 = mouseInvInterfaceIndex;
1462
1462
-
childInterface.items[k3] = childInterface.items[k2];
1463
1463
-
childInterface.itemAmounts[k3] = childInterface.itemAmounts[k2];
1464
1464
-
childInterface.items[k2] = -1;
1465
1465
-
childInterface.itemAmounts[k2] = 0;
1466
1466
-
} else if (i1 == 1) {
1467
1467
-
int l2 = selectedInventorySlot;
1468
1468
-
for (int l3 = mouseInvInterfaceIndex; l2 != l3; )
1469
1469
-
if (l2 > l3) {
1470
1470
-
childInterface.swapItems(l2, l2 - 1);
1471
1471
-
l2--;
1472
1472
-
} else if (l2 < l3) {
1473
1473
-
childInterface.swapItems(l2, l2 + 1);
1474
1474
-
l2++;
1458
1458
+
int slotStart = selectedInventorySlot;
1459
1459
+
int slotEnd = mouseInvInterfaceIndex;
1460
1460
+
childInterface.items[slotEnd] = childInterface.items[slotStart];
1461
1461
+
childInterface.itemAmounts[slotEnd] = childInterface.itemAmounts[slotStart];
1462
1462
+
childInterface.items[slotStart] = -1;
1463
1463
+
childInterface.itemAmounts[slotStart] = 0;
1464
1464
+
} else if (moveItemInsetionMode == 1) {
1465
1465
+
int slotStart = selectedInventorySlot;
1466
1466
+
for (int slotPointer = mouseInvInterfaceIndex; slotStart != slotPointer; )
1467
1467
+
if (slotStart > slotPointer) {
1468
1468
+
childInterface.swapItems(slotStart, slotStart - 1);
1469
1469
+
slotStart--;
1470
1470
+
} else if (slotStart < slotPointer) {
1471
1471
+
childInterface.swapItems(slotStart, slotStart + 1);
1472
1472
+
slotStart++;
1475
1473
}
1476
1474
1477
1475
} else {
···
1479
1477
}
1480
1478
outBuffer.putOpcode(123);
1481
1479
outBuffer.putOffsetShortLE(mouseInvInterfaceIndex);
1482
1482
-
outBuffer.putOffsetByte(i1);
1480
1480
+
outBuffer.putOffsetByte(moveItemInsetionMode);
1483
1481
outBuffer.putOffsetShortBE(modifiedWidgetId);
1484
1482
outBuffer.putShortLE(selectedInventorySlot);
1485
1483
}
1486
1486
-
} else if ((anInt1300 == 1 || menuHasAddFriend(menuActionRow - 1, aByte1161)) && menuActionRow > 2)
1484
1484
+
} else if ((oneMouseButton == 1 || menuHasAddFriend(menuActionRow - 1, aByte1161)) && menuActionRow > 2)
1487
1485
determineMenuSize();
1488
1486
else if (menuActionRow > 0)
1489
1487
processMenuActions(menuActionRow - 1);
···
1498
1496
localPlayer.pathX[0]);
1499
1497
Scene.clickedTileX = -1;
1500
1498
if (flag) {
1501
1501
-
lastClickX = super.clickX;
1502
1502
-
lastClickY = super.clickY;
1499
1499
+
crossX = super.clickX;
1500
1500
+
crossY = super.clickY;
1503
1501
crossType = 1;
1504
1502
crossIndex = 0;
1505
1503
}
···
1539
1537
manageTextInputs();
1540
1538
super.idleTime++;
1541
1539
if (super.idleTime > 4500) {
1542
1542
-
anInt873 = 250;
1540
1540
+
idleLogout = 250;
1543
1541
super.idleTime -= 500;
1544
1542
outBuffer.putOpcode(202);
1545
1543
}
···
1815
1813
for (int floorLevel = 0; floorLevel < 4; floorLevel++) {
1816
1814
for (int width = 1; width < 103; width++) {
1817
1815
for (int heigth = 1; heigth < 103; heigth++)
1818
1818
-
currentCollisionMap[floorLevel].adjacency[width][heigth] = 0;
1816
1816
+
currentCollisionMap[floorLevel].clippingData[width][heigth] = 0;
1819
1817
1820
1818
}
1821
1819
···
1994
1992
return false;
1995
1993
buffer.currentPosition = 0;
1996
1994
gameConnection.read(buffer.buffer, 0, packetSize);
1997
1997
-
timeoutCounter = 0;
1995
1995
+
packetReadAnticheat = 0;
1998
1996
thirdLastOpcode = secondLastOpcode;
1999
1997
secondLastOpcode = lastOpcode;
2000
1998
lastOpcode = opcode;
···
2733
2731
if (opcode == UPDATE_ACTIVE_MAP_REGION) {
2734
2732
tmpChunkY = buffer.getUnsignedShortBE();
2735
2733
tmpChunkX = buffer.getUnsignedNegativeOffsetShortLE();
2736
2736
-
aBoolean1163 = false;
2734
2734
+
loadGeneratedMap = false;
2737
2735
}
2738
2736
if (opcode == CONSTRUCT_MAP_REGION) {
2739
2737
tmpChunkX = buffer.getUnsignedNegativeOffsetShortBE();
···
2754
2752
2755
2753
buffer.finishBitAccess();
2756
2754
tmpChunkY = buffer.getUnsignedNegativeOffsetShortBE();
2757
2757
-
aBoolean1163 = true;
2755
2755
+
loadGeneratedMap = true;
2758
2756
}
2759
2757
if (chunkX == tmpChunkX && chunkY == tmpChunkY && loadingStage == 2) {
2760
2758
opcode = -1;
···
2770
2768
if (chunkX / 8 == 48 && chunkY / 8 == 148)
2771
2769
aBoolean1067 = true;
2772
2770
loadingStage = 1;
2773
2773
-
aLong1229 = System.currentTimeMillis();
2771
2771
+
loadRegionTime = System.currentTimeMillis();
2774
2772
method125(null, "Loading - please wait.");
2775
2773
if (opcode == UPDATE_ACTIVE_MAP_REGION) {
2776
2774
int count = 0;
···
2810
2808
}
2811
2809
if (opcode == CONSTRUCT_MAP_REGION) {
2812
2810
int uniqueCount = 0;
2813
2813
-
int fileIndices[] = new int[676];
2811
2811
+
int[] fileIndices = new int[676];
2814
2812
for (int tileZ = 0; tileZ < 4; tileZ++) {
2815
2813
for (int tileX = 0; tileX < 13; tileX++) {
2816
2814
for (int tileY = 0; tileY < 13; tileY++) {
···
2883
2881
}
2884
2882
}
2885
2883
2886
2886
-
aBoolean1209 = true;
2884
2884
+
loadingMap = true;
2887
2885
byte byte1 = 0;
2888
2886
byte byte2 = 104;
2889
2887
byte byte3 = 1;
···
3113
3111
}
3114
3112
if (opcode == PLAYER_UPDATING) {
3115
3113
updatePlayers(packetSize, buffer);
3116
3116
-
aBoolean1209 = false;
3114
3114
+
loadingMap = false;
3117
3115
opcode = -1;
3118
3116
return true;
3119
3117
}
···
3211
3209
anIntArray1124[k3++] = srcY;
3212
3210
boolean flag2 = false;
3213
3211
int i4 = anIntArray1123.length;
3214
3214
-
int masks[][] = currentCollisionMap[plane].adjacency;
3212
3212
+
int[][] masks = currentCollisionMap[plane].clippingData;
3215
3213
while (l3 != k3) {
3216
3214
curX = anIntArray1123[l3];
3217
3215
curY = anIntArray1124[l3];
···
3750
3748
if (npc.npcDefinition.boundaryDimension == 1
3751
3749
&& (npc.worldX & 0x7f) == 64
3752
3750
&& (npc.worldY & 0x7f) == 64) {
3753
3753
-
for (int i2 = 0; i2 < anInt1133; i2++) {
3754
3754
-
Npc npc1 = npcs[anIntArray1134[i2]];
3751
3751
+
for (int i2 = 0; i2 < npcCount; i2++) {
3752
3752
+
Npc npc1 = npcs[npcIds[i2]];
3755
3753
if (npc1 != null
3756
3754
&& npc1 != npc
3757
3755
&& npc1.npcDefinition.boundaryDimension == 1
3758
3756
&& npc1.worldX == npc.worldX
3759
3757
&& npc1.worldY == npc.worldY)
3760
3760
-
method82(npc1.npcDefinition, i1, l, anIntArray1134[i2]);
3758
3758
+
method82(npc1.npcDefinition, i1, l, npcIds[i2]);
3761
3759
}
3762
3760
3763
3761
for (int k2 = 0; k2 < localPlayerCount; k2++) {
···
3775
3773
Player player1 = players[k1];
3776
3774
if ((player1.worldX & 0x7f) == 64
3777
3775
&& (player1.worldY & 0x7f) == 64) {
3778
3778
-
for (int j2 = 0; j2 < anInt1133; j2++) {
3779
3779
-
Npc npc = npcs[anIntArray1134[j2]];
3776
3776
+
for (int j2 = 0; j2 < npcCount; j2++) {
3777
3777
+
Npc npc = npcs[npcIds[j2]];
3780
3778
if (npc != null
3781
3779
&& npc.npcDefinition.boundaryDimension == 1
3782
3780
&& npc.worldX == player1.worldX
3783
3781
&& npc.worldY == player1.worldY)
3784
3784
-
method82(npc.npcDefinition, i1, l, anIntArray1134[j2]);
3782
3782
+
method82(npc.npcDefinition, i1, l, npcIds[j2]);
3785
3783
}
3786
3784
3787
3785
for (int l2 = 0; l2 < localPlayerCount; l2++) {
···
3920
3918
private void method46(Buffer buffer) {
3921
3919
buffer.initBitAccess();
3922
3920
int j = buffer.getBits(8);
3923
3923
-
if (j < anInt1133) {
3924
3924
-
for (int k = j; k < anInt1133; k++)
3925
3925
-
removePlayers[removePlayerCount++] = anIntArray1134[k];
3921
3921
+
if (j < npcCount) {
3922
3922
+
for (int k = j; k < npcCount; k++)
3923
3923
+
removePlayers[removePlayerCount++] = npcIds[k];
3926
3924
3927
3925
}
3928
3928
-
if (j > anInt1133) {
3926
3926
+
if (j > npcCount) {
3929
3927
SignLink.reportError(username + " Too many npcs");
3930
3928
throw new RuntimeException("eek");
3931
3929
}
3932
3932
-
anInt1133 = 0;
3930
3930
+
npcCount = 0;
3933
3931
for (int l = 0; l < j; l++) {
3934
3934
-
int i1 = anIntArray1134[l];
3932
3932
+
int i1 = npcIds[l];
3935
3933
Npc npc = npcs[i1];
3936
3934
int updateRequired = buffer.getBits(1);
3937
3935
if (updateRequired == 0) {
3938
3938
-
anIntArray1134[anInt1133++] = i1;
3936
3936
+
npcIds[npcCount++] = i1;
3939
3937
npc.pulseCycle = pulseCycle;
3940
3938
} else {
3941
3939
int moveType = buffer.getBits(2);
3942
3940
if (moveType == 0) {
3943
3943
-
anIntArray1134[anInt1133++] = i1;
3941
3941
+
npcIds[npcCount++] = i1;
3944
3942
npc.pulseCycle = pulseCycle;
3945
3943
updatedPlayers[updatedPlayerCount++] = i1;
3946
3944
} else if (moveType == 1) {
3947
3947
-
anIntArray1134[anInt1133++] = i1;
3945
3945
+
npcIds[npcCount++] = i1;
3948
3946
npc.pulseCycle = pulseCycle;
3949
3947
int direction = buffer.getBits(3);
3950
3948
npc.move(direction, false);
···
3952
3950
if (blockUpdateRequired == 1)
3953
3951
updatedPlayers[updatedPlayerCount++] = i1;
3954
3952
} else if (moveType == 2) {
3955
3955
-
anIntArray1134[anInt1133++] = i1;
3953
3953
+
npcIds[npcCount++] = i1;
3956
3954
npc.pulseCycle = pulseCycle;
3957
3955
int direction1 = buffer.getBits(3);
3958
3956
npc.move(direction1, true);
···
3988
3986
+ " psize:" + packetSize);
3989
3987
throw new RuntimeException("eek");
3990
3988
}
3991
3991
-
for (int l = 0; l < anInt1133; l++)
3992
3992
-
if (npcs[anIntArray1134[l]] == null) {
3993
3993
-
SignLink.reportError(username + " null entry in npc list - coord:" + l + " size:" + anInt1133);
3989
3989
+
for (int l = 0; l < npcCount; l++)
3990
3990
+
if (npcs[npcIds[l]] == null) {
3991
3991
+
SignLink.reportError(username + " null entry in npc list - coord:" + l + " size:" + npcCount);
3994
3992
throw new RuntimeException("eek");
3995
3993
}
3996
3994
···
4008
4006
4009
4007
4010
4008
private void renderProjectiles() {
4011
4011
-
Projectile class50_sub1_sub4_sub2 = (Projectile) aClass6_1282.first();
4012
4012
-
for (; class50_sub1_sub4_sub2 != null; class50_sub1_sub4_sub2 = (Projectile) aClass6_1282
4009
4009
+
Projectile class50_sub1_sub4_sub2 = (Projectile) projectileQueue.first();
4010
4010
+
for (; class50_sub1_sub4_sub2 != null; class50_sub1_sub4_sub2 = (Projectile) projectileQueue
4013
4011
.next())
4014
4012
if (class50_sub1_sub4_sub2.sceneId != plane || pulseCycle > class50_sub1_sub4_sub2.endCycle)
4015
4013
class50_sub1_sub4_sub2.remove();
···
4117
4115
anIntArray1084 = new int[32768];
4118
4116
anIntArray1085 = new int[32768];
4119
4117
drawLoadingText(10, "Connecting to fileserver");
4120
4120
-
if (!aBoolean1243) {
4118
4118
+
if (!currentlyDrawingFlames) {
4121
4119
aBoolean1314 = true;
4122
4122
-
aBoolean1243 = true;
4120
4120
+
currentlyDrawingFlames = true;
4123
4121
startRunnable(this, 2);
4124
4122
}
4125
4123
}
···
4225
4223
int id = secondMenuOperand[menuActionRow - 1];
4226
4224
Widget widget = Widget.forId(id);
4227
4225
if (widget.itemSwapable || widget.itemDeletesDraged) {
4228
4228
-
aBoolean1155 = false;
4229
4229
-
anInt1269 = 0;
4226
4226
+
lastItemDragged = false;
4227
4227
+
lastItemDragTime = 0;
4230
4228
modifiedWidgetId = id;
4231
4229
selectedInventorySlot = item;
4232
4230
activeInterfaceType = 2;
···
4240
4238
}
4241
4239
}
4242
4240
}
4243
4243
-
if (meta == 1 && (anInt1300 == 1 || menuHasAddFriend(menuActionRow - 1, aByte1161)) && menuActionRow > 2)
4241
4241
+
if (meta == 1 && (oneMouseButton == 1 || menuHasAddFriend(menuActionRow - 1, aByte1161)) && menuActionRow > 2)
4244
4242
meta = 2;
4245
4243
if (meta == 1 && menuActionRow > 0)
4246
4244
processMenuActions(menuActionRow - 1);
···
4290
4288
Rasterizer.drawHorizontalLine(j + 1, i1 + 14 + k1 + j1, 15, anInt1287);
4291
4289
}
4292
4290
4293
4293
-
private void renderNPCs(int i, boolean flag) {
4294
4294
-
i = 26 / i;
4295
4295
-
for (int j = 0; j < anInt1133; j++) {
4296
4296
-
Npc class50_sub1_sub4_sub3_sub1 = npcs[anIntArray1134[j]];
4297
4297
-
int k = 0x20000000 + (anIntArray1134[j] << 14);
4298
4298
-
if (class50_sub1_sub4_sub3_sub1 == null || !class50_sub1_sub4_sub3_sub1.isVisible()
4299
4299
-
|| class50_sub1_sub4_sub3_sub1.npcDefinition.visible != flag
4300
4300
-
|| !class50_sub1_sub4_sub3_sub1.npcDefinition.method360())
4291
4291
+
private void renderNPCs(boolean flag) {
4292
4292
+
for (int n = 0; n < npcCount; n++) {
4293
4293
+
Npc npc = npcs[npcIds[n]];
4294
4294
+
int hash = 0x20000000 + (npcIds[n] << 14);
4295
4295
+
if (npc == null || !npc.isVisible() || npc.npcDefinition.visible != flag || !npc.npcDefinition.isVisible())
4301
4296
continue;
4302
4302
-
int l = class50_sub1_sub4_sub3_sub1.worldX >> 7;
4303
4303
-
int i1 = class50_sub1_sub4_sub3_sub1.worldY >> 7;
4304
4304
-
if (l < 0 || l >= 104 || i1 < 0 || i1 >= 104)
4297
4297
+
int npcX = npc.worldX >> 7;
4298
4298
+
int npcY = npc.worldY >> 7;
4299
4299
+
if (npcX < 0 || npcX >= 104 || npcY < 0 || npcY >= 104)
4305
4300
continue;
4306
4306
-
if (class50_sub1_sub4_sub3_sub1.boundaryDimension == 1
4307
4307
-
&& (class50_sub1_sub4_sub3_sub1.worldX & 0x7f) == 64
4308
4308
-
&& (class50_sub1_sub4_sub3_sub1.worldY & 0x7f) == 64) {
4309
4309
-
if (anIntArrayArray886[l][i1] == renderCount)
4301
4301
+
if (npc.boundaryDimension == 1
4302
4302
+
&& (npc.worldX & 0x7f) == 64
4303
4303
+
&& (npc.worldY & 0x7f) == 64) {
4304
4304
+
if (tileRenderCount[npcX][npcY] == renderCount)
4310
4305
continue;
4311
4311
-
anIntArrayArray886[l][i1] = renderCount;
4306
4306
+
tileRenderCount[npcX][npcY] = renderCount;
4312
4307
}
4313
4313
-
if (!class50_sub1_sub4_sub3_sub1.npcDefinition.clickable)
4314
4314
-
k += 0x80000000;
4315
4315
-
currentScene.addEntity(plane, class50_sub1_sub4_sub3_sub1.worldX, class50_sub1_sub4_sub3_sub1.worldY, getFloorDrawHeight(
4316
4316
-
plane, class50_sub1_sub4_sub3_sub1.worldX, class50_sub1_sub4_sub3_sub1.worldY
4317
4317
-
), class50_sub1_sub4_sub3_sub1, k,
4318
4318
-
(class50_sub1_sub4_sub3_sub1.boundaryDimension - 1) * 64 + 60, class50_sub1_sub4_sub3_sub1.aBoolean1592,
4319
4319
-
class50_sub1_sub4_sub3_sub1.anInt1612);
4308
4308
+
if (!npc.npcDefinition.clickable)
4309
4309
+
hash += 0x80000000;
4310
4310
+
currentScene.addEntity(plane, npc.worldX, npc.worldY, getFloorDrawHeight(
4311
4311
+
plane, npc.worldX, npc.worldY
4312
4312
+
), npc, hash,
4313
4313
+
(npc.boundaryDimension - 1) * 64 + 60, npc.dynamic,
4314
4314
+
npc.currentRotation);
4320
4315
}
4321
4316
4322
4317
}
···
4326
4321
}
4327
4322
4328
4323
private void dropClient() {
4329
4329
-
if (anInt873 > 0) {
4324
4324
+
if (idleLogout > 0) {
4330
4325
logout();
4331
4326
return;
4332
4327
}
···
4366
4361
}
4367
4362
}
4368
4363
if (type == 205) {
4369
4369
-
anInt873 = 250;
4364
4364
+
idleLogout = 250;
4370
4365
return true;
4371
4366
}
4372
4367
if (type == 501) {
···
4398
4393
} while (IdentityKit.cache[i2].widgetDisplayed
4399
4394
|| IdentityKit.cache[i2].partId != k + (characterEditChangeGenger ? 0 : 7));
4400
4395
characterEditIdentityKits[k] = i2;
4401
4401
-
aBoolean1277 = true;
4396
4396
+
characterModelChanged = true;
4402
4397
}
4403
4398
}
4404
4399
if (type >= 314 && type <= 323) {
···
4410
4405
if (k1 == 1 && ++j2 >= playerColours[l].length)
4411
4406
j2 = 0;
4412
4407
characterEditColors[l] = j2;
4413
4413
-
aBoolean1277 = true;
4408
4408
+
characterModelChanged = true;
4414
4409
}
4415
4410
if (type == 324 && !characterEditChangeGenger) {
4416
4411
characterEditChangeGenger = true;
4417
4417
-
method25();
4412
4412
+
changeGender();
4418
4413
}
4419
4414
if (type == 325 && characterEditChangeGenger) {
4420
4415
characterEditChangeGenger = false;
4421
4421
-
method25();
4416
4416
+
changeGender();
4422
4417
}
4423
4418
if (type == 326) {
4424
4419
outBuffer.putOpcode(163);
···
4764
4759
4765
4760
if ((mask & 4) != 0) {
4766
4761
int size = buffer.getUnsignedByte();
4767
4767
-
byte bytes[] = new byte[size];
4762
4762
+
byte[] bytes = new byte[size];
4768
4763
Buffer appearance = new Buffer(bytes);
4769
4764
4770
4765
buffer.getBytesReverse(bytes, 0, size);
···
4958
4953
onDemandRequester.request(2, nextSong);
4959
4954
4960
4955
while (onDemandRequester.method333() > 0) {
4961
4961
-
method77(false);
4956
4956
+
processOnDemandQueue();
4962
4957
4963
4958
try {
4964
4959
Thread.sleep(100L);
···
4985
4980
if (total > 0)
4986
4981
drawLoadingText(65, "Loading animations - " + (total * 100) / fileRequestCount + "%");
4987
4982
4988
4988
-
method77(false);
4983
4983
+
processOnDemandQueue();
4989
4984
4990
4985
try {
4991
4986
Thread.sleep(100L);
···
5017
5012
if (total > 0)
5018
5013
drawLoadingText(70, "Loading models - " + (total * 100) / fileRequestCount + "%");
5019
5014
5020
5020
-
method77(false);
5015
5015
+
processOnDemandQueue();
5021
5016
5022
5017
try {
5023
5018
Thread.sleep(100L);
···
5048
5043
if (total > 0)
5049
5044
drawLoadingText(75, "Loading maps - " + (total * 100) / fileRequestCount + "%");
5050
5045
5051
5051
-
method77(false);
5046
5046
+
processOnDemandQueue();
5052
5047
5053
5048
try {
5054
5049
Thread.sleep(100L);
···
5260
5255
5261
5256
TypeFace[] typefaces = {fontSmall, fontNormal, fontBold, fontFancy};
5262
5257
5263
5263
-
for(TypeFace typeFace: typefaces){
5264
5264
-
typeFace.setNameIcons(moderatorIcon, (int[])null);
5258
5258
+
for (TypeFace typeFace : typefaces) {
5259
5259
+
typeFace.setNameIcons(moderatorIcon, (int[]) null);
5265
5260
}
5266
5261
5267
5262
Widget.load(archiveInterface, typefaces, archiveMedia);
···
5326
5321
Rasterizer3D.method494(512, 334);
5327
5322
viewportOffsets = Rasterizer3D.lineOffsets;
5328
5323
5329
5329
-
int ai[] = new int[9];
5324
5324
+
int[] ai = new int[9];
5330
5325
5331
5326
for (int i = 0; i < 9; i++) { //TODO: Needs refactoring
5332
5327
int j9 = 128 + i * 32 + 15;
···
5350
5345
SignLink.reportError("loaderror " + aString1027 + " " + anInt1322);
5351
5346
}
5352
5347
5353
5353
-
aBoolean1283 = true;
5348
5348
+
loadingError = true;
5354
5349
}
5355
5350
5356
5351
private void animateTexture(int i) {
···
5361
5356
IndexedImage class50_sub1_sub1_sub3 = Rasterizer3D.aClass50_Sub1_Sub1_Sub3Array1540[l];
5362
5357
int i1 = class50_sub1_sub1_sub3.width * class50_sub1_sub1_sub3.height - 1;
5363
5358
int j1 = class50_sub1_sub1_sub3.width * tickDelta * 2;
5364
5364
-
byte abyte0[] = class50_sub1_sub1_sub3.pixels;
5365
5365
-
byte abyte1[] = aByteArray1245;
5359
5359
+
byte[] abyte0 = class50_sub1_sub1_sub3.pixels;
5360
5360
+
byte[] abyte1 = aByteArray1245;
5366
5361
for (int k1 = 0; k1 <= i1; k1++)
5367
5362
abyte1[k1] = abyte0[k1 - j1 & i1];
5368
5363
···
5585
5580
}
5586
5581
5587
5582
private void method67(int i) {
5588
5588
-
for (int j = 0; j < anInt1133; j++) {
5589
5589
-
int k = anIntArray1134[j];
5583
5583
+
for (int j = 0; j < npcCount; j++) {
5584
5584
+
int k = npcIds[j];
5590
5585
Npc class50_sub1_sub4_sub3_sub1 = npcs[k];
5591
5586
if (class50_sub1_sub4_sub3_sub1 != null)
5592
5587
method68(class50_sub1_sub4_sub3_sub1.npcDefinition.boundaryDimension, (byte) -97, class50_sub1_sub4_sub3_sub1);
···
5675
5670
class50_sub1_sub4_sub3.nextStepOrientation = 0;
5676
5671
if (class50_sub1_sub4_sub3.anInt1608 == 3)
5677
5672
class50_sub1_sub4_sub3.nextStepOrientation = 512;
5678
5678
-
class50_sub1_sub4_sub3.anInt1612 = class50_sub1_sub4_sub3.nextStepOrientation;
5673
5673
+
class50_sub1_sub4_sub3.currentRotation = class50_sub1_sub4_sub3.nextStepOrientation;
5679
5674
if (i == -31135)
5680
5675
;
5681
5676
}
···
5726
5721
class50_sub1_sub4_sub3.nextStepOrientation = 1024;
5727
5722
else
5728
5723
class50_sub1_sub4_sub3.nextStepOrientation = 0;
5729
5729
-
int j1 = class50_sub1_sub4_sub3.nextStepOrientation - class50_sub1_sub4_sub3.anInt1612 & 0x7ff;
5724
5724
+
int j1 = class50_sub1_sub4_sub3.nextStepOrientation - class50_sub1_sub4_sub3.currentRotation & 0x7ff;
5730
5725
if (j1 > 1024)
5731
5726
j1 -= 2048;
5732
5727
int k1 = class50_sub1_sub4_sub3.turnAroundAnimationId;
···
5742
5737
k1 = class50_sub1_sub4_sub3.walkAnimationId;
5743
5738
class50_sub1_sub4_sub3.movementAnimation = k1;
5744
5739
int l1 = 4;
5745
5745
-
if (class50_sub1_sub4_sub3.anInt1612 != class50_sub1_sub4_sub3.nextStepOrientation
5740
5740
+
if (class50_sub1_sub4_sub3.currentRotation != class50_sub1_sub4_sub3.nextStepOrientation
5746
5741
&& class50_sub1_sub4_sub3.anInt1609 == -1 && class50_sub1_sub4_sub3.anInt1600 != 0)
5747
5742
l1 = 2;
5748
5743
if (class50_sub1_sub4_sub3.pathLength > 2)
···
5818
5813
class50_sub1_sub4_sub3.anInt1598 = 0;
5819
5814
class50_sub1_sub4_sub3.anInt1599 = 0;
5820
5815
}
5821
5821
-
int k = class50_sub1_sub4_sub3.nextStepOrientation - class50_sub1_sub4_sub3.anInt1612 & 0x7ff;
5816
5816
+
int k = class50_sub1_sub4_sub3.nextStepOrientation - class50_sub1_sub4_sub3.currentRotation & 0x7ff;
5822
5817
if (k != 0) {
5823
5818
if (k < class50_sub1_sub4_sub3.anInt1600 || k > 2048 - class50_sub1_sub4_sub3.anInt1600)
5824
5824
-
class50_sub1_sub4_sub3.anInt1612 = class50_sub1_sub4_sub3.nextStepOrientation;
5819
5819
+
class50_sub1_sub4_sub3.currentRotation = class50_sub1_sub4_sub3.nextStepOrientation;
5825
5820
else if (k > 1024)
5826
5826
-
class50_sub1_sub4_sub3.anInt1612 -= class50_sub1_sub4_sub3.anInt1600;
5821
5821
+
class50_sub1_sub4_sub3.currentRotation -= class50_sub1_sub4_sub3.anInt1600;
5827
5822
else
5828
5828
-
class50_sub1_sub4_sub3.anInt1612 += class50_sub1_sub4_sub3.anInt1600;
5829
5829
-
class50_sub1_sub4_sub3.anInt1612 &= 0x7ff;
5823
5823
+
class50_sub1_sub4_sub3.currentRotation += class50_sub1_sub4_sub3.anInt1600;
5824
5824
+
class50_sub1_sub4_sub3.currentRotation &= 0x7ff;
5830
5825
if (class50_sub1_sub4_sub3.movementAnimation == class50_sub1_sub4_sub3.idleAnimation
5831
5831
-
&& class50_sub1_sub4_sub3.anInt1612 != class50_sub1_sub4_sub3.nextStepOrientation) {
5826
5826
+
&& class50_sub1_sub4_sub3.currentRotation != class50_sub1_sub4_sub3.nextStepOrientation) {
5832
5827
if (class50_sub1_sub4_sub3.standTurnAnimationId != -1) {
5833
5828
class50_sub1_sub4_sub3.movementAnimation = class50_sub1_sub4_sub3.standTurnAnimationId;
5834
5829
return;
···
5839
5834
}
5840
5835
5841
5836
private void method73(Actor actor) {
5842
5842
-
actor.aBoolean1592 = false;
5837
5837
+
actor.dynamic = false;
5843
5838
if (actor.movementAnimation != -1) {
5844
5839
AnimationSequence class14 = AnimationSequence.animations[actor.movementAnimation];
5845
5840
actor.anInt1590++;
···
5891
5886
if (actor.displayedEmoteFrames < 0 || actor.displayedEmoteFrames >= class14_3.frameCount)
5892
5887
actor.emoteAnimation = -1;
5893
5888
}
5894
5894
-
actor.aBoolean1592 = class14_3.aBoolean300;
5889
5889
+
actor.dynamic = class14_3.aBoolean300;
5895
5890
}
5896
5891
if (actor.animationDelay > 0)
5897
5892
actor.animationDelay--;
···
6235
6230
initializeApplet(765, 503);
6236
6231
}
6237
6232
6238
6238
-
private void renderStationaryGraphics(int i) {
6239
6239
-
while (i >= 0)
6240
6240
-
groundItems = null;
6241
6241
-
for (GameAnimableObject gameAnimableObject = (GameAnimableObject) aClass6_1210.first(); gameAnimableObject != null; gameAnimableObject = (GameAnimableObject) aClass6_1210
6233
6233
+
private void renderStationaryGraphics() {
6234
6234
+
for (GameAnimableObject gameAnimableObject = (GameAnimableObject) gameAnimableObjectQueue.first(); gameAnimableObject != null; gameAnimableObject = (GameAnimableObject) gameAnimableObjectQueue
6242
6235
.next())
6243
6236
if (gameAnimableObject.plane != plane || gameAnimableObject.transformCompleted)
6244
6237
gameAnimableObject.remove();
···
6254
6247
6255
6248
}
6256
6249
6257
6257
-
private void method77(boolean flag) {
6258
6258
-
if (flag)
6259
6259
-
opcode = -1;
6250
6250
+
private void processOnDemandQueue() {
6260
6251
do {
6261
6261
-
OnDemandNode class50_sub1_sub3;
6252
6252
+
OnDemandNode onDemandNode;
6262
6253
do {
6263
6263
-
class50_sub1_sub3 = onDemandRequester.next();
6264
6264
-
if (class50_sub1_sub3 == null)
6254
6254
+
onDemandNode = onDemandRequester.next();
6255
6255
+
if (onDemandNode == null)
6265
6256
return;
6266
6266
-
if (class50_sub1_sub3.type == 0) {
6267
6267
-
Model.loadModelHeader(class50_sub1_sub3.buffer, class50_sub1_sub3.id);
6268
6268
-
if ((onDemandRequester.modelId(class50_sub1_sub3.id) & 0x62) != 0) {
6257
6257
+
if (onDemandNode.type == 0) {
6258
6258
+
Model.loadModelHeader(onDemandNode.buffer, onDemandNode.id);
6259
6259
+
if ((onDemandRequester.modelId(onDemandNode.id) & 0x62) != 0) {
6269
6260
redrawTabArea = true;
6270
6261
if (backDialogueId != -1 || dialogueId != -1)
6271
6262
redrawChatbox = true;
6272
6263
}
6273
6264
}
6274
6274
-
if (class50_sub1_sub3.type == 1 && class50_sub1_sub3.buffer != null)
6275
6275
-
Animation.method236(class50_sub1_sub3.buffer);
6276
6276
-
if (class50_sub1_sub3.type == 2 && class50_sub1_sub3.id == nextSong && class50_sub1_sub3.buffer != null)
6277
6277
-
method24(songChanging, class50_sub1_sub3.buffer, 659);
6278
6278
-
if (class50_sub1_sub3.type == 3 && loadingStage == 1) {
6265
6265
+
if (onDemandNode.type == 1 && onDemandNode.buffer != null)
6266
6266
+
Animation.method236(onDemandNode.buffer);
6267
6267
+
if (onDemandNode.type == 2 && onDemandNode.id == nextSong && onDemandNode.buffer != null)
6268
6268
+
saveMidi(songChanging, onDemandNode.buffer);
6269
6269
+
if (onDemandNode.type == 3 && loadingStage == 1) {
6279
6270
for (int i = 0; i < terrainData.length; i++) {
6280
6280
-
if (terrainDataIds[i] == class50_sub1_sub3.id) {
6281
6281
-
terrainData[i] = class50_sub1_sub3.buffer;
6282
6282
-
if (class50_sub1_sub3.buffer == null)
6271
6271
+
if (terrainDataIds[i] == onDemandNode.id) {
6272
6272
+
terrainData[i] = onDemandNode.buffer;
6273
6273
+
if (onDemandNode.buffer == null)
6283
6274
terrainDataIds[i] = -1;
6284
6275
break;
6285
6276
}
6286
6286
-
if (objectDataIds[i] != class50_sub1_sub3.id)
6277
6277
+
if (objectDataIds[i] != onDemandNode.id)
6287
6278
continue;
6288
6288
-
objectData[i] = class50_sub1_sub3.buffer;
6289
6289
-
if (class50_sub1_sub3.buffer == null)
6279
6279
+
objectData[i] = onDemandNode.buffer;
6280
6280
+
if (onDemandNode.buffer == null)
6290
6281
objectDataIds[i] = -1;
6291
6282
break;
6292
6283
}
6293
6284
6294
6285
}
6295
6295
-
} while (class50_sub1_sub3.type != 93 || !onDemandRequester.method334(class50_sub1_sub3.id, false));
6296
6296
-
Region.passiveRequestGameObjectModels(onDemandRequester, new Buffer(class50_sub1_sub3.buffer));
6286
6286
+
} while (onDemandNode.type != 93 || !onDemandRequester.method334(onDemandNode.id, false));
6287
6287
+
Region.passiveRequestGameObjectModels(onDemandRequester, new Buffer(onDemandNode.buffer));
6297
6288
} while (true);
6298
6289
}
6299
6290
···
6328
6319
6329
6320
buffer.currentPosition = 0;
6330
6321
serverSeed = buffer.getLongBE();
6331
6331
-
int seed[] = new int[4];
6322
6322
+
int[] seed = new int[4];
6332
6323
6333
6324
seed[0] = (int) (Math.random() * 99999999D);
6334
6325
seed[1] = (int) (Math.random() * 99999999D);
···
6391
6382
if (responseCode == 2) {
6392
6383
playerRights = gameConnection.read();
6393
6384
accountFlagged = gameConnection.read() == 1;
6394
6394
-
aLong902 = 0L;
6385
6385
+
lastClickTime = 0L;
6395
6386
duplicateClickCount = 0;
6396
6387
mouseCapturer.coord = 0;
6397
6388
super.awtFocus = true;
6398
6398
-
aBoolean1275 = true;
6389
6389
+
windowFocused = true;
6399
6390
loggedIn = true;
6400
6391
outBuffer.currentPosition = 0;
6401
6392
buffer.currentPosition = 0;
···
6404
6395
secondLastOpcode = -1;
6405
6396
thirdLastOpcode = -1;
6406
6397
packetSize = 0;
6407
6407
-
timeoutCounter = 0;
6398
6398
+
packetReadAnticheat = 0;
6408
6399
systemUpdateTime = 0;
6409
6409
-
anInt873 = 0;
6400
6400
+
idleLogout = 0;
6410
6401
headIconDrawType = 0;
6411
6402
menuActionRow = 0;
6412
6403
menuOpen = false;
···
6426
6417
anInt1233 = (int) (Math.random() * 30D) - 20;
6427
6418
cameraHorizontal = (int) (Math.random() * 20D) - 10 & 0x7ff;
6428
6419
minimapState = 0;
6429
6429
-
anInt1276 = -1;
6420
6420
+
lastRegionId = -1;
6430
6421
destinationX = 0;
6431
6422
destinationY = 0;
6432
6423
localPlayerCount = 0;
6433
6433
-
anInt1133 = 0;
6424
6424
+
npcCount = 0;
6434
6425
6435
6426
for (int i2 = 0; i2 < anInt968; i2++) {
6436
6427
players[i2] = null;
···
6442
6433
6443
6434
localPlayer = players[thisPlayerId] = new Player();
6444
6435
6445
6445
-
aClass6_1282.getNodeCount();
6446
6446
-
aClass6_1210.getNodeCount();
6436
6436
+
projectileQueue.clear();
6437
6437
+
gameAnimableObjectQueue.clear();
6447
6438
6448
6439
for (int l2 = 0; l2 < 4; l2++) {
6449
6440
for (int i3 = 0; i3 < 104; i3++) {
···
6487
6478
flashingSidebarId = -1;
6488
6479
characterEditChangeGenger = true;
6489
6480
6490
6490
-
method25();
6481
6481
+
changeGender();
6491
6482
6492
6483
for (int j3 = 0; j3 < 5; j3++)
6493
6484
characterEditColors[j3] = 0;
···
6582
6573
secondLastOpcode = -1;
6583
6574
thirdLastOpcode = -1;
6584
6575
packetSize = 0;
6585
6585
-
timeoutCounter = 0;
6576
6576
+
packetReadAnticheat = 0;
6586
6577
systemUpdateTime = 0;
6587
6578
menuActionRow = 0;
6588
6579
menuOpen = false;
6589
6589
-
aLong1229 = System.currentTimeMillis();
6580
6580
+
loadRegionTime = System.currentTimeMillis();
6590
6581
return;
6591
6582
}
6592
6583
···
6726
6717
walk(true, false, dstY, localPlayer.pathY[0], 0, 0, 2, objectType + 1, dstX, 0, l1,
6727
6718
localPlayer.pathX[0]);
6728
6719
}
6729
6729
-
lastClickX = super.clickX;
6730
6730
-
lastClickY = super.clickY;
6720
6720
+
crossX = super.clickX;
6721
6721
+
crossY = super.clickY;
6731
6722
crossType = 2;
6732
6723
crossIndex = 0;
6733
6724
packetSize += j;
···
6904
6895
6905
6896
}
6906
6897
6907
6907
-
int ai[] = anIntArray1176;
6898
6898
+
int[] ai = anIntArray1176;
6908
6899
anIntArray1176 = anIntArray1177;
6909
6900
anIntArray1177 = ai;
6910
6901
}
···
7135
7126
}
7136
7127
}
7137
7128
7138
7138
-
for (int i = 0; i < anInt1133; i++) {
7139
7139
-
int index = anIntArray1134[i];
7129
7129
+
for (int i = 0; i < npcCount; i++) {
7130
7130
+
int index = npcIds[i];
7140
7131
Npc npc = npcs[index];
7141
7132
7142
7133
if (npc != null && npc.textCycle > 0) {
···
7270
7261
7271
7262
}
7272
7263
7273
7273
-
for (int i = 0; i < anInt1133; i++) {
7274
7274
-
Npc npc = npcs[anIntArray1134[i]];
7264
7264
+
for (int i = 0; i < npcCount; i++) {
7265
7265
+
Npc npc = npcs[npcIds[i]];
7275
7266
7276
7267
if (npc != null && npc.isVisible()) {
7277
7268
ActorDefinition definition = npc.npcDefinition;
···
7429
7420
return "*";
7430
7421
}
7431
7422
7432
7432
-
public void doLogic() {
7433
7433
-
if (aBoolean1016 || aBoolean1283 || aBoolean1097)
7423
7423
+
public void processGameLoop() {
7424
7424
+
if (rsAlreadyLoaded || loadingError || genericLoadingError)
7434
7425
return;
7435
7426
pulseCycle++;
7436
7427
if (!loggedIn)
7437
7437
-
method149(-724);
7428
7428
+
updateLogin();
7438
7429
else
7439
7439
-
processGame();
7440
7440
-
method77(false);
7430
7430
+
updateGame();
7431
7431
+
processOnDemandQueue();
7441
7432
}
7442
7433
7443
7434
private void processRightClick(int i) {
···
7530
7521
}
7531
7522
7532
7523
7533
7533
-
private void method93(int i) {
7524
7524
+
private void loadRegion() {
7534
7525
try {
7535
7535
-
anInt1276 = -1;
7536
7536
-
aClass6_1210.getNodeCount();
7537
7537
-
aClass6_1282.getNodeCount();
7538
7538
-
Rasterizer3D.method495((byte) 71);
7526
7526
+
lastRegionId = -1;
7527
7527
+
gameAnimableObjectQueue.clear();
7528
7528
+
projectileQueue.clear();
7529
7529
+
Rasterizer3D.clearTextureCache();
7539
7530
resetModelCaches();
7540
7531
currentScene.initToNull();
7541
7532
System.gc();
7542
7533
for (int plane = 0; plane < 4; plane++)
7543
7534
currentCollisionMap[plane].reset();
7544
7535
7545
7545
-
for (int i1 = 0; i1 < 4; i1++) {
7546
7546
-
for (int l1 = 0; l1 < 104; l1++) {
7547
7547
-
for (int k2 = 0; k2 < 104; k2++)
7548
7548
-
currentSceneTileFlags[i1][l1][k2] = 0;
7536
7536
+
for (int z = 0; z < 4; z++) {
7537
7537
+
for (int x = 0; x < 104; x++) {
7538
7538
+
for (int y = 0; y < 104; y++)
7539
7539
+
currentSceneTileFlags[z][x][y] = 0;
7549
7540
7550
7541
}
7551
7542
7552
7543
}
7553
7544
7554
7545
Region region = new Region(currentSceneTileFlags, 104, 104, intGroundArray);
7555
7555
-
int l2 = terrainData.length;
7546
7546
+
int dataLength = terrainData.length;
7556
7547
outBuffer.putOpcode(40);
7557
7557
-
if (!aBoolean1163) {
7558
7558
-
for (int j3 = 0; j3 < l2; j3++) {
7559
7559
-
int j4 = (mapCoordinates[j3] >> 8) * 64 - nextTopLeftTileX;
7560
7560
-
int l5 = (mapCoordinates[j3] & 0xff) * 64 - nextTopRightTileY;
7561
7561
-
byte abyte0[] = terrainData[j3];
7562
7562
-
if (abyte0 != null)
7563
7563
-
region.method174(l5, false, (chunkY - 6) * 8, j4, abyte0, (chunkX - 6) * 8,
7548
7548
+
if (!loadGeneratedMap) {
7549
7549
+
for (int pointer = 0; pointer < dataLength; pointer++) {
7550
7550
+
int offsetX = (mapCoordinates[pointer] >> 8) * 64 - nextTopLeftTileX;
7551
7551
+
int offsetY = (mapCoordinates[pointer] & 0xff) * 64 - nextTopRightTileY;
7552
7552
+
byte[] data = terrainData[pointer];
7553
7553
+
if (data != null)
7554
7554
+
region.loadTerrainBlock(offsetX, (chunkX - 6) * 8, offsetY, (chunkY - 6) * 8, data,
7564
7555
currentCollisionMap);
7565
7556
}
7566
7557
7567
7567
-
for (int k4 = 0; k4 < l2; k4++) {
7558
7558
+
for (int k4 = 0; k4 < dataLength; k4++) {
7568
7559
int i6 = (mapCoordinates[k4] >> 8) * 64 - nextTopLeftTileX;
7569
7560
int l7 = (mapCoordinates[k4] & 0xff) * 64 - nextTopRightTileY;
7570
7570
-
byte abyte2[] = terrainData[k4];
7561
7561
+
byte[] abyte2 = terrainData[k4];
7571
7562
if (abyte2 == null && chunkY < 800)
7572
7563
region.initiateVertexHeights(i6, 64, l7, 64);
7573
7564
}
7574
7565
7575
7566
outBuffer.putOpcode(40);
7576
7576
-
for (int j6 = 0; j6 < l2; j6++) {
7577
7577
-
byte abyte1[] = objectData[j6];
7567
7567
+
for (int j6 = 0; j6 < dataLength; j6++) {
7568
7568
+
byte[] abyte1 = objectData[j6];
7578
7569
if (abyte1 != null) {
7579
7570
int l8 = (mapCoordinates[j6] >> 8) * 64 - nextTopLeftTileX;
7580
7571
int k9 = (mapCoordinates[j6] & 0xff) * 64 - nextTopRightTileY;
···
7583
7574
}
7584
7575
7585
7576
}
7586
7586
-
if (aBoolean1163) {
7577
7577
+
if (loadGeneratedMap) {
7587
7578
for (int k3 = 0; k3 < 4; k3++) {
7588
7579
for (int l4 = 0; l4 < 13; l4++) {
7589
7580
for (int k6 = 0; k6 < 13; k6++) {
···
7696
7687
int k1 = (chunkX + 6) / 8 + 1;
7697
7688
int j2 = (chunkY - 6) / 8 - 1;
7698
7689
int i3 = (chunkY + 6) / 8 + 1;
7699
7699
-
i = 94 / i;
7700
7690
if (aBoolean1067) {
7701
7691
l = 49;
7702
7692
k1 = 50;
···
8047
8037
if (i == 327) {
8048
8038
class13.rotationX = 150;
8049
8039
class13.rotationY = (int) (Math.sin((double) pulseCycle / 40D) * 256D) & 0x7ff;
8050
8050
-
if (aBoolean1277) {
8040
8040
+
if (characterModelChanged) {
8051
8041
for (int j1 = 0; j1 < 7; j1++) {
8052
8042
int i2 = characterEditIdentityKits[j1];
8053
8043
if (i2 >= 0 && !IdentityKit.cache[i2].isBodyModelCached())
8054
8044
return;
8055
8045
}
8056
8046
8057
8057
-
aBoolean1277 = false;
8058
8058
-
Model aclass50_sub1_sub4_sub4[] = new Model[7];
8047
8047
+
characterModelChanged = false;
8048
8048
+
Model[] aclass50_sub1_sub4_sub4 = new Model[7];
8059
8049
int j2 = 0;
8060
8050
for (int k2 = 0; k2 < 7; k2++) {
8061
8051
int l2 = characterEditIdentityKits[k2];
···
8292
8282
aBoolean1301 = false;
8293
8283
}
8294
8284
if (action == 5)
8295
8295
-
anInt1300 = config;
8285
8285
+
oneMouseButton = config;
8296
8286
if (action == 6)
8297
8287
anInt998 = config;
8298
8288
if (action == 8) {
···
8300
8290
redrawChatbox = true;
8301
8291
}
8302
8292
if (action == 9)
8303
8303
-
anInt955 = config;
8293
8293
+
bankInsertMode = config;
8304
8294
}
8305
8295
8306
8296
private int method106(int i, int j, int k, int l) {
···
8411
8401
renderSplitPrivateMessages();
8412
8402
8413
8403
if (crossType == 1)
8414
8414
-
cursorCross[crossIndex / 100].drawImage(lastClickX - 8 - 4, lastClickY - 8 - 4);
8404
8404
+
cursorCross[crossIndex / 100].drawImage(crossX - 8 - 4, crossY - 8 - 4);
8415
8405
if (crossType == 2)
8416
8416
-
cursorCross[4 + crossIndex / 100].drawImage(lastClickX - 8 - 4, lastClickY - 8 - 4);
8406
8406
+
cursorCross[4 + crossIndex / 100].drawImage(crossX - 8 - 4, crossY - 8 - 4);
8417
8407
8418
8408
if (walkableWidgetId != -1) {
8419
8409
method88(tickDelta, walkableWidgetId);
···
8711
8701
}
8712
8702
8713
8703
private void renderViewport(int plane) {
8714
8714
-
int pixels[] = minimapImage.pixels;
8704
8704
+
int[] pixels = minimapImage.pixels;
8715
8705
int pixelAmount = pixels.length;
8716
8706
for (int pixel = 0; pixel < pixelAmount; pixel++)
8717
8707
pixels[pixel] = 0;
···
8765
8755
if (icon != 22 && icon != 29 && icon != 34 && icon != 36 && icon != 46 && icon != 47 && icon != 48) {
8766
8756
byte regionWidth = 104;
8767
8757
byte regionHeight = 104;
8768
8768
-
int flags[][] = currentCollisionMap[this.plane].adjacency;
8758
8758
+
int[][] flags = currentCollisionMap[this.plane].clippingData;
8769
8759
for (int off = 0; off < 10; off++) {
8770
8760
int randPlane = (int) (Math.random() * 4D);
8771
8761
if (randPlane == 0 && drawPointX > 0 && drawPointX > viewportX - 3 && (flags[drawPointX - 1][drawPointY] & 0x1280108) == 0)
···
8889
8879
}
8890
8880
8891
8881
private int getCameraPlaneCutscene() {
8892
8892
-
if(!ROOFS_ENABLED){
8882
8882
+
if (!ROOFS_ENABLED) {
8893
8883
return plane;
8894
8884
}
8895
8885
int j = getFloorDrawHeight(plane, cameraX, cameraY);
···
8943
8933
plane, player.worldX, player.worldY
8944
8934
);
8945
8935
currentScene.addEntity(player.anInt1768, player.anInt1769, plane, player.worldX, player.worldY, player.drawHeight2,
8946
8946
-
player.anInt1612, player.anInt1771, player.anInt1770, player,
8936
8936
+
player.currentRotation, player.anInt1771, player.anInt1770, player,
8947
8937
hash);
8948
8938
continue;
8949
8939
}
8950
8940
if ((player.worldX & 0x7f) == 64
8951
8941
&& (player.worldY & 0x7f) == 64) {
8952
8952
-
if (anIntArrayArray886[viewportX][viewportY] == renderCount)
8942
8942
+
if (tileRenderCount[viewportX][viewportY] == renderCount)
8953
8943
continue;
8954
8954
-
anIntArrayArray886[viewportX][viewportY] = renderCount;
8944
8944
+
tileRenderCount[viewportX][viewportY] = renderCount;
8955
8945
}
8956
8946
player.drawHeight2 = getFloorDrawHeight(plane, player.worldX, player.worldY
8957
8947
);
8958
8948
currentScene.addEntity(plane, player.worldX, player.worldY, player.drawHeight2, player, hash,
8959
8959
-
60, player.aBoolean1592,
8960
8960
-
player.anInt1612);
8949
8949
+
60, player.dynamic,
8950
8950
+
player.currentRotation);
8961
8951
}
8962
8952
}
8963
8953
···
8981
8971
localPlayer.pathY[0], 1, 1, 2, 0,
8982
8972
player.pathX[0], 0, 0,
8983
8973
localPlayer.pathX[0]);
8984
8984
-
lastClickX = super.clickX;
8985
8985
-
lastClickY = super.clickY;
8974
8974
+
crossX = super.clickX;
8975
8975
+
crossY = super.clickY;
8986
8976
crossType = 2;
8987
8977
crossIndex = 0;
8988
8978
outBuffer.putOpcode(245);
···
9016
9006
localPlayer.pathY[0], 1, 1, 2, 0,
9017
9007
player.pathX[0], 0, 0,
9018
9008
localPlayer.pathX[0]);
9019
9019
-
lastClickX = super.clickX;
9020
9020
-
lastClickY = super.clickY;
9009
9009
+
crossX = super.clickX;
9010
9010
+
crossY = super.clickY;
9021
9011
crossType = 2;
9022
9012
crossIndex = 0;
9023
9013
outBuffer.putOpcode(45);
···
9031
9021
localPlayer.pathY[0], 1, 1, 2, 0,
9032
9022
npc.pathX[0], 0, 0,
9033
9023
localPlayer.pathX[0]);
9034
9034
-
lastClickX = super.clickX;
9035
9035
-
lastClickY = super.clickY;
9024
9024
+
crossX = super.clickX;
9025
9025
+
crossY = super.clickY;
9036
9026
crossType = 2;
9037
9027
crossIndex = 0;
9038
9028
outBuffer.putOpcode(67);
···
9089
9079
localPlayer.pathY[0], 1, 1, 2, 0,
9090
9080
npc.pathX[0], 0, 0,
9091
9081
localPlayer.pathX[0]);
9092
9092
-
lastClickX = super.clickX;
9093
9093
-
lastClickY = super.clickY;
9082
9082
+
crossX = super.clickX;
9083
9083
+
crossY = super.clickY;
9094
9084
crossType = 2;
9095
9085
crossIndex = 0;
9096
9086
outBuffer.putOpcode(42);
···
9104
9094
localPlayer.pathY[0], 1, 1, 2, 0,
9105
9095
player.pathX[0], 0, 0,
9106
9096
localPlayer.pathX[0]);
9107
9107
-
lastClickX = super.clickX;
9108
9108
-
lastClickY = super.clickY;
9097
9097
+
crossX = super.clickX;
9098
9098
+
crossY = super.clickY;
9109
9099
crossType = 2;
9110
9100
crossIndex = 0;
9111
9101
outBuffer.putOpcode(116);
···
9136
9126
if (!flag)
9137
9127
flag = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9138
9128
localPlayer.pathX[0]);
9139
9139
-
lastClickX = super.clickX;
9140
9140
-
lastClickY = super.clickY;
9129
9129
+
crossX = super.clickX;
9130
9130
+
crossY = super.clickY;
9141
9131
crossType = 2;
9142
9132
crossIndex = 0;
9143
9133
outBuffer.putOpcode(54);
···
9166
9156
localPlayer.pathY[0], 1, 1, 2, 0,
9167
9157
class50_sub1_sub4_sub3_sub1_2.pathX[0], 0, 0,
9168
9158
localPlayer.pathX[0]);
9169
9169
-
lastClickX = super.clickX;
9170
9170
-
lastClickY = super.clickY;
9159
9159
+
crossX = super.clickX;
9160
9160
+
crossY = super.clickY;
9171
9161
crossType = 2;
9172
9162
crossIndex = 0;
9173
9163
outBuffer.putOpcode(57);
···
9195
9185
localPlayer.pathY[0], 1, 1, 2, 0,
9196
9186
class50_sub1_sub4_sub3_sub2_3.pathX[0], 0, 0,
9197
9187
localPlayer.pathX[0]);
9198
9198
-
lastClickX = super.clickX;
9199
9199
-
lastClickY = super.clickY;
9188
9188
+
crossX = super.clickX;
9189
9189
+
crossY = super.clickY;
9200
9190
crossType = 2;
9201
9191
crossIndex = 0;
9202
9192
outBuffer.putOpcode(233);
···
9247
9237
localPlayer.pathY[0], 1, 1, 2, 0,
9248
9238
class50_sub1_sub4_sub3_sub1_3.pathX[0], 0, 0,
9249
9239
localPlayer.pathX[0]);
9250
9250
-
lastClickX = super.clickX;
9251
9251
-
lastClickY = super.clickY;
9240
9240
+
crossX = super.clickX;
9241
9241
+
crossY = super.clickY;
9252
9242
crossType = 2;
9253
9243
crossIndex = 0;
9254
9244
anInt1235 += clicked;
···
9275
9265
localPlayer.pathY[0], 1, 1, 2, 0,
9276
9266
class50_sub1_sub4_sub3_sub1_4.pathX[0], 0, 0,
9277
9267
localPlayer.pathX[0]);
9278
9278
-
lastClickX = super.clickX;
9279
9279
-
lastClickY = super.clickY;
9268
9268
+
crossX = super.clickX;
9269
9269
+
crossY = super.clickY;
9280
9270
crossType = 2;
9281
9271
crossIndex = 0;
9282
9272
outBuffer.putOpcode(8);
···
9292
9282
localPlayer.pathY[0], 1, 1, 2, 0,
9293
9283
class50_sub1_sub4_sub3_sub2_4.pathX[0], 0, 0,
9294
9284
localPlayer.pathX[0]);
9295
9295
-
lastClickX = super.clickX;
9296
9296
-
lastClickY = super.clickY;
9285
9285
+
crossX = super.clickX;
9286
9286
+
crossY = super.clickY;
9297
9287
crossType = 2;
9298
9288
crossIndex = 0;
9299
9289
outBuffer.putOpcode(31);
···
9308
9298
localPlayer.pathY[0], 1, 1, 2, 0,
9309
9299
class50_sub1_sub4_sub3_sub1_5.pathX[0], 0, 0,
9310
9300
localPlayer.pathX[0]);
9311
9311
-
lastClickX = super.clickX;
9312
9312
-
lastClickY = super.clickY;
9301
9301
+
crossX = super.clickX;
9302
9302
+
crossY = super.clickY;
9313
9303
crossType = 2;
9314
9304
crossIndex = 0;
9315
9305
outBuffer.putOpcode(104);
···
9323
9313
if (!flag1)
9324
9314
flag1 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9325
9315
localPlayer.pathX[0]);
9326
9326
-
lastClickX = super.clickX;
9327
9327
-
lastClickY = super.clickY;
9316
9316
+
crossX = super.clickX;
9317
9317
+
crossY = super.clickY;
9328
9318
crossType = 2;
9329
9319
crossIndex = 0;
9330
9320
outBuffer.putOpcode(77);
···
9338
9328
if (!flag2)
9339
9329
flag2 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9340
9330
localPlayer.pathX[0]);
9341
9341
-
lastClickX = super.clickX;
9342
9342
-
lastClickY = super.clickY;
9331
9331
+
crossX = super.clickX;
9332
9332
+
crossY = super.clickY;
9343
9333
crossType = 2;
9344
9334
crossIndex = 0;
9345
9335
if ((clicked & 3) == 0)
···
9534
9524
if (!flag3)
9535
9525
flag3 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9536
9526
localPlayer.pathX[0]);
9537
9537
-
lastClickX = super.clickX;
9538
9538
-
lastClickY = super.clickY;
9527
9527
+
crossX = super.clickX;
9528
9528
+
crossY = super.clickY;
9539
9529
crossType = 2;
9540
9530
crossIndex = 0;
9541
9531
outBuffer.putOpcode(230);
···
9550
9540
localPlayer.pathY[0], 1, 1, 2, 0,
9551
9541
class50_sub1_sub4_sub3_sub2_5.pathX[0], 0, 0,
9552
9542
localPlayer.pathX[0]);
9553
9553
-
lastClickX = super.clickX;
9554
9554
-
lastClickY = super.clickY;
9543
9543
+
crossX = super.clickX;
9544
9544
+
crossY = super.clickY;
9555
9545
crossType = 2;
9556
9546
crossIndex = 0;
9557
9547
outBuffer.putOpcode(143);
···
9567
9557
if (!flag4)
9568
9558
flag4 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9569
9559
localPlayer.pathX[0]);
9570
9570
-
lastClickX = super.clickX;
9571
9571
-
lastClickY = super.clickY;
9560
9560
+
crossX = super.clickX;
9561
9561
+
crossY = super.clickY;
9572
9562
crossType = 2;
9573
9563
crossIndex = 0;
9574
9564
outBuffer.putOpcode(211);
···
9601
9591
if (!flag5)
9602
9592
flag5 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9603
9593
localPlayer.pathX[0]);
9604
9604
-
lastClickX = super.clickX;
9605
9605
-
lastClickY = super.clickY;
9594
9594
+
crossX = super.clickX;
9595
9595
+
crossY = super.clickY;
9606
9596
crossType = 2;
9607
9597
crossIndex = 0;
9608
9598
anInt1100++;
···
9708
9698
localPlayer.pathY[0], 1, 1, 2, 0,
9709
9699
class50_sub1_sub4_sub3_sub1_7.pathX[0], 0, 0,
9710
9700
localPlayer.pathX[0]);
9711
9711
-
lastClickX = super.clickX;
9712
9712
-
lastClickY = super.clickY;
9701
9701
+
crossX = super.clickX;
9702
9702
+
crossY = super.clickY;
9713
9703
crossType = 2;
9714
9704
crossIndex = 0;
9715
9705
outBuffer.putOpcode(112);
···
9722
9712
if (!flag6)
9723
9713
flag6 = walk(false, false, second, localPlayer.pathY[0], 1, 1, 2, 0, first, 0, 0,
9724
9714
localPlayer.pathX[0]);
9725
9725
-
lastClickX = super.clickX;
9726
9726
-
lastClickY = super.clickY;
9715
9715
+
crossX = super.clickX;
9716
9716
+
crossY = super.clickY;
9727
9717
crossType = 2;
9728
9718
crossIndex = 0;
9729
9719
outBuffer.putOpcode(83);
···
9763
9753
localPlayer.pathY[0], 1, 1, 2, 0,
9764
9754
class50_sub1_sub4_sub3_sub2_6.pathX[0], 0, 0,
9765
9755
localPlayer.pathX[0]);
9766
9766
-
lastClickX = super.clickX;
9767
9767
-
lastClickY = super.clickY;
9756
9756
+
crossX = super.clickX;
9757
9757
+
crossY = super.clickY;
9768
9758
crossType = 2;
9769
9759
crossIndex = 0;
9770
9760
outBuffer.putOpcode(194);
···
9778
9768
9779
9769
private void method121(boolean flag) {
9780
9770
anInt939 = 0;
9781
9781
-
for (int i = -1; i < localPlayerCount + anInt1133; i++) {
9771
9771
+
for (int i = -1; i < localPlayerCount + npcCount; i++) {
9782
9772
Object obj;
9783
9773
if (i == -1)
9784
9774
obj = localPlayer;
9785
9775
else if (i < localPlayerCount)
9786
9776
obj = players[playerList[i]];
9787
9777
else
9788
9788
-
obj = npcs[anIntArray1134[i - localPlayerCount]];
9778
9778
+
obj = npcs[npcIds[i - localPlayerCount]];
9789
9779
if (obj == null || !((Actor) (obj)).isVisible())
9790
9780
continue;
9791
9781
if (obj instanceof Npc) {
···
9826
9816
aClass50_Sub1_Sub1_Sub1Array1079[class37_1.headIcon].drawImage(anInt932 - 12, anInt933 - 30
9827
9817
);
9828
9818
}
9829
9829
-
if (headIconDrawType == 1 && anInt1226 == anIntArray1134[i - localPlayerCount] && pulseCycle % 20 < 10) {
9819
9819
+
if (headIconDrawType == 1 && anInt1226 == npcIds[i - localPlayerCount] && pulseCycle % 20 < 10) {
9830
9820
method136(((Actor) (obj)), false, ((Actor) (obj)).modelHeight + 15);
9831
9821
if (anInt932 > -1)
9832
9822
aClass50_Sub1_Sub1_Sub1Array954[0].drawImage(anInt932 - 12, anInt933 - 28);
···
10030
10020
}
10031
10021
}
10032
10022
10033
10033
-
private void method123(int i) {
10023
10023
+
private void showErrorScreen() {
10034
10024
Graphics g = getParentComponent().getGraphics();
10035
10025
g.setColor(Color.black);
10036
10036
-
i = 68 / i;
10037
10026
g.fillRect(0, 0, 765, 503);
10038
10027
setFrameRate(1);
10039
10039
-
if (aBoolean1283) {
10040
10040
-
aBoolean1243 = false;
10028
10028
+
if (loadingError) {
10029
10029
+
currentlyDrawingFlames = false;
10041
10030
g.setFont(new Font("Helvetica", 1, 16));
10042
10031
g.setColor(Color.yellow);
10043
10043
-
int j = 35;
10044
10044
-
g.drawString("Sorry, an error has occured whilst loading RuneScape", 30, j);
10045
10045
-
j += 50;
10032
10032
+
int currentPositionY = 35;
10033
10033
+
g.drawString("Sorry, an error has occured whilst loading RuneScape", 30, currentPositionY);
10034
10034
+
currentPositionY += 50;
10046
10035
g.setColor(Color.white);
10047
10047
-
g.drawString("To fix this try the following (in order):", 30, j);
10048
10048
-
j += 50;
10036
10036
+
g.drawString("To fix this try the following (in order):", 30, currentPositionY);
10037
10037
+
currentPositionY += 50;
10049
10038
g.setColor(Color.white);
10050
10039
g.setFont(new Font("Helvetica", 1, 12));
10051
10051
-
g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, j);
10052
10052
-
j += 30;
10053
10053
-
g.drawString("2: Try clearing your web-browsers cache from tools->internet options", 30, j);
10054
10054
-
j += 30;
10055
10055
-
g.drawString("3: Try using a different game-world", 30, j);
10056
10056
-
j += 30;
10057
10057
-
g.drawString("4: Try rebooting your computer", 30, j);
10058
10058
-
j += 30;
10059
10059
-
g.drawString("5: Try selecting a different version of Java from the play-game menu", 30, j);
10040
10040
+
g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, currentPositionY);
10041
10041
+
currentPositionY += 30;
10042
10042
+
g.drawString("2: Try clearing your web-browsers cache from tools->internet options", 30, currentPositionY);
10043
10043
+
currentPositionY += 30;
10044
10044
+
g.drawString("3: Try using a different game-world", 30, currentPositionY);
10045
10045
+
currentPositionY += 30;
10046
10046
+
g.drawString("4: Try rebooting your computer", 30, currentPositionY);
10047
10047
+
currentPositionY += 30;
10048
10048
+
g.drawString("5: Try selecting a different version of Java from the play-game menu", 30, currentPositionY);
10060
10049
}
10061
10061
-
if (aBoolean1097) {
10062
10062
-
aBoolean1243 = false;
10050
10050
+
if (genericLoadingError) {
10051
10051
+
currentlyDrawingFlames = false;
10063
10052
g.setFont(new Font("Helvetica", 1, 20));
10064
10053
g.setColor(Color.white);
10065
10054
g.drawString("Error - unable to load game!", 50, 50);
10066
10055
g.drawString("To play RuneScape make sure you play from", 50, 100);
10067
10056
g.drawString("http://www.runescape.com", 50, 150);
10068
10057
}
10069
10069
-
if (aBoolean1016) {
10070
10070
-
aBoolean1243 = false;
10058
10058
+
if (rsAlreadyLoaded) {
10059
10059
+
currentlyDrawingFlames = false;
10071
10060
g.setColor(Color.yellow);
10072
10072
-
int k = 35;
10073
10073
-
g.drawString("Error a copy of RuneScape already appears to be loaded", 30, k);
10074
10074
-
k += 50;
10061
10061
+
int currentPositionY = 35;
10062
10062
+
g.drawString("Error a copy of RuneScape already appears to be loaded", 30, currentPositionY);
10063
10063
+
currentPositionY += 50;
10075
10064
g.setColor(Color.white);
10076
10076
-
g.drawString("To fix this try the following (in order):", 30, k);
10077
10077
-
k += 50;
10065
10065
+
g.drawString("To fix this try the following (in order):", 30, currentPositionY);
10066
10066
+
currentPositionY += 50;
10078
10067
g.setColor(Color.white);
10079
10068
g.setFont(new Font("Helvetica", 1, 12));
10080
10080
-
g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, k);
10081
10081
-
k += 30;
10082
10082
-
g.drawString("2: Try rebooting your computer, and reloading", 30, k);
10083
10083
-
k += 30;
10069
10069
+
g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, currentPositionY);
10070
10070
+
currentPositionY += 30;
10071
10071
+
g.drawString("2: Try rebooting your computer, and reloading", 30, currentPositionY);
10072
10072
+
currentPositionY += 30;
10084
10073
}
10085
10074
}
10086
10075
···
10174
10163
}
10175
10164
10176
10165
public void repaintGame() {
10177
10177
-
if (aBoolean1016 || aBoolean1283 || aBoolean1097) {
10178
10178
-
method123(281);
10166
10166
+
if (rsAlreadyLoaded || loadingError || genericLoadingError) {
10167
10167
+
showErrorScreen();
10179
10168
return;
10180
10169
}
10181
10170
drawCycle++;
···
10224
10213
if (widget.cs1opcodes == null || id >= widget.cs1opcodes.length)
10225
10214
return -2;
10226
10215
try {
10227
10227
-
int opcodes[] = widget.cs1opcodes[id];
10216
10216
+
int[] opcodes = widget.cs1opcodes[id];
10228
10217
int result = 0;
10229
10218
int counter = 0;
10230
10219
int type = 0;
···
10384
10373
k += 30;
10385
10374
}
10386
10375
fontBold.drawShadowedString("Username: " + username
10387
10387
-
+ ((anInt977 == 0) & (pulseCycle % 40 < 20) ? "@yel@|" : ""), c / 2 - 90, k, true, 0xffffff);
10376
10376
+
+ ((loginScreenFocus == 0) & (pulseCycle % 40 < 20) ? "@yel@|" : ""), c / 2 - 90, k, true, 0xffffff);
10388
10377
k += 15;
10389
10378
fontBold.drawShadowedString("Password: "
10390
10390
-
+ TextUtils.censorPassword(password) + ((anInt977 == 1) & (pulseCycle % 40 < 20) ? "@yel@|" : ""), c / 2 - 88, k, true, 0xffffff
10379
10379
+
+ TextUtils.censorPassword(password) + ((loginScreenFocus == 1) & (pulseCycle % 40 < 20) ? "@yel@|" : ""), c / 2 - 88, k, true, 0xffffff
10391
10380
);
10392
10381
k += 15;
10393
10382
if (!flag) {
···
10443
10432
if (npcs[j] == null)
10444
10433
npcs[j] = new Npc();
10445
10434
Npc class50_sub1_sub4_sub3_sub1 = npcs[j];
10446
10446
-
anIntArray1134[anInt1133++] = j;
10435
10435
+
npcIds[npcCount++] = j;
10447
10436
class50_sub1_sub4_sub3_sub1.pulseCycle = pulseCycle;
10448
10437
int k = class50_sub1_sub2.getBits(1);
10449
10438
if (k == 1)
···
10693
10682
graphicsId, speed + pulseCycle, startSlope, entityIndex, getFloorDrawHeight(plane, startX, startY) - startHeight, startX, delay + pulseCycle);
10694
10683
projectile.trackTarget(endX, endY, getFloorDrawHeight(plane, endX, endY) - endHeight, delay
10695
10684
+ pulseCycle);
10696
10696
-
aClass6_1282.pushBack(projectile);
10685
10685
+
projectileQueue.pushBack(projectile);
10697
10686
}
10698
10687
return;
10699
10688
}
···
10727
10716
x = x * 128 + 64;
10728
10717
y = y * 128 + 64;
10729
10718
GameAnimableObject gameAnimableObject = new GameAnimableObject(plane, pulseCycle, delay, graphicsId, getFloorDrawHeight(plane, x, y) - graphicsHeight, y, x);
10730
10730
-
aClass6_1210.pushBack(gameAnimableObject);
10719
10719
+
gameAnimableObjectQueue.pushBack(gameAnimableObject);
10731
10720
}
10732
10721
return;
10733
10722
}
···
10878
10867
aClass18_1200.drawGraphics(202, 171, super.gameGraphics);
10879
10868
if (aBoolean1046) {
10880
10869
aBoolean1046 = false;
10881
10881
-
if (!aBoolean1243) {
10870
10870
+
if (!currentlyDrawingFlames) {
10882
10871
flameLeftBackground.drawGraphics(0, 0, super.gameGraphics);
10883
10872
flameRightBackground.drawGraphics(637, 0, super.gameGraphics);
10884
10873
}
···
10892
10881
}
10893
10882
10894
10883
private void prepareTitleBackground() {
10895
10895
-
byte abyte0[] = titleArchive.getFile("title.dat");
10884
10884
+
byte[] abyte0 = titleArchive.getFile("title.dat");
10896
10885
ImageRGB imageRGB = new ImageRGB(abyte0, this);
10897
10886
flameLeftBackground.createRasterizer();
10898
10887
imageRGB.drawInverse(0, 0);
···
10912
10901
imageRGB.drawInverse(-128, -171);
10913
10902
aClass18_1206.createRasterizer();
10914
10903
imageRGB.drawInverse(-562, -171);
10915
10915
-
int ai[] = new int[imageRGB.width];
10904
10904
+
int[] ai = new int[imageRGB.width];
10916
10905
for (int i = 0; i < imageRGB.height; i++) {
10917
10906
for (int j = 0; j < imageRGB.width; j++)
10918
10907
ai[j] = imageRGB.pixels[(imageRGB.width - j - 1)
···
10978
10967
}
10979
10968
10980
10969
private void method141() {
10981
10981
-
aBoolean1243 = false;
10970
10970
+
currentlyDrawingFlames = false;
10982
10971
while (aBoolean1320) {
10983
10983
-
aBoolean1243 = false;
10972
10972
+
currentlyDrawingFlames = false;
10984
10973
try {
10985
10974
Thread.sleep(50L);
10986
10975
} catch (Exception _ex) {
···
11063
11052
i7 = 0;
11064
11053
if (j8 < 5 && j8 > -5)
11065
11054
j8 = 0;
11066
11066
-
if (anInt1269 < 5) {
11055
11055
+
if (lastItemDragTime < 5) {
11067
11056
i7 = 0;
11068
11057
j8 = 0;
11069
11058
}
···
11341
11330
Rasterizer.setCoordinates(j1, i1, l1, k1);
11342
11331
}
11343
11332
11344
11344
-
private void method143(byte byte0) {
11345
11345
-
if (byte0 != -40)
11346
11346
-
aBoolean1207 = !aBoolean1207;
11333
11333
+
private void loadingStages() {
11347
11334
if (lowMemory && loadingStage == 2 && Region.onBuildTimePlane != plane) {
11348
11335
method125(null, "Loading - please wait.");
11349
11336
loadingStage = 1;
11350
11350
-
aLong1229 = System.currentTimeMillis();
11337
11337
+
loadRegionTime = System.currentTimeMillis();
11351
11338
}
11352
11339
if (loadingStage == 1) {
11353
11353
-
int i = method144(5);
11354
11354
-
if (i != 0 && System.currentTimeMillis() - aLong1229 > 0x57e40L) {
11355
11355
-
SignLink.reportError(username + " glcfb " + serverSeed + "," + i + "," + lowMemory + ","
11340
11340
+
int loadingStages = initialiseRegionLoading();
11341
11341
+
if (loadingStages != 0 && System.currentTimeMillis() - loadRegionTime > 0x57e40L) {
11342
11342
+
SignLink.reportError(username + " glcfb " + serverSeed + "," + loadingStages + "," + lowMemory + ","
11356
11343
+ stores[0] + "," + onDemandRequester.method333() + "," + plane + ","
11357
11344
+ chunkX + "," + chunkY);
11358
11358
-
aLong1229 = System.currentTimeMillis();
11345
11345
+
loadRegionTime = System.currentTimeMillis();
11359
11346
}
11360
11347
}
11361
11361
-
if (loadingStage == 2 && plane != anInt1276) {
11362
11362
-
anInt1276 = plane;
11348
11348
+
if (loadingStage == 2 && plane != lastRegionId) {
11349
11349
+
lastRegionId = plane;
11363
11350
renderViewport(plane);
11364
11351
}
11365
11352
}
11366
11353
11367
11367
-
private int method144(int i) {
11368
11368
-
for (int j = 0; j < terrainData.length; j++) {
11369
11369
-
if (terrainData[j] == null && terrainDataIds[j] != -1)
11354
11354
+
private int initialiseRegionLoading() {
11355
11355
+
for (int t = 0; t < terrainData.length; t++) {
11356
11356
+
if (terrainData[t] == null && terrainDataIds[t] != -1)
11370
11357
return -1;
11371
11371
-
if (objectData[j] == null && objectDataIds[j] != -1)
11358
11358
+
if (objectData[t] == null && objectDataIds[t] != -1)
11372
11359
return -2;
11373
11360
}
11374
11361
11375
11375
-
boolean flag = true;
11376
11376
-
if (i < 5 || i > 5)
11377
11377
-
aBoolean953 = !aBoolean953;
11378
11378
-
for (int k = 0; k < terrainData.length; k++) {
11379
11379
-
byte abyte0[] = objectData[k];
11380
11380
-
if (abyte0 != null) {
11381
11381
-
int l = (mapCoordinates[k] >> 8) * 64 - nextTopLeftTileX;
11382
11382
-
int i1 = (mapCoordinates[k] & 0xff) * 64 - nextTopRightTileY;
11383
11383
-
if (aBoolean1163) {
11384
11384
-
l = 10;
11385
11385
-
i1 = 10;
11362
11362
+
boolean regionsCached = true;
11363
11363
+
for (int region = 0; region < terrainData.length; region++) {
11364
11364
+
byte[] objects = objectData[region];
11365
11365
+
if (objects != null) {
11366
11366
+
int blockX = (mapCoordinates[region] >> 8) * 64 - nextTopLeftTileX;
11367
11367
+
int blockY = (mapCoordinates[region] & 0xff) * 64 - nextTopRightTileY;
11368
11368
+
if (loadGeneratedMap) {
11369
11369
+
blockX = 10;
11370
11370
+
blockY = 10;
11386
11371
}
11387
11387
-
flag &= Region.method181(l, i1, abyte0, 24515);
11372
11372
+
regionsCached &= Region.method181(blockX, blockY, objects, 24515);
11388
11373
}
11389
11374
}
11390
11375
11391
11391
-
if (!flag)
11376
11376
+
if (!regionsCached)
11392
11377
return -3;
11393
11393
-
if (aBoolean1209) {
11378
11378
+
if (loadingMap) {
11394
11379
return -4;
11395
11380
} else {
11396
11381
loadingStage = 2;
11397
11382
Region.onBuildTimePlane = plane;
11398
11398
-
method93(175);
11383
11383
+
loadRegion();
11399
11384
outBuffer.putOpcode(6);
11400
11385
return 0;
11401
11386
}
···
11503
11488
return s.equalsIgnoreCase(localPlayer.playerName);
11504
11489
}
11505
11490
11506
11506
-
private void method149(int i) {
11507
11507
-
while (i >= 0)
11508
11508
-
opcode = buffer.getUnsignedByte();
11491
11491
+
private void updateLogin() {
11509
11492
if (loginScreenState == 0) {
11510
11510
-
int j = super.width / 2 - 80;
11511
11511
-
int i1 = super.height / 2 + 20;
11512
11512
-
i1 += 20;
11513
11513
-
if (super.clickType == 1 && super.clickX >= j - 75 && super.clickX <= j + 75 && super.clickY >= i1 - 20
11514
11514
-
&& super.clickY <= i1 + 20) {
11493
11493
+
int x = super.width / 2 - 80;
11494
11494
+
int y = super.height / 2 + 20;
11495
11495
+
y += 20;
11496
11496
+
if (super.clickType == 1 && super.clickX >= x - 75 && super.clickX <= x + 75 && super.clickY >= y - 20
11497
11497
+
&& super.clickY <= y + 20) {
11515
11498
loginScreenState = 3;
11516
11516
-
anInt977 = 0;
11499
11499
+
loginScreenFocus = 0;
11517
11500
}
11518
11518
-
j = super.width / 2 + 80;
11519
11519
-
if (super.clickType == 1 && super.clickX >= j - 75 && super.clickX <= j + 75 && super.clickY >= i1 - 20
11520
11520
-
&& super.clickY <= i1 + 20) {
11501
11501
+
x = super.width / 2 + 80;
11502
11502
+
if (super.clickType == 1 && super.clickX >= x - 75 && super.clickX <= x + 75 && super.clickY >= y - 20
11503
11503
+
&& super.clickY <= y + 20) {
11521
11504
statusLineOne = "";
11522
11505
statusLineTwo = "Enter your username & password.";
11523
11506
loginScreenState = 2;
11524
11524
-
anInt977 = 0;
11507
11507
+
loginScreenFocus = 0;
11525
11508
}
11526
11509
} else {
11527
11510
if (loginScreenState == 2) {
11528
11528
-
int k = super.height / 2 - 40;
11529
11529
-
k += 30;
11530
11530
-
k += 25;
11531
11531
-
if (super.clickType == 1 && super.clickY >= k - 15 && super.clickY < k)
11532
11532
-
anInt977 = 0;
11533
11533
-
k += 15;
11534
11534
-
if (super.clickType == 1 && super.clickY >= k - 15 && super.clickY < k)
11535
11535
-
anInt977 = 1;
11536
11536
-
k += 15;
11511
11511
+
int y = super.height / 2 - 40;
11512
11512
+
y += 30;
11513
11513
+
y += 25;
11514
11514
+
if (super.clickType == 1 && super.clickY >= y - 15 && super.clickY < y)
11515
11515
+
loginScreenFocus = 0;
11516
11516
+
y += 15;
11517
11517
+
if (super.clickType == 1 && super.clickY >= y - 15 && super.clickY < y)
11518
11518
+
loginScreenFocus = 1;
11519
11519
+
y += 15;
11537
11520
int j1 = super.width / 2 - 80;
11538
11521
int l1 = super.height / 2 + 50;
11539
11522
l1 += 20;
···
11557
11540
}
11558
11541
}
11559
11542
do {
11560
11560
-
int i2 = readCharacter();
11561
11561
-
if (i2 == -1)
11543
11543
+
int character = readCharacter();
11544
11544
+
if (character == -1)
11562
11545
break;
11563
11563
-
boolean flag = false;
11564
11564
-
for (int j2 = 0; j2 < VALID_CHARACTERS.length(); j2++) {
11565
11565
-
if (i2 != VALID_CHARACTERS.charAt(j2))
11546
11546
+
boolean validCharacter = false;
11547
11547
+
for (int c = 0; c < VALID_CHARACTERS.length(); c++) {
11548
11548
+
if (character != VALID_CHARACTERS.charAt(c))
11566
11549
continue;
11567
11567
-
flag = true;
11550
11550
+
validCharacter = true;
11568
11551
break;
11569
11552
}
11570
11553
11571
11571
-
if (anInt977 == 0) {
11572
11572
-
if (i2 == 8 && username.length() > 0)
11554
11554
+
if (loginScreenFocus == 0) {
11555
11555
+
if (character == 8 && username.length() > 0)
11573
11556
username = username.substring(0, username.length() - 1);
11574
11574
-
if (i2 == 9 || i2 == 10 || i2 == 13)
11575
11575
-
anInt977 = 1;
11576
11576
-
if (flag)
11577
11577
-
username += (char) i2;
11557
11557
+
if (character == 9 || character == 10 || character == 13)
11558
11558
+
loginScreenFocus = 1;
11559
11559
+
if (validCharacter)
11560
11560
+
username += (char) character;
11578
11561
if (username.length() > 12)
11579
11562
username = username.substring(0, 12);
11580
11580
-
} else if (anInt977 == 1) {
11581
11581
-
if (i2 == 8 && password.length() > 0)
11563
11563
+
} else if (loginScreenFocus == 1) {
11564
11564
+
if (character == 8 && password.length() > 0)
11582
11565
password = password.substring(0, password.length() - 1);
11583
11583
-
if (i2 == 9 || i2 == 10 || i2 == 13)
11584
11584
-
anInt977 = 0;
11585
11585
-
if (flag)
11586
11586
-
password += (char) i2;
11566
11566
+
if (character == 9 || character == 10 || character == 13)
11567
11567
+
loginScreenFocus = 0;
11568
11568
+
if (validCharacter)
11569
11569
+
password += (char) character;
11587
11570
if (password.length() > 20)
11588
11571
password = password.substring(0, 20);
11589
11572
}
···
11591
11574
return;
11592
11575
}
11593
11576
if (loginScreenState == 3) {
11594
11594
-
int l = super.width / 2;
11595
11595
-
int k1 = super.height / 2 + 50;
11596
11596
-
k1 += 20;
11597
11597
-
if (super.clickType == 1 && super.clickX >= l - 75 && super.clickX <= l + 75
11598
11598
-
&& super.clickY >= k1 - 20 && super.clickY <= k1 + 20)
11577
11577
+
int x = super.width / 2;
11578
11578
+
int y = super.height / 2 + 50;
11579
11579
+
y += 20;
11580
11580
+
if (super.clickType == 1 && super.clickX >= x - 75 && super.clickX <= x + 75
11581
11581
+
&& super.clickY >= y - 20 && super.clickY <= y + 20)
11599
11582
loginScreenState = 0;
11600
11583
}
11601
11584
}
···
11611
11594
int k3 = j1;
11612
11595
if (k1 > 0)
11613
11596
k3 = l;
11614
11614
-
int ai[] = minimapImage.pixels;
11597
11597
+
int[] ai = minimapImage.pixels;
11615
11598
int k4 = 24624 + k * 4 + (103 - i) * 512 * 4;
11616
11599
int i5 = k1 >> 14 & 0x7fff;
11617
11600
GameObjectDefinition gameObjectDefinition = GameObjectDefinition.getDefinition(i5);
···
11698
11681
int l4 = 0xeeeeee;
11699
11682
if (k1 > 0)
11700
11683
l4 = 0xee0000;
11701
11701
-
int ai1[] = minimapImage.pixels;
11684
11684
+
int[] ai1 = minimapImage.pixels;
11702
11685
int l5 = 24624 + k * 4 + (103 - i) * 512 * 4;
11703
11686
if (l2 == 0 || l2 == 2) {
11704
11687
ai1[l5 + 1536] = l4;
···
11731
11714
private void renderGameView() {
11732
11715
this.renderCount++;
11733
11716
processPlayerAdditions(true);
11734
11734
-
renderNPCs(751, true);
11717
11717
+
renderNPCs(true);
11735
11718
processPlayerAdditions(false);
11736
11736
-
renderNPCs(751, false);
11719
11719
+
renderNPCs(false);
11737
11720
renderProjectiles();
11738
11738
-
renderStationaryGraphics(-992);
11721
11721
+
renderStationaryGraphics();
11739
11722
if (!cutsceneActive) {
11740
11723
int vertical = cameraVertical;
11741
11724
if (secondaryCameraVertical / 256 > vertical)
···
25
25
public static boolean aBooleanArray1541[] = new boolean[50];
26
26
public static int anIntArray1542[] = new int[50];
27
27
public static int anInt1543;
28
28
-
public static int anIntArrayArray1544[][];
29
29
-
public static int anIntArrayArray1545[][] = new int[50][];
28
28
+
public static int texelArrayPool[][];
29
29
+
public static int texelCache[][] = new int[50][];
30
30
public static int anIntArray1546[] = new int[50];
31
31
public static int textureGetCount;
32
32
public static int getRgbLookupTableId[] = new int[0x10000];
···
42
42
aClass50_Sub1_Sub1_Sub3Array1540 = null;
43
43
aBooleanArray1541 = null;
44
44
anIntArray1542 = null;
45
45
-
anIntArrayArray1544 = null;
46
46
-
anIntArrayArray1545 = null;
45
45
+
texelArrayPool = null;
46
46
+
texelCache = null;
47
47
anIntArray1546 = null;
48
48
getRgbLookupTableId = null;
49
49
anIntArrayArray1549 = null;
···
67
67
Rasterizer3D.centerY = height / 2;
68
68
}
69
69
70
70
-
public static void method495(byte byte0) {
71
71
-
if (byte0 != 71)
72
72
-
return;
73
73
-
anIntArrayArray1544 = null;
70
70
+
public static void clearTextureCache() {
71
71
+
texelArrayPool = null;
74
72
for (int i = 0; i < 50; i++)
75
75
-
anIntArrayArray1545[i] = null;
73
73
+
texelCache[i] = null;
76
74
77
75
}
78
76
79
77
public static void method496(int i) {
80
80
-
if (anIntArrayArray1544 == null) {
78
78
+
if (texelArrayPool == null) {
81
79
anInt1543 = i;
82
80
if (lowMemory)
83
83
-
anIntArrayArray1544 = new int[anInt1543][16384];
81
81
+
texelArrayPool = new int[anInt1543][16384];
84
82
else
85
85
-
anIntArrayArray1544 = new int[anInt1543][0x10000];
83
83
+
texelArrayPool = new int[anInt1543][0x10000];
86
84
for (int k = 0; k < 50; k++)
87
87
-
anIntArrayArray1545[k] = null;
85
85
+
texelCache[k] = null;
88
86
89
87
}
90
88
}
···
130
128
public static void method499(int i, int j) {
131
129
if (j != 9)
132
130
anInt1524 = -48;
133
133
-
if (anIntArrayArray1545[i] == null) {
131
131
+
if (texelCache[i] == null) {
134
132
return;
135
133
} else {
136
136
-
anIntArrayArray1544[anInt1543++] = anIntArrayArray1545[i];
137
137
-
anIntArrayArray1545[i] = null;
134
134
+
texelArrayPool[anInt1543++] = texelCache[i];
135
135
+
texelCache[i] = null;
138
136
return;
139
137
}
140
138
}
141
139
142
140
public static int[] method500(int i) {
143
141
anIntArray1546[i] = textureGetCount++;
144
144
-
if (anIntArrayArray1545[i] != null)
145
145
-
return anIntArrayArray1545[i];
142
142
+
if (texelCache[i] != null)
143
143
+
return texelCache[i];
146
144
int ai[];
147
145
if (anInt1543 > 0) {
148
148
-
ai = anIntArrayArray1544[--anInt1543];
149
149
-
anIntArrayArray1544[anInt1543] = null;
146
146
+
ai = texelArrayPool[--anInt1543];
147
147
+
texelArrayPool[anInt1543] = null;
150
148
} else {
151
149
int j = 0;
152
150
int k = -1;
153
151
for (int l = 0; l < anInt1539; l++)
154
154
-
if (anIntArrayArray1545[l] != null && (anIntArray1546[l] < j || k == -1)) {
152
152
+
if (texelCache[l] != null && (anIntArray1546[l] < j || k == -1)) {
155
153
j = anIntArray1546[l];
156
154
k = l;
157
155
}
158
156
159
159
-
ai = anIntArrayArray1545[k];
160
160
-
anIntArrayArray1545[k] = null;
157
157
+
ai = texelCache[k];
158
158
+
texelCache[k] = null;
161
159
}
162
162
-
anIntArrayArray1545[i] = ai;
160
160
+
texelCache[i] = ai;
163
161
IndexedImage class50_sub1_sub1_sub3 = aClass50_Sub1_Sub1_Sub3Array1540[i];
164
162
int ai1[] = anIntArrayArray1549[i];
165
163
if (lowMemory) {
···
15
15
public int displayedMovementFrames;
16
16
public int anInt1590;
17
17
public boolean[] runningQueue = new boolean[10];
18
18
-
public boolean aBoolean1592 = false;
18
18
+
public boolean dynamic = false;
19
19
public int textEffect;
20
20
public int modelHeight = 200;
21
21
public int endCycle = -1000;
···
35
35
public int anInt1609 = -1;
36
36
public int worldX;
37
37
public int worldY;
38
38
-
public int anInt1612;
38
38
+
public int currentRotation;
39
39
public int anInt1613;
40
40
public int graphic = -1;
41
41
public int currentAnimation;
···
651
651
for (int i_154_ = 0; i_154_ < 8; i_154_++) {
652
652
for (int i_155_ = 0; i_155_ < 8; i_155_++) {
653
653
if (i_151_ + i_154_ > 0 && i_151_ + i_154_ < 103 && i_152_ + i_155_ > 0 && i_152_ + i_155_ < 103)
654
654
-
class46s[i_149_].adjacency[i_151_ + i_154_][(i_152_ + i_155_)] &= ~0x1000000;
654
654
+
class46s[i_149_].clippingData[i_151_ + i_154_][(i_152_ + i_155_)] &= ~0x1000000;
655
655
}
656
656
}
657
657
Buffer class50_sub1_sub2 = new Buffer(is);
···
660
660
for (int i_158_ = 0; i_158_ < 64; i_158_++) {
661
661
if (i_156_ == i_150_ && i_157_ >= i_153_ && i_157_ < i_153_ + 8 && i_158_ >= i_148_
662
662
&& i_158_ < i_148_ + 8)
663
663
-
method183(0, (byte) -61, 0, class50_sub1_sub2, i, i_151_
664
664
-
+ TiledUtils.getRotatedMapChunkX(i_157_ & 0x7, i_158_ & 0x7, i), i_149_, i_152_
665
665
-
+ TiledUtils.getRotatedMapChunkY(i_157_ & 0x7, i_158_ & 0x7, i));
663
663
+
loadTerrainTile(i_151_
664
664
+
+ TiledUtils.getRotatedMapChunkX(i_157_ & 0x7, i_158_ & 0x7, i), 0, i_152_
665
665
+
+ TiledUtils.getRotatedMapChunkY(i_157_ & 0x7, i_158_ & 0x7, i), 0, i_149_, class50_sub1_sub2, i);
666
666
else
667
667
-
method183(0, (byte) -61, 0, class50_sub1_sub2, 0, -1, 0, -1);
667
667
+
loadTerrainTile(-1, 0, -1, 0, 0, class50_sub1_sub2, 0);
668
668
}
669
669
}
670
670
}
···
1052
1052
}
1053
1053
}
1054
1054
1055
1055
-
public void method174(int i, boolean bool, int i_211_, int i_212_, byte[] is, int i_213_, CollisionMap[] class46s) {
1056
1056
-
if (bool)
1057
1057
-
anInt166 = -379;
1058
1058
-
for (int i_214_ = 0; i_214_ < 4; i_214_++) {
1059
1059
-
for (int i_215_ = 0; i_215_ < 64; i_215_++) {
1060
1060
-
for (int i_216_ = 0; i_216_ < 64; i_216_++) {
1061
1061
-
if (i_212_ + i_215_ > 0 && i_212_ + i_215_ < 103 && i + i_216_ > 0 && i + i_216_ < 103)
1062
1062
-
class46s[i_214_].adjacency[i_212_ + i_215_][i + i_216_] &= ~0x1000000;
1055
1055
+
public void loadTerrainBlock(int blockX, int offsetX, int blockY, int offsetY, byte[] blockData, CollisionMap[] collisionMap) {
1056
1056
+
for (int plane = 0; plane < 4; plane++) {
1057
1057
+
for (int tileX = 0; tileX < 64; tileX++) {
1058
1058
+
for (int tileY = 0; tileY < 64; tileY++) {
1059
1059
+
if (blockX + tileX > 0 && blockX + tileX < 103 && blockY + tileY > 0 && blockY + tileY < 103)
1060
1060
+
collisionMap[plane].clippingData[blockX + tileX][blockY + tileY] &= ~0x1000000;
1063
1061
}
1064
1062
}
1065
1063
}
1066
1066
-
Buffer class50_sub1_sub2 = new Buffer(is);
1067
1067
-
for (int i_217_ = 0; i_217_ < 4; i_217_++) {
1068
1068
-
for (int i_218_ = 0; i_218_ < 64; i_218_++) {
1069
1069
-
for (int i_219_ = 0; i_219_ < 64; i_219_++)
1070
1070
-
method183(i_213_, (byte) -61, i_211_, class50_sub1_sub2, 0, i_218_ + i_212_, i_217_, i_219_ + i);
1064
1064
+
Buffer stream = new Buffer(blockData);
1065
1065
+
for (int plane = 0; plane < 4; plane++) {
1066
1066
+
for (int tileX = 0; tileX < 64; tileX++) {
1067
1067
+
for (int tileY = 0; tileY < 64; tileY++)
1068
1068
+
loadTerrainTile(tileX + blockX, offsetX, tileY + blockY, offsetY, plane, stream, 0);
1071
1069
}
1072
1070
}
1073
1071
}
···
1220
1218
return (i & 0xff80) + i_271_;
1221
1219
}
1222
1220
1223
1223
-
public void method183(int i, byte i_272_, int i_273_, Buffer class50_sub1_sub2, int i_274_, int i_275_,
1224
1224
-
int i_276_, int i_277_) {
1225
1225
-
if (i_272_ != -61)
1226
1226
-
aBoolean140 = !aBoolean140;
1227
1227
-
if (i_275_ >= 0 && i_275_ < 104 && i_277_ >= 0 && i_277_ < 104) {
1228
1228
-
renderRuleFlags[i_276_][i_275_][i_277_] = (byte) 0;
1221
1221
+
public void loadTerrainTile(int tileX, int offsetX, int tileY, int offsetY, int tileZ, Buffer stream, int i1) {
1222
1222
+
if (tileX >= 0 && tileX < 104 && tileY >= 0 && tileY < 104) {
1223
1223
+
renderRuleFlags[tileZ][tileX][tileY] = (byte) 0;
1229
1224
for (;;) {
1230
1230
-
int i_278_ = class50_sub1_sub2.getUnsignedByte();
1231
1231
-
if (i_278_ == 0) {
1232
1232
-
if (i_276_ == 0)
1233
1233
-
vertexHeights[0][i_275_][i_277_] = -calculateVertexHeight(932731 + i_275_ + i, 556238 + i_277_
1234
1234
-
+ i_273_) * 8;
1225
1225
+
int value = stream.getUnsignedByte();
1226
1226
+
if (value == 0) {
1227
1227
+
if (tileZ == 0)
1228
1228
+
vertexHeights[0][tileX][tileY] = -calculateVertexHeight(932731 + tileX + offsetX, 556238 + tileY
1229
1229
+
+ offsetY) * 8;
1235
1230
else {
1236
1236
-
vertexHeights[i_276_][i_275_][i_277_] = (vertexHeights[i_276_ - 1][i_275_][i_277_] - 240);
1231
1231
+
vertexHeights[tileZ][tileX][tileY] = (vertexHeights[tileZ - 1][tileX][tileY] - 240);
1237
1232
break;
1238
1233
}
1239
1234
break;
1240
1235
}
1241
1241
-
if (i_278_ == 1) {
1242
1242
-
int i_279_ = class50_sub1_sub2.getUnsignedByte();
1243
1243
-
if (i_279_ == 1)
1244
1244
-
i_279_ = 0;
1245
1245
-
if (i_276_ == 0)
1246
1246
-
vertexHeights[0][i_275_][i_277_] = -i_279_ * 8;
1236
1236
+
if (value == 1) {
1237
1237
+
int height = stream.getUnsignedByte();
1238
1238
+
if (height == 1)
1239
1239
+
height = 0;
1240
1240
+
if (tileZ == 0)
1241
1241
+
vertexHeights[0][tileX][tileY] = -height * 8;
1247
1242
else {
1248
1248
-
vertexHeights[i_276_][i_275_][i_277_] = (vertexHeights[i_276_ - 1][i_275_][i_277_] - i_279_ * 8);
1243
1243
+
vertexHeights[tileZ][tileX][tileY] = (vertexHeights[tileZ - 1][tileX][tileY] - height * 8);
1249
1244
break;
1250
1245
}
1251
1246
break;
1252
1247
}
1253
1253
-
if (i_278_ <= 49) {
1254
1254
-
overlayFloorIds[i_276_][i_275_][i_277_] = class50_sub1_sub2.getByte();
1255
1255
-
overlayClippingPaths[i_276_][i_275_][i_277_] = (byte) ((i_278_ - 2) / 4);
1256
1256
-
overlayRotations[i_276_][i_275_][i_277_] = (byte) (i_278_ - 2 + i_274_ & 0x3);
1257
1257
-
} else if (i_278_ <= 81)
1258
1258
-
renderRuleFlags[i_276_][i_275_][i_277_] = (byte) (i_278_ - 49);
1248
1248
+
if (value <= 49) {
1249
1249
+
overlayFloorIds[tileZ][tileX][tileY] = stream.getByte();
1250
1250
+
overlayClippingPaths[tileZ][tileX][tileY] = (byte) ((value - 2) / 4);
1251
1251
+
overlayRotations[tileZ][tileX][tileY] = (byte) (value - 2 + i1 & 0x3);
1252
1252
+
} else if (value <= 81)
1253
1253
+
renderRuleFlags[tileZ][tileX][tileY] = (byte) (value - 49);
1259
1254
else
1260
1260
-
underlayFloorIds[i_276_][i_275_][i_277_] = (byte) (i_278_ - 81);
1255
1255
+
underlayFloorIds[tileZ][tileX][tileY] = (byte) (value - 81);
1261
1256
}
1262
1257
} else {
1263
1258
for (;;) {
1264
1264
-
int i_280_ = class50_sub1_sub2.getUnsignedByte();
1265
1265
-
if (i_280_ == 0)
1259
1259
+
int value = stream.getUnsignedByte();
1260
1260
+
if (value == 0)
1266
1261
break;
1267
1267
-
if (i_280_ == 1) {
1268
1268
-
class50_sub1_sub2.getUnsignedByte();
1262
1262
+
if (value == 1) {
1263
1263
+
stream.getUnsignedByte();
1269
1264
break;
1270
1265
}
1271
1271
-
if (i_280_ <= 49)
1272
1272
-
class50_sub1_sub2.getUnsignedByte();
1266
1266
+
if (value <= 49)
1267
1267
+
stream.getUnsignedByte();
1273
1268
}
1274
1269
}
1275
1270
}
···
6
6
public int insetY;
7
7
public int width;
8
8
public int height;
9
9
-
public int[][] adjacency;
9
9
+
public int[][] clippingData;
10
10
11
11
public CollisionMap(int height, int width) {
12
12
insetX = 0;
13
13
insetY = 0;
14
14
this.width = width;
15
15
this.height = height;
16
16
-
adjacency = new int[width][height];
16
16
+
clippingData = new int[width][height];
17
17
reset();
18
18
19
19
}
···
22
22
for (int x = 0; x < width; x++) {
23
23
for (int y = 0; y < height; y++)
24
24
if (x == 0 || y == 0 || x == width - 1 || y == height - 1)
25
25
-
adjacency[x][y] = 0xffffff;
25
25
+
clippingData[x][y] = 0xffffff;
26
26
else
27
27
-
adjacency[x][y] = 0x1000000;
27
27
+
clippingData[x][y] = 0x1000000;
28
28
29
29
}
30
30
···
177
177
public void markBlocked(int x, int y) {
178
178
x -= insetX;
179
179
y -= insetY;
180
180
-
adjacency[x][y] |= 0x200000;
180
180
+
clippingData[x][y] |= 0x200000;
181
181
}
182
182
183
183
public void set(int x, int y, int flag) {
184
184
-
adjacency[x][y] |= flag;
184
184
+
clippingData[x][y] |= flag;
185
185
}
186
186
187
187
public void unmarkWall(int orientation, int x, int y, int position, boolean impenetrable) {
···
327
327
}
328
328
329
329
public void unset(int x, int y, int flag) {
330
330
-
adjacency[x][y] &= 0xffffff - flag;
330
330
+
clippingData[x][y] &= 0xffffff - flag;
331
331
}
332
332
333
333
public void unmarkConcealed(int x, int y) {
334
334
x -= insetX;
335
335
y -= insetY;
336
336
-
adjacency[x][y] &= 0xdfffff;
336
336
+
clippingData[x][y] &= 0xdfffff;
337
337
}
338
338
339
339
public boolean reachedWall(int currentX, int currentY, int goalX, int goalY, int goalPosition, int goalOrientation) {
···
347
347
if (goalOrientation == 0) {
348
348
if (currentX == goalX - 1 && currentY == goalY)
349
349
return true;
350
350
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x1280120) == 0)
350
350
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x1280120) == 0)
351
351
return true;
352
352
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 0x1280102) == 0)
352
352
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 0x1280102) == 0)
353
353
return true;
354
354
} else if (goalOrientation == 1) {
355
355
if (currentX == goalX && currentY == goalY + 1)
356
356
return true;
357
357
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280108) == 0)
357
357
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280108) == 0)
358
358
return true;
359
359
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280180) == 0)
359
359
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280180) == 0)
360
360
return true;
361
361
} else if (goalOrientation == 2) {
362
362
if (currentX == goalX + 1 && currentY == goalY)
363
363
return true;
364
364
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x1280120) == 0)
364
364
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x1280120) == 0)
365
365
return true;
366
366
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 0x1280102) == 0)
366
366
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 0x1280102) == 0)
367
367
return true;
368
368
} else if (goalOrientation == 3) {
369
369
if (currentX == goalX && currentY == goalY - 1)
370
370
return true;
371
371
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280108) == 0)
371
371
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280108) == 0)
372
372
return true;
373
373
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280180) == 0)
373
373
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280180) == 0)
374
374
return true;
375
375
}
376
376
if (goalPosition == 2)
···
379
379
return true;
380
380
if (currentX == goalX && currentY == goalY + 1)
381
381
return true;
382
382
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280180) == 0)
382
382
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280180) == 0)
383
383
return true;
384
384
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 0x1280102) == 0)
384
384
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 0x1280102) == 0)
385
385
return true;
386
386
} else if (goalOrientation == 1) {
387
387
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280108) == 0)
387
387
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280108) == 0)
388
388
return true;
389
389
if (currentX == goalX && currentY == goalY + 1)
390
390
return true;
391
391
if (currentX == goalX + 1 && currentY == goalY)
392
392
return true;
393
393
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 0x1280102) == 0)
393
393
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 0x1280102) == 0)
394
394
return true;
395
395
} else if (goalOrientation == 2) {
396
396
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280108) == 0)
396
396
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280108) == 0)
397
397
return true;
398
398
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x1280120) == 0)
398
398
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x1280120) == 0)
399
399
return true;
400
400
if (currentX == goalX + 1 && currentY == goalY)
401
401
return true;
···
404
404
} else if (goalOrientation == 3) {
405
405
if (currentX == goalX - 1 && currentY == goalY)
406
406
return true;
407
407
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x1280120) == 0)
407
407
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x1280120) == 0)
408
408
return true;
409
409
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x1280180) == 0)
409
409
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x1280180) == 0)
410
410
return true;
411
411
if (currentX == goalX && currentY == goalY - 1)
412
412
return true;
413
413
}
414
414
if (goalPosition == 9) {
415
415
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x20) == 0)
415
415
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x20) == 0)
416
416
return true;
417
417
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 2) == 0)
417
417
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 2) == 0)
418
418
return true;
419
419
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 8) == 0)
419
419
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 8) == 0)
420
420
return true;
421
421
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x80) == 0)
421
421
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x80) == 0)
422
422
return true;
423
423
}
424
424
return false;
···
433
433
if (goalPosition == 7)
434
434
goalOrientation = goalOrientation + 2 & 3;
435
435
if (goalOrientation == 0) {
436
436
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x80) == 0)
436
436
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x80) == 0)
437
437
return true;
438
438
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 2) == 0)
438
438
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 2) == 0)
439
439
return true;
440
440
} else if (goalOrientation == 1) {
441
441
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 8) == 0)
441
441
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 8) == 0)
442
442
return true;
443
443
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 2) == 0)
443
443
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 2) == 0)
444
444
return true;
445
445
} else if (goalOrientation == 2) {
446
446
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 8) == 0)
446
446
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 8) == 0)
447
447
return true;
448
448
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x20) == 0)
448
448
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x20) == 0)
449
449
return true;
450
450
} else if (goalOrientation == 3) {
451
451
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x80) == 0)
451
451
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x80) == 0)
452
452
return true;
453
453
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x20) == 0)
453
453
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x20) == 0)
454
454
return true;
455
455
}
456
456
}
457
457
if (goalPosition == 8) {
458
458
-
if (currentX == goalX && currentY == goalY + 1 && (adjacency[currentX][currentY] & 0x20) == 0)
458
458
+
if (currentX == goalX && currentY == goalY + 1 && (clippingData[currentX][currentY] & 0x20) == 0)
459
459
return true;
460
460
-
if (currentX == goalX && currentY == goalY - 1 && (adjacency[currentX][currentY] & 2) == 0)
460
460
+
if (currentX == goalX && currentY == goalY - 1 && (clippingData[currentX][currentY] & 2) == 0)
461
461
return true;
462
462
-
if (currentX == goalX - 1 && currentY == goalY && (adjacency[currentX][currentY] & 8) == 0)
462
462
+
if (currentX == goalX - 1 && currentY == goalY && (clippingData[currentX][currentY] & 8) == 0)
463
463
return true;
464
464
-
if (currentX == goalX + 1 && currentY == goalY && (adjacency[currentX][currentY] & 0x80) == 0)
464
464
+
if (currentX == goalX + 1 && currentY == goalY && (clippingData[currentX][currentY] & 0x80) == 0)
465
465
return true;
466
466
}
467
467
return false;
···
472
472
int goalY2 = (goalY + goalDY) - 1;
473
473
if (currentX >= goalX && currentX <= goalX2 && currentY >= goalY && currentY <= goalY2)
474
474
return true;
475
475
-
if (currentX == goalX - 1 && currentY >= goalY && currentY <= goalY2 && (adjacency[currentX - insetX][currentY - insetY] & 8) == 0
475
475
+
if (currentX == goalX - 1 && currentY >= goalY && currentY <= goalY2 && (clippingData[currentX - insetX][currentY - insetY] & 8) == 0
476
476
&& (surroundings & 8) == 0)
477
477
return true;
478
478
-
if (currentX == goalX2 + 1 && currentY >= goalY && currentY <= goalY2 && (adjacency[currentX - insetX][currentY - insetY] & 0x80) == 0
478
478
+
if (currentX == goalX2 + 1 && currentY >= goalY && currentY <= goalY2 && (clippingData[currentX - insetX][currentY - insetY] & 0x80) == 0
479
479
&& (surroundings & 2) == 0)
480
480
return true;
481
481
-
if (currentY == goalY - 1 && currentX >= goalX && currentX <= goalX2 && (adjacency[currentX - insetX][currentY - insetY] & 2) == 0
481
481
+
if (currentY == goalY - 1 && currentX >= goalX && currentX <= goalX2 && (clippingData[currentX - insetX][currentY - insetY] & 2) == 0
482
482
&& (surroundings & 4) == 0)
483
483
return true;
484
484
-
return currentY == goalY2 + 1 && currentX >= goalX && currentX <= goalX2 && (adjacency[currentX - insetX][currentY - insetY] & 0x20) == 0
484
484
+
return currentY == goalY2 + 1 && currentX >= goalX && currentX <= goalX2 && (clippingData[currentX - insetX][currentY - insetY] & 0x20) == 0
485
485
&& (surroundings & 1) == 0;
486
486
}
487
487
···
83
83
}
84
84
}
85
85
86
86
-
public void getNodeCount() {
86
86
+
public void clear() {
87
87
if (head.next == head)
88
88
return;
89
89
do {