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.

getUnsignedBEShort -> getUnsignedLEShort

+218 -218
+44 -44
src/com/jagex/runescape/Game.java
··· 1983 1983 if (available > 1) { 1984 1984 gameConnection.read(buffer.buffer, 0, 2); 1985 1985 buffer.currentPosition = 0; 1986 - packetSize = buffer.getUnsignedBEShort(); 1986 + packetSize = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2002 + int interfaceId = buffer.getUnsignedShort(); 2003 2003 Widget widget = Widget.forId(interfaceId); 2004 2004 widget.xOffset = xOffset; 2005 2005 widget.yOffset = yOffset; ··· 2026 2026 return true; 2027 2027 } 2028 2028 if (opcode == 26) { 2029 - int k1 = buffer.getUnsignedBEShort(); 2029 + int k1 = buffer.getUnsignedShort(); 2030 2030 int k11 = buffer.getUnsignedByte(); 2031 - int i17 = buffer.getUnsignedBEShort(); 2031 + int i17 = buffer.getUnsignedShort(); 2032 2032 if (i17 == 65535) { 2033 2033 if (currentSound < 50) { 2034 2034 sound[currentSound] = (short) k1; ··· 2085 2085 return true; 2086 2086 } 2087 2087 if (opcode == 109) { 2088 - int k2 = buffer.getUnsignedBEShort(); 2088 + int k2 = buffer.getUnsignedShort(); 2089 2089 method112((byte) 36, k2); 2090 2090 if (openInvOverLayId != -1) { 2091 2091 method44(openInvOverLayId); ··· 2151 2151 return true; 2152 2152 } 2153 2153 if (opcode == 218) { // set interface colour(?) 2154 - int interfaceId = buffer.getUnsignedBEShort(); 2154 + int interfaceId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2196 + anInt1226 = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2220 - anInt845 = buffer.getUnsignedBEShort(); 2219 + anInt844 = buffer.getUnsignedShort(); 2220 + anInt845 = buffer.getUnsignedShort(); 2221 2221 anInt846 = buffer.getUnsignedByte(); 2222 2222 } 2223 2223 if (headIconDrawType == 10) 2224 - otherPlayerId = buffer.getUnsignedBEShort(); 2224 + otherPlayerId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2232 + anInt995 = buffer.getUnsignedShort(); 2233 2233 anInt996 = buffer.getUnsignedByte(); 2234 2234 anInt997 = buffer.getUnsignedByte(); 2235 2235 if (anInt997 >= 100) { ··· 2305 2305 if (opcode == 76) { // open welcome screen 2306 2306 anInt1083 = buffer.getUnsignedLEShort(); 2307 2307 anInt1075 = buffer.getLittleShortA(); 2308 - buffer.getUnsignedBEShort(); 2309 - anInt1208 = buffer.getUnsignedBEShort(); 2308 + buffer.getUnsignedShort(); 2309 + anInt1208 = buffer.getUnsignedShort(); 2310 2310 anInt1170 = buffer.getUnsignedLEShort(); 2311 2311 anInt1273 = buffer.getShortUnsingedAdded(); 2312 2312 anInt1215 = buffer.getShortUnsingedAdded(); 2313 - anInt992 = buffer.getUnsignedBEShort(); 2313 + anInt992 = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2383 + int interfaceId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2455 + int interfaceId = buffer.getUnsignedShort(); 2456 2456 Widget inter = Widget.forId(interfaceId); 2457 2457 while (buffer.currentPosition < packetSize) { 2458 2458 int slot = buffer.getSmart(); 2459 - int id = buffer.getUnsignedBEShort(); 2459 + int id = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2708 + int interfaceId = buffer.getUnsignedShort(); 2709 2709 Widget inter = Widget.forId(interfaceId); 2710 - int items = buffer.getUnsignedBEShort(); 2710 + int items = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 2731 + tmpChunkY = buffer.getUnsignedShort(); 2732 2732 tmpChunkX = buffer.getLittleShortA(); 2733 2733 aBoolean1163 = false; 2734 2734 } ··· 2947 2947 return true; 2948 2948 } 2949 2949 if (opcode == 21) { // show a model on an interface?? 2950 - int scale = buffer.getUnsignedBEShort(); 2950 + int scale = buffer.getUnsignedShort(); 2951 2951 int itemId = buffer.getUnsignedLEShort(); 2952 2952 int interfaceId = buffer.getLittleShortA(); 2953 2953 if (itemId == 65535) { ··· 2969 2969 cutsceneActive = true; 2970 2970 anInt874 = buffer.getUnsignedByte(); 2971 2971 anInt875 = buffer.getUnsignedByte(); 2972 - anInt876 = buffer.getUnsignedBEShort(); 2972 + anInt876 = buffer.getUnsignedShort(); 2973 2973 anInt877 = buffer.getUnsignedByte(); 2974 2974 anInt878 = buffer.getUnsignedByte(); 2975 2975 if (anInt878 >= 100) { ··· 3100 3100 return true; 3101 3101 } 3102 3102 if (opcode == 18) { 3103 - int l9 = buffer.getUnsignedBEShort(); 3103 + int l9 = buffer.getUnsignedShort(); 3104 3104 int interfaceId = buffer.getShortUnsingedAdded(); 3105 3105 int l21 = buffer.getUnsignedLEShort(); 3106 3106 Widget.forId(interfaceId).anInt218 = (l9 << 16) + l21; ··· 3134 3134 return true; 3135 3135 } 3136 3136 if (opcode == 200) { 3137 - int interfaceId = buffer.getUnsignedBEShort(); 3137 + int interfaceId = buffer.getUnsignedShort(); 3138 3138 int scrollPosition = buffer.getLittleShortA(); 3139 3139 Widget widget = Widget.forId(interfaceId); 3140 3140 if (widget != null && widget.type == 0) { ··· 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.getUnsignedBEShort(); 4618 + class50_sub1_sub4_sub3_sub1.graphic = class50_sub1_sub2.getUnsignedShort(); 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); ··· 4635 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.getUnsignedBEShort(); 4638 + int l1 = class50_sub1_sub2.getUnsignedShort(); 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.getUnsignedBEShort(); 4677 + int animation = buffer.getUnsignedShort(); 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.getUnsignedBEShort() + pulseCycle; 4727 + player.anInt1606 = buffer.getUnsignedShort() + 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.getUnsignedBEShort(); 4743 - player.anInt1599 = buffer.getUnsignedBEShort(); 4742 + player.anInt1598 = buffer.getUnsignedShort(); 4743 + player.anInt1599 = buffer.getUnsignedShort(); 4744 4744 } 4745 4745 4746 4746 if ((mask & 0x200) != 0) { ··· 4782 4782 } 4783 4783 4784 4784 if ((mask & 0x40) != 0) { 4785 - int effectsAndColour = buffer.getUnsignedBEShort(); 4785 + int effectsAndColour = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 10496 + int objectId = buf.getUnsignedShort(); 10497 10497 int j3 = buf.getUnsignedByte(); 10498 10498 int modelType = j3 >> 2; 10499 10499 int modelOrientation = j3 & 3; ··· 10507 10507 int id = buf.getUnsignedLEShort(); 10508 10508 byte byte2 = buf.getSignedByte(); 10509 10509 byte byte3 = buf.getSignedByteAdded(); 10510 - int startDelay = buf.getUnsignedBEShort(); 10510 + int startDelay = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10574 + int i1 = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10626 + int id = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10647 - int amount = buf.getUnsignedBEShort(); 10648 - int newAmount = buf.getUnsignedBEShort(); 10646 + int id = buf.getUnsignedShort(); 10647 + int amount = buf.getUnsignedShort(); 10648 + int newAmount = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10671 + int k16 = buf.getUnsignedShort(); 10672 10672 int i18 = buf.getUnsignedByte() * 4; 10673 10673 int i19 = buf.getUnsignedByte() * 4; 10674 - int k19 = buf.getUnsignedBEShort(); 10675 - int j20 = buf.getUnsignedBEShort(); 10674 + int k19 = buf.getUnsignedShort(); 10675 + int j20 = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10696 + int soundId = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 10715 + int k10 = buf.getUnsignedShort(); 10716 10716 int j13 = buf.getUnsignedByte(); 10717 - int j15 = buf.getUnsignedBEShort(); 10717 + int j15 = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 36 + dataSize = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 75 + fragments[index] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 17 + count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 40 + configId = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 28 + count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 61 + anInt712 = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 74 + modelIds[model] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 83 + standAnimationId = buffer.getUnsignedShort(); 84 84 else if (attributeId == 14) 85 - walkAnimationId = buffer.getUnsignedBEShort(); 85 + walkAnimationId = buffer.getUnsignedShort(); 86 86 else if (attributeId == 17) { 87 - walkAnimationId = buffer.getUnsignedBEShort(); 88 - turnAroundAnimationId = buffer.getUnsignedBEShort(); 89 - turnRightAnimationId = buffer.getUnsignedBEShort(); 90 - turnLeftAnimationId = buffer.getUnsignedBEShort(); 87 + walkAnimationId = buffer.getUnsignedShort(); 88 + turnAroundAnimationId = buffer.getUnsignedShort(); 89 + turnRightAnimationId = buffer.getUnsignedShort(); 90 + turnLeftAnimationId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 103 - originalModelColors[colour] = buffer.getUnsignedBEShort(); 102 + modifiedModelColors[colour] = buffer.getUnsignedShort(); 103 + originalModelColors[colour] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 110 + headModelIndexes[model] = buffer.getUnsignedShort(); 111 111 112 112 } else if (attributeId == 90) 113 - anInt648 = buffer.getUnsignedBEShort(); 113 + anInt648 = buffer.getUnsignedShort(); 114 114 else if (attributeId == 91) 115 - anInt627 = buffer.getUnsignedBEShort(); 115 + anInt627 = buffer.getUnsignedShort(); 116 116 else if (attributeId == 92) 117 - anInt637 = buffer.getUnsignedBEShort(); 117 + anInt637 = buffer.getUnsignedShort(); 118 118 else if (attributeId == 93) 119 119 minimapVisible = false; 120 120 else if (attributeId == 95) 121 - combatLevel = buffer.getUnsignedBEShort(); 121 + combatLevel = buffer.getUnsignedShort(); 122 122 else if (attributeId == 97) 123 - sizeXZ = buffer.getUnsignedBEShort(); 123 + sizeXZ = buffer.getUnsignedShort(); 124 124 else if (attributeId == 98) 125 - sizeY = buffer.getUnsignedBEShort(); 125 + sizeY = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 133 + headIcon = buffer.getUnsignedShort(); 134 134 else if (attributeId == 103) 135 - degreesToTurn = buffer.getUnsignedBEShort(); 135 + degreesToTurn = buffer.getUnsignedShort(); 136 136 else if (attributeId == 106) { 137 - varBitId = buffer.getUnsignedBEShort(); 137 + varBitId = buffer.getUnsignedShort(); 138 138 if (varBitId == 65535) 139 139 varBitId = -1; 140 - settingId = buffer.getUnsignedBEShort(); 140 + settingId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 146 + childrenIds[child] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 217 + size = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 222 + offset += buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 27 + count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 148 + definitionCount = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 153 + offset += buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 288 + modelIds[k1] = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 309 + modelIds[l1] = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 342 + animationId = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 364 - anIntArray792[i2] = buf.getUnsignedBEShort(); 363 + modifiedModelColors[i2] = buf.getUnsignedShort(); 364 + anIntArray792[i2] = buf.getUnsignedShort(); 365 365 } 366 366 367 367 break; 368 368 case 60: 369 - icon = buf.getUnsignedBEShort(); 369 + icon = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 378 + modelSizeX = buf.getUnsignedShort(); 379 379 break; 380 380 case 66: 381 - modelSizeY = buf.getUnsignedBEShort(); 381 + modelSizeY = buf.getUnsignedShort(); 382 382 break; 383 383 case 67: 384 - modelSizeZ = buf.getUnsignedBEShort(); 384 + modelSizeZ = buf.getUnsignedShort(); 385 385 break; 386 386 case 68: 387 - anInt795 = buf.getUnsignedBEShort(); 387 + anInt795 = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 422 + varbitId = buf.getUnsignedShort(); 423 423 if (varbitId == 65535) 424 424 varbitId = -1; 425 - configId = buf.getUnsignedBEShort(); 425 + configId = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 431 + childrenIds[j2] = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 194 + count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 199 + index += buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 279 + modelId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 285 + modelScale = buffer.getUnsignedShort(); 286 286 else if (opcode == 5) 287 - modelRotationX = buffer.getUnsignedBEShort(); 287 + modelRotationX = buffer.getUnsignedShort(); 288 288 else if (opcode == 6) 289 - modelRotationY = buffer.getUnsignedBEShort(); 289 + modelRotationY = buffer.getUnsignedShort(); 290 290 else if (opcode == 7) { 291 - modelOffsetX = buffer.getUnsignedBEShort(); 291 + modelOffsetX = buffer.getUnsignedShort(); 292 292 if (modelOffsetX > 32767) 293 293 modelOffsetX -= 0x10000; 294 294 } else if (opcode == 8) { 295 - modelOffsetY = buffer.getUnsignedBEShort(); 295 + modelOffsetY = buffer.getUnsignedShort(); 296 296 if (modelOffsetY > 32767) 297 297 modelOffsetY -= 0x10000; 298 298 } else if (opcode == 10) 299 - buffer.getUnsignedBEShort(); // Dummy 299 + buffer.getUnsignedShort(); // 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.getUnsignedBEShort(); 307 + primaryMaleModel = buffer.getUnsignedShort(); 308 308 maleTranslation = buffer.getSignedByte(); 309 309 } else if (opcode == 24) 310 - secondaryMaleModel = buffer.getUnsignedBEShort(); 310 + secondaryMaleModel = buffer.getUnsignedShort(); 311 311 else if (opcode == 25) { 312 - primaryFemaleModel = buffer.getUnsignedBEShort(); 312 + primaryFemaleModel = buffer.getUnsignedShort(); 313 313 femaleTranslation = buffer.getSignedByte(); 314 314 } else if (opcode == 26) 315 - secondaryFemaleModel = buffer.getUnsignedBEShort(); 315 + secondaryFemaleModel = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 332 - destColors[k] = buffer.getUnsignedBEShort(); 331 + originalColours[k] = buffer.getUnsignedShort(); 332 + destColors[k] = buffer.getUnsignedShort(); 333 333 } 334 334 335 335 } else if (opcode == 78) 336 - tertiaryMaleEquipmentModel = buffer.getUnsignedBEShort(); 336 + tertiaryMaleEquipmentModel = buffer.getUnsignedShort(); 337 337 else if (opcode == 79) 338 - tertiaryFemaleEquipmentModel = buffer.getUnsignedBEShort(); 338 + tertiaryFemaleEquipmentModel = buffer.getUnsignedShort(); 339 339 else if (opcode == 90) 340 - primaryMaleHeadPiece = buffer.getUnsignedBEShort(); 340 + primaryMaleHeadPiece = buffer.getUnsignedShort(); 341 341 else if (opcode == 91) 342 - primaryFemaleHeadPiece = buffer.getUnsignedBEShort(); 342 + primaryFemaleHeadPiece = buffer.getUnsignedShort(); 343 343 else if (opcode == 92) 344 - secondaryMaleHeadPiece = buffer.getUnsignedBEShort(); 344 + secondaryMaleHeadPiece = buffer.getUnsignedShort(); 345 345 else if (opcode == 93) 346 - secondaryFemaleHeadPiece = buffer.getUnsignedBEShort(); 346 + secondaryFemaleHeadPiece = buffer.getUnsignedShort(); 347 347 else if (opcode == 95) 348 - anInt339 = buffer.getUnsignedBEShort(); 348 + anInt339 = buffer.getUnsignedShort(); 349 349 else if (opcode == 97) 350 - notedInfoId = buffer.getUnsignedBEShort(); 350 + notedInfoId = buffer.getUnsignedShort(); 351 351 else if (opcode == 98) 352 - notedTemplateId = buffer.getUnsignedBEShort(); 352 + notedTemplateId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 359 - stackAmounts[opcode - 100] = buffer.getUnsignedBEShort(); 358 + stackIds[opcode - 100] = buffer.getUnsignedShort(); 359 + stackAmounts[opcode - 100] = buffer.getUnsignedShort(); 360 360 } else if (opcode == 110) 361 - groundScaleX = buffer.getUnsignedBEShort(); 361 + groundScaleX = buffer.getUnsignedShort(); 362 362 else if (opcode == 111) 363 - groundScaleY = buffer.getUnsignedBEShort(); 363 + groundScaleY = buffer.getUnsignedShort(); 364 364 else if (opcode == 112) 365 - groundScaleZ = buffer.getUnsignedBEShort(); 365 + groundScaleZ = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 28 + AnimationSequence.count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 63 - frame1Ids[frame] = buf.getUnsignedBEShort(); 62 + getPrimaryFrame[frame] = buf.getUnsignedShort(); 63 + frame1Ids[frame] = buf.getUnsignedShort(); 64 64 if (frame1Ids[frame] == 65535) 65 65 frame1Ids[frame] = -1; 66 - frameLenghts[frame] = buf.getUnsignedBEShort(); 66 + frameLenghts[frame] = buf.getUnsignedShort(); 67 67 } 68 68 69 69 break; 70 70 case 2: 71 - frameStep = buf.getUnsignedBEShort(); 71 + frameStep = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 88 + getPlayerShieldDelta = buf.getUnsignedShort(); 89 89 break; 90 90 case 7: 91 - getPlayerWeaponDelta = buf.getUnsignedBEShort(); 91 + getPlayerWeaponDelta = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 20 + IdentityKit.count = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 41 + modelId[model] = buffer.getUnsignedShort(); 42 42 } else if (attributeId == 3) 43 43 widgetDisplayed = true; 44 44 else if (attributeId >= 40 && attributeId < 50) 45 - originalModelColors[attributeId - 40] = buffer.getUnsignedBEShort(); 45 + originalModelColors[attributeId - 40] = buffer.getUnsignedShort(); 46 46 else if (attributeId >= 50 && attributeId < 60) 47 - modifiedModelColors[attributeId - 50] = buffer.getUnsignedBEShort(); 47 + modifiedModelColors[attributeId - 50] = buffer.getUnsignedShort(); 48 48 else if (attributeId >= 60 && attributeId < 70) 49 - headModelIds[attributeId - 60] = buffer.getUnsignedBEShort(); 49 + headModelIds[attributeId - 60] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 57 - maxWidth = indexBuffer.getUnsignedBEShort(); 58 - maxHeight = indexBuffer.getUnsignedBEShort(); 56 + indexBuffer.currentPosition = dataBuffer.getUnsignedShort(); 57 + maxWidth = indexBuffer.getUnsignedShort(); 58 + maxHeight = indexBuffer.getUnsignedShort(); 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.getUnsignedBEShort() * indexBuffer.getUnsignedBEShort(); 69 + dataBuffer.currentPosition += indexBuffer.getUnsignedShort() * indexBuffer.getUnsignedShort(); 70 70 indexBuffer.currentPosition++; 71 71 } 72 72 73 73 offsetX = indexBuffer.getUnsignedByte(); 74 74 offsetY = indexBuffer.getUnsignedByte(); 75 - width = indexBuffer.getUnsignedBEShort(); 76 - height = indexBuffer.getUnsignedBEShort(); 75 + width = indexBuffer.getUnsignedShort(); 76 + height = indexBuffer.getUnsignedShort(); 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.getUnsignedBEShort(); 22 - maxWidth = indexBuffer.getUnsignedBEShort(); 23 - maxHeight = indexBuffer.getUnsignedBEShort(); 21 + indexBuffer.currentPosition = dataBuffer.getUnsignedShort(); 22 + maxWidth = indexBuffer.getUnsignedShort(); 23 + maxHeight = indexBuffer.getUnsignedShort(); 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.getUnsignedBEShort() * indexBuffer.getUnsignedBEShort(); 31 + dataBuffer.currentPosition += indexBuffer.getUnsignedShort() * indexBuffer.getUnsignedShort(); 32 32 indexBuffer.currentPosition++; 33 33 } 34 34 35 35 xDrawOffset = indexBuffer.getUnsignedByte(); 36 36 yDrawOffset = indexBuffer.getUnsignedByte(); 37 - width = indexBuffer.getUnsignedBEShort(); 38 - height = indexBuffer.getUnsignedBEShort(); 37 + width = indexBuffer.getUnsignedShort(); 38 + height = indexBuffer.getUnsignedShort(); 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.getUnsignedBEShort(); 27 + SpotAnimation.spotAnimationCount = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 45 + modelId = buffer.getUnsignedShort(); 46 46 else if (attributeId == 2) { 47 - animationId = buffer.getUnsignedBEShort(); 47 + animationId = buffer.getUnsignedShort(); 48 48 if (AnimationSequence.animations != null) 49 49 sequences = AnimationSequence.animations[animationId]; 50 50 } else if (attributeId == 4) 51 - resizeXY = buffer.getUnsignedBEShort(); 51 + resizeXY = buffer.getUnsignedShort(); 52 52 else if (attributeId == 5) 53 - resizeZ = buffer.getUnsignedBEShort(); 53 + resizeZ = buffer.getUnsignedShort(); 54 54 else if (attributeId == 6) 55 - rotation = buffer.getUnsignedBEShort(); 55 + rotation = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 61 + originalModelColors[attributeId - 40] = buffer.getUnsignedShort(); 62 62 else if (attributeId >= 50 && attributeId < 60) 63 - modifiedModelColors[attributeId - 50] = buffer.getUnsignedBEShort(); 63 + modifiedModelColors[attributeId - 50] = buffer.getUnsignedShort(); 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.getUnsignedBEShort() + 4; 61 + indexBuffer.currentPosition = dataBuffer.getUnsignedShort() + 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.getUnsignedBEShort(); 69 - int characterHeight = characterHeights[character] = indexBuffer.getUnsignedBEShort(); 68 + int characterWidth = characterWidths[character] = indexBuffer.getUnsignedShort(); 69 + int characterHeight = characterHeights[character] = indexBuffer.getUnsignedShort(); 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.getUnsignedBEShort(); 108 + int j = buf.getUnsignedShort(); 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.getUnsignedBEShort(); 155 - widget.width = buffer.getUnsignedBEShort(); 156 - widget.height = buffer.getUnsignedBEShort(); 154 + widget.contentType = buffer.getUnsignedShort(); 155 + widget.width = buffer.getUnsignedShort(); 156 + widget.height = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 175 + widget.conditionValues[condition] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 183 + int cs1blocklen = buffer.getUnsignedShort(); 184 184 widget.cs1opcodes[blockIdx] = new int[cs1blocklen]; 185 185 for (int cs1opcIdx = 0; cs1opcIdx < cs1blocklen; cs1opcIdx++) 186 - widget.cs1opcodes[blockIdx][cs1opcIdx] = buffer.getUnsignedBEShort(); 186 + widget.cs1opcodes[blockIdx][cs1opcIdx] = buffer.getUnsignedShort(); 187 187 188 188 } 189 189 190 190 } 191 191 if (widget.type == 0) { 192 - widget.scrollLimit = buffer.getUnsignedBEShort(); 192 + widget.scrollLimit = buffer.getUnsignedShort(); 193 193 widget.hiddenUntilHovered = buffer.getUnsignedByte() == 1; 194 - int childrenCount = buffer.getUnsignedBEShort(); 194 + int childrenCount = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 199 + widget.children[child] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 206 + widget.unknownOne = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 299 - widget.rotationX = buffer.getUnsignedBEShort(); 300 - widget.rotationY = buffer.getUnsignedBEShort(); 298 + widget.zoom = buffer.getUnsignedShort(); 299 + widget.rotationX = buffer.getUnsignedShort(); 300 + widget.rotationY = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 327 + widget.optionAttributes = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 351 + int widgetCount = buffer.getUnsignedShort(); 352 352 interfaces = new Widget[widgetCount]; 353 353 data = new byte[widgetCount][]; 354 354 while (buffer.currentPosition < buffer.buffer.length) { 355 - int widgetIndex = buffer.getUnsignedBEShort(); 355 + int widgetIndex = buffer.getUnsignedShort(); 356 356 if (widgetIndex == 65535) { 357 - parentId = buffer.getUnsignedBEShort(); 358 - widgetIndex = buffer.getUnsignedBEShort(); 357 + parentId = buffer.getUnsignedShort(); 358 + widgetIndex = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 28 - int j = buffer.getUnsignedBEShort(); 29 - int k = buffer.getUnsignedBEShort(); 30 - int l = buffer.getUnsignedBEShort(); 27 + int i = buffer.getUnsignedShort(); 28 + int j = buffer.getUnsignedShort(); 29 + int k = buffer.getUnsignedShort(); 30 + int l = buffer.getUnsignedShort(); 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_.getUnsignedBEShort(); 47 + int animationAmount = buffer_5_.getUnsignedShort(); 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_.getUnsignedBEShort(); 53 + int l1 = buffer_5_.getUnsignedShort(); 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.getUnsignedBEShort(); 128 - modelHeader.triangleCount = buffer.getUnsignedBEShort(); 127 + modelHeader.vertexCount = buffer.getUnsignedShort(); 128 + modelHeader.triangleCount = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 136 - int yDataLength = buffer.getUnsignedBEShort(); 137 - int zDataLength = buffer.getUnsignedBEShort(); 138 - int triangleDataLength = buffer.getUnsignedBEShort(); 135 + int xDataLength = buffer.getUnsignedShort(); 136 + int yDataLength = buffer.getUnsignedShort(); 137 + int zDataLength = buffer.getUnsignedShort(); 138 + int triangleDataLength = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 295 + triangleColorValues[l1] = vertexDirectionOffsetBuffer.getUnsignedShort(); 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.getUnsignedBEShort(); 360 - texturedTrianglePointsY[triangle] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 361 - texturedTrianglePointsZ[triangle] = vertexDirectionOffsetBuffer.getUnsignedBEShort(); 359 + texturedTrianglePointsX[triangle] = vertexDirectionOffsetBuffer.getUnsignedShort(); 360 + texturedTrianglePointsY[triangle] = vertexDirectionOffsetBuffer.getUnsignedShort(); 361 + texturedTrianglePointsZ[triangle] = vertexDirectionOffsetBuffer.getUnsignedShort(); 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.getUnsignedBEShort()); 279 + npcDefinition = ActorDefinition.getDefinition(buffer.getUnsignedShort()); 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.getUnsignedBEShort(); 296 + super.idleAnimation = buffer.getUnsignedShort(); 297 297 if (super.idleAnimation == 65535) 298 298 super.idleAnimation = -1; 299 - super.standTurnAnimationId = buffer.getUnsignedBEShort(); 299 + super.standTurnAnimationId = buffer.getUnsignedShort(); 300 300 if (super.standTurnAnimationId == 65535) 301 301 super.standTurnAnimationId = -1; 302 - super.walkAnimationId = buffer.getUnsignedBEShort(); 302 + super.walkAnimationId = buffer.getUnsignedShort(); 303 303 if (super.walkAnimationId == 65535) 304 304 super.walkAnimationId = -1; 305 - super.turnAroundAnimationId = buffer.getUnsignedBEShort(); 305 + super.turnAroundAnimationId = buffer.getUnsignedShort(); 306 306 if (super.turnAroundAnimationId == 65535) 307 307 super.turnAroundAnimationId = -1; 308 - super.turnRightAnimationId = buffer.getUnsignedBEShort(); 308 + super.turnRightAnimationId = buffer.getUnsignedShort(); 309 309 if (super.turnRightAnimationId == 65535) 310 310 super.turnRightAnimationId = -1; 311 - super.turnLeftAnimationId = buffer.getUnsignedBEShort(); 311 + super.turnLeftAnimationId = buffer.getUnsignedShort(); 312 312 if (super.turnLeftAnimationId == 65535) 313 313 super.turnLeftAnimationId = -1; 314 - super.runAnimationId = buffer.getUnsignedBEShort(); 314 + super.runAnimationId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 319 + skillLevel = buffer.getUnsignedShort(); 320 320 visible = true; 321 321 appearanceHash = 0L; 322 322 int k1 = appearance[5];
+3 -3
src/com/jagex/runescape/net/Buffer.java
··· 137 137 return buffer[currentPosition++]; 138 138 } 139 139 140 - public int getUnsignedBEShort() { 140 + public int getUnsignedShort() { 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 getUnsignedBEShort() - 49152; 221 + return getUnsignedShort() - 49152; 222 222 } 223 223 224 224 public int getSmart() { ··· 226 226 if (peek < 128) 227 227 return getUnsignedByte(); 228 228 else 229 - return getUnsignedBEShort() - 32768; 229 + return getUnsignedShort() - 32768; 230 230 } 231 231 232 232 public void encrypt(BigInteger modulus, BigInteger key) {
+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.getUnsignedBEShort(); 441 + fileVersions[version][file] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 474 - regMapIndex[reg] = buffer.getUnsignedBEShort(); 475 - regLandIndex[reg] = buffer.getUnsignedBEShort(); 473 + regHash[reg] = buffer.getUnsignedShort(); 474 + regMapIndex[reg] = buffer.getUnsignedShort(); 475 + regLandIndex[reg] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 484 + animIndex[i] = buffer.getUnsignedShort(); 485 485 486 486 data = archive.getFile("midi_index"); 487 487 buffer = new Buffer(data);
+6 -6
src/com/jagex/runescape/sound/SoundFilter.java
··· 74 74 numPairs[0] = numPair >> 4; 75 75 numPairs[1] = numPair & 0xf; 76 76 if (numPair != 0) { 77 - unity[0] = buffer.getUnsignedBEShort(); 78 - unity[1] = buffer.getUnsignedBEShort(); 77 + unity[0] = buffer.getUnsignedShort(); 78 + unity[1] = buffer.getUnsignedShort(); 79 79 int migrated = buffer.getUnsignedByte(); 80 80 for (int dir = 0; dir < 2; dir++) { 81 81 for (int term = 0; term < numPairs[dir]; term++) { 82 - pairPhase[dir][0][term] = buffer.getUnsignedBEShort(); 83 - magnitude[dir][0][term] = buffer.getUnsignedBEShort(); 82 + pairPhase[dir][0][term] = buffer.getUnsignedShort(); 83 + magnitude[dir][0][term] = buffer.getUnsignedShort(); 84 84 } 85 85 86 86 } ··· 88 88 for (int dir = 0; dir < 2; dir++) { 89 89 for (int term = 0; term < numPairs[dir]; term++) 90 90 if ((migrated & 1 << dir * 4 << term) != 0) { 91 - pairPhase[dir][1][term] = buffer.getUnsignedBEShort(); 92 - magnitude[dir][1][term] = buffer.getUnsignedBEShort(); 91 + pairPhase[dir][1][term] = buffer.getUnsignedShort(); 92 + magnitude[dir][1][term] = buffer.getUnsignedShort(); 93 93 } else { 94 94 pairPhase[dir][1][term] = pairPhase[dir][0][term]; 95 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.getUnsignedBEShort(); 28 + int trackId = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 57 - loopEnd = buffer.getUnsignedBEShort(); 56 + loopBegin = buffer.getUnsignedShort(); 57 + loopEnd = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 32 - phasePeak[phase] = buffer.getUnsignedBEShort(); 31 + phaseDuration[phase] = buffer.getUnsignedShort(); 32 + phasePeak[phase] = buffer.getUnsignedShort(); 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.getUnsignedBEShort(); 270 - pauseMillis = buffer.getUnsignedBEShort(); 269 + soundMillis = buffer.getUnsignedShort(); 270 + pauseMillis = buffer.getUnsignedShort(); 271 271 filter = new SoundFilter(); 272 272 filterEnvelope = new SoundTrackEnvelope(); 273 273 filter.decode(filterEnvelope, buffer);