A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
0

Configure Feed

Select the types of activity you want to include in your feed.

misnamed getUnsignedBEShort as getUnsignedLEShort

+248 -249
+73 -73
src/com/jagex/runescape/Game.java
··· 450 450 private long aLong1172; 451 451 private int cameraVertical = 128; 452 452 private int cameraHorizontal; 453 - private int anInt1186; 454 - private int anInt1187; 453 + private int cameraVelocityHorizontal; 454 + private int cameraVelocityVertical; 455 455 private int cameraRandomisationA; 456 456 private int anInt1256 = 1; 457 457 private int anIntArray1258[] = new int[100]; ··· 1120 1120 void mouseWheelDragged(int i, int j) { 1121 1121 if (!mouseWheelDown) 1122 1122 return; 1123 - this.anInt1186 += i * 3; 1124 - this.anInt1187 += (j << 1); 1123 + this.cameraVelocityHorizontal += i * 3; 1124 + this.cameraVelocityVertical += (j << 1); 1125 1125 } 1126 1126 1127 1127 private void checkForGameUsages(int i) { ··· 1138 1138 if (currentCameraPositionV != k) 1139 1139 currentCameraPositionV += (k - currentCameraPositionV) / 16; 1140 1140 if (super.keyStatus[1] == 1) 1141 - anInt1186 += (-24 - anInt1186) / 2; 1141 + cameraVelocityHorizontal += (-24 - cameraVelocityHorizontal) / 2; 1142 1142 else if (super.keyStatus[2] == 1) 1143 - anInt1186 += (24 - anInt1186) / 2; 1143 + cameraVelocityHorizontal += (24 - cameraVelocityHorizontal) / 2; 1144 1144 else 1145 - anInt1186 /= 2; 1145 + cameraVelocityHorizontal /= 2; 1146 1146 if (super.keyStatus[3] == 1) 1147 - anInt1187 += (12 - anInt1187) / 2; 1147 + cameraVelocityVertical += (12 - cameraVelocityVertical) / 2; 1148 1148 else if (super.keyStatus[4] == 1) 1149 - anInt1187 += (-12 - anInt1187) / 2; 1149 + cameraVelocityVertical += (-12 - cameraVelocityVertical) / 2; 1150 1150 else 1151 - anInt1187 /= 2; 1152 - cameraHorizontal = cameraHorizontal + anInt1186 / 2 & 0x7ff; 1153 - cameraVertical += anInt1187 / 2; 1151 + cameraVelocityVertical /= 2; 1152 + cameraHorizontal = cameraHorizontal + cameraVelocityHorizontal / 2 & 0x7ff; 1153 + cameraVertical += cameraVelocityVertical / 2; 1154 1154 if (cameraVertical < 128) 1155 1155 cameraVertical = 128; 1156 1156 if (cameraVertical > 383) ··· 1174 1174 1175 1175 } 1176 1176 int i2 = k1 * 192; 1177 - if (i2 > 0x17f00) 1178 - i2 = 0x17f00; 1177 + if (i2 > 98048) 1178 + i2 = 98048; 1179 1179 if (i2 < 32768) 1180 1180 i2 = 32768; 1181 1181 if (i2 > secondaryCameraVertical) { ··· 1983 1983 if (available > 1) { 1984 1984 gameConnection.read(buffer.buffer, 0, 2); 1985 1985 buffer.currentPosition = 0; 1986 - packetSize = buffer.getUnsignedLEShort(); 1986 + packetSize = buffer.getUnsignedBEShort(); 1987 1987 available -= 2; 1988 1988 } else { 1989 1989 return false; ··· 1999 1999 if (opcode == 166) { 2000 2000 int yOffset = buffer.getLEShort(); 2001 2001 int xOffset = buffer.getLEShort(); 2002 - int interfaceId = buffer.getUnsignedLEShort(); 2002 + int interfaceId = buffer.getUnsignedBEShort(); 2003 2003 Widget widget = Widget.forId(interfaceId); 2004 2004 widget.xOffset = xOffset; 2005 2005 widget.yOffset = yOffset; ··· 2010 2010 int rotationX = buffer.getShortUnsingedAdded(); 2011 2011 int interfaceId = buffer.getLittleShortA(); 2012 2012 int zoom = buffer.getShortUnsingedAdded(); 2013 - int rotationY = buffer.getLEUnsignedShort(); 2013 + int rotationY = buffer.getUnsignedLEShort(); 2014 2014 Widget.forId(interfaceId).rotationX = rotationX; 2015 2015 Widget.forId(interfaceId).rotationY = rotationY; 2016 2016 Widget.forId(interfaceId).zoom = zoom; ··· 2026 2026 return true; 2027 2027 } 2028 2028 if (opcode == 26) { 2029 - int k1 = buffer.getUnsignedLEShort(); 2029 + int k1 = buffer.getUnsignedBEShort(); 2030 2030 int k11 = buffer.getUnsignedByte(); 2031 - int i17 = buffer.getUnsignedLEShort(); 2031 + int i17 = buffer.getUnsignedBEShort(); 2032 2032 if (i17 == 65535) { 2033 2033 if (currentSound < 50) { 2034 2034 sound[currentSound] = (short) k1; ··· 2078 2078 } 2079 2079 if (opcode == 162) { 2080 2080 int j2 = buffer.getShortUnsingedAdded(); 2081 - int interfaceId = buffer.getLEUnsignedShort(); 2081 + int interfaceId = buffer.getUnsignedLEShort(); 2082 2082 Widget.forId(interfaceId).modelType = 2; 2083 2083 Widget.forId(interfaceId).modelId = j2; 2084 2084 opcode = -1; 2085 2085 return true; 2086 2086 } 2087 2087 if (opcode == 109) { 2088 - int k2 = buffer.getUnsignedLEShort(); 2088 + int k2 = buffer.getUnsignedBEShort(); 2089 2089 method112((byte) 36, k2); 2090 2090 if (openInvOverLayId != -1) { 2091 2091 method44(openInvOverLayId); ··· 2129 2129 return true; 2130 2130 } 2131 2131 if (opcode == 249) { 2132 - int fileId = buffer.getLEUnsignedShort(); 2132 + int fileId = buffer.getUnsignedLEShort(); 2133 2133 int j12 = buffer.method554(); 2134 2134 if (musicEnabled && !lowMemory) { 2135 2135 nextSong = fileId; ··· 2151 2151 return true; 2152 2152 } 2153 2153 if (opcode == 218) { // set interface colour(?) 2154 - int interfaceId = buffer.getUnsignedLEShort(); 2154 + int interfaceId = buffer.getUnsignedBEShort(); 2155 2155 int rgb = buffer.getShortUnsingedAdded(); 2156 2156 int j17 = rgb >> 10 & 0x1f; 2157 2157 int j22 = rgb >> 5 & 0x1f; ··· 2193 2193 if (opcode == 199) { 2194 2194 headIconDrawType = buffer.getUnsignedByte(); 2195 2195 if (headIconDrawType == 1) 2196 - anInt1226 = buffer.getUnsignedLEShort(); 2196 + anInt1226 = buffer.getUnsignedBEShort(); 2197 2197 if (headIconDrawType >= 2 && headIconDrawType <= 6) { 2198 2198 if (headIconDrawType == 2) { 2199 2199 anInt847 = 64; ··· 2216 2216 anInt848 = 128; 2217 2217 } 2218 2218 headIconDrawType = 2; 2219 - anInt844 = buffer.getUnsignedLEShort(); 2220 - anInt845 = buffer.getUnsignedLEShort(); 2219 + anInt844 = buffer.getUnsignedBEShort(); 2220 + anInt845 = buffer.getUnsignedBEShort(); 2221 2221 anInt846 = buffer.getUnsignedByte(); 2222 2222 } 2223 2223 if (headIconDrawType == 10) 2224 - otherPlayerId = buffer.getUnsignedLEShort(); 2224 + otherPlayerId = buffer.getUnsignedBEShort(); 2225 2225 opcode = -1; 2226 2226 return true; 2227 2227 } ··· 2229 2229 cutsceneActive = true; 2230 2230 anInt993 = buffer.getUnsignedByte(); 2231 2231 anInt994 = buffer.getUnsignedByte(); 2232 - anInt995 = buffer.getUnsignedLEShort(); 2232 + anInt995 = buffer.getUnsignedBEShort(); 2233 2233 anInt996 = buffer.getUnsignedByte(); 2234 2234 anInt997 = buffer.getUnsignedByte(); 2235 2235 if (anInt997 >= 100) { ··· 2257 2257 } 2258 2258 if (opcode == 115) { 2259 2259 int j4 = buffer.method557(); 2260 - int i13 = buffer.getLEUnsignedShort(); 2260 + int i13 = buffer.getUnsignedLEShort(); 2261 2261 anIntArray1005[i13] = j4; 2262 2262 if (widgetSettings[i13] != j4) { 2263 2263 widgetSettings[i13] = j4; ··· 2303 2303 return true; 2304 2304 } 2305 2305 if (opcode == 76) { // open welcome screen 2306 - anInt1083 = buffer.getLEUnsignedShort(); 2306 + anInt1083 = buffer.getUnsignedLEShort(); 2307 2307 anInt1075 = buffer.getLittleShortA(); 2308 - buffer.getUnsignedLEShort(); 2309 - anInt1208 = buffer.getUnsignedLEShort(); 2310 - anInt1170 = buffer.getLEUnsignedShort(); 2308 + buffer.getUnsignedBEShort(); 2309 + anInt1208 = buffer.getUnsignedBEShort(); 2310 + anInt1170 = buffer.getUnsignedLEShort(); 2311 2311 anInt1273 = buffer.getShortUnsingedAdded(); 2312 2312 anInt1215 = buffer.getShortUnsingedAdded(); 2313 - anInt992 = buffer.getUnsignedLEShort(); 2313 + anInt992 = buffer.getUnsignedBEShort(); 2314 2314 lastAddress = buffer.method555(); 2315 2315 anInt1034 = buffer.getLittleShortA(); 2316 2316 buffer.getByteAdded(); ··· 2380 2380 } 2381 2381 if (opcode == 82) { // make interface (in)visible maybe? 2382 2382 boolean flag = buffer.getUnsignedByte() == 1; 2383 - int interfaceId = buffer.getUnsignedLEShort(); 2383 + int interfaceId = buffer.getUnsignedBEShort(); 2384 2384 Widget.forId(interfaceId).hiddenUntilHovered = flag; 2385 2385 opcode = -1; 2386 2386 return true; ··· 2452 2452 } 2453 2453 if (opcode == 134) { // set items in interface 2454 2454 redrawTabArea = true; 2455 - int interfaceId = buffer.getUnsignedLEShort(); 2455 + int interfaceId = buffer.getUnsignedBEShort(); 2456 2456 Widget inter = Widget.forId(interfaceId); 2457 2457 while (buffer.currentPosition < packetSize) { 2458 2458 int slot = buffer.getSmart(); 2459 - int id = buffer.getUnsignedLEShort(); 2459 + int id = buffer.getUnsignedBEShort(); 2460 2460 int amount = buffer.getUnsignedByte(); 2461 2461 if (amount == 255) 2462 2462 amount = buffer.getInt(); ··· 2705 2705 } 2706 2706 if (opcode == 206) { // update all items in interface 2707 2707 redrawTabArea = true; 2708 - int interfaceId = buffer.getUnsignedLEShort(); 2708 + int interfaceId = buffer.getUnsignedBEShort(); 2709 2709 Widget inter = Widget.forId(interfaceId); 2710 - int items = buffer.getUnsignedLEShort(); 2710 + int items = buffer.getUnsignedBEShort(); 2711 2711 for (int item = 0; item < items; item++) { 2712 2712 inter.items[item] = buffer.getLittleShortA(); 2713 2713 int amount = buffer.getByteNegated(); ··· 2728 2728 int tmpChunkX = chunkX; 2729 2729 int tmpChunkY = chunkY; 2730 2730 if (opcode == 222) { 2731 - tmpChunkY = buffer.getUnsignedLEShort(); 2731 + tmpChunkY = buffer.getUnsignedBEShort(); 2732 2732 tmpChunkX = buffer.getLittleShortA(); 2733 2733 aBoolean1163 = false; 2734 2734 } ··· 2929 2929 return true; 2930 2930 } 2931 2931 if (opcode == 190) { 2932 - systemUpdateTime = buffer.getLEUnsignedShort() * 30; 2932 + systemUpdateTime = buffer.getUnsignedLEShort() * 30; 2933 2933 opcode = -1; 2934 2934 return true; 2935 2935 } ··· 2947 2947 return true; 2948 2948 } 2949 2949 if (opcode == 21) { // show a model on an interface?? 2950 - int scale = buffer.getUnsignedLEShort(); 2951 - int itemId = buffer.getLEUnsignedShort(); 2950 + int scale = buffer.getUnsignedBEShort(); 2951 + int itemId = buffer.getUnsignedLEShort(); 2952 2952 int interfaceId = buffer.getLittleShortA(); 2953 2953 if (itemId == 65535) { 2954 2954 Widget.forId(interfaceId).modelType = 0; ··· 2969 2969 cutsceneActive = true; 2970 2970 anInt874 = buffer.getUnsignedByte(); 2971 2971 anInt875 = buffer.getUnsignedByte(); 2972 - anInt876 = buffer.getUnsignedLEShort(); 2972 + anInt876 = buffer.getUnsignedBEShort(); 2973 2973 anInt877 = buffer.getUnsignedByte(); 2974 2974 anInt878 = buffer.getUnsignedByte(); 2975 2975 if (anInt878 >= 100) { ··· 3020 3020 return true; 3021 3021 } 3022 3022 if (opcode == 219) { // reset all items on interface? 3023 - int interfaceId = buffer.getLEUnsignedShort(); 3023 + int interfaceId = buffer.getUnsignedLEShort(); 3024 3024 Widget class13_2 = Widget.forId(interfaceId); 3025 3025 for (int k21 = 0; k21 < class13_2.items.length; k21++) { 3026 3026 class13_2.items[k21] = -1; ··· 3052 3052 } 3053 3053 if (opcode == 126) { 3054 3054 playerMembers = buffer.getUnsignedByte(); 3055 - thisPlayerServerId = buffer.getLEUnsignedShort(); 3055 + thisPlayerServerId = buffer.getUnsignedLEShort(); 3056 3056 opcode = -1; 3057 3057 return true; 3058 3058 } ··· 3063 3063 return true; 3064 3064 } 3065 3065 if (opcode == 253) { // open fullscreen interface 3066 - int k9 = buffer.getLEUnsignedShort(); 3066 + int k9 = buffer.getUnsignedLEShort(); 3067 3067 int k15 = buffer.getShortUnsingedAdded(); 3068 3068 method112((byte) 36, k15); 3069 3069 if (k9 != -1) ··· 3100 3100 return true; 3101 3101 } 3102 3102 if (opcode == 18) { 3103 - int l9 = buffer.getUnsignedLEShort(); 3103 + int l9 = buffer.getUnsignedBEShort(); 3104 3104 int interfaceId = buffer.getShortUnsingedAdded(); 3105 - int l21 = buffer.getLEUnsignedShort(); 3105 + int l21 = buffer.getUnsignedLEShort(); 3106 3106 Widget.forId(interfaceId).anInt218 = (l9 << 16) + l21; 3107 3107 opcode = -1; 3108 3108 return true; ··· 3134 3134 return true; 3135 3135 } 3136 3136 if (opcode == 200) { 3137 - int interfaceId = buffer.getUnsignedLEShort(); 3137 + int interfaceId = buffer.getUnsignedBEShort(); 3138 3138 int scrollPosition = buffer.getLittleShortA(); 3139 3139 Widget widget = Widget.forId(interfaceId); 3140 3140 if (widget != null && widget.type == 0) { ··· 4602 4602 class50_sub1_sub4_sub3_sub1.idleAnimation = class50_sub1_sub4_sub3_sub1.npcDefinition.standAnimationId; 4603 4603 } 4604 4604 if ((i1 & 0x40) != 0) { 4605 - class50_sub1_sub4_sub3_sub1.anInt1609 = class50_sub1_sub2.getLEUnsignedShort(); 4605 + class50_sub1_sub4_sub3_sub1.anInt1609 = class50_sub1_sub2.getUnsignedLEShort(); 4606 4606 if (class50_sub1_sub4_sub3_sub1.anInt1609 == 65535) 4607 4607 class50_sub1_sub4_sub3_sub1.anInt1609 = -1; 4608 4608 } ··· 4615 4615 class50_sub1_sub4_sub3_sub1.anInt1597 = class50_sub1_sub2.getByteSubtracted(); 4616 4616 } 4617 4617 if ((i1 & 4) != 0) { 4618 - class50_sub1_sub4_sub3_sub1.graphic = class50_sub1_sub2.getUnsignedLEShort(); 4618 + class50_sub1_sub4_sub3_sub1.graphic = class50_sub1_sub2.getUnsignedBEShort(); 4619 4619 int k1 = class50_sub1_sub2.method556(); 4620 4620 class50_sub1_sub4_sub3_sub1.spotAnimationDelay = k1 >> 16; 4621 4621 class50_sub1_sub4_sub3_sub1.anInt1617 = pulseCycle + (k1 & 0xffff); ··· 4632 4632 } 4633 4633 if ((i1 & 8) != 0) { 4634 4634 class50_sub1_sub4_sub3_sub1.anInt1598 = class50_sub1_sub2.getLittleShortA(); 4635 - class50_sub1_sub4_sub3_sub1.anInt1599 = class50_sub1_sub2.getLEUnsignedShort(); 4635 + class50_sub1_sub4_sub3_sub1.anInt1599 = class50_sub1_sub2.getUnsignedLEShort(); 4636 4636 } 4637 4637 if ((i1 & 2) != 0) { 4638 - int l1 = class50_sub1_sub2.getUnsignedLEShort(); 4638 + int l1 = class50_sub1_sub2.getUnsignedBEShort(); 4639 4639 if (l1 == 65535) 4640 4640 l1 = -1; 4641 4641 int k2 = class50_sub1_sub2.getByteSubtracted(); ··· 4674 4674 4675 4675 private void parsePlayerBlock(int id, Player player, int mask, Buffer buffer) { 4676 4676 if ((mask & 8) != 0) { 4677 - int animation = buffer.getUnsignedLEShort(); 4677 + int animation = buffer.getUnsignedBEShort(); 4678 4678 4679 4679 if (animation == 65535) 4680 4680 animation = -1; ··· 4724 4724 player.anInt1604 = buffer.getByteNegated(); 4725 4725 player.anInt1603 = buffer.getByteSubtracted(); 4726 4726 player.anInt1605 = buffer.getUnsignedByte(); 4727 - player.anInt1606 = buffer.getUnsignedLEShort() + pulseCycle; 4727 + player.anInt1606 = buffer.getUnsignedBEShort() + pulseCycle; 4728 4728 player.anInt1607 = buffer.getShortUnsingedAdded() + pulseCycle; 4729 4729 player.anInt1608 = buffer.getUnsignedByte(); 4730 4730 ··· 4739 4739 } 4740 4740 4741 4741 if ((mask & 2) != 0) { 4742 - player.anInt1598 = buffer.getUnsignedLEShort(); 4743 - player.anInt1599 = buffer.getUnsignedLEShort(); 4742 + player.anInt1598 = buffer.getUnsignedBEShort(); 4743 + player.anInt1599 = buffer.getUnsignedBEShort(); 4744 4744 } 4745 4745 4746 4746 if ((mask & 0x200) != 0) { ··· 4782 4782 } 4783 4783 4784 4784 if ((mask & 0x40) != 0) { 4785 - int effectsAndColour = buffer.getUnsignedLEShort(); 4785 + int effectsAndColour = buffer.getUnsignedBEShort(); 4786 4786 int rights = buffer.getByteNegated(); 4787 4787 int length = buffer.getByteAdded(); 4788 4788 int currentPosition = buffer.currentPosition; ··· 10493 10493 10494 10494 private void parsePlacementPacket(Buffer buf, int opcode) { 10495 10495 if (opcode == 203) { 10496 - int objectId = buf.getUnsignedLEShort(); 10496 + int objectId = buf.getUnsignedBEShort(); 10497 10497 int j3 = buf.getUnsignedByte(); 10498 10498 int modelType = j3 >> 2; 10499 10499 int modelOrientation = j3 & 3; ··· 10504 10504 int y = placementY + (offset & 7); 10505 10505 byte byte1 = buf.getSignedByteAdded(); 10506 10506 int duration = buf.getShortUnsingedAdded(); 10507 - int id = buf.getLEUnsignedShort(); 10507 + int id = buf.getUnsignedLEShort(); 10508 10508 byte byte2 = buf.getSignedByte(); 10509 10509 byte byte3 = buf.getSignedByteAdded(); 10510 - int startDelay = buf.getUnsignedLEShort(); 10510 + int startDelay = buf.getUnsignedBEShort(); 10511 10511 Player player; 10512 10512 if (id == thisPlayerServerId) 10513 10513 player = localPlayer; ··· 10571 10571 return; 10572 10572 } 10573 10573 if (opcode == 142) { 10574 - int i1 = buf.getUnsignedLEShort(); 10574 + int i1 = buf.getUnsignedBEShort(); 10575 10575 int l3 = buf.getByteAdded(); 10576 10576 int k6 = l3 >> 2; 10577 10577 int j9 = l3 & 3; ··· 10623 10623 return; 10624 10624 } 10625 10625 if (opcode == 107) { // add ground item (dropped by npc or "auto spawn") 10626 - int id = buf.getUnsignedLEShort(); 10626 + int id = buf.getUnsignedBEShort(); 10627 10627 int offset = buf.getByteNegated(); 10628 10628 int x = placementX + (offset >> 4 & 7); 10629 10629 int y = placementY + (offset & 7); ··· 10643 10643 int offset = buf.getUnsignedByte(); 10644 10644 int x = placementX + (offset >> 4 & 7); 10645 10645 int y = placementY + (offset & 7); 10646 - int id = buf.getUnsignedLEShort(); 10647 - int amount = buf.getUnsignedLEShort(); 10648 - int newAmount = buf.getUnsignedLEShort(); 10646 + int id = buf.getUnsignedBEShort(); 10647 + int amount = buf.getUnsignedBEShort(); 10648 + int newAmount = buf.getUnsignedBEShort(); 10649 10649 if (x >= 0 && y >= 0 && x < 104 && y < 104) { 10650 10650 LinkedList list = groundItems[plane][x][y]; 10651 10651 if (list != null) { ··· 10668 10668 int i10 = x + buf.getSignedByte(); 10669 10669 int l12 = y + buf.getSignedByte(); 10670 10670 int l14 = buf.getSignedShort(); 10671 - int k16 = buf.getUnsignedLEShort(); 10671 + int k16 = buf.getUnsignedBEShort(); 10672 10672 int i18 = buf.getUnsignedByte() * 4; 10673 10673 int i19 = buf.getUnsignedByte() * 4; 10674 - int k19 = buf.getUnsignedLEShort(); 10675 - int j20 = buf.getUnsignedLEShort(); 10674 + int k19 = buf.getUnsignedBEShort(); 10675 + int j20 = buf.getUnsignedBEShort(); 10676 10676 int i21 = buf.getUnsignedByte(); 10677 10677 int j21 = buf.getUnsignedByte(); 10678 10678 if (x >= 0 && y >= 0 && x < 104 && y < 104 && i10 >= 0 && l12 >= 0 && i10 < 104 && l12 < 104 ··· 10693 10693 int offset = buf.getUnsignedByte(); 10694 10694 int x = placementX + (offset >> 4 & 7); 10695 10695 int y = placementY + (offset & 7); 10696 - int soundId = buf.getUnsignedLEShort(); 10696 + int soundId = buf.getUnsignedBEShort(); 10697 10697 int i13 = buf.getUnsignedByte(); 10698 10698 int i15 = i13 >> 4 & 0xf; 10699 10699 int type = i13 & 7; ··· 10712 10712 int j2 = buf.getUnsignedByte(); 10713 10713 int i5 = placementX + (j2 >> 4 & 7); 10714 10714 int l7 = placementY + (j2 & 7); 10715 - int k10 = buf.getUnsignedLEShort(); 10715 + int k10 = buf.getUnsignedBEShort(); 10716 10716 int j13 = buf.getUnsignedByte(); 10717 - int j15 = buf.getUnsignedLEShort(); 10717 + int j15 = buf.getUnsignedBEShort(); 10718 10718 if (i5 >= 0 && l7 >= 0 && i5 < 104 && l7 < 104) { 10719 10719 i5 = i5 * 128 + 64; 10720 10720 l7 = l7 * 128 + 64;
+1 -1
src/com/jagex/runescape/cache/Archive.java
··· 33 33 archiveBuffer = dataBuffer; 34 34 this.compressed = false; 35 35 } 36 - dataSize = buffer.getUnsignedLEShort(); 36 + dataSize = buffer.getUnsignedBEShort(); 37 37 nameHashes = new int[dataSize]; 38 38 uncompressedSizes = new int[dataSize]; 39 39 compressedSizes = new int[dataSize];
+1 -1
src/com/jagex/runescape/cache/cfg/ChatCensor.java
··· 72 72 public static void loadFragmentsEnc(Buffer buffer) { 73 73 fragments = new int[buffer.getInt()]; 74 74 for (int index = 0; index < fragments.length; index++) 75 - fragments[index] = buffer.getUnsignedLEShort(); 75 + fragments[index] = buffer.getUnsignedBEShort(); 76 76 77 77 } 78 78
+2 -2
src/com/jagex/runescape/cache/cfg/Varbit.java
··· 14 14 15 15 public static void load(Archive archive) { 16 16 Buffer buffer = new Buffer(archive.getFile("varbit.dat")); 17 - count = buffer.getUnsignedLEShort(); 17 + count = buffer.getUnsignedBEShort(); 18 18 19 19 if (cache == null) 20 20 cache = new Varbit[count]; ··· 37 37 if (attribute == 0) 38 38 return; 39 39 if (attribute == 1) { 40 - configId = buf.getUnsignedLEShort(); 40 + configId = buf.getUnsignedBEShort(); 41 41 leastSignificantBit = buf.getUnsignedByte(); 42 42 mostSignificantBit = buf.getUnsignedByte(); 43 43 } else if (attribute == 10)
+2 -2
src/com/jagex/runescape/cache/cfg/Varp.java
··· 25 25 public static void load(Archive archive) { 26 26 Buffer buffer = new Buffer(archive.getFile("varp.dat")); 27 27 currentIndex = 0; 28 - count = buffer.getUnsignedLEShort(); 28 + count = buffer.getUnsignedBEShort(); 29 29 30 30 if (cache == null) 31 31 cache = new Varp[count]; ··· 58 58 } else if (attribute == 4) 59 59 aBoolean711 = false; 60 60 else if (attribute == 5) 61 - anInt712 = buffer.getUnsignedLEShort(); 61 + anInt712 = buffer.getUnsignedBEShort(); 62 62 else if (attribute == 6) 63 63 aBoolean713 = true; 64 64 else if (attribute == 7)
+23 -23
src/com/jagex/runescape/cache/def/ActorDefinition.java
··· 71 71 int modelCount = buffer.getUnsignedByte(); 72 72 modelIds = new int[modelCount]; 73 73 for (int model = 0; model < modelCount; model++) 74 - modelIds[model] = buffer.getUnsignedLEShort(); 74 + modelIds[model] = buffer.getUnsignedBEShort(); 75 75 76 76 } else if (attributeId == 2) 77 77 name = buffer.getString(); ··· 80 80 else if (attributeId == 12) 81 81 boundaryDimension = buffer.getSignedByte(); 82 82 else if (attributeId == 13) 83 - standAnimationId = buffer.getUnsignedLEShort(); 83 + standAnimationId = buffer.getUnsignedBEShort(); 84 84 else if (attributeId == 14) 85 - walkAnimationId = buffer.getUnsignedLEShort(); 85 + walkAnimationId = buffer.getUnsignedBEShort(); 86 86 else if (attributeId == 17) { 87 - walkAnimationId = buffer.getUnsignedLEShort(); 88 - turnAroundAnimationId = buffer.getUnsignedLEShort(); 89 - turnRightAnimationId = buffer.getUnsignedLEShort(); 90 - turnLeftAnimationId = buffer.getUnsignedLEShort(); 87 + walkAnimationId = buffer.getUnsignedBEShort(); 88 + turnAroundAnimationId = buffer.getUnsignedBEShort(); 89 + turnRightAnimationId = buffer.getUnsignedBEShort(); 90 + turnLeftAnimationId = buffer.getUnsignedBEShort(); 91 91 } else if (attributeId >= 30 && attributeId < 40) { 92 92 if (actions == null) 93 93 actions = new String[5]; ··· 99 99 modifiedModelColors = new int[modelColorCount]; 100 100 originalModelColors = new int[modelColorCount]; 101 101 for (int colour = 0; colour < modelColorCount; colour++) { 102 - modifiedModelColors[colour] = buffer.getUnsignedLEShort(); 103 - originalModelColors[colour] = buffer.getUnsignedLEShort(); 102 + modifiedModelColors[colour] = buffer.getUnsignedBEShort(); 103 + originalModelColors[colour] = buffer.getUnsignedBEShort(); 104 104 } 105 105 106 106 } else if (attributeId == 60) { 107 107 int additionalModelCount = buffer.getUnsignedByte(); 108 108 headModelIndexes = new int[additionalModelCount]; 109 109 for (int model = 0; model < additionalModelCount; model++) 110 - headModelIndexes[model] = buffer.getUnsignedLEShort(); 110 + headModelIndexes[model] = buffer.getUnsignedBEShort(); 111 111 112 112 } else if (attributeId == 90) 113 - anInt648 = buffer.getUnsignedLEShort(); 113 + anInt648 = buffer.getUnsignedBEShort(); 114 114 else if (attributeId == 91) 115 - anInt627 = buffer.getUnsignedLEShort(); 115 + anInt627 = buffer.getUnsignedBEShort(); 116 116 else if (attributeId == 92) 117 - anInt637 = buffer.getUnsignedLEShort(); 117 + anInt637 = buffer.getUnsignedBEShort(); 118 118 else if (attributeId == 93) 119 119 minimapVisible = false; 120 120 else if (attributeId == 95) 121 - combatLevel = buffer.getUnsignedLEShort(); 121 + combatLevel = buffer.getUnsignedBEShort(); 122 122 else if (attributeId == 97) 123 - sizeXZ = buffer.getUnsignedLEShort(); 123 + sizeXZ = buffer.getUnsignedBEShort(); 124 124 else if (attributeId == 98) 125 - sizeY = buffer.getUnsignedLEShort(); 125 + sizeY = buffer.getUnsignedBEShort(); 126 126 else if (attributeId == 99) 127 127 visible = true; 128 128 else if (attributeId == 100) ··· 130 130 else if (attributeId == 101) 131 131 contrast = buffer.getSignedByte() * 5; 132 132 else if (attributeId == 102) 133 - headIcon = buffer.getUnsignedLEShort(); 133 + headIcon = buffer.getUnsignedBEShort(); 134 134 else if (attributeId == 103) 135 - degreesToTurn = buffer.getUnsignedLEShort(); 135 + degreesToTurn = buffer.getUnsignedBEShort(); 136 136 else if (attributeId == 106) { 137 - varBitId = buffer.getUnsignedLEShort(); 137 + varBitId = buffer.getUnsignedBEShort(); 138 138 if (varBitId == 65535) 139 139 varBitId = -1; 140 - settingId = buffer.getUnsignedLEShort(); 140 + settingId = buffer.getUnsignedBEShort(); 141 141 if (settingId == 65535) 142 142 settingId = -1; 143 143 int childrenCount = buffer.getUnsignedByte(); 144 144 childrenIds = new int[childrenCount + 1]; 145 145 for (int child = 0; child <= childrenCount; child++) { 146 - childrenIds[child] = buffer.getUnsignedLEShort(); 146 + childrenIds[child] = buffer.getUnsignedBEShort(); 147 147 if (childrenIds[child] == 65535) 148 148 childrenIds[child] = -1; 149 149 } ··· 214 214 public static void load(Archive archive) { 215 215 buffer = new Buffer(archive.getFile("npc.dat")); 216 216 Buffer buffer = new Buffer(archive.getFile("npc.idx")); 217 - size = buffer.getUnsignedLEShort(); 217 + size = buffer.getUnsignedBEShort(); 218 218 bufferOffsets = new int[size]; 219 219 int offset = 2; 220 220 for (int bufferIndex = 0; bufferIndex < size; bufferIndex++) { 221 221 bufferOffsets[bufferIndex] = offset; 222 - offset += buffer.getUnsignedLEShort(); 222 + offset += buffer.getUnsignedBEShort(); 223 223 } 224 224 225 225 cache = new ActorDefinition[20];
+1 -1
src/com/jagex/runescape/cache/def/FloorDefinition.java
··· 24 24 25 25 public static void load(Archive archive) { 26 26 Buffer buffer = new Buffer(archive.getFile("flo.dat")); 27 - count = buffer.getUnsignedLEShort(); 27 + count = buffer.getUnsignedBEShort(); 28 28 if (cache == null) 29 29 cache = new FloorDefinition[count]; 30 30 for (int floor = 0; floor < count; floor++) {
+15 -15
src/com/jagex/runescape/cache/def/GameObjectDefinition.java
··· 145 145 public static void load(Archive archive) { 146 146 buffer = new Buffer(archive.getFile("loc.dat")); 147 147 Buffer buffer = new Buffer(archive.getFile("loc.idx")); 148 - definitionCount = buffer.getUnsignedLEShort(); 148 + definitionCount = buffer.getUnsignedBEShort(); 149 149 bufferOffsets = new int[definitionCount]; 150 150 int offset = 2; 151 151 for (int index = 0; index < definitionCount; index++) { 152 152 bufferOffsets[index] = offset; 153 - offset += buffer.getUnsignedLEShort(); 153 + offset += buffer.getUnsignedBEShort(); 154 154 } 155 155 156 156 cache = new GameObjectDefinition[20]; ··· 285 285 modelTypes = new int[k]; 286 286 modelIds = new int[k]; 287 287 for (int k1 = 0; k1 < k; k1++) { 288 - modelIds[k1] = buf.getUnsignedLEShort(); 288 + modelIds[k1] = buf.getUnsignedBEShort(); 289 289 modelTypes[k1] = buf.getUnsignedByte(); 290 290 } 291 291 ··· 306 306 modelTypes = null; 307 307 modelIds = new int[l]; 308 308 for (int l1 = 0; l1 < l; l1++) 309 - modelIds[l1] = buf.getUnsignedLEShort(); 309 + modelIds[l1] = buf.getUnsignedBEShort(); 310 310 311 311 } else { 312 312 buf.currentPosition += l * 2; ··· 339 339 aBoolean797 = true; 340 340 break; 341 341 case 24: 342 - animationId = buf.getUnsignedLEShort(); 342 + animationId = buf.getUnsignedBEShort(); 343 343 if (animationId == 65535) 344 344 animationId = -1; 345 345 break; ··· 360 360 modifiedModelColors = new int[i1]; 361 361 anIntArray792 = new int[i1]; 362 362 for (int i2 = 0; i2 < i1; i2++) { 363 - modifiedModelColors[i2] = buf.getUnsignedLEShort(); 364 - anIntArray792[i2] = buf.getUnsignedLEShort(); 363 + modifiedModelColors[i2] = buf.getUnsignedBEShort(); 364 + anIntArray792[i2] = buf.getUnsignedBEShort(); 365 365 } 366 366 367 367 break; 368 368 case 60: 369 - icon = buf.getUnsignedLEShort(); 369 + icon = buf.getUnsignedBEShort(); 370 370 break; 371 371 case 62: 372 372 unknown3 = true; ··· 375 375 unknown2 = false; 376 376 break; 377 377 case 65: 378 - modelSizeX = buf.getUnsignedLEShort(); 378 + modelSizeX = buf.getUnsignedBEShort(); 379 379 break; 380 380 case 66: 381 - modelSizeY = buf.getUnsignedLEShort(); 381 + modelSizeY = buf.getUnsignedBEShort(); 382 382 break; 383 383 case 67: 384 - modelSizeZ = buf.getUnsignedLEShort(); 384 + modelSizeZ = buf.getUnsignedBEShort(); 385 385 break; 386 386 case 68: 387 - anInt795 = buf.getUnsignedLEShort(); 387 + anInt795 = buf.getUnsignedBEShort(); 388 388 break; 389 389 case 69: 390 390 anInt764 = buf.getUnsignedByte(); ··· 419 419 } 420 420 continue label0; 421 421 } while (attribute != 77); 422 - varbitId = buf.getUnsignedLEShort(); 422 + varbitId = buf.getUnsignedBEShort(); 423 423 if (varbitId == 65535) 424 424 varbitId = -1; 425 - configId = buf.getUnsignedLEShort(); 425 + configId = buf.getUnsignedBEShort(); 426 426 if (configId == 65535) 427 427 configId = -1; 428 428 int j1 = buf.getUnsignedByte(); 429 429 childrenIds = new int[j1 + 1]; 430 430 for (int j2 = 0; j2 <= j1; j2++) { 431 - childrenIds[j2] = buf.getUnsignedLEShort(); 431 + childrenIds[j2] = buf.getUnsignedBEShort(); 432 432 if (childrenIds[j2] == 65535) 433 433 childrenIds[j2] = -1; 434 434 }
+29 -29
src/com/jagex/runescape/cache/def/ItemDefinition.java
··· 191 191 public static void load(Archive archive) { 192 192 buffer = new Buffer(archive.getFile("obj.dat")); 193 193 Buffer buffer = new Buffer(archive.getFile("obj.idx")); 194 - count = buffer.getUnsignedLEShort(); 194 + count = buffer.getUnsignedBEShort(); 195 195 offsets = new int[count]; 196 196 int index = 2; 197 197 for (int i = 0; i < count; i++) { 198 198 offsets[i] = index; 199 - index += buffer.getUnsignedLEShort(); 199 + index += buffer.getUnsignedBEShort(); 200 200 } 201 201 202 202 cache = new ItemDefinition[10]; ··· 276 276 if (opcode == 0) 277 277 return; 278 278 if (opcode == 1) 279 - modelId = buffer.getUnsignedLEShort(); 279 + modelId = buffer.getUnsignedBEShort(); 280 280 else if (opcode == 2) 281 281 name = buffer.getString(); 282 282 else if (opcode == 3) 283 283 description = buffer.getStringBytes(); 284 284 else if (opcode == 4) 285 - modelScale = buffer.getUnsignedLEShort(); 285 + modelScale = buffer.getUnsignedBEShort(); 286 286 else if (opcode == 5) 287 - modelRotationX = buffer.getUnsignedLEShort(); 287 + modelRotationX = buffer.getUnsignedBEShort(); 288 288 else if (opcode == 6) 289 - modelRotationY = buffer.getUnsignedLEShort(); 289 + modelRotationY = buffer.getUnsignedBEShort(); 290 290 else if (opcode == 7) { 291 - modelOffsetX = buffer.getUnsignedLEShort(); 291 + modelOffsetX = buffer.getUnsignedBEShort(); 292 292 if (modelOffsetX > 32767) 293 293 modelOffsetX -= 0x10000; 294 294 } else if (opcode == 8) { 295 - modelOffsetY = buffer.getUnsignedLEShort(); 295 + modelOffsetY = buffer.getUnsignedBEShort(); 296 296 if (modelOffsetY > 32767) 297 297 modelOffsetY -= 0x10000; 298 298 } else if (opcode == 10) 299 - buffer.getUnsignedLEShort(); // Dummy 299 + buffer.getUnsignedBEShort(); // Dummy 300 300 else if (opcode == 11) 301 301 stackable = true; 302 302 else if (opcode == 12) ··· 304 304 else if (opcode == 16) 305 305 members = true; 306 306 else if (opcode == 23) { 307 - primaryMaleModel = buffer.getUnsignedLEShort(); 307 + primaryMaleModel = buffer.getUnsignedBEShort(); 308 308 maleTranslation = buffer.getSignedByte(); 309 309 } else if (opcode == 24) 310 - secondaryMaleModel = buffer.getUnsignedLEShort(); 310 + secondaryMaleModel = buffer.getUnsignedBEShort(); 311 311 else if (opcode == 25) { 312 - primaryFemaleModel = buffer.getUnsignedLEShort(); 312 + primaryFemaleModel = buffer.getUnsignedBEShort(); 313 313 femaleTranslation = buffer.getSignedByte(); 314 314 } else if (opcode == 26) 315 - secondaryFemaleModel = buffer.getUnsignedLEShort(); 315 + secondaryFemaleModel = buffer.getUnsignedBEShort(); 316 316 else if (opcode >= 30 && opcode < 35) { 317 317 if (groundActions == null) 318 318 groundActions = new String[5]; ··· 328 328 originalColours = new int[colorCount]; 329 329 destColors = new int[colorCount]; 330 330 for (int k = 0; k < colorCount; k++) { 331 - originalColours[k] = buffer.getUnsignedLEShort(); 332 - destColors[k] = buffer.getUnsignedLEShort(); 331 + originalColours[k] = buffer.getUnsignedBEShort(); 332 + destColors[k] = buffer.getUnsignedBEShort(); 333 333 } 334 334 335 335 } else if (opcode == 78) 336 - tertiaryMaleEquipmentModel = buffer.getUnsignedLEShort(); 336 + tertiaryMaleEquipmentModel = buffer.getUnsignedBEShort(); 337 337 else if (opcode == 79) 338 - tertiaryFemaleEquipmentModel = buffer.getUnsignedLEShort(); 338 + tertiaryFemaleEquipmentModel = buffer.getUnsignedBEShort(); 339 339 else if (opcode == 90) 340 - primaryMaleHeadPiece = buffer.getUnsignedLEShort(); 340 + primaryMaleHeadPiece = buffer.getUnsignedBEShort(); 341 341 else if (opcode == 91) 342 - primaryFemaleHeadPiece = buffer.getUnsignedLEShort(); 342 + primaryFemaleHeadPiece = buffer.getUnsignedBEShort(); 343 343 else if (opcode == 92) 344 - secondaryMaleHeadPiece = buffer.getUnsignedLEShort(); 344 + secondaryMaleHeadPiece = buffer.getUnsignedBEShort(); 345 345 else if (opcode == 93) 346 - secondaryFemaleHeadPiece = buffer.getUnsignedLEShort(); 346 + secondaryFemaleHeadPiece = buffer.getUnsignedBEShort(); 347 347 else if (opcode == 95) 348 - anInt339 = buffer.getUnsignedLEShort(); 348 + anInt339 = buffer.getUnsignedBEShort(); 349 349 else if (opcode == 97) 350 - notedInfoId = buffer.getUnsignedLEShort(); 350 + notedInfoId = buffer.getUnsignedBEShort(); 351 351 else if (opcode == 98) 352 - notedTemplateId = buffer.getUnsignedLEShort(); 352 + notedTemplateId = buffer.getUnsignedBEShort(); 353 353 else if (opcode >= 100 && opcode < 110) { 354 354 if (stackIds == null) { 355 355 stackIds = new int[10]; 356 356 stackAmounts = new int[10]; 357 357 } 358 - stackIds[opcode - 100] = buffer.getUnsignedLEShort(); 359 - stackAmounts[opcode - 100] = buffer.getUnsignedLEShort(); 358 + stackIds[opcode - 100] = buffer.getUnsignedBEShort(); 359 + stackAmounts[opcode - 100] = buffer.getUnsignedBEShort(); 360 360 } else if (opcode == 110) 361 - groundScaleX = buffer.getUnsignedLEShort(); 361 + groundScaleX = buffer.getUnsignedBEShort(); 362 362 else if (opcode == 111) 363 - groundScaleY = buffer.getUnsignedLEShort(); 363 + groundScaleY = buffer.getUnsignedBEShort(); 364 364 else if (opcode == 112) 365 - groundScaleZ = buffer.getUnsignedLEShort(); 365 + groundScaleZ = buffer.getUnsignedBEShort(); 366 366 else if (opcode == 113) 367 367 ambience = buffer.getSignedByte(); 368 368 else if (opcode == 114)
+7 -7
src/com/jagex/runescape/cache/media/AnimationSequence.java
··· 25 25 26 26 public static void load(Archive archive) { 27 27 Buffer buffer = new Buffer(archive.getFile("seq.dat")); 28 - AnimationSequence.count = buffer.getUnsignedLEShort(); 28 + AnimationSequence.count = buffer.getUnsignedBEShort(); 29 29 if (AnimationSequence.animations == null) 30 30 AnimationSequence.animations = new AnimationSequence[AnimationSequence.count]; 31 31 for (int animation = 0; animation < count; animation++) { ··· 59 59 frame1Ids = new int[frameCount]; 60 60 frameLenghts = new int[frameCount]; 61 61 for (int frame = 0; frame < frameCount; frame++) { 62 - getPrimaryFrame[frame] = buf.getUnsignedLEShort(); 63 - frame1Ids[frame] = buf.getUnsignedLEShort(); 62 + getPrimaryFrame[frame] = buf.getUnsignedBEShort(); 63 + frame1Ids[frame] = buf.getUnsignedBEShort(); 64 64 if (frame1Ids[frame] == 65535) 65 65 frame1Ids[frame] = -1; 66 - frameLenghts[frame] = buf.getUnsignedLEShort(); 66 + frameLenghts[frame] = buf.getUnsignedBEShort(); 67 67 } 68 68 69 69 break; 70 70 case 2: 71 - frameStep = buf.getUnsignedLEShort(); 71 + frameStep = buf.getUnsignedBEShort(); 72 72 break; 73 73 case 3: 74 74 int flowCount = buf.getUnsignedByte(); ··· 85 85 anInt301 = buf.getUnsignedByte(); 86 86 break; 87 87 case 6: 88 - getPlayerShieldDelta = buf.getUnsignedLEShort(); 88 + getPlayerShieldDelta = buf.getUnsignedBEShort(); 89 89 break; 90 90 case 7: 91 - getPlayerWeaponDelta = buf.getUnsignedLEShort(); 91 + getPlayerWeaponDelta = buf.getUnsignedBEShort(); 92 92 break; 93 93 case 8: 94 94 anInt304 = buf.getUnsignedByte();
+5 -5
src/com/jagex/runescape/cache/media/IdentityKit.java
··· 17 17 18 18 public static void load(Archive archive) { 19 19 Buffer buffer = new Buffer(archive.getFile("idk.dat")); 20 - IdentityKit.count = buffer.getUnsignedLEShort(); 20 + IdentityKit.count = buffer.getUnsignedBEShort(); 21 21 if (IdentityKit.cache == null) 22 22 IdentityKit.cache = new IdentityKit[IdentityKit.count]; 23 23 for (int identityKit = 0; identityKit < count; identityKit++) { ··· 38 38 int modelCount = buffer.getUnsignedByte(); 39 39 modelId = new int[modelCount]; 40 40 for (int model = 0; model < modelCount; model++) 41 - modelId[model] = buffer.getUnsignedLEShort(); 41 + modelId[model] = buffer.getUnsignedBEShort(); 42 42 } else if (attributeId == 3) 43 43 widgetDisplayed = true; 44 44 else if (attributeId >= 40 && attributeId < 50) 45 - originalModelColors[attributeId - 40] = buffer.getUnsignedLEShort(); 45 + originalModelColors[attributeId - 40] = buffer.getUnsignedBEShort(); 46 46 else if (attributeId >= 50 && attributeId < 60) 47 - modifiedModelColors[attributeId - 50] = buffer.getUnsignedLEShort(); 47 + modifiedModelColors[attributeId - 50] = buffer.getUnsignedBEShort(); 48 48 else if (attributeId >= 60 && attributeId < 70) 49 - headModelIds[attributeId - 60] = buffer.getUnsignedLEShort(); 49 + headModelIds[attributeId - 60] = buffer.getUnsignedBEShort(); 50 50 else 51 51 System.out.println("Error unrecognised config code: " + attributeId); 52 52 }
+6 -6
src/com/jagex/runescape/cache/media/ImageRGB.java
··· 53 53 public ImageRGB(Archive archive, String archiveName, int archiveIndex) { 54 54 Buffer dataBuffer = new Buffer(archive.getFile(archiveName + ".dat")); 55 55 Buffer indexBuffer = new Buffer(archive.getFile("index.dat")); 56 - indexBuffer.currentPosition = dataBuffer.getUnsignedLEShort(); 57 - maxWidth = indexBuffer.getUnsignedLEShort(); 58 - maxHeight = indexBuffer.getUnsignedLEShort(); 56 + indexBuffer.currentPosition = dataBuffer.getUnsignedBEShort(); 57 + maxWidth = indexBuffer.getUnsignedBEShort(); 58 + maxHeight = indexBuffer.getUnsignedBEShort(); 59 59 int length = indexBuffer.getUnsignedByte(); 60 60 int[] pixels = new int[length]; 61 61 for (int pixel = 0; pixel < length - 1; pixel++) { ··· 66 66 67 67 for (int index = 0; index < archiveIndex; index++) { 68 68 indexBuffer.currentPosition += 2; 69 - dataBuffer.currentPosition += indexBuffer.getUnsignedLEShort() * indexBuffer.getUnsignedLEShort(); 69 + dataBuffer.currentPosition += indexBuffer.getUnsignedBEShort() * indexBuffer.getUnsignedBEShort(); 70 70 indexBuffer.currentPosition++; 71 71 } 72 72 73 73 offsetX = indexBuffer.getUnsignedByte(); 74 74 offsetY = indexBuffer.getUnsignedByte(); 75 - width = indexBuffer.getUnsignedLEShort(); 76 - height = indexBuffer.getUnsignedLEShort(); 75 + width = indexBuffer.getUnsignedBEShort(); 76 + height = indexBuffer.getUnsignedBEShort(); 77 77 int type = indexBuffer.getUnsignedByte(); 78 78 int pixelCount = width * height; 79 79 this.pixels = new int[pixelCount];
+6 -6
src/com/jagex/runescape/cache/media/IndexedImage.java
··· 18 18 public IndexedImage(Archive archive, String archiveName, int offset) { 19 19 Buffer dataBuffer = new Buffer(archive.getFile(archiveName + ".dat")); 20 20 Buffer indexBuffer = new Buffer(archive.getFile("index.dat")); 21 - indexBuffer.currentPosition = dataBuffer.getUnsignedLEShort(); 22 - maxWidth = indexBuffer.getUnsignedLEShort(); 23 - maxHeight = indexBuffer.getUnsignedLEShort(); 21 + indexBuffer.currentPosition = dataBuffer.getUnsignedBEShort(); 22 + maxWidth = indexBuffer.getUnsignedBEShort(); 23 + maxHeight = indexBuffer.getUnsignedBEShort(); 24 24 int palleteLength = indexBuffer.getUnsignedByte(); 25 25 palette = new int[palleteLength]; 26 26 for (int index = 0; index < palleteLength - 1; index++) ··· 28 28 29 29 for (int counter = 0; counter < offset; counter++) { 30 30 indexBuffer.currentPosition += 2; 31 - dataBuffer.currentPosition += indexBuffer.getUnsignedLEShort() * indexBuffer.getUnsignedLEShort(); 31 + dataBuffer.currentPosition += indexBuffer.getUnsignedBEShort() * indexBuffer.getUnsignedBEShort(); 32 32 indexBuffer.currentPosition++; 33 33 } 34 34 35 35 xDrawOffset = indexBuffer.getUnsignedByte(); 36 36 yDrawOffset = indexBuffer.getUnsignedByte(); 37 - width = indexBuffer.getUnsignedLEShort(); 38 - height = indexBuffer.getUnsignedLEShort(); 37 + width = indexBuffer.getUnsignedBEShort(); 38 + height = indexBuffer.getUnsignedBEShort(); 39 39 int type = indexBuffer.getUnsignedByte(); 40 40 int pixelLength = width * height; 41 41 pixels = new byte[pixelLength];
+8 -8
src/com/jagex/runescape/cache/media/SpotAnimation.java
··· 24 24 25 25 public static void load(Archive archive) { 26 26 Buffer buffer = new Buffer(archive.getFile("spotanim.dat")); 27 - SpotAnimation.spotAnimationCount = buffer.getUnsignedLEShort(); 27 + SpotAnimation.spotAnimationCount = buffer.getUnsignedBEShort(); 28 28 if (SpotAnimation.cache == null) 29 29 SpotAnimation.cache = new SpotAnimation[SpotAnimation.spotAnimationCount]; 30 30 for (int spotAnimation = 0; spotAnimation < spotAnimationCount; spotAnimation++) { ··· 42 42 if (attributeId == 0) 43 43 return; 44 44 if (attributeId == 1) 45 - modelId = buffer.getUnsignedLEShort(); 45 + modelId = buffer.getUnsignedBEShort(); 46 46 else if (attributeId == 2) { 47 - animationId = buffer.getUnsignedLEShort(); 47 + animationId = buffer.getUnsignedBEShort(); 48 48 if (AnimationSequence.animations != null) 49 49 sequences = AnimationSequence.animations[animationId]; 50 50 } else if (attributeId == 4) 51 - resizeXY = buffer.getUnsignedLEShort(); 51 + resizeXY = buffer.getUnsignedBEShort(); 52 52 else if (attributeId == 5) 53 - resizeZ = buffer.getUnsignedLEShort(); 53 + resizeZ = buffer.getUnsignedBEShort(); 54 54 else if (attributeId == 6) 55 - rotation = buffer.getUnsignedLEShort(); 55 + rotation = buffer.getUnsignedBEShort(); 56 56 else if (attributeId == 7) 57 57 modelLightFalloff = buffer.getUnsignedByte(); 58 58 else if (attributeId == 8) 59 59 modelLightAmbient = buffer.getUnsignedByte(); 60 60 else if (attributeId >= 40 && attributeId < 50) 61 - originalModelColors[attributeId - 40] = buffer.getUnsignedLEShort(); 61 + originalModelColors[attributeId - 40] = buffer.getUnsignedBEShort(); 62 62 else if (attributeId >= 50 && attributeId < 60) 63 - modifiedModelColors[attributeId - 50] = buffer.getUnsignedLEShort(); 63 + modifiedModelColors[attributeId - 50] = buffer.getUnsignedBEShort(); 64 64 else 65 65 System.out.println("Error unrecognised spotanim config code: " + attributeId); 66 66 }
+3 -3
src/com/jagex/runescape/cache/media/TypeFace.java
··· 58 58 public TypeFace(boolean monospace, Archive archive, String archiveName) { 59 59 Buffer dataBuffer = new Buffer(archive.getFile(archiveName + ".dat")); 60 60 Buffer indexBuffer = new Buffer(archive.getFile("index.dat")); 61 - indexBuffer.currentPosition = dataBuffer.getUnsignedLEShort() + 4; 61 + indexBuffer.currentPosition = dataBuffer.getUnsignedBEShort() + 4; 62 62 int k = indexBuffer.getUnsignedByte(); 63 63 if (k > 0) 64 64 indexBuffer.currentPosition += 3 * (k - 1); 65 65 for (int character = 0; character < 256; character++) { 66 66 characterXOffsets[character] = indexBuffer.getUnsignedByte(); 67 67 characterYOffsets[character] = indexBuffer.getUnsignedByte(); 68 - int characterWidth = characterWidths[character] = indexBuffer.getUnsignedLEShort(); 69 - int characterHeight = characterHeights[character] = indexBuffer.getUnsignedLEShort(); 68 + int characterWidth = characterWidths[character] = indexBuffer.getUnsignedBEShort(); 69 + int characterHeight = characterHeights[character] = indexBuffer.getUnsignedBEShort(); 70 70 int characterType = indexBuffer.getUnsignedByte(); 71 71 int characterSize = characterWidth * characterHeight; 72 72 characterPixels[character] = new byte[characterSize];
+19 -19
src/com/jagex/runescape/cache/media/Widget.java
··· 105 105 public static Widget forId(int id) { 106 106 if (interfaces[id] == null) { 107 107 Buffer buf = new Buffer(data[id]); 108 - int j = buf.getUnsignedLEShort(); 108 + int j = buf.getUnsignedBEShort(); 109 109 interfaces[id] = parse(j, buf, id); 110 110 } 111 111 return interfaces[id]; ··· 151 151 widget.parentId = parentId; 152 152 widget.type = buffer.getUnsignedByte(); 153 153 widget.actionType = buffer.getUnsignedByte(); 154 - widget.contentType = buffer.getUnsignedLEShort(); 155 - widget.width = buffer.getUnsignedLEShort(); 156 - widget.height = buffer.getUnsignedLEShort(); 154 + widget.contentType = buffer.getUnsignedBEShort(); 155 + widget.width = buffer.getUnsignedBEShort(); 156 + widget.height = buffer.getUnsignedBEShort(); 157 157 widget.alpha = (byte) buffer.getUnsignedByte(); 158 158 widget.hoveredPopup = buffer.getUnsignedByte(); 159 159 if (widget.hoveredPopup != 0) ··· 172 172 widget.conditionValues = new int[conditionCount]; 173 173 for (int condition = 0; condition < conditionCount; condition++) { 174 174 widget.conditionTypes[condition] = buffer.getUnsignedByte(); 175 - widget.conditionValues[condition] = buffer.getUnsignedLEShort(); 175 + widget.conditionValues[condition] = buffer.getUnsignedBEShort(); 176 176 } 177 177 178 178 } ··· 180 180 if (cs1length > 0) { 181 181 widget.cs1opcodes = new int[cs1length][]; 182 182 for (int blockIdx = 0; blockIdx < cs1length; blockIdx++) { 183 - int cs1blocklen = buffer.getUnsignedLEShort(); 183 + int cs1blocklen = buffer.getUnsignedBEShort(); 184 184 widget.cs1opcodes[blockIdx] = new int[cs1blocklen]; 185 185 for (int cs1opcIdx = 0; cs1opcIdx < cs1blocklen; cs1opcIdx++) 186 - widget.cs1opcodes[blockIdx][cs1opcIdx] = buffer.getUnsignedLEShort(); 186 + widget.cs1opcodes[blockIdx][cs1opcIdx] = buffer.getUnsignedBEShort(); 187 187 188 188 } 189 189 190 190 } 191 191 if (widget.type == 0) { 192 - widget.scrollLimit = buffer.getUnsignedLEShort(); 192 + widget.scrollLimit = buffer.getUnsignedBEShort(); 193 193 widget.hiddenUntilHovered = buffer.getUnsignedByte() == 1; 194 - int childrenCount = buffer.getUnsignedLEShort(); 194 + int childrenCount = buffer.getUnsignedBEShort(); 195 195 widget.children = new int[childrenCount]; 196 196 widget.childrenX = new int[childrenCount]; 197 197 widget.childrenY = new int[childrenCount]; 198 198 for (int child = 0; child < childrenCount; child++) { 199 - widget.children[child] = buffer.getUnsignedLEShort(); 199 + widget.children[child] = buffer.getUnsignedBEShort(); 200 200 widget.childrenX[child] = buffer.getSignedShort(); 201 201 widget.childrenY[child] = buffer.getSignedShort(); 202 202 } 203 203 204 204 } 205 205 if (widget.type == 1) { 206 - widget.unknownOne = buffer.getUnsignedLEShort(); 206 + widget.unknownOne = buffer.getUnsignedBEShort(); 207 207 widget.unknownTwo = buffer.getUnsignedByte() == 1; 208 208 } 209 209 if (widget.type == 2) { ··· 295 295 widget.enabledAnimation = (widgetIndex - 1 << 8) + buffer.getUnsignedByte(); 296 296 else 297 297 widget.enabledAnimation = -1; 298 - widget.zoom = buffer.getUnsignedLEShort(); 299 - widget.rotationX = buffer.getUnsignedLEShort(); 300 - widget.rotationY = buffer.getUnsignedLEShort(); 298 + widget.zoom = buffer.getUnsignedBEShort(); 299 + widget.rotationX = buffer.getUnsignedBEShort(); 300 + widget.rotationY = buffer.getUnsignedBEShort(); 301 301 } 302 302 if (widget.type == 7) { 303 303 widget.items = new int[widget.width * widget.height]; ··· 324 324 if (widget.actionType == 2 || widget.type == 2) { 325 325 widget.optionCircumfix = buffer.getString(); 326 326 widget.optionText = buffer.getString(); 327 - widget.optionAttributes = buffer.getUnsignedLEShort(); 327 + widget.optionAttributes = buffer.getUnsignedBEShort(); 328 328 } 329 329 if (widget.actionType == 1 || widget.actionType == 4 || widget.actionType == 5 || widget.actionType == 6) { 330 330 widget.tooltip = buffer.getString(); ··· 348 348 Widget.mediaArchive = mediaArchive; 349 349 Widget.fonts = fonts; 350 350 int parentId = -1; 351 - int widgetCount = buffer.getUnsignedLEShort(); 351 + int widgetCount = buffer.getUnsignedBEShort(); 352 352 interfaces = new Widget[widgetCount]; 353 353 data = new byte[widgetCount][]; 354 354 while (buffer.currentPosition < buffer.buffer.length) { 355 - int widgetIndex = buffer.getUnsignedLEShort(); 355 + int widgetIndex = buffer.getUnsignedBEShort(); 356 356 if (widgetIndex == 65535) { 357 - parentId = buffer.getUnsignedLEShort(); 358 - widgetIndex = buffer.getUnsignedLEShort(); 357 + parentId = buffer.getUnsignedBEShort(); 358 + widgetIndex = buffer.getUnsignedBEShort(); 359 359 } 360 360 int i1 = buffer.currentPosition; 361 361 Widget widget = parse(parentId, buffer, widgetIndex);
+6 -6
src/com/jagex/runescape/media/Animation.java
··· 24 24 public static void method236(byte[] bs) { 25 25 Buffer buffer = new Buffer(bs); 26 26 buffer.currentPosition = bs.length - 8; 27 - int i = buffer.getUnsignedLEShort(); 28 - int j = buffer.getUnsignedLEShort(); 29 - int k = buffer.getUnsignedLEShort(); 30 - int l = buffer.getUnsignedLEShort(); 27 + int i = buffer.getUnsignedBEShort(); 28 + int j = buffer.getUnsignedBEShort(); 29 + int k = buffer.getUnsignedBEShort(); 30 + int l = buffer.getUnsignedBEShort(); 31 31 int i1 = 0; 32 32 Buffer buffer_5_ = new Buffer(bs); 33 33 buffer_5_.currentPosition = i1; ··· 44 44 Buffer buffer_9_ = new Buffer(bs); 45 45 buffer_9_.currentPosition = i1; 46 46 Skins skins = new Skins(buffer_9_); 47 - int animationAmount = buffer_5_.getUnsignedLEShort(); 47 + int animationAmount = buffer_5_.getUnsignedBEShort(); 48 48 int ai[] = new int[500]; 49 49 int ai1[] = new int[500]; 50 50 int ai2[] = new int[500]; 51 51 int ai3[] = new int[500]; 52 52 for (int k1 = 0; k1 < animationAmount; k1++) { 53 - int l1 = buffer_5_.getUnsignedLEShort(); 53 + int l1 = buffer_5_.getUnsignedBEShort(); 54 54 Animation animation = cache[l1] = new Animation(); 55 55 animation.anInt431 = class50_sub1_sub2_4.getUnsignedByte(); 56 56 animation.animationSkins = skins;
+10 -10
src/com/jagex/runescape/media/renderable/Model.java
··· 124 124 buffer.currentPosition = modelData.length - 18; 125 125 ModelHeader modelHeader = modelHeaders[modelId] = new ModelHeader(); 126 126 modelHeader.modelData = modelData; 127 - modelHeader.vertexCount = buffer.getUnsignedLEShort(); 128 - modelHeader.triangleCount = buffer.getUnsignedLEShort(); 127 + modelHeader.vertexCount = buffer.getUnsignedBEShort(); 128 + modelHeader.triangleCount = buffer.getUnsignedBEShort(); 129 129 modelHeader.texturedTriangleCount = buffer.getUnsignedByte(); 130 130 int useTextures = buffer.getUnsignedByte(); 131 131 int useTrianglePriority = buffer.getUnsignedByte(); 132 132 int useTransparency = buffer.getUnsignedByte(); 133 133 int useTriangleSkinning = buffer.getUnsignedByte(); 134 134 int useVertexSkinning = buffer.getUnsignedByte(); 135 - int xDataLength = buffer.getUnsignedLEShort(); 136 - int yDataLength = buffer.getUnsignedLEShort(); 137 - int zDataLength = buffer.getUnsignedLEShort(); 138 - int triangleDataLength = buffer.getUnsignedLEShort(); 135 + int xDataLength = buffer.getUnsignedBEShort(); 136 + int yDataLength = buffer.getUnsignedBEShort(); 137 + int zDataLength = buffer.getUnsignedBEShort(); 138 + int triangleDataLength = buffer.getUnsignedBEShort(); 139 139 int offset = 0; 140 140 modelHeader.vertexDirectionOffset = offset; 141 141 offset += modelHeader.vertexCount; ··· 292 292 zDataOffsetBuffer.currentPosition = modelHeader.triangleAlphaOffset; 293 293 vertexSkinOffsetBuffer.currentPosition = modelHeader.triangleSkinOffset; 294 294 for (int l1 = 0; l1 < triangleCount; l1++) { 295 - triangleColorValues[l1] = vertexDirectionOffsetBuffer.getUnsignedLEShort(); 295 + triangleColorValues[l1] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 296 296 if (triangleDrawType != null) { 297 297 triangleDrawType[l1] = xDataOffsetBuffer.getUnsignedByte(); 298 298 } ··· 356 356 357 357 vertexDirectionOffsetBuffer.currentPosition = modelHeader.uvMapTriangleOffset; 358 358 for (int triangle = 0; triangle < texturedTriangleCount; triangle++) { 359 - texturedTrianglePointsX[triangle] = vertexDirectionOffsetBuffer.getUnsignedLEShort(); 360 - texturedTrianglePointsY[triangle] = vertexDirectionOffsetBuffer.getUnsignedLEShort(); 361 - texturedTrianglePointsZ[triangle] = vertexDirectionOffsetBuffer.getUnsignedLEShort(); 359 + texturedTrianglePointsX[triangle] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 360 + texturedTrianglePointsY[triangle] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 361 + texturedTrianglePointsZ[triangle] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 362 362 } 363 363 364 364 }
+9 -9
src/com/jagex/runescape/media/renderable/actor/Player.java
··· 276 276 int lowerByte = buffer.getUnsignedByte(); 277 277 appearance[index] = (upperByte << 8) + lowerByte; 278 278 if (index == 0 && appearance[0] == 65535) { 279 - npcDefinition = ActorDefinition.getDefinition(buffer.getUnsignedLEShort()); 279 + npcDefinition = ActorDefinition.getDefinition(buffer.getUnsignedBEShort()); 280 280 break; 281 281 } 282 282 if (appearance[index] >= 512 && appearance[index] - 512 < ItemDefinition.count) { ··· 293 293 appearanceColors[l] = j1; 294 294 } 295 295 296 - super.idleAnimation = buffer.getUnsignedLEShort(); 296 + super.idleAnimation = buffer.getUnsignedBEShort(); 297 297 if (super.idleAnimation == 65535) 298 298 super.idleAnimation = -1; 299 - super.standTurnAnimationId = buffer.getUnsignedLEShort(); 299 + super.standTurnAnimationId = buffer.getUnsignedBEShort(); 300 300 if (super.standTurnAnimationId == 65535) 301 301 super.standTurnAnimationId = -1; 302 - super.walkAnimationId = buffer.getUnsignedLEShort(); 302 + super.walkAnimationId = buffer.getUnsignedBEShort(); 303 303 if (super.walkAnimationId == 65535) 304 304 super.walkAnimationId = -1; 305 - super.turnAroundAnimationId = buffer.getUnsignedLEShort(); 305 + super.turnAroundAnimationId = buffer.getUnsignedBEShort(); 306 306 if (super.turnAroundAnimationId == 65535) 307 307 super.turnAroundAnimationId = -1; 308 - super.turnRightAnimationId = buffer.getUnsignedLEShort(); 308 + super.turnRightAnimationId = buffer.getUnsignedBEShort(); 309 309 if (super.turnRightAnimationId == 65535) 310 310 super.turnRightAnimationId = -1; 311 - super.turnLeftAnimationId = buffer.getUnsignedLEShort(); 311 + super.turnLeftAnimationId = buffer.getUnsignedBEShort(); 312 312 if (super.turnLeftAnimationId == 65535) 313 313 super.turnLeftAnimationId = -1; 314 - super.runAnimationId = buffer.getUnsignedLEShort(); 314 + super.runAnimationId = buffer.getUnsignedBEShort(); 315 315 if (super.runAnimationId == 65535) 316 316 super.runAnimationId = -1; 317 317 playerName = TextUtils.formatName(TextUtils.longToName(buffer.getLong())); 318 318 combatLevel = buffer.getUnsignedByte(); 319 - skillLevel = buffer.getUnsignedLEShort(); 319 + skillLevel = buffer.getUnsignedBEShort(); 320 320 visible = true; 321 321 appearanceHash = 0L; 322 322 int k1 = appearance[5];
+4 -4
src/com/jagex/runescape/net/Buffer.java
··· 137 137 return buffer[currentPosition++]; 138 138 } 139 139 140 - public int getUnsignedLEShort() { 140 + public int getUnsignedBEShort() { 141 141 currentPosition += 2; 142 142 return ((buffer[currentPosition - 2] & 0xff) << 8) + (buffer[currentPosition - 1] & 0xff); 143 143 } ··· 218 218 if (peek < 128) 219 219 return getUnsignedByte() - 64; 220 220 else 221 - return getUnsignedLEShort() - 49152; 221 + return getUnsignedBEShort() - 49152; 222 222 } 223 223 224 224 public int getSmart() { ··· 226 226 if (peek < 128) 227 227 return getUnsignedByte(); 228 228 else 229 - return getUnsignedLEShort() - 32768; 229 + return getUnsignedBEShort() - 32768; 230 230 } 231 231 232 232 public void encrypt(BigInteger modulus, BigInteger key) { ··· 297 297 buffer[currentPosition++] = (byte) (value >> 8); 298 298 } 299 299 300 - public int getLEUnsignedShort() { 300 + public int getUnsignedLEShort() { 301 301 currentPosition += 2; 302 302 return ((buffer[currentPosition - 1] & 0xff) << 8) + (buffer[currentPosition - 2] & 0xff); 303 303 }
+5 -5
src/com/jagex/runescape/net/requester/OnDemandRequester.java
··· 438 438 fileVersions[version] = new int[versionCount]; 439 439 filePriorities[version] = new byte[versionCount]; 440 440 for (int file = 0; file < versionCount; file++) 441 - fileVersions[version][file] = buffer.getUnsignedLEShort(); 441 + fileVersions[version][file] = buffer.getUnsignedBEShort(); 442 442 443 443 } 444 444 ··· 470 470 regLandIndex = new int[count]; 471 471 regShouldPreload = new int[count]; 472 472 for (int reg = 0; reg < count; reg++) { 473 - regHash[reg] = buffer.getUnsignedLEShort(); 474 - regMapIndex[reg] = buffer.getUnsignedLEShort(); 475 - regLandIndex[reg] = buffer.getUnsignedLEShort(); 473 + regHash[reg] = buffer.getUnsignedBEShort(); 474 + regMapIndex[reg] = buffer.getUnsignedBEShort(); 475 + regLandIndex[reg] = buffer.getUnsignedBEShort(); 476 476 regShouldPreload[reg] = buffer.getUnsignedByte(); 477 477 } 478 478 ··· 481 481 count = data.length / 2; 482 482 animIndex = new int[count]; 483 483 for (int i = 0; i < count; i++) 484 - animIndex[i] = buffer.getUnsignedLEShort(); 484 + animIndex[i] = buffer.getUnsignedBEShort(); 485 485 486 486 data = archive.getFile("midi_index"); 487 487 buffer = new Buffer(data);
+6 -7
src/com/jagex/runescape/sound/SoundFilter.java
··· 1 1 package com.jagex.runescape.sound; 2 2 3 3 import com.jagex.runescape.net.Buffer; 4 - import com.jagex.runescape.sound.SoundTrackEnvelope; 5 4 6 5 public class SoundFilter { 7 6 ··· 75 74 numPairs[0] = numPair >> 4; 76 75 numPairs[1] = numPair & 0xf; 77 76 if (numPair != 0) { 78 - unity[0] = buffer.getUnsignedLEShort(); 79 - unity[1] = buffer.getUnsignedLEShort(); 77 + unity[0] = buffer.getUnsignedBEShort(); 78 + unity[1] = buffer.getUnsignedBEShort(); 80 79 int migrated = buffer.getUnsignedByte(); 81 80 for (int dir = 0; dir < 2; dir++) { 82 81 for (int term = 0; term < numPairs[dir]; term++) { 83 - pairPhase[dir][0][term] = buffer.getUnsignedLEShort(); 84 - magnitude[dir][0][term] = buffer.getUnsignedLEShort(); 82 + pairPhase[dir][0][term] = buffer.getUnsignedBEShort(); 83 + magnitude[dir][0][term] = buffer.getUnsignedBEShort(); 85 84 } 86 85 87 86 } ··· 89 88 for (int dir = 0; dir < 2; dir++) { 90 89 for (int term = 0; term < numPairs[dir]; term++) 91 90 if ((migrated & 1 << dir * 4 << term) != 0) { 92 - pairPhase[dir][1][term] = buffer.getUnsignedLEShort(); 93 - magnitude[dir][1][term] = buffer.getUnsignedLEShort(); 91 + pairPhase[dir][1][term] = buffer.getUnsignedBEShort(); 92 + magnitude[dir][1][term] = buffer.getUnsignedBEShort(); 94 93 } else { 95 94 pairPhase[dir][1][term] = pairPhase[dir][0][term]; 96 95 magnitude[dir][1][term] = magnitude[dir][0][term];
+3 -3
src/com/jagex/runescape/sound/SoundTrack.java
··· 25 25 SoundTrack.buffer = new Buffer(SoundTrack._buffer); 26 26 SoundTrackInstrument.decode(); 27 27 while (true) { 28 - int trackId = buffer.getUnsignedLEShort(); 28 + int trackId = buffer.getUnsignedBEShort(); 29 29 if (trackId == 65535) 30 30 return; 31 31 SoundTrack.tracks[trackId] = new SoundTrack(-524); ··· 53 53 } 54 54 } 55 55 56 - loopBegin = buffer.getUnsignedLEShort(); 57 - loopEnd = buffer.getUnsignedLEShort(); 56 + loopBegin = buffer.getUnsignedBEShort(); 57 + loopEnd = buffer.getUnsignedBEShort(); 58 58 } 59 59 60 60 public int delay() {
+2 -2
src/com/jagex/runescape/sound/SoundTrackEnvelope.java
··· 28 28 phaseDuration = new int[numPhases]; 29 29 phasePeak = new int[numPhases]; 30 30 for (int phase = 0; phase < numPhases; phase++) { 31 - phaseDuration[phase] = buffer.getUnsignedLEShort(); 32 - phasePeak[phase] = buffer.getUnsignedLEShort(); 31 + phaseDuration[phase] = buffer.getUnsignedBEShort(); 32 + phasePeak[phase] = buffer.getUnsignedBEShort(); 33 33 } 34 34 35 35 }
+2 -2
src/com/jagex/runescape/sound/SoundTrackInstrument.java
··· 266 266 267 267 delayTime = buffer.getSmart(); 268 268 delayFeedback = buffer.getSmart(); 269 - soundMillis = buffer.getUnsignedLEShort(); 270 - pauseMillis = buffer.getUnsignedLEShort(); 269 + soundMillis = buffer.getUnsignedBEShort(); 270 + pauseMillis = buffer.getUnsignedBEShort(); 271 271 filter = new SoundFilter(); 272 272 filterEnvelope = new SoundTrackEnvelope(); 273 273 filter.decode(filterEnvelope, buffer);