Buffer documentation

This commit is contained in:
thedaneeffect committed 2021-03-10 05:07:29 -05:00
1 parent def89acd40
commit 1a86f73807
28 files changed
+1243 -1209

No files matched your search

+12 -12
View File
@@ -17,29 +17,29 @@ public class BitmapFont extends Draw2D {
public boolean aBoolean1499 = false;
public BitmapFont(boolean flag, String s, FileArchive archive) {
Buffer buffer = new Buffer(archive.read(s + ".dat", null));
Buffer buffer_1 = new Buffer(archive.read("index.dat", null));
buffer_1.position = buffer.get2U() + 4;
int k = buffer_1.get1U();
Packet packet = new Packet(archive.read(s + ".dat", null));
Packet packet_1 = new Packet(archive.read("index.dat", null));
packet_1.position = packet.get2U() + 4;
int k = packet_1.get1U();
if (k > 0) {
buffer_1.position += 3 * (k - 1);
packet_1.position += 3 * (k - 1);
}
for (int l = 0; l < 256; l++) {
anIntArray1494[l] = buffer_1.get1U();
anIntArray1495[l] = buffer_1.get1U();
int i1 = anIntArray1492[l] = buffer_1.get2U();
int j1 = anIntArray1493[l] = buffer_1.get2U();
int k1 = buffer_1.get1U();
anIntArray1494[l] = packet_1.get1U();
anIntArray1495[l] = packet_1.get1U();
int i1 = anIntArray1492[l] = packet_1.get2U();
int j1 = anIntArray1493[l] = packet_1.get2U();
int k1 = packet_1.get1U();
int l1 = i1 * j1;
aByteArrayArray1491[l] = new byte[l1];
if (k1 == 0) {
for (int i2 = 0; i2 < l1; i2++) {
aByteArrayArray1491[l][i2] = buffer.get1();
aByteArrayArray1491[l][i2] = packet.get1();
}
} else if (k1 == 1) {
for (int j2 = 0; j2 < i1; j2++) {
for (int l2 = 0; l2 < j1; l2++) {
aByteArrayArray1491[l][j2 + (l2 * i1)] = buffer.get1();
aByteArrayArray1491[l][j2 + (l2 * i1)] = packet.get1();
}
}
}
+32 -32
View File
@@ -13,65 +13,65 @@ public class Censor {
public static int[] anIntArray625;
public static void method487(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("fragmentsenc.txt", null));
Buffer buffer_1 = new Buffer(archive.read("badenc.txt", null));
Buffer class30_sub2_sub2_2 = new Buffer(archive.read("domainenc.txt", null));
Buffer buffer_3 = new Buffer(archive.read("tldlist.txt", null));
method488(buffer, buffer_1, class30_sub2_sub2_2, buffer_3);
Packet packet = new Packet(archive.read("fragmentsenc.txt", null));
Packet packet_1 = new Packet(archive.read("badenc.txt", null));
Packet class30_sub2_sub2_2 = new Packet(archive.read("domainenc.txt", null));
Packet packet_3 = new Packet(archive.read("tldlist.txt", null));
method488(packet, packet_1, class30_sub2_sub2_2, packet_3);
}
public static void method488(Buffer buffer, Buffer buffer_1, Buffer class30_sub2_sub2_2, Buffer buffer_3) {
method490(buffer_1);
public static void method488(Packet packet, Packet packet_1, Packet class30_sub2_sub2_2, Packet packet_3) {
method490(packet_1);
method491(class30_sub2_sub2_2);
method492(buffer);
method489(buffer_3);
method492(packet);
method489(packet_3);
}
public static void method489(Buffer buffer) {
int i = buffer.get4();
public static void method489(Packet packet) {
int i = packet.get4();
aCharArrayArray624 = new char[i][];
anIntArray625 = new int[i];
for (int j = 0; j < i; j++) {
anIntArray625[j] = buffer.get1U();
char[] ac = new char[buffer.get1U()];
anIntArray625[j] = packet.get1U();
char[] ac = new char[packet.get1U()];
for (int k = 0; k < ac.length; k++) {
ac[k] = (char) buffer.get1U();
ac[k] = (char) packet.get1U();
}
aCharArrayArray624[j] = ac;
}
}
public static void method490(Buffer buffer) {
int j = buffer.get4();
public static void method490(Packet packet) {
int j = packet.get4();
aCharArrayArray621 = new char[j][];
aByteArrayArrayArray622 = new byte[j][][];
method493(buffer, aCharArrayArray621, aByteArrayArrayArray622);
method493(packet, aCharArrayArray621, aByteArrayArrayArray622);
}
public static void method491(Buffer buffer) {
int i = buffer.get4();
public static void method491(Packet packet) {
int i = packet.get4();
aCharArrayArray623 = new char[i][];
method494(aCharArrayArray623, buffer, -490);
method494(aCharArrayArray623, packet, -490);
}
public static void method492(Buffer buffer) {
anIntArray620 = new int[buffer.get4()];
public static void method492(Packet packet) {
anIntArray620 = new int[packet.get4()];
for (int i = 0; i < anIntArray620.length; i++) {
anIntArray620[i] = buffer.get2U();
anIntArray620[i] = packet.get2U();
}
}
public static void method493(Buffer buffer, char[][] ac, byte[][][] abyte0) {
public static void method493(Packet packet, char[][] ac, byte[][][] abyte0) {
for (int j = 0; j < ac.length; j++) {
char[] ac1 = new char[buffer.get1U()];
char[] ac1 = new char[packet.get1U()];
for (int k = 0; k < ac1.length; k++) {
ac1[k] = (char) buffer.get1U();
ac1[k] = (char) packet.get1U();
}
ac[j] = ac1;
byte[][] abyte1 = new byte[buffer.get1U()][2];
byte[][] abyte1 = new byte[packet.get1U()][2];
for (int l = 0; l < abyte1.length; l++) {
abyte1[l][0] = (byte) buffer.get1U();
abyte1[l][1] = (byte) buffer.get1U();
abyte1[l][0] = (byte) packet.get1U();
abyte1[l][1] = (byte) packet.get1U();
}
if (abyte1.length > 0) {
abyte0[j] = abyte1;
@@ -79,14 +79,14 @@ public class Censor {
}
}
public static void method494(char[][] ac, Buffer buffer, int i) {
public static void method494(char[][] ac, Packet packet, int i) {
if (i >= 0) {
return;
}
for (int j = 0; j < ac.length; j++) {
char[] ac1 = new char[buffer.get1U()];
char[] ac1 = new char[packet.get1U()];
for (int k = 0; k < ac1.length; k++) {
ac1[k] = (char) buffer.get1U();
ac1[k] = (char) packet.get1U();
}
ac[j] = ac1;
}
+74 -74
View File
@@ -74,86 +74,86 @@ public class Component {
public static void method205(FileArchive archive, BitmapFont[] aclass30_sub2_sub1_sub4, FileArchive archive_1) {
aCache_238 = new LRUCache(50000);
Buffer buffer = new Buffer(archive.read("data", null));
Packet packet = new Packet(archive.read("data", null));
int i = -1;
int j = buffer.get2U();
int j = packet.get2U();
aComponentArray210 = new Component[j];
while (buffer.position < buffer.data.length) {
int k = buffer.get2U();
while (packet.position < packet.data.length) {
int k = packet.get2U();
if (k == 65535) {
i = buffer.get2U();
k = buffer.get2U();
i = packet.get2U();
k = packet.get2U();
}
Component component = aComponentArray210[k] = new Component();
component.anInt250 = k;
component.anInt236 = i;
component.anInt262 = buffer.get1U();
component.anInt217 = buffer.get1U();
component.anInt214 = buffer.get2U();
component.anInt220 = buffer.get2U();
component.anInt267 = buffer.get2U();
component.aByte254 = (byte) buffer.get1U();
component.anInt230 = buffer.get1U();
component.anInt262 = packet.get1U();
component.anInt217 = packet.get1U();
component.anInt214 = packet.get2U();
component.anInt220 = packet.get2U();
component.anInt267 = packet.get2U();
component.aByte254 = (byte) packet.get1U();
component.anInt230 = packet.get1U();
if (component.anInt230 != 0) {
component.anInt230 = ((component.anInt230 - 1) << 8) + buffer.get1U();
component.anInt230 = ((component.anInt230 - 1) << 8) + packet.get1U();
} else {
component.anInt230 = -1;
}
int i1 = buffer.get1U();
int i1 = packet.get1U();
if (i1 > 0) {
component.anIntArray245 = new int[i1];
component.anIntArray212 = new int[i1];
for (int j1 = 0; j1 < i1; j1++) {
component.anIntArray245[j1] = buffer.get1U();
component.anIntArray212[j1] = buffer.get2U();
component.anIntArray245[j1] = packet.get1U();
component.anIntArray212[j1] = packet.get2U();
}
}
int k1 = buffer.get1U();
int k1 = packet.get1U();
if (k1 > 0) {
component.anIntArrayArray226 = new int[k1][];
for (int l1 = 0; l1 < k1; l1++) {
int i3 = buffer.get2U();
int i3 = packet.get2U();
component.anIntArrayArray226[l1] = new int[i3];
for (int l4 = 0; l4 < i3; l4++) {
component.anIntArrayArray226[l1][l4] = buffer.get2U();
component.anIntArrayArray226[l1][l4] = packet.get2U();
}
}
}
if (component.anInt262 == 0) {
component.anInt261 = buffer.get2U();
component.aBoolean266 = buffer.get1U() == 1;
int i2 = buffer.get2U();
component.anInt261 = packet.get2U();
component.aBoolean266 = packet.get1U() == 1;
int i2 = packet.get2U();
component.anIntArray240 = new int[i2];
component.anIntArray241 = new int[i2];
component.anIntArray272 = new int[i2];
for (int j3 = 0; j3 < i2; j3++) {
component.anIntArray240[j3] = buffer.get2U();
component.anIntArray241[j3] = buffer.get2();
component.anIntArray272[j3] = buffer.get2();
component.anIntArray240[j3] = packet.get2U();
component.anIntArray241[j3] = packet.get2();
component.anIntArray272[j3] = packet.get2();
}
}
if (component.anInt262 == 1) {
component.unusedInt = buffer.get2U();
component.unusedBool = buffer.get1U() == 1;
component.unusedInt = packet.get2U();
component.unusedBool = packet.get1U() == 1;
}
if (component.anInt262 == 2) {
component.anIntArray253 = new int[component.anInt220 * component.anInt267];
component.anIntArray252 = new int[component.anInt220 * component.anInt267];
component.aBoolean259 = buffer.get1U() == 1;
component.aBoolean249 = buffer.get1U() == 1;
component.aBoolean242 = buffer.get1U() == 1;
component.aBoolean235 = buffer.get1U() == 1;
component.anInt231 = buffer.get1U();
component.anInt244 = buffer.get1U();
component.aBoolean259 = packet.get1U() == 1;
component.aBoolean249 = packet.get1U() == 1;
component.aBoolean242 = packet.get1U() == 1;
component.aBoolean235 = packet.get1U() == 1;
component.anInt231 = packet.get1U();
component.anInt244 = packet.get1U();
component.anIntArray215 = new int[20];
component.anIntArray247 = new int[20];
component.aImageArray209 = new Image24[20];
for (int j2 = 0; j2 < 20; j2++) {
int k3 = buffer.get1U();
int k3 = packet.get1U();
if (k3 == 1) {
component.anIntArray215[j2] = buffer.get2();
component.anIntArray247[j2] = buffer.get2();
String s1 = buffer.getString();
component.anIntArray215[j2] = packet.get2();
component.anIntArray247[j2] = packet.get2();
String s1 = packet.getString();
if ((archive_1 != null) && (s1.length() > 0)) {
int i5 = s1.lastIndexOf(",");
component.aImageArray209[j2] = method207(Integer.parseInt(s1.substring(i5 + 1)), archive_1, s1.substring(0, i5));
@@ -162,102 +162,102 @@ public class Component {
}
component.aStringArray225 = new String[5];
for (int l3 = 0; l3 < 5; l3++) {
component.aStringArray225[l3] = buffer.getString();
component.aStringArray225[l3] = packet.getString();
if (component.aStringArray225[l3].length() == 0) {
component.aStringArray225[l3] = null;
}
}
}
if (component.anInt262 == 3) {
component.aBoolean227 = buffer.get1U() == 1;
component.aBoolean227 = packet.get1U() == 1;
}
if ((component.anInt262 == 4) || (component.anInt262 == 1)) {
component.aBoolean223 = buffer.get1U() == 1;
int k2 = buffer.get1U();
component.aBoolean223 = packet.get1U() == 1;
int k2 = packet.get1U();
if (aclass30_sub2_sub1_sub4 != null) {
component.aFont_243 = aclass30_sub2_sub1_sub4[k2];
}
component.aBoolean268 = buffer.get1U() == 1;
component.aBoolean268 = packet.get1U() == 1;
}
if (component.anInt262 == 4) {
component.aString248 = buffer.getString();
component.aString228 = buffer.getString();
component.aString248 = packet.getString();
component.aString228 = packet.getString();
}
if ((component.anInt262 == 1) || (component.anInt262 == 3) || (component.anInt262 == 4)) {
component.anInt232 = buffer.get4();
component.anInt232 = packet.get4();
}
if ((component.anInt262 == 3) || (component.anInt262 == 4)) {
component.anInt219 = buffer.get4();
component.anInt216 = buffer.get4();
component.anInt239 = buffer.get4();
component.anInt219 = packet.get4();
component.anInt216 = packet.get4();
component.anInt239 = packet.get4();
}
if (component.anInt262 == 5) {
String s = buffer.getString();
String s = packet.getString();
if ((archive_1 != null) && (s.length() > 0)) {
int i4 = s.lastIndexOf(",");
component.aImage_207 = method207(Integer.parseInt(s.substring(i4 + 1)), archive_1, s.substring(0, i4));
}
s = buffer.getString();
s = packet.getString();
if ((archive_1 != null) && (s.length() > 0)) {
int j4 = s.lastIndexOf(",");
component.aImage_260 = method207(Integer.parseInt(s.substring(j4 + 1)), archive_1, s.substring(0, j4));
}
}
if (component.anInt262 == 6) {
int l = buffer.get1U();
int l = packet.get1U();
if (l != 0) {
component.anInt233 = 1;
component.anInt234 = ((l - 1) << 8) + buffer.get1U();
component.anInt234 = ((l - 1) << 8) + packet.get1U();
}
l = buffer.get1U();
l = packet.get1U();
if (l != 0) {
component.anInt255 = 1;
component.anInt256 = ((l - 1) << 8) + buffer.get1U();
component.anInt256 = ((l - 1) << 8) + packet.get1U();
}
l = buffer.get1U();
l = packet.get1U();
if (l != 0) {
component.anInt257 = ((l - 1) << 8) + buffer.get1U();
component.anInt257 = ((l - 1) << 8) + packet.get1U();
} else {
component.anInt257 = -1;
}
l = buffer.get1U();
l = packet.get1U();
if (l != 0) {
component.anInt258 = ((l - 1) << 8) + buffer.get1U();
component.anInt258 = ((l - 1) << 8) + packet.get1U();
} else {
component.anInt258 = -1;
}
component.anInt269 = buffer.get2U();
component.anInt270 = buffer.get2U();
component.anInt271 = buffer.get2U();
component.anInt269 = packet.get2U();
component.anInt270 = packet.get2U();
component.anInt271 = packet.get2U();
}
if (component.anInt262 == 7) {
component.anIntArray253 = new int[component.anInt220 * component.anInt267];
component.anIntArray252 = new int[component.anInt220 * component.anInt267];
component.aBoolean223 = buffer.get1U() == 1;
int l2 = buffer.get1U();
component.aBoolean223 = packet.get1U() == 1;
int l2 = packet.get1U();
if (aclass30_sub2_sub1_sub4 != null) {
component.aFont_243 = aclass30_sub2_sub1_sub4[l2];
}
component.aBoolean268 = buffer.get1U() == 1;
component.anInt232 = buffer.get4();
component.anInt231 = buffer.get2();
component.anInt244 = buffer.get2();
component.aBoolean249 = buffer.get1U() == 1;
component.aBoolean268 = packet.get1U() == 1;
component.anInt232 = packet.get4();
component.anInt231 = packet.get2();
component.anInt244 = packet.get2();
component.aBoolean249 = packet.get1U() == 1;
component.aStringArray225 = new String[5];
for (int k4 = 0; k4 < 5; k4++) {
component.aStringArray225[k4] = buffer.getString();
component.aStringArray225[k4] = packet.getString();
if (component.aStringArray225[k4].length() == 0) {
component.aStringArray225[k4] = null;
}
}
}
if ((component.anInt217 == 2) || (component.anInt262 == 2)) {
component.aString222 = buffer.getString();
component.aString218 = buffer.getString();
component.anInt237 = buffer.get2U();
component.aString222 = packet.getString();
component.aString218 = packet.getString();
component.anInt237 = packet.get2U();
}
if ((component.anInt217 == 1) || (component.anInt217 == 4) || (component.anInt217 == 5) || (component.anInt217 == 6)) {
component.aString221 = buffer.getString();
component.aString221 = packet.getString();
if (component.aString221.length() == 0) {
if (component.anInt217 == 1) {
component.aString221 = "Ok";
+9 -9
View File
@@ -16,33 +16,33 @@ public class FileArchive {
}
public void load(byte[] src) {
Buffer buffer = new Buffer(src);
Packet packet = new Packet(src);
int unpackedSize = buffer.get3();
int packedSize = buffer.get3();
int unpackedSize = packet.get3();
int packedSize = packet.get3();
if (packedSize != unpackedSize) {
data = new byte[unpackedSize];
BZip2.decompress(data, unpackedSize, src, 6, packedSize);
buffer = new Buffer(data);
packet = new Packet(data);
unpacked = true;
} else {
data = src;
unpacked = false;
}
fileCount = buffer.get2U();
fileCount = packet.get2U();
fileHash = new int[fileCount];
fileSizeInflated = new int[fileCount];
fileSizeDeflated = new int[fileCount];
fileOffset = new int[fileCount];
int offset = buffer.position + (fileCount * 10);
int offset = packet.position + (fileCount * 10);
for (int file = 0; file < fileCount; file++) {
fileHash[file] = buffer.get4();
fileSizeInflated[file] = buffer.get3();
fileSizeDeflated[file] = buffer.get3();
fileHash[file] = packet.get4();
fileSizeInflated[file] = packet.get3();
fileSizeDeflated[file] = packet.get3();
fileOffset[file] = offset;
offset += fileSizeDeflated[file];
}
+9 -9
View File
@@ -22,8 +22,8 @@ public class FloType {
}
public static void method260(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("flo.dat", null));
anInt387 = buffer.get2U();
Packet packet = new Packet(archive.read("flo.dat", null));
anInt387 = packet.get2U();
if (aTypeArray388 == null) {
aTypeArray388 = new FloType[anInt387];
}
@@ -31,33 +31,33 @@ public class FloType {
if (aTypeArray388[j] == null) {
aTypeArray388[j] = new FloType();
}
aTypeArray388[j].method261(buffer);
aTypeArray388[j].method261(packet);
}
}
public void method261(Buffer buffer) {
public void method261(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt390 = buffer.get3();
anInt390 = packet.get3();
method262(anInt390);
} else if (i == 2) {
anInt391 = buffer.get1U();
anInt391 = packet.get1U();
} else if (i == 3) {
unusedBool = true;
} else if (i == 5) {
aBoolean393 = false;
} else if (i == 6) {
unusedString = buffer.getString();
unusedString = packet.getString();
} else if (i == 7) {
int j = anInt394;
int k = anInt395;
int l = anInt396;
int i1 = anInt397;
int j1 = buffer.get3();
int j1 = packet.get3();
method262(j1);
anInt394 = j;
anInt395 = k;
+653 -653
View File
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -5,14 +5,14 @@
public class Huffman {
public static final char[] aCharArray631 = new char[100];
public static final Buffer A_BUFFER___632 = new Buffer(new byte[100]);
public static final Packet A_PACKET___632 = new Packet(new byte[100]);
public static final char[] aCharArray633 = {' ', 'e', 't', 'a', 'o', 'i', 'h', 'n', 's', 'r', 'd', 'l', 'u', 'm', 'w', 'c', 'y', 'f', 'g', 'p', 'b', 'v', 'k', 'x', 'j', 'q', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ', '!', '?', '.', ',', ':', ';', '(', ')', '-', '&', '*', '\\', '\'', '@', '#', '+', '=', '\243', '$', '%', '"', '[', ']'};
public static String method525(int i, Buffer buffer) {
public static String method525(int i, Packet packet) {
int j = 0;
int k = -1;
for (int l = 0; l < i; l++) {
int i1 = buffer.get1U();
int i1 = packet.get1U();
int j1 = (i1 >> 4) & 0xf;
if (k == -1) {
if (j1 < 13) {
@@ -50,7 +50,7 @@ public class Huffman {
return new String(aCharArray631, 0, j);
}
public static void method526(String s, Buffer buffer) {
public static void method526(String s, Packet packet) {
if (s.length() > 80) {
s = s.substring(0, 80);
}
@@ -73,27 +73,27 @@ public class Huffman {
if (k < 13) {
i = k;
} else {
buffer.put1(k);
packet.put1(k);
}
} else if (k < 13) {
buffer.put1((i << 4) + k);
packet.put1((i << 4) + k);
i = -1;
} else {
buffer.put1((i << 4) + (k >> 4));
packet.put1((i << 4) + (k >> 4));
i = k & 0xf;
}
}
if (i != -1) {
buffer.put1(i << 4);
packet.put1(i << 4);
}
}
public static String method527(String s) {
A_BUFFER___632.position = 0;
method526(s, A_BUFFER___632);
int j = A_BUFFER___632.position;
A_BUFFER___632.position = 0;
return method525(j, A_BUFFER___632);
A_PACKET___632.position = 0;
method526(s, A_PACKET___632);
int j = A_PACKET___632.position;
A_PACKET___632.position = 0;
return method525(j, A_PACKET___632);
}
}
+11 -11
View File
@@ -17,8 +17,8 @@ public class IDKType {
}
public static void method535(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("idk.dat", null));
anInt655 = buffer.get2U();
Packet packet = new Packet(archive.read("idk.dat", null));
anInt655 = packet.get2U();
if (aIDKTypeArray656 == null) {
aIDKTypeArray656 = new IDKType[anInt655];
}
@@ -26,32 +26,32 @@ public class IDKType {
if (aIDKTypeArray656[j] == null) {
aIDKTypeArray656[j] = new IDKType();
}
aIDKTypeArray656[j].method536(buffer);
aIDKTypeArray656[j].method536(packet);
}
}
public void method536(Buffer buffer) {
public void method536(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt657 = buffer.get1U();
anInt657 = packet.get1U();
} else if (i == 2) {
int j = buffer.get1U();
int j = packet.get1U();
anIntArray658 = new int[j];
for (int k = 0; k < j; k++) {
anIntArray658[k] = buffer.get2U();
anIntArray658[k] = packet.get2U();
}
} else if (i == 3) {
aBoolean662 = true;
} else if ((i >= 40) && (i < 50)) {
anIntArray659[i - 40] = buffer.get2U();
anIntArray659[i - 40] = packet.get2U();
} else if ((i >= 50) && (i < 60)) {
anIntArray660[i - 50] = buffer.get2U();
anIntArray660[i - 50] = packet.get2U();
} else if ((i >= 60) && (i < 70)) {
anIntArray661[i - 60] = buffer.get2U();
anIntArray661[i - 60] = packet.get2U();
} else {
System.out.println("Error unrecognised config code: " + i);
}
+17 -17
View File
@@ -43,41 +43,41 @@ public class Image24 extends Draw2D {
}
public Image24(FileArchive archive, String s, int i) {
Buffer buffer = new Buffer(archive.read(s + ".dat", null));
Buffer buffer_1 = new Buffer(archive.read("index.dat", null));
buffer_1.position = buffer.get2U();
anInt1444 = buffer_1.get2U();
anInt1445 = buffer_1.get2U();
int j = buffer_1.get1U();
Packet packet = new Packet(archive.read(s + ".dat", null));
Packet packet_1 = new Packet(archive.read("index.dat", null));
packet_1.position = packet.get2U();
anInt1444 = packet_1.get2U();
anInt1445 = packet_1.get2U();
int j = packet_1.get1U();
int[] ai = new int[j];
for (int k = 0; k < (j - 1); k++) {
ai[k + 1] = buffer_1.get3();
ai[k + 1] = packet_1.get3();
if (ai[k + 1] == 0) {
ai[k + 1] = 1;
}
}
for (int l = 0; l < i; l++) {
buffer_1.position += 2;
buffer.position += buffer_1.get2U() * buffer_1.get2U();
buffer_1.position++;
packet_1.position += 2;
packet.position += packet_1.get2U() * packet_1.get2U();
packet_1.position++;
}
anInt1442 = buffer_1.get1U();
anInt1443 = buffer_1.get1U();
anInt1440 = buffer_1.get2U();
anInt1441 = buffer_1.get2U();
int i1 = buffer_1.get1U();
anInt1442 = packet_1.get1U();
anInt1443 = packet_1.get1U();
anInt1440 = packet_1.get2U();
anInt1441 = packet_1.get2U();
int i1 = packet_1.get1U();
int j1 = anInt1440 * anInt1441;
anIntArray1439 = new int[j1];
if (i1 == 0) {
for (int k1 = 0; k1 < j1; k1++) {
anIntArray1439[k1] = ai[buffer.get1U()];
anIntArray1439[k1] = ai[packet.get1U()];
}
return;
}
if (i1 == 1) {
for (int l1 = 0; l1 < anInt1440; l1++) {
for (int i2 = 0; i2 < anInt1441; i2++) {
anIntArray1439[l1 + (i2 * anInt1440)] = ai[buffer.get1U()];
anIntArray1439[l1 + (i2 * anInt1440)] = ai[packet.get1U()];
}
}
}
+17 -17
View File
@@ -14,38 +14,38 @@ public class Image8 extends Draw2D {
public int anInt1457;
public Image8(FileArchive archive, String s, int i) {
Buffer buffer = new Buffer(archive.read(s + ".dat", null));
Buffer buffer_1 = new Buffer(archive.read("index.dat", null));
buffer_1.position = buffer.get2U();
anInt1456 = buffer_1.get2U();
anInt1457 = buffer_1.get2U();
int j = buffer_1.get1U();
Packet packet = new Packet(archive.read(s + ".dat", null));
Packet packet_1 = new Packet(archive.read("index.dat", null));
packet_1.position = packet.get2U();
anInt1456 = packet_1.get2U();
anInt1457 = packet_1.get2U();
int j = packet_1.get1U();
anIntArray1451 = new int[j];
for (int k = 0; k < (j - 1); k++) {
anIntArray1451[k + 1] = buffer_1.get3();
anIntArray1451[k + 1] = packet_1.get3();
}
for (int l = 0; l < i; l++) {
buffer_1.position += 2;
buffer.position += buffer_1.get2U() * buffer_1.get2U();
buffer_1.position++;
packet_1.position += 2;
packet.position += packet_1.get2U() * packet_1.get2U();
packet_1.position++;
}
anInt1454 = buffer_1.get1U();
anInt1455 = buffer_1.get1U();
anInt1452 = buffer_1.get2U();
anInt1453 = buffer_1.get2U();
int i1 = buffer_1.get1U();
anInt1454 = packet_1.get1U();
anInt1455 = packet_1.get1U();
anInt1452 = packet_1.get2U();
anInt1453 = packet_1.get2U();
int i1 = packet_1.get1U();
int j1 = anInt1452 * anInt1453;
aByteArray1450 = new byte[j1];
if (i1 == 0) {
for (int k1 = 0; k1 < j1; k1++) {
aByteArray1450[k1] = buffer.get1();
aByteArray1450[k1] = packet.get1();
}
return;
}
if (i1 == 1) {
for (int l1 = 0; l1 < anInt1452; l1++) {
for (int i2 = 0; i2 < anInt1453; i2++) {
aByteArray1450[l1 + (i2 * anInt1452)] = buffer.get1();
aByteArray1450[l1 + (i2 * anInt1452)] = packet.get1();
}
}
}
+44 -44
View File
@@ -6,7 +6,7 @@ public class LocType {
public static final Model[] A_MODEL_ARRAY_741 = new Model[4];
public static boolean aBoolean752;
public static Buffer aBuffer_753;
public static Packet aPacket_753;
public static int[] anIntArray755;
public static int anInt756;
public static Game aGame765;
@@ -64,10 +64,10 @@ public class LocType {
}
anInt771 = (anInt771 + 1) % 20;
LocType type = aTypeArray782[anInt771];
aBuffer_753.position = anIntArray755[i];
aPacket_753.position = anIntArray755[i];
type.anInt754 = i;
type.method573();
type.method582(aBuffer_753);
type.method582(aPacket_753);
return type;
}
@@ -76,18 +76,18 @@ public class LocType {
aCache_780 = null;
anIntArray755 = null;
aTypeArray782 = null;
aBuffer_753 = null;
aPacket_753 = null;
}
public static void method576(FileArchive archive) {
aBuffer_753 = new Buffer(archive.read("loc.dat", null));
Buffer buffer = new Buffer(archive.read("loc.idx", null));
anInt756 = buffer.get2U();
aPacket_753 = new Packet(archive.read("loc.dat", null));
Packet packet = new Packet(archive.read("loc.idx", null));
anInt756 = packet.get2U();
anIntArray755 = new int[anInt756];
int i = 2;
for (int j = 0; j < anInt756; j++) {
anIntArray755[j] = i;
i += buffer.get2U();
i += packet.get2U();
}
aTypeArray782 = new LocType[20];
for (int k = 0; k < 20; k++) {
@@ -325,57 +325,57 @@ public class LocType {
return model_3;
}
public void method582(Buffer buffer) {
public void method582(Packet packet) {
int i = -1;
label0:
do {
int j;
do {
j = buffer.get1U();
j = packet.get1U();
if (j == 0) {
break label0;
}
if (j == 1) {
int k = buffer.get1U();
int k = packet.get1U();
if (k > 0) {
if ((anIntArray773 == null) || aBoolean752) {
anIntArray776 = new int[k];
anIntArray773 = new int[k];
for (int k1 = 0; k1 < k; k1++) {
anIntArray773[k1] = buffer.get2U();
anIntArray776[k1] = buffer.get1U();
anIntArray773[k1] = packet.get2U();
anIntArray776[k1] = packet.get1U();
}
} else {
buffer.position += k * 3;
packet.position += k * 3;
}
}
} else if (j == 2) {
aString739 = buffer.getString();
aString739 = packet.getString();
} else if (j == 3) {
aByteArray777 = buffer.getStringRaw();
aByteArray777 = packet.getStringRaw();
} else if (j == 5) {
int l = buffer.get1U();
int l = packet.get1U();
if (l > 0) {
if ((anIntArray773 == null) || aBoolean752) {
anIntArray776 = null;
anIntArray773 = new int[l];
for (int l1 = 0; l1 < l; l1++) {
anIntArray773[l1] = buffer.get2U();
anIntArray773[l1] = packet.get2U();
}
} else {
buffer.position += l * 2;
packet.position += l * 2;
}
}
} else if (j == 14) {
anInt744 = buffer.get1U();
anInt744 = packet.get1U();
} else if (j == 15) {
anInt761 = buffer.get1U();
anInt761 = packet.get1U();
} else if (j == 17) {
aBoolean767 = false;
} else if (j == 18) {
aBoolean757 = false;
} else if (j == 19) {
i = buffer.get1U();
i = packet.get1U();
if (i == 1) {
aBoolean778 = true;
}
@@ -386,54 +386,54 @@ public class LocType {
} else if (j == 23) {
aBoolean764 = true;
} else if (j == 24) {
anInt781 = buffer.get2U();
anInt781 = packet.get2U();
if (anInt781 == 65535) {
anInt781 = -1;
}
} else if (j == 28) {
anInt775 = buffer.get1U();
anInt775 = packet.get1U();
} else if (j == 29) {
aByte737 = buffer.get1();
aByte737 = packet.get1();
} else if (j == 39) {
aByte742 = buffer.get1();
aByte742 = packet.get1();
} else if ((j >= 30) && (j < 39)) {
if (aStringArray786 == null) {
aStringArray786 = new String[5];
}
aStringArray786[j - 30] = buffer.getString();
aStringArray786[j - 30] = packet.getString();
if (aStringArray786[j - 30].equalsIgnoreCase("hidden")) {
aStringArray786[j - 30] = null;
}
} else if (j == 40) {
int i1 = buffer.get1U();
int i1 = packet.get1U();
anIntArray784 = new int[i1];
anIntArray747 = new int[i1];
for (int i2 = 0; i2 < i1; i2++) {
anIntArray784[i2] = buffer.get2U();
anIntArray747[i2] = buffer.get2U();
anIntArray784[i2] = packet.get2U();
anIntArray747[i2] = packet.get2U();
}
} else if (j == 60) {
anInt746 = buffer.get2U();
anInt746 = packet.get2U();
} else if (j == 62) {
aBoolean751 = true;
} else if (j == 64) {
aBoolean779 = false;
} else if (j == 65) {
anInt748 = buffer.get2U();
anInt748 = packet.get2U();
} else if (j == 66) {
anInt772 = buffer.get2U();
anInt772 = packet.get2U();
} else if (j == 67) {
anInt740 = buffer.get2U();
anInt740 = packet.get2U();
} else if (j == 68) {
anInt758 = buffer.get2U();
anInt758 = packet.get2U();
} else if (j == 69) {
anInt768 = buffer.get1U();
anInt768 = packet.get1U();
} else if (j == 70) {
anInt738 = buffer.get2();
anInt738 = packet.get2();
} else if (j == 71) {
anInt745 = buffer.get2();
anInt745 = packet.get2();
} else if (j == 72) {
anInt783 = buffer.get2();
anInt783 = packet.get2();
} else if (j == 73) {
aBoolean736 = true;
} else if (j == 74) {
@@ -442,22 +442,22 @@ public class LocType {
if (j != 75) {
continue;
}
anInt760 = buffer.get1U();
anInt760 = packet.get1U();
}
continue label0;
} while (j != 77);
anInt774 = buffer.get2U();
anInt774 = packet.get2U();
if (anInt774 == 65535) {
anInt774 = -1;
}
anInt749 = buffer.get2U();
anInt749 = packet.get2U();
if (anInt749 == 65535) {
anInt749 = -1;
}
int j1 = buffer.get1U();
int j1 = packet.get1U();
anIntArray759 = new int[j1 + 1];
for (int j2 = 0; j2 <= j1; j2++) {
anIntArray759[j2] = buffer.get2U();
anIntArray759[j2] = packet.get2U();
if (anIntArray759[j2] == 65535) {
anIntArray759[j2] = -1;
}
+19 -19
View File
@@ -174,19 +174,19 @@ public class Model extends Entity {
faceColor = new int[faceCount];
Buffer buf0 = new Buffer(header.data);
Packet buf0 = new Packet(header.data);
buf0.position = header.obPoint1Position;
Buffer buf1 = new Buffer(header.data);
Packet buf1 = new Packet(header.data);
buf1.position = header.obPoint2Position;
Buffer buf2 = new Buffer(header.data);
Packet buf2 = new Packet(header.data);
buf2.position = header.obPoint3Position;
Buffer buf3 = new Buffer(header.data);
Packet buf3 = new Packet(header.data);
buf3.position = header.obPoint4Position;
Buffer buf4 = new Buffer(header.data);
Packet buf4 = new Packet(header.data);
buf4.position = header.obPoint5Position;
int x = 0;
@@ -812,23 +812,23 @@ public class Model extends Entity {
header.texturedFaceCount = 0;
return;
}
Buffer buffer = new Buffer(src);
buffer.position = src.length - 18;
Packet packet = new Packet(src);
packet.position = src.length - 18;
ModelHeader header = headers[id] = new ModelHeader();
header.data = src;
header.vertexCount = buffer.get2U();
header.faceCount = buffer.get2U();
header.texturedFaceCount = buffer.get1U();
int k = buffer.get1U();
int l = buffer.get1U();
int i1 = buffer.get1U();
int j1 = buffer.get1U();
int k1 = buffer.get1U();
int l1 = buffer.get2U();
int i2 = buffer.get2U();
header.vertexCount = packet.get2U();
header.faceCount = packet.get2U();
header.texturedFaceCount = packet.get1U();
int k = packet.get1U();
int l = packet.get1U();
int i1 = packet.get1U();
int j1 = packet.get1U();
int k1 = packet.get1U();
int l1 = packet.get2U();
int i2 = packet.get2U();
//noinspection unused
int j2 = buffer.get2U();
int k2 = buffer.get2U();
int j2 = packet.get2U();
int k2 = packet.get2U();
int offset = 0;
header.obPoint1Position = offset;
offset += header.vertexCount;
+41 -41
View File
@@ -5,7 +5,7 @@
public class NPCType {
public static int anInt56;
public static Buffer aBuffer_60;
public static Packet aPacket_60;
public static int anInt62;
public static int[] anIntArray72;
public static NPCType[] aTypeArray80;
@@ -53,21 +53,21 @@ public class NPCType {
}
anInt56 = (anInt56 + 1) % 20;
NPCType type = aTypeArray80[anInt56] = new NPCType();
aBuffer_60.position = anIntArray72[i];
aPacket_60.position = anIntArray72[i];
type.aLong78 = i;
type.method165(aBuffer_60);
type.method165(aPacket_60);
return type;
}
public static void method162(FileArchive archive) {
aBuffer_60 = new Buffer(archive.read("npc.dat", null));
Buffer buffer = new Buffer(archive.read("npc.idx", null));
anInt62 = buffer.get2U();
aPacket_60 = new Packet(archive.read("npc.dat", null));
Packet packet = new Packet(archive.read("npc.idx", null));
anInt62 = packet.get2U();
anIntArray72 = new int[anInt62];
int i = 2;
for (int j = 0; j < anInt62; j++) {
anIntArray72[j] = i;
i += buffer.get2U();
i += packet.get2U();
}
aTypeArray80 = new NPCType[20];
for (int k = 0; k < 20; k++) {
@@ -79,7 +79,7 @@ public class NPCType {
aCache_95 = null;
anIntArray72 = null;
aTypeArray80 = null;
aBuffer_60 = null;
aPacket_60 = null;
}
public Model method160() {
@@ -197,92 +197,92 @@ public class NPCType {
return model_1;
}
public void method165(Buffer buffer) {
public void method165(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
return;
}
if (i == 1) {
int j = buffer.get1U();
int j = packet.get1U();
anIntArray94 = new int[j];
for (int j1 = 0; j1 < j; j1++) {
anIntArray94[j1] = buffer.get2U();
anIntArray94[j1] = packet.get2U();
}
} else if (i == 2) {
aString65 = buffer.getString();
aString65 = packet.getString();
} else if (i == 3) {
aByteArray89 = buffer.getStringRaw();
aByteArray89 = packet.getStringRaw();
} else if (i == 12) {
aByte68 = buffer.get1();
aByte68 = packet.get1();
} else if (i == 13) {
anInt77 = buffer.get2U();
anInt77 = packet.get2U();
} else if (i == 14) {
anInt67 = buffer.get2U();
anInt67 = packet.get2U();
} else if (i == 17) {
anInt67 = buffer.get2U();
anInt58 = buffer.get2U();
anInt83 = buffer.get2U();
anInt55 = buffer.get2U();
anInt67 = packet.get2U();
anInt58 = packet.get2U();
anInt83 = packet.get2U();
anInt55 = packet.get2U();
} else if ((i >= 30) && (i < 40)) {
if (aStringArray66 == null) {
aStringArray66 = new String[5];
}
aStringArray66[i - 30] = buffer.getString();
aStringArray66[i - 30] = packet.getString();
if (aStringArray66[i - 30].equalsIgnoreCase("hidden")) {
aStringArray66[i - 30] = null;
}
} else if (i == 40) {
int k = buffer.get1U();
int k = packet.get1U();
anIntArray76 = new int[k];
anIntArray70 = new int[k];
for (int k1 = 0; k1 < k; k1++) {
anIntArray76[k1] = buffer.get2U();
anIntArray70[k1] = buffer.get2U();
anIntArray76[k1] = packet.get2U();
anIntArray70[k1] = packet.get2U();
}
} else if (i == 60) {
int l = buffer.get1U();
int l = packet.get1U();
anIntArray73 = new int[l];
for (int l1 = 0; l1 < l; l1++) {
anIntArray73[l1] = buffer.get2U();
anIntArray73[l1] = packet.get2U();
}
} else if (i == 90) {
unusedInt2 = buffer.get2U();
unusedInt2 = packet.get2U();
} else if (i == 91) {
unusedInt0 = buffer.get2U();
unusedInt0 = packet.get2U();
} else if (i == 92) {
unusedInt1 = buffer.get2U();
unusedInt1 = packet.get2U();
} else if (i == 93) {
aBoolean87 = false;
} else if (i == 95) {
anInt61 = buffer.get2U();
anInt61 = packet.get2U();
} else if (i == 97) {
anInt91 = buffer.get2U();
anInt91 = packet.get2U();
} else if (i == 98) {
anInt86 = buffer.get2U();
anInt86 = packet.get2U();
} else if (i == 99) {
aBoolean93 = true;
} else if (i == 100) {
anInt85 = buffer.get1();
anInt85 = packet.get1();
} else if (i == 101) {
anInt92 = buffer.get1() * 5;
anInt92 = packet.get1() * 5;
} else if (i == 102) {
anInt75 = buffer.get2U();
anInt75 = packet.get2U();
} else if (i == 103) {
anInt79 = buffer.get2U();
anInt79 = packet.get2U();
} else if (i == 106) {
anInt57 = buffer.get2U();
anInt57 = packet.get2U();
if (anInt57 == 65535) {
anInt57 = -1;
}
anInt59 = buffer.get2U();
anInt59 = packet.get2U();
if (anInt59 == 65535) {
anInt59 = -1;
}
int i1 = buffer.get1U();
int i1 = packet.get1U();
anIntArray88 = new int[i1 + 1];
for (int i2 = 0; i2 <= i1; i2++) {
anIntArray88[i2] = buffer.get2U();
anIntArray88[i2] = packet.get2U();
if (anIntArray88[i2] == 65535) {
anIntArray88[i2] = -1;
}
+48 -48
View File
@@ -9,7 +9,7 @@ public class ObjType {
public static ObjType[] aTypeArray172;
public static int anInt180;
public static boolean aBoolean182 = true;
public static Buffer aBuffer_183;
public static Packet aPacket_183;
public static int[] anIntArray195;
public static int anInt203;
public byte aByte154;
@@ -61,18 +61,18 @@ public class ObjType {
aCache_158 = null;
anIntArray195 = null;
aTypeArray172 = null;
aBuffer_183 = null;
aPacket_183 = null;
}
public static void method193(FileArchive archive) {
aBuffer_183 = new Buffer(archive.read("obj.dat", null));
Buffer buffer = new Buffer(archive.read("obj.idx", null));
anInt203 = buffer.get2U();
aPacket_183 = new Packet(archive.read("obj.dat", null));
Packet packet = new Packet(archive.read("obj.idx", null));
anInt203 = packet.get2U();
anIntArray195 = new int[anInt203];
int i = 2;
for (int j = 0; j < anInt203; j++) {
anIntArray195[j] = i;
i += buffer.get2U();
i += packet.get2U();
}
aTypeArray172 = new ObjType[10];
for (int k = 0; k < 10; k++) {
@@ -88,10 +88,10 @@ public class ObjType {
}
anInt180 = (anInt180 + 1) % 10;
ObjType type = aTypeArray172[anInt180];
aBuffer_183.position = anIntArray195[i];
aPacket_183.position = anIntArray195[i];
type.anInt157 = i;
type.method197();
type.method203(aBuffer_183);
type.method203(aPacket_183);
if (type.anInt163 != -1) {
type.method199();
}
@@ -466,57 +466,57 @@ public class ObjType {
return model;
}
public void method203(Buffer buffer) {
public void method203(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt174 = buffer.get2U();
anInt174 = packet.get2U();
} else if (i == 2) {
aString170 = buffer.getString();
aString170 = packet.getString();
} else if (i == 3) {
aByteArray178 = buffer.getStringRaw();
aByteArray178 = packet.getStringRaw();
} else if (i == 4) {
anInt181 = buffer.get2U();
anInt181 = packet.get2U();
} else if (i == 5) {
anInt190 = buffer.get2U();
anInt190 = packet.get2U();
} else if (i == 6) {
anInt198 = buffer.get2U();
anInt198 = packet.get2U();
} else if (i == 7) {
anInt169 = buffer.get2U();
anInt169 = packet.get2U();
if (anInt169 > 32767) {
anInt169 -= 0x10000;
}
} else if (i == 8) {
anInt194 = buffer.get2U();
anInt194 = packet.get2U();
if (anInt194 > 32767) {
anInt194 -= 0x10000;
}
} else if (i == 10) {
unusedInt = buffer.get2U();
unusedInt = packet.get2U();
} else if (i == 11) {
aBoolean176 = true;
} else if (i == 12) {
anInt155 = buffer.get4();
anInt155 = packet.get4();
} else if (i == 16) {
aBoolean161 = true;
} else if (i == 23) {
anInt165 = buffer.get2U();
aByte205 = buffer.get1();
anInt165 = packet.get2U();
aByte205 = packet.get1();
} else if (i == 24) {
anInt188 = buffer.get2U();
anInt188 = packet.get2U();
} else if (i == 25) {
anInt200 = buffer.get2U();
aByte154 = buffer.get1();
anInt200 = packet.get2U();
aByte154 = packet.get1();
} else if (i == 26) {
anInt164 = buffer.get2U();
anInt164 = packet.get2U();
} else if ((i >= 30) && (i < 35)) {
if (aStringArray168 == null) {
aStringArray168 = new String[5];
}
aStringArray168[i - 30] = buffer.getString();
aStringArray168[i - 30] = packet.getString();
if (aStringArray168[i - 30].equalsIgnoreCase("hidden")) {
aStringArray168[i - 30] = null;
}
@@ -524,52 +524,52 @@ public class ObjType {
if (aStringArray189 == null) {
aStringArray189 = new String[5];
}
aStringArray189[i - 35] = buffer.getString();
aStringArray189[i - 35] = packet.getString();
} else if (i == 40) {
int j = buffer.get1U();
int j = packet.get1U();
anIntArray156 = new int[j];
anIntArray160 = new int[j];
for (int k = 0; k < j; k++) {
anIntArray156[k] = buffer.get2U();
anIntArray160[k] = buffer.get2U();
anIntArray156[k] = packet.get2U();
anIntArray160[k] = packet.get2U();
}
} else if (i == 78) {
anInt185 = buffer.get2U();
anInt185 = packet.get2U();
} else if (i == 79) {
anInt162 = buffer.get2U();
anInt162 = packet.get2U();
} else if (i == 90) {
anInt175 = buffer.get2U();
anInt175 = packet.get2U();
} else if (i == 91) {
anInt197 = buffer.get2U();
anInt197 = packet.get2U();
} else if (i == 92) {
anInt166 = buffer.get2U();
anInt166 = packet.get2U();
} else if (i == 93) {
anInt173 = buffer.get2U();
anInt173 = packet.get2U();
} else if (i == 95) {
anInt204 = buffer.get2U();
anInt204 = packet.get2U();
} else if (i == 97) {
anInt179 = buffer.get2U();
anInt179 = packet.get2U();
} else if (i == 98) {
anInt163 = buffer.get2U();
anInt163 = packet.get2U();
} else if ((i >= 100) && (i < 110)) {
if (anIntArray193 == null) {
anIntArray193 = new int[10];
anIntArray201 = new int[10];
}
anIntArray193[i - 100] = buffer.get2U();
anIntArray201[i - 100] = buffer.get2U();
anIntArray193[i - 100] = packet.get2U();
anIntArray201[i - 100] = packet.get2U();
} else if (i == 110) {
anInt167 = buffer.get2U();
anInt167 = packet.get2U();
} else if (i == 111) {
anInt192 = buffer.get2U();
anInt192 = packet.get2U();
} else if (i == 112) {
anInt191 = buffer.get2U();
anInt191 = packet.get2U();
} else if (i == 113) {
anInt196 = buffer.get1();
anInt196 = packet.get1();
} else if (i == 114) {
anInt184 = buffer.get1() * 5;
anInt184 = packet.get1() * 5;
} else if (i == 115) {
anInt202 = buffer.get1U();
anInt202 = packet.get1U();
}
} while (true);
}
+7 -7
View File
@@ -163,21 +163,21 @@ public class OnDemand implements Runnable {
for (int i = 0; i < 4; i++) {
byte[] abyte0 = archive.read(as[i], null);
int j = abyte0.length / 2;
Buffer buffer = new Buffer(abyte0);
Packet packet = new Packet(abyte0);
anIntArrayArray1364[i] = new int[j];
aByteArrayArray1342[i] = new byte[j];
for (int l = 0; l < j; l++) {
anIntArrayArray1364[i][l] = buffer.get2U();
anIntArrayArray1364[i][l] = packet.get2U();
}
}
String[] as1 = {"model_crc", "anim_crc", "midi_crc", "map_crc"};
for (int k = 0; k < 4; k++) {
byte[] abyte1 = archive.read(as1[k], null);
int i1 = abyte1.length / 4;
Buffer buffer_1 = new Buffer(abyte1);
Packet packet_1 = new Packet(abyte1);
anIntArrayArray1365[k] = new int[i1];
for (int l1 = 0; l1 < i1; l1++) {
anIntArrayArray1365[k][l1] = buffer_1.get4();
anIntArrayArray1365[k][l1] = packet_1.get4();
}
}
byte[] abyte2 = archive.read("model_index", null);
@@ -191,7 +191,7 @@ public class OnDemand implements Runnable {
}
}
abyte2 = archive.read("map_index", null);
Buffer class30_sub2_sub2_2 = new Buffer(abyte2);
Packet class30_sub2_sub2_2 = new Packet(abyte2);
j1 = abyte2.length / 7;
anIntArray1371 = new int[j1];
anIntArray1350 = new int[j1];
@@ -204,14 +204,14 @@ public class OnDemand implements Runnable {
anIntArray1356[i2] = class30_sub2_sub2_2.get1U();
}
abyte2 = archive.read("anim_index", null);
class30_sub2_sub2_2 = new Buffer(abyte2);
class30_sub2_sub2_2 = new Packet(abyte2);
j1 = abyte2.length / 2;
anIntArray1360 = new int[j1];
for (int j2 = 0; j2 < j1; j2++) {
anIntArray1360[j2] = class30_sub2_sub2_2.get2U();
}
abyte2 = archive.read("midi_index", null);
class30_sub2_sub2_2 = new Buffer(abyte2);
class30_sub2_sub2_2 = new Packet(abyte2);
j1 = abyte2.length;
anIntArray1348 = new int[j1];
for (int k2 = 0; k2 < j1; k2++) {
@@ -1,6 +1,30 @@
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
public class Buffer extends DoublyLinkedListNode {
/**
* A {@link Packet} encapsulates a finite amount of data and provides methods for reading and writing to that data.
* The <code>put()</code> and <code>get()</code> methods describe the type of data they use by attributes in their
* suffix. The naming convention is <code>put[type][U:unsigned][endianness][modifier]</code>.
* <p>
* <b>Types:</b><br/>
* # — the number of bytes<br/>
* Op — 1 byte which is modified by the {@link #cipher}<br/>
* Smart — 1 or 2 byte value [-16384...16383]<br/>
* USmart — 1 or 2 byte value [0...32768]<br/>
* String — {@link StandardCharsets#ISO_8859_1} encoding delimited by a newline character (\n)<br/>
* <p>
* <b><a href="https://en.wikipedia.org/wiki/Endianness">Endianness</a>:</b><br/>
* LE — little endian (DCBA)<br/>
* ME — middle endian (CDAB) <br/>
* RME — reversed middle endian (BADC)<br/>
* Note: ME and RME are not standard, and are a form of obfuscation similar to the <i>modifier</i> attribute.<br/>
* <p>
* <b>Modifiers:</b><br/>
* A — put(v + 128) — get: v - 128<br/>
* C — put(-v) — get: -v<br/>
* S — put(128 - v) — get: 128 - v<br/>
*/
public class Packet extends DoublyLinkedListNode {
public static final LinkedList pool0 = new LinkedList();
public static final LinkedList pool1 = new LinkedList();
@@ -10,39 +34,39 @@ public class Buffer extends DoublyLinkedListNode {
public static int poolSize1;
public static int poolSize2;
public static Buffer create(int sizeType) {
public static Packet create(int sizeType) {
synchronized (pool1) {
Buffer buffer = null;
Packet packet = null;
if ((sizeType == 0) && (poolSize0 > 0)) {
poolSize0--;
buffer = (Buffer) pool0.method251();
packet = (Packet) pool0.method251();
} else if ((sizeType == 1) && (poolSize1 > 0)) {
poolSize1--;
buffer = (Buffer) pool1.method251();
packet = (Packet) pool1.method251();
} else if ((sizeType == 2) && (poolSize2 > 0)) {
poolSize2--;
buffer = (Buffer) pool2.method251();
packet = (Packet) pool2.method251();
}
if (buffer != null) {
buffer.position = 0;
return buffer;
if (packet != null) {
packet.position = 0;
return packet;
}
}
Buffer buffer = new Buffer();
buffer.position = 0;
Packet packet = new Packet();
packet.position = 0;
if (sizeType == 0) {
buffer.data = new byte[100];
packet.data = new byte[100];
} else if (sizeType == 1) {
buffer.data = new byte[5000];
packet.data = new byte[5000];
} else {
buffer.data = new byte[30000];
packet.data = new byte[30000];
}
return buffer;
return packet;
}
public byte[] data;
@@ -50,10 +74,10 @@ public class Buffer extends DoublyLinkedListNode {
public int bitPosition;
public ISAACCipher cipher;
public Buffer() {
public Packet() {
}
public Buffer(byte[] src) {
public Packet(byte[] src) {
data = src;
position = 0;
}
@@ -130,7 +154,7 @@ public class Buffer extends DoublyLinkedListNode {
}
public void put(String s) {
put(s.getBytes());
put(s.getBytes(StandardCharsets.ISO_8859_1));
put1('\n');
}
@@ -177,15 +201,25 @@ public class Buffer extends DoublyLinkedListNode {
return (128 - data[position++]) & 0xff;
}
/**
* Gets a 1 or 2 byte varint which has the range [-16384...16383].
*
* @return the value.
*/
public int getSmart() {
int i = data[position] & 0xff;
if (i < 0x80) {
return get1U() - 0x40;
} else {
return get2U() - 0xc000;
return get2U() - 0xC000;
}
}
/**
* Gets a 1 or 2 byte varint which has the range [0...32768].
*
* @return the value.
*/
public int getUSmart() {
int i = data[position] & 0xff;
if (i < 0x80) {
+18 -18
View File
@@ -101,22 +101,22 @@ public class PlayerEntity extends PathingEntity {
return model;
}
public void method451(Buffer buffer) {
buffer.position = 0;
anInt1702 = buffer.get1U();
anInt1706 = buffer.get1U();
public void method451(Packet packet) {
packet.position = 0;
anInt1702 = packet.get1U();
anInt1706 = packet.get1U();
aType_1698 = null;
anInt1701 = 0;
for (int j = 0; j < 12; j++) {
int k = buffer.get1U();
int k = packet.get1U();
if (k == 0) {
anIntArray1717[j] = 0;
continue;
}
int i1 = buffer.get1U();
int i1 = packet.get1U();
anIntArray1717[j] = (k << 8) + i1;
if ((j == 0) && (anIntArray1717[0] == 65535)) {
aType_1698 = NPCType.method159(buffer.get2U());
aType_1698 = NPCType.method159(packet.get2U());
break;
}
if ((anIntArray1717[j] >= 512) && ((anIntArray1717[j] - 512) < ObjType.anInt203)) {
@@ -127,43 +127,43 @@ public class PlayerEntity extends PathingEntity {
}
}
for (int l = 0; l < 5; l++) {
int j1 = buffer.get1U();
int j1 = packet.get1U();
if ((j1 < 0) || (j1 >= Game.anIntArrayArray1003[l].length)) {
j1 = 0;
}
anIntArray1700[l] = j1;
}
super.anInt1511 = buffer.get2U();
super.anInt1511 = packet.get2U();
if (super.anInt1511 == 65535) {
super.anInt1511 = -1;
}
super.anInt1512 = buffer.get2U();
super.anInt1512 = packet.get2U();
if (super.anInt1512 == 65535) {
super.anInt1512 = -1;
}
super.anInt1554 = buffer.get2U();
super.anInt1554 = packet.get2U();
if (super.anInt1554 == 65535) {
super.anInt1554 = -1;
}
super.anInt1555 = buffer.get2U();
super.anInt1555 = packet.get2U();
if (super.anInt1555 == 65535) {
super.anInt1555 = -1;
}
super.anInt1556 = buffer.get2U();
super.anInt1556 = packet.get2U();
if (super.anInt1556 == 65535) {
super.anInt1556 = -1;
}
super.anInt1557 = buffer.get2U();
super.anInt1557 = packet.get2U();
if (super.anInt1557 == 65535) {
super.anInt1557 = -1;
}
super.anInt1505 = buffer.get2U();
super.anInt1505 = packet.get2U();
if (super.anInt1505 == 65535) {
super.anInt1505 = -1;
}
aString1703 = StringUtil.formatName(StringUtil.fromBase37(buffer.get8()));
anInt1705 = buffer.get1U();
anInt1723 = buffer.get2U();
aString1703 = StringUtil.formatName(StringUtil.fromBase37(packet.get8()));
anInt1705 = packet.get1U();
anInt1723 = packet.get2U();
aBoolean1710 = true;
aLong1718 = 0L;
for (int k1 = 0; k1 < 12; k1++) {
+30 -30
View File
@@ -68,10 +68,10 @@ public class SceneBuilder {
return i_109_;
}
public static void method173(Buffer buffer, OnDemand onDemand) {
public static void method173(Packet packet, OnDemand onDemand) {
int i_110_ = -1;
for (; ; ) {
int i_111_ = buffer.getUSmart();
int i_111_ = packet.getUSmart();
if (i_111_ == 0) {
break;
}
@@ -79,11 +79,11 @@ public class SceneBuilder {
LocType type = LocType.method572(i_110_);
type.method574(onDemand);
for (; ; ) {
int i_112_ = buffer.getUSmart();
int i_112_ = packet.getUSmart();
if (i_112_ == 0) {
break;
}
buffer.get1U();
packet.get1U();
}
}
}
@@ -331,10 +331,10 @@ public class SceneBuilder {
public static boolean method189(int i, byte[] is, int i_250_) {
boolean bool = true;
Buffer buffer = new Buffer(is);
Packet packet = new Packet(is);
int i_252_ = -1;
for (; ; ) {
int i_253_ = buffer.getUSmart();
int i_253_ = packet.getUSmart();
if (i_253_ == 0) {
break;
}
@@ -343,20 +343,20 @@ public class SceneBuilder {
boolean bool_255_ = false;
for (; ; ) {
if (bool_255_) {
int i_256_ = buffer.getUSmart();
int i_256_ = packet.getUSmart();
if (i_256_ == 0) {
break;
}
buffer.get1U();
packet.get1U();
} else {
int i_257_ = buffer.getUSmart();
int i_257_ = packet.getUSmart();
if (i_257_ == 0) {
break;
}
i_254_ += i_257_ - 1;
int i_258_ = i_254_ & 0x3f;
int i_259_ = (i_254_ >> 6) & 0x3f;
int i_260_ = buffer.get1U() >> 2;
int i_260_ = packet.get1U() >> 2;
int i_261_ = i_259_ + i;
int i_262_ = i_258_ + i_250_;
if ((i_261_ > 0) && (i_262_ > 0) && (i_261_ < 103) && (i_262_ < 103)) {
@@ -1062,14 +1062,14 @@ public class SceneBuilder {
}
}
}
Buffer buffer = new Buffer(is);
Packet packet = new Packet(is);
for (int i_172_ = 0; i_172_ < 4; i_172_++) {
for (int i_173_ = 0; i_173_ < 64; i_173_++) {
for (int i_174_ = 0; i_174_ < 64; i_174_++) {
if ((i_172_ == i) && (i_173_ >= i_165_) && (i_173_ < (i_165_ + 8)) && (i_174_ >= i_166_) && (i_174_ < (i_166_ + 8))) {
method181(i_168_ + ChunkUtil.method156(i_174_ & 0x7, i_162_, i_173_ & 0x7), 0, buffer, i_164_ + ChunkUtil.method155(i_162_, i_174_ & 0x7, i_173_ & 0x7), i_167_, i_162_, 0);
method181(i_168_ + ChunkUtil.method156(i_174_ & 0x7, i_162_, i_173_ & 0x7), 0, packet, i_164_ + ChunkUtil.method155(i_162_, i_174_ & 0x7, i_173_ & 0x7), i_167_, i_162_, 0);
} else {
method181(-1, 0, buffer, -1, 0, 0, 0);
method181(-1, 0, packet, -1, 0, 0, 0);
}
}
}
@@ -1086,21 +1086,21 @@ public class SceneBuilder {
}
}
}
Buffer buffer = new Buffer(is);
Packet packet = new Packet(is);
for (int i_182_ = 0; i_182_ < 4; i_182_++) {
for (int i_183_ = 0; i_183_ < 64; i_183_++) {
for (int i_184_ = 0; i_184_ < 64; i_184_++) {
method181(i_184_ + i, i_177_, buffer, i_183_ + i_175_, i_182_, 0, i_176_);
method181(i_184_ + i, i_177_, packet, i_183_ + i_175_, i_182_, 0, i_176_);
}
}
}
}
public void method181(int i, int i_185_, Buffer buffer, int i_186_, int i_187_, int i_188_, int i_190_) {
public void method181(int i, int i_185_, Packet packet, int i_186_, int i_187_, int i_188_, int i_190_) {
if ((i_186_ >= 0) && (i_186_ < 104) && (i >= 0) && (i < 104)) {
aByteArrayArrayArray149[i_187_][i_186_][i] = (byte) 0;
for (; ; ) {
int i_191_ = buffer.get1U();
int i_191_ = packet.get1U();
if (i_191_ == 0) {
if (i_187_ == 0) {
anIntArrayArrayArray129[0][i_186_][i] = -method172(932731 + i_186_ + i_190_, 556238 + i + i_185_) * 8;
@@ -1111,7 +1111,7 @@ public class SceneBuilder {
break;
}
if (i_191_ == 1) {
int i_192_ = buffer.get1U();
int i_192_ = packet.get1U();
if (i_192_ == 1) {
i_192_ = 0;
}
@@ -1124,7 +1124,7 @@ public class SceneBuilder {
break;
}
if (i_191_ <= 49) {
aByteArrayArrayArray130[i_187_][i_186_][i] = buffer.get1();
aByteArrayArrayArray130[i_187_][i_186_][i] = packet.get1();
aByteArrayArrayArray136[i_187_][i_186_][i] = (byte) ((i_191_ - 2) / 4);
aByteArrayArrayArray148[i_187_][i_186_][i] = (byte) (((i_191_ - 2) + i_188_) & 0x3);
} else if (i_191_ <= 81) {
@@ -1135,16 +1135,16 @@ public class SceneBuilder {
}
} else {
for (; ; ) {
int i_193_ = buffer.get1U();
int i_193_ = packet.get1U();
if (i_193_ == 0) {
break;
}
if (i_193_ == 1) {
buffer.get1U();
packet.get1U();
break;
}
if (i_193_ <= 49) {
buffer.get1U();
packet.get1U();
}
}
}
@@ -1164,17 +1164,17 @@ public class SceneBuilder {
}
public void method183(SceneCollisionMap[] collisionMaps, SceneGraph graph, int i, int i_197_, int i_198_, int i_199_, byte[] is, int i_200_, int i_201_, int i_202_) {
Buffer buffer = new Buffer(is);
Packet packet = new Packet(is);
int i_203_ = -1;
for (; ; ) {
int i_204_ = buffer.getUSmart();
int i_204_ = packet.getUSmart();
if (i_204_ == 0) {
break;
}
i_203_ += i_204_;
int i_205_ = 0;
for (; ; ) {
int i_206_ = buffer.getUSmart();
int i_206_ = packet.getUSmart();
if (i_206_ == 0) {
break;
}
@@ -1182,7 +1182,7 @@ public class SceneBuilder {
int i_207_ = i_205_ & 0x3f;
int i_208_ = (i_205_ >> 6) & 0x3f;
int i_209_ = i_205_ >> 12;
int i_210_ = buffer.get1U();
int i_210_ = packet.get1U();
int i_211_ = i_210_ >> 2;
int i_212_ = i_210_ & 0x3;
if ((i_209_ == i) && (i_208_ >= i_200_) && (i_208_ < (i_200_ + 8)) && (i_207_ >= i_198_) && (i_207_ < (i_198_ + 8))) {
@@ -1228,17 +1228,17 @@ public class SceneBuilder {
}
public void method190(int i, SceneCollisionMap[] collisionMaps, int i_263_, SceneGraph graph, byte[] is) {
Buffer buffer = new Buffer(is);
Packet packet = new Packet(is);
int i_265_ = -1;
for (; ; ) {
int i_266_ = buffer.getUSmart();
int i_266_ = packet.getUSmart();
if (i_266_ == 0) {
break;
}
i_265_ += i_266_;
int i_267_ = 0;
for (; ; ) {
int i_268_ = buffer.getUSmart();
int i_268_ = packet.getUSmart();
if (i_268_ == 0) {
break;
}
@@ -1246,7 +1246,7 @@ public class SceneBuilder {
int i_269_ = i_267_ & 0x3f;
int i_270_ = (i_267_ >> 6) & 0x3f;
int i_271_ = i_267_ >> 12;
int i_272_ = buffer.get1U();
int i_272_ = packet.get1U();
int i_273_ = i_272_ >> 2;
int i_274_ = i_272_ & 0x3;
int i_275_ = i_270_ + i;
+6 -6
View File
@@ -83,27 +83,27 @@ public class SeqFrame {
* @see #get(int)
*/
public static void readAnimation(byte[] src) {
Buffer offsets = new Buffer(src);
Packet offsets = new Packet(src);
offsets.position = src.length - 8;
int offset = 0;
Buffer header = new Buffer(src);
Packet header = new Packet(src);
header.position = offset;
offset += offsets.get2U() + 2;
Buffer tran1 = new Buffer(src);
Packet tran1 = new Packet(src);
tran1.position = offset;
offset += offsets.get2U();
Buffer tran2 = new Buffer(src);
Packet tran2 = new Packet(src);
tran2.position = offset;
offset += offsets.get2U();
Buffer del = new Buffer(src);
Packet del = new Packet(src);
del.position = offset;
offset += offsets.get2U();
Buffer skel = new Buffer(src);
Packet skel = new Packet(src);
skel.position = offset;
SeqSkeleton skeleton = new SeqSkeleton(skel);
+1 -1
View File
@@ -31,7 +31,7 @@ public class SeqSkeleton {
*
* @param in the input
*/
public SeqSkeleton(Buffer in) {
public SeqSkeleton(Packet in) {
final int length = in.get1U();
baseTypes = new int[length];
baseLabels = new int[length][];
+20 -20
View File
@@ -26,8 +26,8 @@ public class SeqType {
}
public static void method257(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("seq.dat", null));
anInt350 = buffer.get2U();
Packet packet = new Packet(archive.read("seq.dat", null));
anInt350 = packet.get2U();
if (aTypeArray351 == null) {
aTypeArray351 = new SeqType[anInt350];
}
@@ -35,7 +35,7 @@ public class SeqType {
if (aTypeArray351[j] == null) {
aTypeArray351[j] = new SeqType();
}
aTypeArray351[j].method259(buffer);
aTypeArray351[j].method259(packet);
}
}
@@ -53,52 +53,52 @@ public class SeqType {
return j;
}
public void method259(Buffer buffer) {
public void method259(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
break;
}
if (i == 1) {
anInt352 = buffer.get1U();
anInt352 = packet.get1U();
anIntArray353 = new int[anInt352];
anIntArray354 = new int[anInt352];
anIntArray355 = new int[anInt352];
for (int j = 0; j < anInt352; j++) {
anIntArray353[j] = buffer.get2U();
anIntArray354[j] = buffer.get2U();
anIntArray353[j] = packet.get2U();
anIntArray354[j] = packet.get2U();
if (anIntArray354[j] == 65535) {
anIntArray354[j] = -1;
}
anIntArray355[j] = buffer.get2U();
anIntArray355[j] = packet.get2U();
}
} else if (i == 2) {
anInt356 = buffer.get2U();
anInt356 = packet.get2U();
} else if (i == 3) {
int k = buffer.get1U();
int k = packet.get1U();
anIntArray357 = new int[k + 1];
for (int l = 0; l < k; l++) {
anIntArray357[l] = buffer.get1U();
anIntArray357[l] = packet.get1U();
}
anIntArray357[k] = 9999999;
} else if (i == 4) {
aBoolean358 = true;
} else if (i == 5) {
anInt359 = buffer.get1U();
anInt359 = packet.get1U();
} else if (i == 6) {
anInt360 = buffer.get2U();
anInt360 = packet.get2U();
} else if (i == 7) {
anInt361 = buffer.get2U();
anInt361 = packet.get2U();
} else if (i == 8) {
anInt362 = buffer.get1U();
anInt362 = packet.get1U();
} else if (i == 9) {
anInt363 = buffer.get1U();
anInt363 = packet.get1U();
} else if (i == 10) {
anInt364 = buffer.get1U();
anInt364 = packet.get1U();
} else if (i == 11) {
anInt365 = buffer.get1U();
anInt365 = packet.get1U();
} else if (i == 12) {
unusedInt = buffer.get4();
unusedInt = packet.get4();
} else {
System.out.println("Error unrecognised seq config code: " + i);
}
+9 -9
View File
@@ -19,20 +19,20 @@ public class SoundEnvelope {
public SoundEnvelope() {
}
public void method325(Buffer buffer) {
anInt540 = buffer.get1U();
anInt538 = buffer.get4();
anInt539 = buffer.get4();
method326(buffer);
public void method325(Packet packet) {
anInt540 = packet.get1U();
anInt538 = packet.get4();
anInt539 = packet.get4();
method326(packet);
}
public void method326(Buffer buffer) {
anInt535 = buffer.get1U();
public void method326(Packet packet) {
anInt535 = packet.get1U();
anIntArray536 = new int[anInt535];
anIntArray537 = new int[anInt535];
for (int i = 0; i < anInt535; i++) {
anIntArray536[i] = buffer.get2U();
anIntArray537[i] = buffer.get2U();
anIntArray536[i] = packet.get2U();
anIntArray537[i] = packet.get2U();
}
}
+10 -10
View File
@@ -69,25 +69,25 @@ public class SoundFilter {
return anIntArray665[i] * 2;
}
public void method545(Buffer buffer, SoundEnvelope envelope) {
int i = buffer.get1U();
public void method545(Packet packet, SoundEnvelope envelope) {
int i = packet.get1U();
anIntArray665[0] = i >> 4;
anIntArray665[1] = i & 0xf;
if (i != 0) {
anIntArray668[0] = buffer.get2U();
anIntArray668[1] = buffer.get2U();
int j = buffer.get1U();
anIntArray668[0] = packet.get2U();
anIntArray668[1] = packet.get2U();
int j = packet.get1U();
for (int k = 0; k < 2; k++) {
for (int l = 0; l < anIntArray665[k]; l++) {
anIntArrayArrayArray666[k][0][l] = buffer.get2U();
anIntArrayArrayArray667[k][0][l] = buffer.get2U();
anIntArrayArrayArray666[k][0][l] = packet.get2U();
anIntArrayArrayArray667[k][0][l] = packet.get2U();
}
}
for (int i1 = 0; i1 < 2; i1++) {
for (int j1 = 0; j1 < anIntArray665[i1]; j1++) {
if ((j & (1 << (i1 * 4) << j1)) != 0) {
anIntArrayArrayArray666[i1][1][j1] = buffer.get2U();
anIntArrayArrayArray667[i1][1][j1] = buffer.get2U();
anIntArrayArrayArray666[i1][1][j1] = packet.get2U();
anIntArrayArrayArray667[i1][1][j1] = packet.get2U();
} else {
anIntArrayArrayArray666[i1][1][j1] = anIntArrayArrayArray666[i1][0][j1];
anIntArrayArrayArray667[i1][1][j1] = anIntArrayArrayArray667[i1][0][j1];
@@ -95,7 +95,7 @@ public class SoundFilter {
}
}
if ((j != 0) || (anIntArray668[1] != anIntArray668[0])) {
envelope.method326(buffer);
envelope.method326(packet);
}
} else {
anIntArray668[0] = anIntArray668[1] = 0;
+23 -23
View File
@@ -231,51 +231,51 @@ public class SoundTone {
}
}
public void method169(Buffer buffer) {
public void method169(Packet packet) {
aEnvelope_98 = new SoundEnvelope();
aEnvelope_98.method325(buffer);
aEnvelope_98.method325(packet);
aEnvelope_99 = new SoundEnvelope();
aEnvelope_99.method325(buffer);
int i = buffer.get1U();
aEnvelope_99.method325(packet);
int i = packet.get1U();
if (i != 0) {
buffer.position--;
packet.position--;
aEnvelope_100 = new SoundEnvelope();
aEnvelope_100.method325(buffer);
aEnvelope_100.method325(packet);
aEnvelope_101 = new SoundEnvelope();
aEnvelope_101.method325(buffer);
aEnvelope_101.method325(packet);
}
i = buffer.get1U();
i = packet.get1U();
if (i != 0) {
buffer.position--;
packet.position--;
aEnvelope_102 = new SoundEnvelope();
aEnvelope_102.method325(buffer);
aEnvelope_102.method325(packet);
aEnvelope_103 = new SoundEnvelope();
aEnvelope_103.method325(buffer);
aEnvelope_103.method325(packet);
}
i = buffer.get1U();
i = packet.get1U();
if (i != 0) {
buffer.position--;
packet.position--;
aEnvelope_104 = new SoundEnvelope();
aEnvelope_104.method325(buffer);
aEnvelope_104.method325(packet);
aEnvelope_105 = new SoundEnvelope();
aEnvelope_105.method325(buffer);
aEnvelope_105.method325(packet);
}
for (int j = 0; j < 10; j++) {
int k = buffer.getUSmart();
int k = packet.getUSmart();
if (k == 0) {
break;
}
anIntArray106[j] = k;
anIntArray107[j] = buffer.getSmart();
anIntArray108[j] = buffer.getUSmart();
anIntArray107[j] = packet.getSmart();
anIntArray108[j] = packet.getUSmart();
}
anInt109 = buffer.getUSmart();
anInt110 = buffer.getUSmart();
anInt113 = buffer.get2U();
anInt114 = buffer.get2U();
anInt109 = packet.getUSmart();
anInt110 = packet.getUSmart();
anInt113 = packet.get2U();
anInt114 = packet.get2U();
aSoundFilter_111 = new SoundFilter();
aEnvelope_112 = new SoundEnvelope();
aSoundFilter_111.method545(buffer, aEnvelope_112);
aSoundFilter_111.method545(packet, aEnvelope_112);
}
}
+29 -29
View File
@@ -7,7 +7,7 @@ public class SoundTrack {
public static final SoundTrack[] A_TRACK_ARRAY_325 = new SoundTrack[5000];
public static final int[] anIntArray326 = new int[5000];
public static byte[] aByteArray327;
public static Buffer aBuffer_328;
public static Packet aPacket_328;
public final SoundTone[] aToneArray329 = new SoundTone[10];
public int anInt330;
public int anInt331;
@@ -15,22 +15,22 @@ public class SoundTrack {
public SoundTrack() {
}
public static void method240(Buffer buffer) {
public static void method240(Packet packet) {
aByteArray327 = new byte[0x6baa8];
aBuffer_328 = new Buffer(aByteArray327);
aPacket_328 = new Packet(aByteArray327);
SoundTone.method166();
do {
int j = buffer.get2U();
int j = packet.get2U();
if (j == 65535) {
return;
}
A_TRACK_ARRAY_325[j] = new SoundTrack();
A_TRACK_ARRAY_325[j].method242(buffer);
A_TRACK_ARRAY_325[j].method242(packet);
anIntArray326[j] = A_TRACK_ARRAY_325[j].method243();
} while (true);
}
public static Buffer method241(int i, int j) {
public static Packet method241(int i, int j) {
if (A_TRACK_ARRAY_325[j] != null) {
SoundTrack track = A_TRACK_ARRAY_325[j];
return track.method244(i);
@@ -39,17 +39,17 @@ public class SoundTrack {
}
}
public void method242(Buffer buffer) {
public void method242(Packet packet) {
for (int i = 0; i < 10; i++) {
int j = buffer.get1U();
int j = packet.get1U();
if (j != 0) {
buffer.position--;
packet.position--;
aToneArray329[i] = new SoundTone();
aToneArray329[i].method169(buffer);
aToneArray329[i].method169(packet);
}
}
anInt330 = buffer.get2U();
anInt331 = buffer.get2U();
anInt330 = packet.get2U();
anInt331 = packet.get2U();
}
public int method243() {
@@ -77,24 +77,24 @@ public class SoundTrack {
return j;
}
public Buffer method244(int i) {
public Packet method244(int i) {
int k = method245(i);
aBuffer_328.position = 0;
aBuffer_328.put4(0x52494646);
aBuffer_328.put4LE(36 + k);
aBuffer_328.put4(0x57415645);
aBuffer_328.put4(0x666d7420);
aBuffer_328.put4LE(16);
aBuffer_328.put2LE(1);
aBuffer_328.put2LE(1);
aBuffer_328.put4LE(22050);
aBuffer_328.put4LE(22050);
aBuffer_328.put2LE(1);
aBuffer_328.put2LE(8);
aBuffer_328.put4(0x64617461);
aBuffer_328.put4LE(k);
aBuffer_328.position += k;
return aBuffer_328;
aPacket_328.position = 0;
aPacket_328.put4(0x52494646);
aPacket_328.put4LE(36 + k);
aPacket_328.put4(0x57415645);
aPacket_328.put4(0x666d7420);
aPacket_328.put4LE(16);
aPacket_328.put2LE(1);
aPacket_328.put2LE(1);
aPacket_328.put4LE(22050);
aPacket_328.put4LE(22050);
aPacket_328.put2LE(1);
aPacket_328.put2LE(8);
aPacket_328.put4(0x64617461);
aPacket_328.put4LE(k);
aPacket_328.position += k;
return aPacket_328;
}
public int method245(int i) {
+14 -14
View File
@@ -23,8 +23,8 @@ public class SpotAnimType {
}
public static void method264(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("spotanim.dat", null));
anInt402 = buffer.get2U();
Packet packet = new Packet(archive.read("spotanim.dat", null));
anInt402 = packet.get2U();
if (aTypeArray403 == null) {
aTypeArray403 = new SpotAnimType[anInt402];
}
@@ -33,37 +33,37 @@ public class SpotAnimType {
aTypeArray403[j] = new SpotAnimType();
}
aTypeArray403[j].anInt404 = j;
aTypeArray403[j].method265(buffer);
aTypeArray403[j].method265(packet);
}
}
public void method265(Buffer buffer) {
public void method265(Packet packet) {
do {
int i = buffer.get1U();
int i = packet.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt405 = buffer.get2U();
anInt405 = packet.get2U();
} else if (i == 2) {
anInt406 = buffer.get2U();
anInt406 = packet.get2U();
if (SeqType.aTypeArray351 != null) {
aType_407 = SeqType.aTypeArray351[anInt406];
}
} else if (i == 4) {
anInt410 = buffer.get2U();
anInt410 = packet.get2U();
} else if (i == 5) {
anInt411 = buffer.get2U();
anInt411 = packet.get2U();
} else if (i == 6) {
anInt412 = buffer.get2U();
anInt412 = packet.get2U();
} else if (i == 7) {
anInt413 = buffer.get1U();
anInt413 = packet.get1U();
} else if (i == 8) {
anInt414 = buffer.get1U();
anInt414 = packet.get1U();
} else if ((i >= 40) && (i < 50)) {
anIntArray408[i - 40] = buffer.get2U();
anIntArray408[i - 40] = packet.get2U();
} else if ((i >= 50) && (i < 60)) {
anIntArray409[i - 50] = buffer.get2U();
anIntArray409[i - 50] = packet.get2U();
} else {
System.out.println("Error unrecognised spotanim config code: " + i);
}
+12 -12
View File
@@ -18,8 +18,8 @@ public class VarbitType {
}
public static void method533(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varbit.dat", null));
anInt645 = buffer.get2U();
Packet packet = new Packet(archive.read("varbit.dat", null));
anInt645 = packet.get2U();
if (aVarbitArray646 == null) {
aVarbitArray646 = new VarbitType[anInt645];
}
@@ -27,34 +27,34 @@ public class VarbitType {
if (aVarbitArray646[j] == null) {
aVarbitArray646[j] = new VarbitType();
}
aVarbitArray646[j].method534(buffer);
aVarbitArray646[j].method534(packet);
if (aVarbitArray646[j].aBoolean651) {
VarpType.aVarpArray701[aVarbitArray646[j].anInt648].unusedBool3 = true;
}
}
if (buffer.position != buffer.data.length) {
if (packet.position != packet.data.length) {
System.out.println("varbit load mismatch");
}
}
public void method534(Buffer buffer) {
public void method534(Packet packet) {
do {
int j = buffer.get1U();
int j = packet.get1U();
if (j == 0) {
return;
}
if (j == 1) {
anInt648 = buffer.get2U();
anInt649 = buffer.get1U();
anInt650 = buffer.get1U();
anInt648 = packet.get2U();
anInt649 = packet.get1U();
anInt650 = packet.get1U();
} else if (j == 10) {
unusedString = buffer.getString();
unusedString = packet.getString();
} else if (j == 2) {
aBoolean651 = true;
} else if (j == 3) {
unusedInt0 = buffer.get4();
unusedInt0 = packet.get4();
} else if (j == 4) {
unusedInt1 = buffer.get4();
unusedInt1 = packet.get4();
} else {
System.out.println("Error unrecognised config code: " + j);
}
+12 -12
View File
@@ -25,9 +25,9 @@ public class VarpType {
}
public static void method546(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varp.dat", null));
Packet packet = new Packet(archive.read("varp.dat", null));
anInt702 = 0;
anInt700 = buffer.get2U();
anInt700 = packet.get2U();
if (aVarpArray701 == null) {
aVarpArray701 = new VarpType[anInt700];
}
@@ -38,43 +38,43 @@ public class VarpType {
if (aVarpArray701[j] == null) {
aVarpArray701[j] = new VarpType();
}
aVarpArray701[j].method547(buffer, j);
aVarpArray701[j].method547(packet, j);
}
if (buffer.position != buffer.data.length) {
if (packet.position != packet.data.length) {
System.out.println("varptype load mismatch");
}
}
public void method547(Buffer buffer, int i) {
public void method547(Packet packet, int i) {
do {
int j = buffer.get1U();
int j = packet.get1U();
if (j == 0) {
return;
}
if (j == 1) {
unusedInt0 = buffer.get1U();
unusedInt0 = packet.get1U();
} else if (j == 2) {
unusedInt1 = buffer.get1U();
unusedInt1 = packet.get1U();
} else if (j == 3) {
unusedBool0 = true;
anIntArray703[anInt702++] = i;
} else if (j == 4) {
unusedBool1 = false;
} else if (j == 5) {
anInt709 = buffer.get2U();
anInt709 = packet.get2U();
} else if (j == 6) {
unusedBool2 = true;
} else if (j == 7) {
unusedInt2 = buffer.get4();
unusedInt2 = packet.get4();
} else if (j == 8) {
unusedInt3 = 1;
unusedBool3 = true;
} else if (j == 10) {
unusedString = buffer.getString();
unusedString = packet.getString();
} else if (j == 11) {
unusedBool3 = true;
} else if (j == 12) {
unusedInt4 = buffer.get4();
unusedInt4 = packet.get4();
} else if (j == 13) {
unusedInt3 = 2;
} else {