Buffer changes

This commit is contained in:
thedaneeffect committed 2021-03-10 04:09:14 -05:00
1 parent 65cd676f18
commit def89acd40
31 files changed
+1099 -1105

No files matched your search

+177 -177
View File
@@ -4,39 +4,39 @@
public class BZip2 {
public static final BZip2Context context = new BZip2Context();
private static final BZip2Stream stream = new BZip2Stream();
public static void inflate(byte[] abyte0, int i, byte[] abyte1, int j, int k) {
synchronized (context) {
context.aByteArray563 = abyte1;
context.anInt564 = k;
context.aByteArray568 = abyte0;
context.anInt569 = 0;
context.anInt565 = j;
context.anInt570 = i;
context.anInt577 = 0;
context.anInt576 = 0;
context.anInt566 = 0;
context.anInt567 = 0;
context.anInt571 = 0;
context.anInt572 = 0;
context.anInt579 = 0;
method227(context);
public static void decompress(byte[] dst, int dstLen, byte[] src, int srcOff, int srcLen) {
synchronized (stream) {
stream.aByteArray563 = src;
stream.anInt564 = srcOff;
stream.aByteArray568 = dst;
stream.anInt569 = 0;
stream.anInt565 = srcLen;
stream.anInt570 = dstLen;
stream.anInt577 = 0;
stream.anInt576 = 0;
stream.anInt566 = 0;
stream.anInt567 = 0;
stream.anInt571 = 0;
stream.anInt572 = 0;
stream.anInt579 = 0;
decompress(stream);
}
}
public static void method226(BZip2Context block) {
byte byte4 = block.aByte573;
int i = block.anInt574;
int j = block.anInt584;
int k = block.anInt582;
int[] ai = BZip2Context.anIntArray587;
int l = block.anInt581;
byte[] abyte0 = block.aByteArray568;
int i1 = block.anInt569;
int j1 = block.anInt570;
public static void method226(BZip2Stream stream) {
byte byte4 = stream.aByte573;
int i = stream.anInt574;
int j = stream.anInt584;
int k = stream.anInt582;
int[] ai = BZip2Stream.anIntArray587;
int l = stream.anInt581;
byte[] abyte0 = stream.aByteArray568;
int i1 = stream.anInt569;
int j1 = stream.anInt570;
int k1 = j1;
int l1 = block.anInt601 + 1;
int l1 = stream.anInt601 + 1;
label0:
do {
if (i > 0) {
@@ -127,167 +127,167 @@ public class BZip2 {
}
}
} while (true);
int i2 = block.anInt571;
block.anInt571 += k1 - j1;
if (block.anInt571 < i2) {
block.anInt572++;
int i2 = stream.anInt571;
stream.anInt571 += k1 - j1;
if (stream.anInt571 < i2) {
stream.anInt572++;
}
block.aByte573 = byte4;
block.anInt574 = i;
block.anInt584 = j;
block.anInt582 = k;
BZip2Context.anIntArray587 = ai;
block.anInt581 = l;
block.aByteArray568 = abyte0;
block.anInt569 = i1;
block.anInt570 = j1;
stream.aByte573 = byte4;
stream.anInt574 = i;
stream.anInt584 = j;
stream.anInt582 = k;
BZip2Stream.anIntArray587 = ai;
stream.anInt581 = l;
stream.aByteArray568 = abyte0;
stream.anInt569 = i1;
stream.anInt570 = j1;
}
public static void method227(BZip2Context block) {
public static void decompress(BZip2Stream stream) {
int k8 = 0;
int[] ai = null;
int[] ai1 = null;
int[] ai2 = null;
block.anInt578 = 1;
if (BZip2Context.anIntArray587 == null) {
BZip2Context.anIntArray587 = new int[block.anInt578 * 0x186a0];
stream.anInt578 = 1;
if (BZip2Stream.anIntArray587 == null) {
BZip2Stream.anIntArray587 = new int[stream.anInt578 * 100000];
}
boolean flag19 = true;
while (flag19) {
byte byte0 = method228(block);
byte byte0 = method228(stream);
if (byte0 == 23) {
return;
}
method228(block);
method228(block);
method228(block);
method228(block);
method228(block);
block.anInt579++;
method228(block);
method228(block);
method228(block);
method228(block);
byte0 = method229(block);
block.aBoolean575 = byte0 != 0;
if (block.aBoolean575) {
method228(stream);
method228(stream);
method228(stream);
method228(stream);
method228(stream);
stream.anInt579++;
method228(stream);
method228(stream);
method228(stream);
method228(stream);
byte0 = method229(stream);
stream.aBoolean575 = byte0 != 0;
if (stream.aBoolean575) {
System.out.println("PANIC! RANDOMISED BLOCK!");
}
block.anInt580 = 0;
byte0 = method228(block);
block.anInt580 = (block.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(block);
block.anInt580 = (block.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(block);
block.anInt580 = (block.anInt580 << 8) | (byte0 & 0xff);
stream.anInt580 = 0;
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
byte0 = method228(stream);
stream.anInt580 = (stream.anInt580 << 8) | (byte0 & 0xff);
for (int j = 0; j < 16; j++) {
byte byte1 = method229(block);
block.aBooleanArray590[j] = byte1 == 1;
byte byte1 = method229(stream);
stream.aBooleanArray590[j] = byte1 == 1;
}
for (int k = 0; k < 256; k++) {
block.aBooleanArray589[k] = false;
stream.aBooleanArray589[k] = false;
}
for (int l = 0; l < 16; l++) {
if (block.aBooleanArray590[l]) {
if (stream.aBooleanArray590[l]) {
for (int i3 = 0; i3 < 16; i3++) {
byte byte2 = method229(block);
byte byte2 = method229(stream);
if (byte2 == 1) {
block.aBooleanArray589[(l * 16) + i3] = true;
stream.aBooleanArray589[(l * 16) + i3] = true;
}
}
}
}
method231(block);
int i4 = block.anInt588 + 2;
int j4 = method230(3, block);
int k4 = method230(15, block);
method231(stream);
int i4 = stream.anInt588 + 2;
int j4 = method230(3, stream);
int k4 = method230(15, stream);
for (int i1 = 0; i1 < k4; i1++) {
int j3 = 0;
do {
byte byte3 = method229(block);
byte byte3 = method229(stream);
if (byte3 == 0) {
break;
}
j3++;
} while (true);
block.aByteArray595[i1] = (byte) j3;
stream.aByteArray595[i1] = (byte) j3;
}
byte[] abyte0 = new byte[6];
for (byte byte16 = 0; byte16 < j4; byte16++) {
abyte0[byte16] = byte16;
}
for (int j1 = 0; j1 < k4; j1++) {
byte byte17 = block.aByteArray595[j1];
byte byte17 = stream.aByteArray595[j1];
byte byte15 = abyte0[byte17];
for (; byte17 > 0; byte17--) {
abyte0[byte17] = abyte0[byte17 - 1];
}
abyte0[0] = byte15;
block.aByteArray594[j1] = byte15;
stream.aByteArray594[j1] = byte15;
}
for (int k3 = 0; k3 < j4; k3++) {
int l6 = method230(5, block);
int l6 = method230(5, stream);
for (int k1 = 0; k1 < i4; k1++) {
do {
byte byte4 = method229(block);
byte byte4 = method229(stream);
if (byte4 == 0) {
break;
}
byte4 = method229(block);
byte4 = method229(stream);
if (byte4 == 0) {
l6++;
} else {
l6--;
}
} while (true);
block.aByteArrayArray596[k3][k1] = (byte) l6;
stream.aByteArrayArray596[k3][k1] = (byte) l6;
}
}
for (int l3 = 0; l3 < j4; l3++) {
byte byte8 = 32;
int i = 0;
for (int l1 = 0; l1 < i4; l1++) {
if (block.aByteArrayArray596[l3][l1] > i) {
i = block.aByteArrayArray596[l3][l1];
if (stream.aByteArrayArray596[l3][l1] > i) {
i = stream.aByteArrayArray596[l3][l1];
}
if (block.aByteArrayArray596[l3][l1] < byte8) {
byte8 = block.aByteArrayArray596[l3][l1];
if (stream.aByteArrayArray596[l3][l1] < byte8) {
byte8 = stream.aByteArrayArray596[l3][l1];
}
}
method232(block.anIntArrayArray597[l3], block.anIntArrayArray598[l3], block.anIntArrayArray599[l3], block.aByteArrayArray596[l3], byte8, i, i4);
block.anIntArray600[l3] = byte8;
method232(stream.anIntArrayArray597[l3], stream.anIntArrayArray598[l3], stream.anIntArrayArray599[l3], stream.aByteArrayArray596[l3], byte8, i, i4);
stream.anIntArray600[l3] = byte8;
}
int l4 = block.anInt588 + 1;
int l4 = stream.anInt588 + 1;
int i5 = -1;
int j5 = 0;
for (int i2 = 0; i2 <= 255; i2++) {
block.anIntArray583[i2] = 0;
stream.anIntArray583[i2] = 0;
}
int j9 = 4095;
for (int l8 = 15; l8 >= 0; l8--) {
for (int i9 = 15; i9 >= 0; i9--) {
block.aByteArray592[j9] = (byte) ((l8 * 16) + i9);
stream.aByteArray592[j9] = (byte) ((l8 * 16) + i9);
j9--;
}
block.anIntArray593[l8] = j9 + 1;
stream.anIntArray593[l8] = j9 + 1;
}
int i6 = 0;
if (j5 == 0) {
i5++;
j5 = 50;
byte byte12 = block.aByteArray594[i5];
k8 = block.anIntArray600[byte12];
ai = block.anIntArrayArray597[byte12];
ai2 = block.anIntArrayArray599[byte12];
ai1 = block.anIntArrayArray598[byte12];
byte byte12 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte12];
ai = stream.anIntArrayArray597[byte12];
ai2 = stream.anIntArrayArray599[byte12];
ai1 = stream.anIntArrayArray598[byte12];
}
j5--;
int i7 = k8;
int l7;
byte byte9;
for (l7 = method230(i7, block); l7 > ai[i7]; l7 = (l7 << 1) | byte9) {
for (l7 = method230(i7, stream); l7 > ai[i7]; l7 = (l7 << 1) | byte9) {
i7++;
byte9 = method229(block);
byte9 = method229(stream);
}
for (int k5 = ai2[l7 - ai1[i7]]; k5 != l4; ) {
if ((k5 == 0) || (k5 == 1)) {
@@ -303,156 +303,156 @@ public class BZip2 {
if (j5 == 0) {
i5++;
j5 = 50;
byte byte13 = block.aByteArray594[i5];
k8 = block.anIntArray600[byte13];
ai = block.anIntArrayArray597[byte13];
ai2 = block.anIntArrayArray599[byte13];
ai1 = block.anIntArrayArray598[byte13];
byte byte13 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte13];
ai = stream.anIntArrayArray597[byte13];
ai2 = stream.anIntArrayArray599[byte13];
ai1 = stream.anIntArrayArray598[byte13];
}
j5--;
int j7 = k8;
int i8;
byte byte10;
for (i8 = method230(j7, block); i8 > ai[j7]; i8 = (i8 << 1) | byte10) {
for (i8 = method230(j7, stream); i8 > ai[j7]; i8 = (i8 << 1) | byte10) {
j7++;
byte10 = method229(block);
byte10 = method229(stream);
}
k5 = ai2[i8 - ai1[j7]];
} while ((k5 == 0) || (k5 == 1));
j6++;
byte byte5 = block.aByteArray591[block.aByteArray592[block.anIntArray593[0]] & 0xff];
block.anIntArray583[byte5 & 0xff] += j6;
byte byte5 = stream.aByteArray591[stream.aByteArray592[stream.anIntArray593[0]] & 0xff];
stream.anIntArray583[byte5 & 0xff] += j6;
for (; j6 > 0; j6--) {
BZip2Context.anIntArray587[i6] = byte5 & 0xff;
BZip2Stream.anIntArray587[i6] = byte5 & 0xff;
i6++;
}
} else {
int j11 = k5 - 1;
byte byte6;
if (j11 < 16) {
int j10 = block.anIntArray593[0];
byte6 = block.aByteArray592[j10 + j11];
int j10 = stream.anIntArray593[0];
byte6 = stream.aByteArray592[j10 + j11];
for (; j11 > 3; j11 -= 4) {
int k11 = j10 + j11;
block.aByteArray592[k11] = block.aByteArray592[k11 - 1];
block.aByteArray592[k11 - 1] = block.aByteArray592[k11 - 2];
block.aByteArray592[k11 - 2] = block.aByteArray592[k11 - 3];
block.aByteArray592[k11 - 3] = block.aByteArray592[k11 - 4];
stream.aByteArray592[k11] = stream.aByteArray592[k11 - 1];
stream.aByteArray592[k11 - 1] = stream.aByteArray592[k11 - 2];
stream.aByteArray592[k11 - 2] = stream.aByteArray592[k11 - 3];
stream.aByteArray592[k11 - 3] = stream.aByteArray592[k11 - 4];
}
for (; j11 > 0; j11--) {
block.aByteArray592[j10 + j11] = block.aByteArray592[(j10 + j11) - 1];
stream.aByteArray592[j10 + j11] = stream.aByteArray592[(j10 + j11) - 1];
}
block.aByteArray592[j10] = byte6;
stream.aByteArray592[j10] = byte6;
} else {
int l10 = j11 / 16;
int i11 = j11 % 16;
int k10 = block.anIntArray593[l10] + i11;
byte6 = block.aByteArray592[k10];
for (; k10 > block.anIntArray593[l10]; k10--) {
block.aByteArray592[k10] = block.aByteArray592[k10 - 1];
int k10 = stream.anIntArray593[l10] + i11;
byte6 = stream.aByteArray592[k10];
for (; k10 > stream.anIntArray593[l10]; k10--) {
stream.aByteArray592[k10] = stream.aByteArray592[k10 - 1];
}
block.anIntArray593[l10]++;
stream.anIntArray593[l10]++;
for (; l10 > 0; l10--) {
block.anIntArray593[l10]--;
block.aByteArray592[block.anIntArray593[l10]] = block.aByteArray592[(block.anIntArray593[l10 - 1] + 16) - 1];
stream.anIntArray593[l10]--;
stream.aByteArray592[stream.anIntArray593[l10]] = stream.aByteArray592[(stream.anIntArray593[l10 - 1] + 16) - 1];
}
block.anIntArray593[0]--;
block.aByteArray592[block.anIntArray593[0]] = byte6;
if (block.anIntArray593[0] == 0) {
stream.anIntArray593[0]--;
stream.aByteArray592[stream.anIntArray593[0]] = byte6;
if (stream.anIntArray593[0] == 0) {
int i10 = 4095;
for (int k9 = 15; k9 >= 0; k9--) {
for (int l9 = 15; l9 >= 0; l9--) {
block.aByteArray592[i10] = block.aByteArray592[block.anIntArray593[k9] + l9];
stream.aByteArray592[i10] = stream.aByteArray592[stream.anIntArray593[k9] + l9];
i10--;
}
block.anIntArray593[k9] = i10 + 1;
stream.anIntArray593[k9] = i10 + 1;
}
}
}
block.anIntArray583[block.aByteArray591[byte6 & 0xff] & 0xff]++;
BZip2Context.anIntArray587[i6] = block.aByteArray591[byte6 & 0xff] & 0xff;
stream.anIntArray583[stream.aByteArray591[byte6 & 0xff] & 0xff]++;
BZip2Stream.anIntArray587[i6] = stream.aByteArray591[byte6 & 0xff] & 0xff;
i6++;
if (j5 == 0) {
i5++;
j5 = 50;
byte byte14 = block.aByteArray594[i5];
k8 = block.anIntArray600[byte14];
ai = block.anIntArrayArray597[byte14];
ai2 = block.anIntArrayArray599[byte14];
ai1 = block.anIntArrayArray598[byte14];
byte byte14 = stream.aByteArray594[i5];
k8 = stream.anIntArray600[byte14];
ai = stream.anIntArrayArray597[byte14];
ai2 = stream.anIntArrayArray599[byte14];
ai1 = stream.anIntArrayArray598[byte14];
}
j5--;
int k7 = k8;
int j8;
byte byte11;
for (j8 = method230(k7, block); j8 > ai[k7]; j8 = (j8 << 1) | byte11) {
for (j8 = method230(k7, stream); j8 > ai[k7]; j8 = (j8 << 1) | byte11) {
k7++;
byte11 = method229(block);
byte11 = method229(stream);
}
k5 = ai2[j8 - ai1[k7]];
}
}
block.anInt574 = 0;
block.aByte573 = 0;
block.anIntArray585[0] = 0;
stream.anInt574 = 0;
stream.aByte573 = 0;
stream.anIntArray585[0] = 0;
for (int j2 = 1; j2 <= 256; j2++) {
block.anIntArray585[j2] = block.anIntArray583[j2 - 1];
stream.anIntArray585[j2] = stream.anIntArray583[j2 - 1];
}
for (int k2 = 1; k2 <= 256; k2++) {
block.anIntArray585[k2] += block.anIntArray585[k2 - 1];
stream.anIntArray585[k2] += stream.anIntArray585[k2 - 1];
}
for (int l2 = 0; l2 < i6; l2++) {
byte byte7 = (byte) (BZip2Context.anIntArray587[l2] & 0xff);
BZip2Context.anIntArray587[block.anIntArray585[byte7 & 0xff]] |= l2 << 8;
block.anIntArray585[byte7 & 0xff]++;
byte byte7 = (byte) (BZip2Stream.anIntArray587[l2] & 0xff);
BZip2Stream.anIntArray587[stream.anIntArray585[byte7 & 0xff]] |= l2 << 8;
stream.anIntArray585[byte7 & 0xff]++;
}
block.anInt581 = BZip2Context.anIntArray587[block.anInt580] >> 8;
block.anInt584 = 0;
block.anInt581 = BZip2Context.anIntArray587[block.anInt581];
block.anInt582 = (byte) (block.anInt581 & 0xff);
block.anInt581 >>= 8;
block.anInt584++;
block.anInt601 = i6;
method226(block);
flag19 = (block.anInt584 == (block.anInt601 + 1)) && (block.anInt574 == 0);
stream.anInt581 = BZip2Stream.anIntArray587[stream.anInt580] >> 8;
stream.anInt584 = 0;
stream.anInt581 = BZip2Stream.anIntArray587[stream.anInt581];
stream.anInt582 = (byte) (stream.anInt581 & 0xff);
stream.anInt581 >>= 8;
stream.anInt584++;
stream.anInt601 = i6;
method226(stream);
flag19 = (stream.anInt584 == (stream.anInt601 + 1)) && (stream.anInt574 == 0);
}
}
public static byte method228(BZip2Context block) {
return (byte) method230(8, block);
public static byte method228(BZip2Stream stream) {
return (byte) method230(8, stream);
}
public static byte method229(BZip2Context block) {
return (byte) method230(1, block);
public static byte method229(BZip2Stream stream) {
return (byte) method230(1, stream);
}
public static int method230(int i, BZip2Context block) {
public static int method230(int i, BZip2Stream stream) {
int j;
do {
if (block.anInt577 >= i) {
int k = (block.anInt576 >> (block.anInt577 - i)) & ((1 << i) - 1);
block.anInt577 -= i;
if (stream.anInt577 >= i) {
int k = (stream.anInt576 >> (stream.anInt577 - i)) & ((1 << i) - 1);
stream.anInt577 -= i;
j = k;
break;
}
block.anInt576 = (block.anInt576 << 8) | (block.aByteArray563[block.anInt564] & 0xff);
block.anInt577 += 8;
block.anInt564++;
block.anInt565--;
block.anInt566++;
if (block.anInt566 == 0) {
block.anInt567++;
stream.anInt576 = (stream.anInt576 << 8) | (stream.aByteArray563[stream.anInt564] & 0xff);
stream.anInt577 += 8;
stream.anInt564++;
stream.anInt565--;
stream.anInt566++;
if (stream.anInt566 == 0) {
stream.anInt567++;
}
} while (true);
return j;
}
public static void method231(BZip2Context block) {
block.anInt588 = 0;
public static void method231(BZip2Stream stream) {
stream.anInt588 = 0;
for (int i = 0; i < 256; i++) {
if (block.aBooleanArray589[i]) {
block.aByteArray591[block.anInt588] = (byte) i;
block.anInt588++;
if (stream.aBooleanArray589[i]) {
stream.aByteArray591[stream.anInt588] = (byte) i;
stream.anInt588++;
}
}
}
@@ -2,7 +2,7 @@
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public class BZip2Context {
public class BZip2Stream {
public static int[] anIntArray587;
public byte[] aByteArray563;
@@ -43,7 +43,7 @@ public class BZip2Context {
public final int[] anIntArray600 = new int[6];
public int anInt601;
public BZip2Context() {
public BZip2Stream() {
}
}
+9 -9
View File
@@ -19,27 +19,27 @@ public class BitmapFont extends Draw2D {
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.getU16() + 4;
int k = buffer_1.getU8();
buffer_1.position = buffer.get2U() + 4;
int k = buffer_1.get1U();
if (k > 0) {
buffer_1.position += 3 * (k - 1);
}
for (int l = 0; l < 256; l++) {
anIntArray1494[l] = buffer_1.getU8();
anIntArray1495[l] = buffer_1.getU8();
int i1 = anIntArray1492[l] = buffer_1.getU16();
int j1 = anIntArray1493[l] = buffer_1.getU16();
int k1 = buffer_1.getU8();
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();
int l1 = i1 * j1;
aByteArrayArray1491[l] = new byte[l1];
if (k1 == 0) {
for (int i2 = 0; i2 < l1; i2++) {
aByteArrayArray1491[l][i2] = buffer.get8();
aByteArrayArray1491[l][i2] = buffer.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.get8();
aByteArrayArray1491[l][j2 + (l2 * i1)] = buffer.get1();
}
}
}
+59 -64
View File
@@ -1,33 +1,28 @@
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
public class Buffer extends DoublyLinkedListNode {
public static final LinkedList bufferPool0 = new LinkedList();
public static final LinkedList bufferPool1 = new LinkedList();
public static final LinkedList bufferPool2 = new LinkedList();
public static final LinkedList pool0 = new LinkedList();
public static final LinkedList pool1 = new LinkedList();
public static final LinkedList pool2 = new LinkedList();
private static final int[] BITMASK = {0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 0x1ffff, 0x3ffff, 0x7ffff, 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, -1};
public static int bufferPoolSize0;
public static int bufferPoolSize1;
public static int bufferPoolSize2;
public static int poolSize0;
public static int poolSize1;
public static int poolSize2;
public static Buffer create(int sizeType) {
synchronized (bufferPool1) {
synchronized (pool1) {
Buffer buffer = null;
if ((sizeType == 0) && (bufferPoolSize0 > 0)) {
bufferPoolSize0--;
buffer = (Buffer) bufferPool0.method251();
} else if ((sizeType == 1) && (bufferPoolSize1 > 0)) {
bufferPoolSize1--;
buffer = (Buffer) bufferPool1.method251();
} else if ((sizeType == 2) && (bufferPoolSize2 > 0)) {
bufferPoolSize2--;
buffer = (Buffer) bufferPool2.method251();
if ((sizeType == 0) && (poolSize0 > 0)) {
poolSize0--;
buffer = (Buffer) pool0.method251();
} else if ((sizeType == 1) && (poolSize1 > 0)) {
poolSize1--;
buffer = (Buffer) pool1.method251();
} else if ((sizeType == 2) && (poolSize2 > 0)) {
poolSize2--;
buffer = (Buffer) pool2.method251();
}
if (buffer != null) {
@@ -67,63 +62,63 @@ public class Buffer extends DoublyLinkedListNode {
data[position++] = (byte) (i + cipher.method246());
}
public void putSize8(int i) {
public void putSize1(int i) {
data[position - i - 1] = (byte) i;
}
public void put8(int i) {
public void put1(int i) {
data[position++] = (byte) i;
}
public void put8C(int i) {
public void put1C(int i) {
data[position++] = (byte) (-i);
}
public void put8S(int j) {
public void put1S(int j) {
data[position++] = (byte) (128 - j);
}
public void put16(int i) {
public void put2(int i) {
data[position++] = (byte) (i >> 8);
data[position++] = (byte) i;
}
public void put16A(int j) {
public void put2A(int j) {
data[position++] = (byte) (j >> 8);
data[position++] = (byte) (j + 128);
}
public void put16LE(int i) {
public void put2LE(int i) {
data[position++] = (byte) i;
data[position++] = (byte) (i >> 8);
}
public void put16LEA(int j) {
public void put2LEA(int j) {
data[position++] = (byte) (j + 128);
data[position++] = (byte) (j >> 8);
}
public void put24(int i) {
public void put3(int i) {
data[position++] = (byte) (i >> 16);
data[position++] = (byte) (i >> 8);
data[position++] = (byte) i;
}
public void put32(int i) {
public void put4(int i) {
data[position++] = (byte) (i >> 24);
data[position++] = (byte) (i >> 16);
data[position++] = (byte) (i >> 8);
data[position++] = (byte) i;
}
public void put32LE(int j) {
public void put4LE(int j) {
data[position++] = (byte) j;
data[position++] = (byte) (j >> 8);
data[position++] = (byte) (j >> 16);
data[position++] = (byte) (j >> 24);
}
public void put64(long l) {
public void put8(long l) {
data[position++] = (byte) (int) (l >> 56);
data[position++] = (byte) (int) (l >> 48);
data[position++] = (byte) (int) (l >> 40);
@@ -134,9 +129,9 @@ public class Buffer extends DoublyLinkedListNode {
data[position++] = (byte) (int) l;
}
public void putString(String s) {
put(s.getBytes(StandardCharsets.US_ASCII));
put8('\n');
public void put(String s) {
put(s.getBytes());
put1('\n');
}
public void put(byte[] src, int len, int off) {
@@ -154,73 +149,73 @@ public class Buffer extends DoublyLinkedListNode {
}
}
public byte get8() {
public byte get1() {
return data[position++];
}
public byte get8C() {
public byte get1C() {
return (byte) (-data[position++]);
}
public byte get8S() {
public byte get1S() {
return (byte) (128 - data[position++]);
}
public int getU8() {
public int get1U() {
return data[position++] & 0xff;
}
public int getU8A() {
public int get1UA() {
return (data[position++] - 128) & 0xff;
}
public int getU8C() {
public int getU1C() {
return -data[position++] & 0xff;
}
public int getU8S() {
public int get1US() {
return (128 - data[position++]) & 0xff;
}
public int getSmart() {
int i = data[position] & 0xff;
if (i < 0x80) {
return getU8() - 0x40;
return get1U() - 0x40;
} else {
return getU16() - 0xc000;
return get2U() - 0xc000;
}
}
public int getUSmart() {
int i = data[position] & 0xff;
if (i < 0x80) {
return getU8();
return get1U();
} else {
return getU16() - 0x7fff;
return get2U() - 0x7fff;
}
}
public int getU16() {
public int get2U() {
position += 2;
return ((data[position - 2] & 0xff) << 8) + (data[position - 1] & 0xff);
}
public int getU16A() {
public int get2UA() {
position += 2;
return ((data[position - 2] & 0xff) << 8) + ((data[position - 1] - 128) & 0xff);
}
public int getU16LE() {
public int get2ULE() {
position += 2;
return ((data[position - 1] & 0xff) << 8) + (data[position - 2] & 0xff);
}
public int getU16LEA() {
public int get2ULEA() {
position += 2;
return ((data[position - 1] & 0xff) << 8) + ((data[position - 2] - 128) & 0xff);
}
public int get16() {
public int get2() {
position += 2;
int i = ((data[position - 2] & 0xff) << 8) + (data[position - 1] & 0xff);
if (i > 0x7fff) {
@@ -229,7 +224,7 @@ public class Buffer extends DoublyLinkedListNode {
return i;
}
public int get16LE() {
public int get2LE() {
position += 2;
int j = ((data[position - 1] & 0xff) << 8) + (data[position - 2] & 0xff);
if (j > 0x7fff) {
@@ -238,7 +233,7 @@ public class Buffer extends DoublyLinkedListNode {
return j;
}
public int get16LEA() {
public int get2LEA() {
position += 2;
int j = ((data[position - 1] & 0xff) << 8) + ((data[position - 2] - 128) & 0xff);
if (j > 0x7fff) {
@@ -247,29 +242,29 @@ public class Buffer extends DoublyLinkedListNode {
return j;
}
public int get24() {
public int get3() {
position += 3;
return ((data[position - 3] & 0xff) << 16) + ((data[position - 2] & 0xff) << 8) + (data[position - 1] & 0xff);
}
public int get32() {
public int get4() {
position += 4;
return ((data[position - 4] & 0xff) << 24) + ((data[position - 3] & 0xff) << 16) + ((data[position - 2] & 0xff) << 8) + (data[position - 1] & 0xff);
}
public int get32ME() {
public int get4ME() {
position += 4;
return ((data[position - 3] & 0xff) << 24) + ((data[position - 4] & 0xff) << 16) + ((data[position - 1] & 0xff) << 8) + (data[position - 2] & 0xff);
}
public int get32RME() {
public int get4RME() {
position += 4;
return ((data[position - 2] & 0xff) << 24) + ((data[position - 1] & 0xff) << 16) + ((data[position - 4] & 0xff) << 8) + (data[position - 3] & 0xff);
}
public long get64() {
long l = (long) get32() & 0xffffffffL;
long l1 = (long) get32() & 0xffffffffL;
public long get8() {
long l = (long) get4() & 0xffffffffL;
long l1 = (long) get4() & 0xffffffffL;
return (l << 32) + l1;
}
@@ -280,7 +275,7 @@ public class Buffer extends DoublyLinkedListNode {
return new String(data, start, position - start - 1);
}
public byte[] getStringBytes() {
public byte[] getStringRaw() {
int start = position;
while (data[position++] != '\n') {
}
@@ -306,7 +301,7 @@ public class Buffer extends DoublyLinkedListNode {
bitPosition = position * 8;
}
public int getN(int n) {
public int getBits(int n) {
int bytePos = bitPosition >> 3;
int remaining = 8 - (bitPosition & 7);
int value = 0;
@@ -334,7 +329,7 @@ public class Buffer extends DoublyLinkedListNode {
get(raw, 0, length);
byte[] encrypted = new BigInteger(raw).modPow(exponent, modulus).toByteArray();
position = 0;
put8(encrypted.length);
put1(encrypted.length);
put(encrypted, encrypted.length, 0);
}
+15 -15
View File
@@ -28,50 +28,50 @@ public class Censor {
}
public static void method489(Buffer buffer) {
int i = buffer.get32();
int i = buffer.get4();
aCharArrayArray624 = new char[i][];
anIntArray625 = new int[i];
for (int j = 0; j < i; j++) {
anIntArray625[j] = buffer.getU8();
char[] ac = new char[buffer.getU8()];
anIntArray625[j] = buffer.get1U();
char[] ac = new char[buffer.get1U()];
for (int k = 0; k < ac.length; k++) {
ac[k] = (char) buffer.getU8();
ac[k] = (char) buffer.get1U();
}
aCharArrayArray624[j] = ac;
}
}
public static void method490(Buffer buffer) {
int j = buffer.get32();
int j = buffer.get4();
aCharArrayArray621 = new char[j][];
aByteArrayArrayArray622 = new byte[j][][];
method493(buffer, aCharArrayArray621, aByteArrayArrayArray622);
}
public static void method491(Buffer buffer) {
int i = buffer.get32();
int i = buffer.get4();
aCharArrayArray623 = new char[i][];
method494(aCharArrayArray623, buffer, -490);
}
public static void method492(Buffer buffer) {
anIntArray620 = new int[buffer.get32()];
anIntArray620 = new int[buffer.get4()];
for (int i = 0; i < anIntArray620.length; i++) {
anIntArray620[i] = buffer.getU16();
anIntArray620[i] = buffer.get2U();
}
}
public static void method493(Buffer buffer, char[][] ac, byte[][][] abyte0) {
for (int j = 0; j < ac.length; j++) {
char[] ac1 = new char[buffer.getU8()];
char[] ac1 = new char[buffer.get1U()];
for (int k = 0; k < ac1.length; k++) {
ac1[k] = (char) buffer.getU8();
ac1[k] = (char) buffer.get1U();
}
ac[j] = ac1;
byte[][] abyte1 = new byte[buffer.getU8()][2];
byte[][] abyte1 = new byte[buffer.get1U()][2];
for (int l = 0; l < abyte1.length; l++) {
abyte1[l][0] = (byte) buffer.getU8();
abyte1[l][1] = (byte) buffer.getU8();
abyte1[l][0] = (byte) buffer.get1U();
abyte1[l][1] = (byte) buffer.get1U();
}
if (abyte1.length > 0) {
abyte0[j] = abyte1;
@@ -84,9 +84,9 @@ public class Censor {
return;
}
for (int j = 0; j < ac.length; j++) {
char[] ac1 = new char[buffer.getU8()];
char[] ac1 = new char[buffer.get1U()];
for (int k = 0; k < ac1.length; k++) {
ac1[k] = (char) buffer.getU8();
ac1[k] = (char) buffer.get1U();
}
ac[j] = ac1;
}
+62 -62
View File
@@ -76,83 +76,83 @@ public class Component {
aCache_238 = new LRUCache(50000);
Buffer buffer = new Buffer(archive.read("data", null));
int i = -1;
int j = buffer.getU16();
int j = buffer.get2U();
aComponentArray210 = new Component[j];
while (buffer.position < buffer.data.length) {
int k = buffer.getU16();
int k = buffer.get2U();
if (k == 65535) {
i = buffer.getU16();
k = buffer.getU16();
i = buffer.get2U();
k = buffer.get2U();
}
Component component = aComponentArray210[k] = new Component();
component.anInt250 = k;
component.anInt236 = i;
component.anInt262 = buffer.getU8();
component.anInt217 = buffer.getU8();
component.anInt214 = buffer.getU16();
component.anInt220 = buffer.getU16();
component.anInt267 = buffer.getU16();
component.aByte254 = (byte) buffer.getU8();
component.anInt230 = buffer.getU8();
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();
if (component.anInt230 != 0) {
component.anInt230 = ((component.anInt230 - 1) << 8) + buffer.getU8();
component.anInt230 = ((component.anInt230 - 1) << 8) + buffer.get1U();
} else {
component.anInt230 = -1;
}
int i1 = buffer.getU8();
int i1 = buffer.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.getU8();
component.anIntArray212[j1] = buffer.getU16();
component.anIntArray245[j1] = buffer.get1U();
component.anIntArray212[j1] = buffer.get2U();
}
}
int k1 = buffer.getU8();
int k1 = buffer.get1U();
if (k1 > 0) {
component.anIntArrayArray226 = new int[k1][];
for (int l1 = 0; l1 < k1; l1++) {
int i3 = buffer.getU16();
int i3 = buffer.get2U();
component.anIntArrayArray226[l1] = new int[i3];
for (int l4 = 0; l4 < i3; l4++) {
component.anIntArrayArray226[l1][l4] = buffer.getU16();
component.anIntArrayArray226[l1][l4] = buffer.get2U();
}
}
}
if (component.anInt262 == 0) {
component.anInt261 = buffer.getU16();
component.aBoolean266 = buffer.getU8() == 1;
int i2 = buffer.getU16();
component.anInt261 = buffer.get2U();
component.aBoolean266 = buffer.get1U() == 1;
int i2 = buffer.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.getU16();
component.anIntArray241[j3] = buffer.get16();
component.anIntArray272[j3] = buffer.get16();
component.anIntArray240[j3] = buffer.get2U();
component.anIntArray241[j3] = buffer.get2();
component.anIntArray272[j3] = buffer.get2();
}
}
if (component.anInt262 == 1) {
component.unusedInt = buffer.getU16();
component.unusedBool = buffer.getU8() == 1;
component.unusedInt = buffer.get2U();
component.unusedBool = buffer.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.getU8() == 1;
component.aBoolean249 = buffer.getU8() == 1;
component.aBoolean242 = buffer.getU8() == 1;
component.aBoolean235 = buffer.getU8() == 1;
component.anInt231 = buffer.getU8();
component.anInt244 = buffer.getU8();
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.anIntArray215 = new int[20];
component.anIntArray247 = new int[20];
component.aImageArray209 = new Image24[20];
for (int j2 = 0; j2 < 20; j2++) {
int k3 = buffer.getU8();
int k3 = buffer.get1U();
if (k3 == 1) {
component.anIntArray215[j2] = buffer.get16();
component.anIntArray247[j2] = buffer.get16();
component.anIntArray215[j2] = buffer.get2();
component.anIntArray247[j2] = buffer.get2();
String s1 = buffer.getString();
if ((archive_1 != null) && (s1.length() > 0)) {
int i5 = s1.lastIndexOf(",");
@@ -169,27 +169,27 @@ public class Component {
}
}
if (component.anInt262 == 3) {
component.aBoolean227 = buffer.getU8() == 1;
component.aBoolean227 = buffer.get1U() == 1;
}
if ((component.anInt262 == 4) || (component.anInt262 == 1)) {
component.aBoolean223 = buffer.getU8() == 1;
int k2 = buffer.getU8();
component.aBoolean223 = buffer.get1U() == 1;
int k2 = buffer.get1U();
if (aclass30_sub2_sub1_sub4 != null) {
component.aFont_243 = aclass30_sub2_sub1_sub4[k2];
}
component.aBoolean268 = buffer.getU8() == 1;
component.aBoolean268 = buffer.get1U() == 1;
}
if (component.anInt262 == 4) {
component.aString248 = buffer.getString();
component.aString228 = buffer.getString();
}
if ((component.anInt262 == 1) || (component.anInt262 == 3) || (component.anInt262 == 4)) {
component.anInt232 = buffer.get32();
component.anInt232 = buffer.get4();
}
if ((component.anInt262 == 3) || (component.anInt262 == 4)) {
component.anInt219 = buffer.get32();
component.anInt216 = buffer.get32();
component.anInt239 = buffer.get32();
component.anInt219 = buffer.get4();
component.anInt216 = buffer.get4();
component.anInt239 = buffer.get4();
}
if (component.anInt262 == 5) {
String s = buffer.getString();
@@ -204,45 +204,45 @@ public class Component {
}
}
if (component.anInt262 == 6) {
int l = buffer.getU8();
int l = buffer.get1U();
if (l != 0) {
component.anInt233 = 1;
component.anInt234 = ((l - 1) << 8) + buffer.getU8();
component.anInt234 = ((l - 1) << 8) + buffer.get1U();
}
l = buffer.getU8();
l = buffer.get1U();
if (l != 0) {
component.anInt255 = 1;
component.anInt256 = ((l - 1) << 8) + buffer.getU8();
component.anInt256 = ((l - 1) << 8) + buffer.get1U();
}
l = buffer.getU8();
l = buffer.get1U();
if (l != 0) {
component.anInt257 = ((l - 1) << 8) + buffer.getU8();
component.anInt257 = ((l - 1) << 8) + buffer.get1U();
} else {
component.anInt257 = -1;
}
l = buffer.getU8();
l = buffer.get1U();
if (l != 0) {
component.anInt258 = ((l - 1) << 8) + buffer.getU8();
component.anInt258 = ((l - 1) << 8) + buffer.get1U();
} else {
component.anInt258 = -1;
}
component.anInt269 = buffer.getU16();
component.anInt270 = buffer.getU16();
component.anInt271 = buffer.getU16();
component.anInt269 = buffer.get2U();
component.anInt270 = buffer.get2U();
component.anInt271 = buffer.get2U();
}
if (component.anInt262 == 7) {
component.anIntArray253 = new int[component.anInt220 * component.anInt267];
component.anIntArray252 = new int[component.anInt220 * component.anInt267];
component.aBoolean223 = buffer.getU8() == 1;
int l2 = buffer.getU8();
component.aBoolean223 = buffer.get1U() == 1;
int l2 = buffer.get1U();
if (aclass30_sub2_sub1_sub4 != null) {
component.aFont_243 = aclass30_sub2_sub1_sub4[l2];
}
component.aBoolean268 = buffer.getU8() == 1;
component.anInt232 = buffer.get32();
component.anInt231 = buffer.get16();
component.anInt244 = buffer.get16();
component.aBoolean249 = buffer.getU8() == 1;
component.aBoolean268 = buffer.get1U() == 1;
component.anInt232 = buffer.get4();
component.anInt231 = buffer.get2();
component.anInt244 = buffer.get2();
component.aBoolean249 = buffer.get1U() == 1;
component.aStringArray225 = new String[5];
for (int k4 = 0; k4 < 5; k4++) {
component.aStringArray225[k4] = buffer.getString();
@@ -254,7 +254,7 @@ public class Component {
if ((component.anInt217 == 2) || (component.anInt262 == 2)) {
component.aString222 = buffer.getString();
component.aString218 = buffer.getString();
component.anInt237 = buffer.getU16();
component.anInt237 = buffer.get2U();
}
if ((component.anInt217 == 1) || (component.anInt217 == 4) || (component.anInt217 == 5) || (component.anInt217 == 6)) {
component.aString221 = buffer.getString();
+1 -1
View File
@@ -148,7 +148,7 @@ public class Connection implements Runnable {
}
public void method272() {
System.out.println("dummy:" + aBoolean422);
System.out.println("closed:" + aBoolean422);
System.out.println("tcycl:" + anInt425);
System.out.println("tnum:" + anInt426);
System.out.println("writer:" + aBoolean427);
+14 -15
View File
@@ -9,7 +9,7 @@ public class FileArchive {
public int[] fileSizeInflated;
public int[] fileSizeDeflated;
public int[] fileOffset;
public boolean inflated;
public boolean unpacked;
public FileArchive(byte[] src) {
load(src);
@@ -18,21 +18,20 @@ public class FileArchive {
public void load(byte[] src) {
Buffer buffer = new Buffer(src);
int inflatedSize = buffer.get24();
int deflatedSize = buffer.get24();
int unpackedSize = buffer.get3();
int packedSize = buffer.get3();
if (deflatedSize != inflatedSize) {
byte[] inflated = new byte[inflatedSize];
BZip2.inflate(inflated, inflatedSize, src, deflatedSize, 6);
data = inflated;
if (packedSize != unpackedSize) {
data = new byte[unpackedSize];
BZip2.decompress(data, unpackedSize, src, 6, packedSize);
buffer = new Buffer(data);
this.inflated = true;
unpacked = true;
} else {
data = src;
inflated = false;
unpacked = false;
}
fileCount = buffer.getU16();
fileCount = buffer.get2U();
fileHash = new int[fileCount];
fileSizeInflated = new int[fileCount];
fileSizeDeflated = new int[fileCount];
@@ -41,9 +40,9 @@ public class FileArchive {
int offset = buffer.position + (fileCount * 10);
for (int file = 0; file < fileCount; file++) {
fileHash[file] = buffer.get32();
fileSizeInflated[file] = buffer.get24();
fileSizeDeflated[file] = buffer.get24();
fileHash[file] = buffer.get4();
fileSizeInflated[file] = buffer.get3();
fileSizeDeflated[file] = buffer.get3();
fileOffset[file] = offset;
offset += fileSizeDeflated[file];
}
@@ -64,8 +63,8 @@ public class FileArchive {
dst = new byte[fileSizeInflated[file]];
}
if (!inflated) {
BZip2.inflate(dst, fileSizeInflated[file], data, fileSizeDeflated[file], fileOffset[file]);
if (!unpacked) {
BZip2.decompress(dst, fileSizeInflated[file], data, fileOffset[file], fileSizeDeflated[file]);
} else {
for (int i = 0; i < fileSizeInflated[file]; i++) {
dst[i] = data[fileOffset[file] + i];
+5 -5
View File
@@ -23,7 +23,7 @@ public class FloType {
public static void method260(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("flo.dat", null));
anInt387 = buffer.getU16();
anInt387 = buffer.get2U();
if (aTypeArray388 == null) {
aTypeArray388 = new FloType[anInt387];
}
@@ -37,15 +37,15 @@ public class FloType {
public void method261(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt390 = buffer.get24();
anInt390 = buffer.get3();
method262(anInt390);
} else if (i == 2) {
anInt391 = buffer.getU8();
anInt391 = buffer.get1U();
} else if (i == 3) {
unusedBool = true;
} else if (i == 5) {
@@ -57,7 +57,7 @@ public class FloType {
int k = anInt395;
int l = anInt396;
int i1 = anInt397;
int j1 = buffer.get24();
int j1 = buffer.get3();
method262(j1);
anInt394 = j;
anInt395 = k;
+459 -459
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -12,7 +12,7 @@ public class Huffman {
int j = 0;
int k = -1;
for (int l = 0; l < i; l++) {
int i1 = buffer.getU8();
int i1 = buffer.get1U();
int j1 = (i1 >> 4) & 0xf;
if (k == -1) {
if (j1 < 13) {
@@ -73,18 +73,18 @@ public class Huffman {
if (k < 13) {
i = k;
} else {
buffer.put8(k);
buffer.put1(k);
}
} else if (k < 13) {
buffer.put8((i << 4) + k);
buffer.put1((i << 4) + k);
i = -1;
} else {
buffer.put8((i << 4) + (k >> 4));
buffer.put1((i << 4) + (k >> 4));
i = k & 0xf;
}
}
if (i != -1) {
buffer.put8(i << 4);
buffer.put1(i << 4);
}
}
+8 -8
View File
@@ -18,7 +18,7 @@ public class IDKType {
public static void method535(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("idk.dat", null));
anInt655 = buffer.getU16();
anInt655 = buffer.get2U();
if (aIDKTypeArray656 == null) {
aIDKTypeArray656 = new IDKType[anInt655];
}
@@ -32,26 +32,26 @@ public class IDKType {
public void method536(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt657 = buffer.getU8();
anInt657 = buffer.get1U();
} else if (i == 2) {
int j = buffer.getU8();
int j = buffer.get1U();
anIntArray658 = new int[j];
for (int k = 0; k < j; k++) {
anIntArray658[k] = buffer.getU16();
anIntArray658[k] = buffer.get2U();
}
} else if (i == 3) {
aBoolean662 = true;
} else if ((i >= 40) && (i < 50)) {
anIntArray659[i - 40] = buffer.getU16();
anIntArray659[i - 40] = buffer.get2U();
} else if ((i >= 50) && (i < 60)) {
anIntArray660[i - 50] = buffer.getU16();
anIntArray660[i - 50] = buffer.get2U();
} else if ((i >= 60) && (i < 70)) {
anIntArray661[i - 60] = buffer.getU16();
anIntArray661[i - 60] = buffer.get2U();
} else {
System.out.println("Error unrecognised config code: " + i);
}
+13 -13
View File
@@ -45,39 +45,39 @@ 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.getU16();
anInt1444 = buffer_1.getU16();
anInt1445 = buffer_1.getU16();
int j = buffer_1.getU8();
buffer_1.position = buffer.get2U();
anInt1444 = buffer_1.get2U();
anInt1445 = buffer_1.get2U();
int j = buffer_1.get1U();
int[] ai = new int[j];
for (int k = 0; k < (j - 1); k++) {
ai[k + 1] = buffer_1.get24();
ai[k + 1] = buffer_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.getU16() * buffer_1.getU16();
buffer.position += buffer_1.get2U() * buffer_1.get2U();
buffer_1.position++;
}
anInt1442 = buffer_1.getU8();
anInt1443 = buffer_1.getU8();
anInt1440 = buffer_1.getU16();
anInt1441 = buffer_1.getU16();
int i1 = buffer_1.getU8();
anInt1442 = buffer_1.get1U();
anInt1443 = buffer_1.get1U();
anInt1440 = buffer_1.get2U();
anInt1441 = buffer_1.get2U();
int i1 = buffer_1.get1U();
int j1 = anInt1440 * anInt1441;
anIntArray1439 = new int[j1];
if (i1 == 0) {
for (int k1 = 0; k1 < j1; k1++) {
anIntArray1439[k1] = ai[buffer.getU8()];
anIntArray1439[k1] = ai[buffer.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.getU8()];
anIntArray1439[l1 + (i2 * anInt1440)] = ai[buffer.get1U()];
}
}
}
+13 -13
View File
@@ -16,36 +16,36 @@ public class Image8 extends Draw2D {
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.getU16();
anInt1456 = buffer_1.getU16();
anInt1457 = buffer_1.getU16();
int j = buffer_1.getU8();
buffer_1.position = buffer.get2U();
anInt1456 = buffer_1.get2U();
anInt1457 = buffer_1.get2U();
int j = buffer_1.get1U();
anIntArray1451 = new int[j];
for (int k = 0; k < (j - 1); k++) {
anIntArray1451[k + 1] = buffer_1.get24();
anIntArray1451[k + 1] = buffer_1.get3();
}
for (int l = 0; l < i; l++) {
buffer_1.position += 2;
buffer.position += buffer_1.getU16() * buffer_1.getU16();
buffer.position += buffer_1.get2U() * buffer_1.get2U();
buffer_1.position++;
}
anInt1454 = buffer_1.getU8();
anInt1455 = buffer_1.getU8();
anInt1452 = buffer_1.getU16();
anInt1453 = buffer_1.getU16();
int i1 = buffer_1.getU8();
anInt1454 = buffer_1.get1U();
anInt1455 = buffer_1.get1U();
anInt1452 = buffer_1.get2U();
anInt1453 = buffer_1.get2U();
int i1 = buffer_1.get1U();
int j1 = anInt1452 * anInt1453;
aByteArray1450 = new byte[j1];
if (i1 == 0) {
for (int k1 = 0; k1 < j1; k1++) {
aByteArray1450[k1] = buffer.get8();
aByteArray1450[k1] = buffer.get1();
}
return;
}
if (i1 == 1) {
for (int l1 = 0; l1 < anInt1452; l1++) {
for (int i2 = 0; i2 < anInt1453; i2++) {
aByteArray1450[l1 + (i2 * anInt1452)] = buffer.get8();
aByteArray1450[l1 + (i2 * anInt1452)] = buffer.get1();
}
}
}
+33 -33
View File
@@ -82,12 +82,12 @@ public class LocType {
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.getU16();
anInt756 = buffer.get2U();
anIntArray755 = new int[anInt756];
int i = 2;
for (int j = 0; j < anInt756; j++) {
anIntArray755[j] = i;
i += buffer.getU16();
i += buffer.get2U();
}
aTypeArray782 = new LocType[20];
for (int k = 0; k < 20; k++) {
@@ -331,19 +331,19 @@ public class LocType {
do {
int j;
do {
j = buffer.getU8();
j = buffer.get1U();
if (j == 0) {
break label0;
}
if (j == 1) {
int k = buffer.getU8();
int k = buffer.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.getU16();
anIntArray776[k1] = buffer.getU8();
anIntArray773[k1] = buffer.get2U();
anIntArray776[k1] = buffer.get1U();
}
} else {
buffer.position += k * 3;
@@ -352,30 +352,30 @@ public class LocType {
} else if (j == 2) {
aString739 = buffer.getString();
} else if (j == 3) {
aByteArray777 = buffer.getStringBytes();
aByteArray777 = buffer.getStringRaw();
} else if (j == 5) {
int l = buffer.getU8();
int l = buffer.get1U();
if (l > 0) {
if ((anIntArray773 == null) || aBoolean752) {
anIntArray776 = null;
anIntArray773 = new int[l];
for (int l1 = 0; l1 < l; l1++) {
anIntArray773[l1] = buffer.getU16();
anIntArray773[l1] = buffer.get2U();
}
} else {
buffer.position += l * 2;
}
}
} else if (j == 14) {
anInt744 = buffer.getU8();
anInt744 = buffer.get1U();
} else if (j == 15) {
anInt761 = buffer.getU8();
anInt761 = buffer.get1U();
} else if (j == 17) {
aBoolean767 = false;
} else if (j == 18) {
aBoolean757 = false;
} else if (j == 19) {
i = buffer.getU8();
i = buffer.get1U();
if (i == 1) {
aBoolean778 = true;
}
@@ -386,16 +386,16 @@ public class LocType {
} else if (j == 23) {
aBoolean764 = true;
} else if (j == 24) {
anInt781 = buffer.getU16();
anInt781 = buffer.get2U();
if (anInt781 == 65535) {
anInt781 = -1;
}
} else if (j == 28) {
anInt775 = buffer.getU8();
anInt775 = buffer.get1U();
} else if (j == 29) {
aByte737 = buffer.get8();
aByte737 = buffer.get1();
} else if (j == 39) {
aByte742 = buffer.get8();
aByte742 = buffer.get1();
} else if ((j >= 30) && (j < 39)) {
if (aStringArray786 == null) {
aStringArray786 = new String[5];
@@ -405,35 +405,35 @@ public class LocType {
aStringArray786[j - 30] = null;
}
} else if (j == 40) {
int i1 = buffer.getU8();
int i1 = buffer.get1U();
anIntArray784 = new int[i1];
anIntArray747 = new int[i1];
for (int i2 = 0; i2 < i1; i2++) {
anIntArray784[i2] = buffer.getU16();
anIntArray747[i2] = buffer.getU16();
anIntArray784[i2] = buffer.get2U();
anIntArray747[i2] = buffer.get2U();
}
} else if (j == 60) {
anInt746 = buffer.getU16();
anInt746 = buffer.get2U();
} else if (j == 62) {
aBoolean751 = true;
} else if (j == 64) {
aBoolean779 = false;
} else if (j == 65) {
anInt748 = buffer.getU16();
anInt748 = buffer.get2U();
} else if (j == 66) {
anInt772 = buffer.getU16();
anInt772 = buffer.get2U();
} else if (j == 67) {
anInt740 = buffer.getU16();
anInt740 = buffer.get2U();
} else if (j == 68) {
anInt758 = buffer.getU16();
anInt758 = buffer.get2U();
} else if (j == 69) {
anInt768 = buffer.getU8();
anInt768 = buffer.get1U();
} else if (j == 70) {
anInt738 = buffer.get16();
anInt738 = buffer.get2();
} else if (j == 71) {
anInt745 = buffer.get16();
anInt745 = buffer.get2();
} else if (j == 72) {
anInt783 = buffer.get16();
anInt783 = buffer.get2();
} else if (j == 73) {
aBoolean736 = true;
} else if (j == 74) {
@@ -442,22 +442,22 @@ public class LocType {
if (j != 75) {
continue;
}
anInt760 = buffer.getU8();
anInt760 = buffer.get1U();
}
continue label0;
} while (j != 77);
anInt774 = buffer.getU16();
anInt774 = buffer.get2U();
if (anInt774 == 65535) {
anInt774 = -1;
}
anInt749 = buffer.getU16();
anInt749 = buffer.get2U();
if (anInt749 == 65535) {
anInt749 = -1;
}
int j1 = buffer.getU8();
int j1 = buffer.get1U();
anIntArray759 = new int[j1 + 1];
for (int j2 = 0; j2 <= j1; j2++) {
anIntArray759[j2] = buffer.getU16();
anIntArray759[j2] = buffer.get2U();
if (anIntArray759[j2] == 65535) {
anIntArray759[j2] = -1;
}
+28 -28
View File
@@ -194,7 +194,7 @@ public class Model extends Entity {
int z = 0;
for (int v = 0; v < vertexCount; v++) {
int flags = buf0.getU8();
int flags = buf0.get1U();
int dx = 0;
int dy = 0;
@@ -221,7 +221,7 @@ public class Model extends Entity {
z = vertexZ[v];
if (vertexLabel != null) {
vertexLabel[v] = buf4.getU8();
vertexLabel[v] = buf4.get1U();
}
}
@@ -232,22 +232,22 @@ public class Model extends Entity {
buf4.position = header.obFace5Position;
for (int face = 0; face < faceCount; face++) {
faceColor[face] = buf0.getU16();
faceColor[face] = buf0.get2U();
if (faceInfo != null) {
faceInfo[face] = buf1.getU8();
faceInfo[face] = buf1.get1U();
}
if (facePriority != null) {
facePriority[face] = buf2.getU8();
facePriority[face] = buf2.get1U();
}
if (faceAlpha != null) {
faceAlpha[face] = buf3.getU8();
faceAlpha[face] = buf3.get1U();
}
if (faceLabel != null) {
faceLabel[face] = buf4.getU8();
faceLabel[face] = buf4.get1U();
}
}
@@ -260,7 +260,7 @@ public class Model extends Entity {
int last = 0;
for (int face = 0; face < faceCount; face++) {
int orientation = buf1.getU8();
int orientation = buf1.get1U();
// fancy shmansy compression type stuff.
// vertex indices stored as deltas, with some faces
@@ -315,9 +315,9 @@ public class Model extends Entity {
buf0.position = header.obAxisPosition;
for (int face = 0; face < texturedFaceCount; face++) {
texturedVertexA[face] = buf0.getU16();
texturedVertexB[face] = buf0.getU16();
texturedVertexC[face] = buf0.getU16();
texturedVertexA[face] = buf0.get2U();
texturedVertexB[face] = buf0.get2U();
texturedVertexC[face] = buf0.get2U();
}
}
@@ -816,19 +816,19 @@ public class Model extends Entity {
buffer.position = src.length - 18;
ModelHeader header = headers[id] = new ModelHeader();
header.data = src;
header.vertexCount = buffer.getU16();
header.faceCount = buffer.getU16();
header.texturedFaceCount = buffer.getU8();
int k = buffer.getU8();
int l = buffer.getU8();
int i1 = buffer.getU8();
int j1 = buffer.getU8();
int k1 = buffer.getU8();
int l1 = buffer.getU16();
int i2 = buffer.getU16();
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();
//noinspection unused
int j2 = buffer.getU16();
int k2 = buffer.getU16();
int j2 = buffer.get2U();
int k2 = buffer.get2U();
int offset = 0;
header.obPoint1Position = offset;
offset += header.vertexCount;
@@ -1805,7 +1805,7 @@ public class Model extends Entity {
// Our pitch is clamped between 128 and 384 (22.5 degrees and 67.5 degrees)
// We know this will be positive and within 92->38% its original value.
int radiusCosEyePitch = (this.radius * cosEyePitch) >> 16;
int radiusCosEyePitch = (radius * cosEyePitch) >> 16;
// +Z goes forward, which makes this value supposedly the farthest Z the model should be away from the camera.
int maxZ = midZ + radiusCosEyePitch;
@@ -1819,7 +1819,7 @@ public class Model extends Entity {
int midX = ((relativeZ * sinEyeYaw) + (relativeX * cosEyeYaw)) >> 16;
// calculate left bound
int leftX = (midX - this.radius) << 9;
int leftX = (midX - radius) << 9;
// early fail
if ((leftX / maxZ) >= Draw2D.centerX) {
@@ -1827,7 +1827,7 @@ public class Model extends Entity {
}
// calculate right bound
int rightX = (midX + this.radius) << 9;
int rightX = (midX + radius) << 9;
// early fail
if ((rightX / maxZ) <= -Draw2D.centerX) {
@@ -1839,7 +1839,7 @@ public class Model extends Entity {
// Our pitch is clamped between 128 and 384 (22.5 degrees and 67.5 degrees)
// We know this will be positive and within 38->92% its original value.
int radiusSinEyePitch = (this.radius * sinEyePitch) >> 16;
int radiusSinEyePitch = (radius * sinEyePitch) >> 16;
// calculate bottom bound
int bottomY = (midY + radiusSinEyePitch) << 9;
@@ -1974,7 +1974,7 @@ public class Model extends Entity {
tmpDepthFaceCount[depth] = 0;
}
for (int f = 0; f < this.faceCount; f++) {
for (int f = 0; f < faceCount; f++) {
if ((faceInfo != null) && (faceInfo[f] == -1)) {
continue;
}
+32 -32
View File
@@ -62,12 +62,12 @@ public class NPCType {
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.getU16();
anInt62 = buffer.get2U();
anIntArray72 = new int[anInt62];
int i = 2;
for (int j = 0; j < anInt62; j++) {
anIntArray72[j] = i;
i += buffer.getU16();
i += buffer.get2U();
}
aTypeArray80 = new NPCType[20];
for (int k = 0; k < 20; k++) {
@@ -199,31 +199,31 @@ public class NPCType {
public void method165(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
return;
}
if (i == 1) {
int j = buffer.getU8();
int j = buffer.get1U();
anIntArray94 = new int[j];
for (int j1 = 0; j1 < j; j1++) {
anIntArray94[j1] = buffer.getU16();
anIntArray94[j1] = buffer.get2U();
}
} else if (i == 2) {
aString65 = buffer.getString();
} else if (i == 3) {
aByteArray89 = buffer.getStringBytes();
aByteArray89 = buffer.getStringRaw();
} else if (i == 12) {
aByte68 = buffer.get8();
aByte68 = buffer.get1();
} else if (i == 13) {
anInt77 = buffer.getU16();
anInt77 = buffer.get2U();
} else if (i == 14) {
anInt67 = buffer.getU16();
anInt67 = buffer.get2U();
} else if (i == 17) {
anInt67 = buffer.getU16();
anInt58 = buffer.getU16();
anInt83 = buffer.getU16();
anInt55 = buffer.getU16();
anInt67 = buffer.get2U();
anInt58 = buffer.get2U();
anInt83 = buffer.get2U();
anInt55 = buffer.get2U();
} else if ((i >= 30) && (i < 40)) {
if (aStringArray66 == null) {
aStringArray66 = new String[5];
@@ -233,56 +233,56 @@ public class NPCType {
aStringArray66[i - 30] = null;
}
} else if (i == 40) {
int k = buffer.getU8();
int k = buffer.get1U();
anIntArray76 = new int[k];
anIntArray70 = new int[k];
for (int k1 = 0; k1 < k; k1++) {
anIntArray76[k1] = buffer.getU16();
anIntArray70[k1] = buffer.getU16();
anIntArray76[k1] = buffer.get2U();
anIntArray70[k1] = buffer.get2U();
}
} else if (i == 60) {
int l = buffer.getU8();
int l = buffer.get1U();
anIntArray73 = new int[l];
for (int l1 = 0; l1 < l; l1++) {
anIntArray73[l1] = buffer.getU16();
anIntArray73[l1] = buffer.get2U();
}
} else if (i == 90) {
unusedInt2 = buffer.getU16();
unusedInt2 = buffer.get2U();
} else if (i == 91) {
unusedInt0 = buffer.getU16();
unusedInt0 = buffer.get2U();
} else if (i == 92) {
unusedInt1 = buffer.getU16();
unusedInt1 = buffer.get2U();
} else if (i == 93) {
aBoolean87 = false;
} else if (i == 95) {
anInt61 = buffer.getU16();
anInt61 = buffer.get2U();
} else if (i == 97) {
anInt91 = buffer.getU16();
anInt91 = buffer.get2U();
} else if (i == 98) {
anInt86 = buffer.getU16();
anInt86 = buffer.get2U();
} else if (i == 99) {
aBoolean93 = true;
} else if (i == 100) {
anInt85 = buffer.get8();
anInt85 = buffer.get1();
} else if (i == 101) {
anInt92 = buffer.get8() * 5;
anInt92 = buffer.get1() * 5;
} else if (i == 102) {
anInt75 = buffer.getU16();
anInt75 = buffer.get2U();
} else if (i == 103) {
anInt79 = buffer.getU16();
anInt79 = buffer.get2U();
} else if (i == 106) {
anInt57 = buffer.getU16();
anInt57 = buffer.get2U();
if (anInt57 == 65535) {
anInt57 = -1;
}
anInt59 = buffer.getU16();
anInt59 = buffer.get2U();
if (anInt59 == 65535) {
anInt59 = -1;
}
int i1 = buffer.getU8();
int i1 = buffer.get1U();
anIntArray88 = new int[i1 + 1];
for (int i2 = 0; i2 <= i1; i2++) {
anIntArray88[i2] = buffer.getU16();
anIntArray88[i2] = buffer.get2U();
if (anIntArray88[i2] == 65535) {
anIntArray88[i2] = -1;
}
+38 -38
View File
@@ -67,12 +67,12 @@ public class ObjType {
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.getU16();
anInt203 = buffer.get2U();
anIntArray195 = new int[anInt203];
int i = 2;
for (int j = 0; j < anInt203; j++) {
anIntArray195[j] = i;
i += buffer.getU16();
i += buffer.get2U();
}
aTypeArray172 = new ObjType[10];
for (int k = 0; k < 10; k++) {
@@ -468,50 +468,50 @@ public class ObjType {
public void method203(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt174 = buffer.getU16();
anInt174 = buffer.get2U();
} else if (i == 2) {
aString170 = buffer.getString();
} else if (i == 3) {
aByteArray178 = buffer.getStringBytes();
aByteArray178 = buffer.getStringRaw();
} else if (i == 4) {
anInt181 = buffer.getU16();
anInt181 = buffer.get2U();
} else if (i == 5) {
anInt190 = buffer.getU16();
anInt190 = buffer.get2U();
} else if (i == 6) {
anInt198 = buffer.getU16();
anInt198 = buffer.get2U();
} else if (i == 7) {
anInt169 = buffer.getU16();
anInt169 = buffer.get2U();
if (anInt169 > 32767) {
anInt169 -= 0x10000;
}
} else if (i == 8) {
anInt194 = buffer.getU16();
anInt194 = buffer.get2U();
if (anInt194 > 32767) {
anInt194 -= 0x10000;
}
} else if (i == 10) {
unusedInt = buffer.getU16();
unusedInt = buffer.get2U();
} else if (i == 11) {
aBoolean176 = true;
} else if (i == 12) {
anInt155 = buffer.get32();
anInt155 = buffer.get4();
} else if (i == 16) {
aBoolean161 = true;
} else if (i == 23) {
anInt165 = buffer.getU16();
aByte205 = buffer.get8();
anInt165 = buffer.get2U();
aByte205 = buffer.get1();
} else if (i == 24) {
anInt188 = buffer.getU16();
anInt188 = buffer.get2U();
} else if (i == 25) {
anInt200 = buffer.getU16();
aByte154 = buffer.get8();
anInt200 = buffer.get2U();
aByte154 = buffer.get1();
} else if (i == 26) {
anInt164 = buffer.getU16();
anInt164 = buffer.get2U();
} else if ((i >= 30) && (i < 35)) {
if (aStringArray168 == null) {
aStringArray168 = new String[5];
@@ -526,50 +526,50 @@ public class ObjType {
}
aStringArray189[i - 35] = buffer.getString();
} else if (i == 40) {
int j = buffer.getU8();
int j = buffer.get1U();
anIntArray156 = new int[j];
anIntArray160 = new int[j];
for (int k = 0; k < j; k++) {
anIntArray156[k] = buffer.getU16();
anIntArray160[k] = buffer.getU16();
anIntArray156[k] = buffer.get2U();
anIntArray160[k] = buffer.get2U();
}
} else if (i == 78) {
anInt185 = buffer.getU16();
anInt185 = buffer.get2U();
} else if (i == 79) {
anInt162 = buffer.getU16();
anInt162 = buffer.get2U();
} else if (i == 90) {
anInt175 = buffer.getU16();
anInt175 = buffer.get2U();
} else if (i == 91) {
anInt197 = buffer.getU16();
anInt197 = buffer.get2U();
} else if (i == 92) {
anInt166 = buffer.getU16();
anInt166 = buffer.get2U();
} else if (i == 93) {
anInt173 = buffer.getU16();
anInt173 = buffer.get2U();
} else if (i == 95) {
anInt204 = buffer.getU16();
anInt204 = buffer.get2U();
} else if (i == 97) {
anInt179 = buffer.getU16();
anInt179 = buffer.get2U();
} else if (i == 98) {
anInt163 = buffer.getU16();
anInt163 = buffer.get2U();
} else if ((i >= 100) && (i < 110)) {
if (anIntArray193 == null) {
anIntArray193 = new int[10];
anIntArray201 = new int[10];
}
anIntArray193[i - 100] = buffer.getU16();
anIntArray201[i - 100] = buffer.getU16();
anIntArray193[i - 100] = buffer.get2U();
anIntArray201[i - 100] = buffer.get2U();
} else if (i == 110) {
anInt167 = buffer.getU16();
anInt167 = buffer.get2U();
} else if (i == 111) {
anInt192 = buffer.getU16();
anInt192 = buffer.get2U();
} else if (i == 112) {
anInt191 = buffer.getU16();
anInt191 = buffer.get2U();
} else if (i == 113) {
anInt196 = buffer.get8();
anInt196 = buffer.get1();
} else if (i == 114) {
anInt184 = buffer.get8() * 5;
anInt184 = buffer.get1() * 5;
} else if (i == 115) {
anInt202 = buffer.getU8();
anInt202 = buffer.get1U();
}
} while (true);
}
+8 -8
View File
@@ -167,7 +167,7 @@ public class OnDemand implements Runnable {
anIntArrayArray1364[i] = new int[j];
aByteArrayArray1342[i] = new byte[j];
for (int l = 0; l < j; l++) {
anIntArrayArray1364[i][l] = buffer.getU16();
anIntArrayArray1364[i][l] = buffer.get2U();
}
}
String[] as1 = {"model_crc", "anim_crc", "midi_crc", "map_crc"};
@@ -177,7 +177,7 @@ public class OnDemand implements Runnable {
Buffer buffer_1 = new Buffer(abyte1);
anIntArrayArray1365[k] = new int[i1];
for (int l1 = 0; l1 < i1; l1++) {
anIntArrayArray1365[k][l1] = buffer_1.get32();
anIntArrayArray1365[k][l1] = buffer_1.get4();
}
}
byte[] abyte2 = archive.read("model_index", null);
@@ -198,24 +198,24 @@ public class OnDemand implements Runnable {
anIntArray1337 = new int[j1];
anIntArray1356 = new int[j1];
for (int i2 = 0; i2 < j1; i2++) {
anIntArray1371[i2] = class30_sub2_sub2_2.getU16();
anIntArray1350[i2] = class30_sub2_sub2_2.getU16();
anIntArray1337[i2] = class30_sub2_sub2_2.getU16();
anIntArray1356[i2] = class30_sub2_sub2_2.getU8();
anIntArray1371[i2] = class30_sub2_sub2_2.get2U();
anIntArray1350[i2] = class30_sub2_sub2_2.get2U();
anIntArray1337[i2] = class30_sub2_sub2_2.get2U();
anIntArray1356[i2] = class30_sub2_sub2_2.get1U();
}
abyte2 = archive.read("anim_index", null);
class30_sub2_sub2_2 = new Buffer(abyte2);
j1 = abyte2.length / 2;
anIntArray1360 = new int[j1];
for (int j2 = 0; j2 < j1; j2++) {
anIntArray1360[j2] = class30_sub2_sub2_2.getU16();
anIntArray1360[j2] = class30_sub2_sub2_2.get2U();
}
abyte2 = archive.read("midi_index", null);
class30_sub2_sub2_2 = new Buffer(abyte2);
j1 = abyte2.length;
anIntArray1348 = new int[j1];
for (int k2 = 0; k2 < j1; k2++) {
anIntArray1348[k2] = class30_sub2_sub2_2.getU8();
anIntArray1348[k2] = class30_sub2_sub2_2.get1U();
}
aGame1343 = game1;
aBoolean1353 = true;
+16 -16
View File
@@ -103,20 +103,20 @@ public class PlayerEntity extends PathingEntity {
public void method451(Buffer buffer) {
buffer.position = 0;
anInt1702 = buffer.getU8();
anInt1706 = buffer.getU8();
anInt1702 = buffer.get1U();
anInt1706 = buffer.get1U();
aType_1698 = null;
anInt1701 = 0;
for (int j = 0; j < 12; j++) {
int k = buffer.getU8();
int k = buffer.get1U();
if (k == 0) {
anIntArray1717[j] = 0;
continue;
}
int i1 = buffer.getU8();
int i1 = buffer.get1U();
anIntArray1717[j] = (k << 8) + i1;
if ((j == 0) && (anIntArray1717[0] == 65535)) {
aType_1698 = NPCType.method159(buffer.getU16());
aType_1698 = NPCType.method159(buffer.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.getU8();
int j1 = buffer.get1U();
if ((j1 < 0) || (j1 >= Game.anIntArrayArray1003[l].length)) {
j1 = 0;
}
anIntArray1700[l] = j1;
}
super.anInt1511 = buffer.getU16();
super.anInt1511 = buffer.get2U();
if (super.anInt1511 == 65535) {
super.anInt1511 = -1;
}
super.anInt1512 = buffer.getU16();
super.anInt1512 = buffer.get2U();
if (super.anInt1512 == 65535) {
super.anInt1512 = -1;
}
super.anInt1554 = buffer.getU16();
super.anInt1554 = buffer.get2U();
if (super.anInt1554 == 65535) {
super.anInt1554 = -1;
}
super.anInt1555 = buffer.getU16();
super.anInt1555 = buffer.get2U();
if (super.anInt1555 == 65535) {
super.anInt1555 = -1;
}
super.anInt1556 = buffer.getU16();
super.anInt1556 = buffer.get2U();
if (super.anInt1556 == 65535) {
super.anInt1556 = -1;
}
super.anInt1557 = buffer.getU16();
super.anInt1557 = buffer.get2U();
if (super.anInt1557 == 65535) {
super.anInt1557 = -1;
}
super.anInt1505 = buffer.getU16();
super.anInt1505 = buffer.get2U();
if (super.anInt1505 == 65535) {
super.anInt1505 = -1;
}
aString1703 = StringUtil.formatName(StringUtil.fromBase37(buffer.get64()));
anInt1705 = buffer.getU8();
anInt1723 = buffer.getU16();
aString1703 = StringUtil.formatName(StringUtil.fromBase37(buffer.get8()));
anInt1705 = buffer.get1U();
anInt1723 = buffer.get2U();
aBoolean1710 = true;
aLong1718 = 0L;
for (int k1 = 0; k1 < 12; k1++) {
+11 -11
View File
@@ -83,7 +83,7 @@ public class SceneBuilder {
if (i_112_ == 0) {
break;
}
buffer.getU8();
buffer.get1U();
}
}
}
@@ -347,7 +347,7 @@ public class SceneBuilder {
if (i_256_ == 0) {
break;
}
buffer.getU8();
buffer.get1U();
} else {
int i_257_ = buffer.getUSmart();
if (i_257_ == 0) {
@@ -356,7 +356,7 @@ public class SceneBuilder {
i_254_ += i_257_ - 1;
int i_258_ = i_254_ & 0x3f;
int i_259_ = (i_254_ >> 6) & 0x3f;
int i_260_ = buffer.getU8() >> 2;
int i_260_ = buffer.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)) {
@@ -1100,7 +1100,7 @@ public class SceneBuilder {
if ((i_186_ >= 0) && (i_186_ < 104) && (i >= 0) && (i < 104)) {
aByteArrayArrayArray149[i_187_][i_186_][i] = (byte) 0;
for (; ; ) {
int i_191_ = buffer.getU8();
int i_191_ = buffer.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.getU8();
int i_192_ = buffer.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.get8();
aByteArrayArrayArray130[i_187_][i_186_][i] = buffer.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.getU8();
int i_193_ = buffer.get1U();
if (i_193_ == 0) {
break;
}
if (i_193_ == 1) {
buffer.getU8();
buffer.get1U();
break;
}
if (i_193_ <= 49) {
buffer.getU8();
buffer.get1U();
}
}
}
@@ -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.getU8();
int i_210_ = buffer.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))) {
@@ -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.getU8();
int i_272_ = buffer.get1U();
int i_273_ = i_272_ >> 2;
int i_274_ = i_272_ & 0x3;
int i_275_ = i_270_ + i;
+9 -9
View File
@@ -89,41 +89,41 @@ public class SeqFrame {
int offset = 0;
Buffer header = new Buffer(src);
header.position = offset;
offset += offsets.getU16() + 2;
offset += offsets.get2U() + 2;
Buffer tran1 = new Buffer(src);
tran1.position = offset;
offset += offsets.getU16();
offset += offsets.get2U();
Buffer tran2 = new Buffer(src);
tran2.position = offset;
offset += offsets.getU16();
offset += offsets.get2U();
Buffer del = new Buffer(src);
del.position = offset;
offset += offsets.getU16();
offset += offsets.get2U();
Buffer skel = new Buffer(src);
skel.position = offset;
SeqSkeleton skeleton = new SeqSkeleton(skel);
int frameCount = header.getU16();
int frameCount = header.get2U();
int[] bases = new int[500];
int[] x = new int[500];
int[] y = new int[500];
int[] z = new int[500];
for (int i = 0; i < frameCount; i++) {
SeqFrame frame = instances[header.getU16()] = new SeqFrame();
frame.delay = del.getU8();
SeqFrame frame = instances[header.get2U()] = new SeqFrame();
frame.delay = del.get1U();
frame.skeleton = skeleton;
int baseCount = header.getU8();
int baseCount = header.get1U();
int lastBase = -1;
int length = 0;
for (int base = 0; base < baseCount; base++) {
int flags = tran1.getU8();
int flags = tran1.get1U();
if (flags <= 0) {
continue;
+4 -4
View File
@@ -32,17 +32,17 @@ public class SeqSkeleton {
* @param in the input
*/
public SeqSkeleton(Buffer in) {
final int length = in.getU8();
final int length = in.get1U();
baseTypes = new int[length];
baseLabels = new int[length][];
for (int group = 0; group < length; group++) {
baseTypes[group] = in.getU8();
baseTypes[group] = in.get1U();
}
for (int group = 0; group < length; group++) {
int count = in.getU8();
int count = in.get1U();
baseLabels[group] = new int[count];
for (int child = 0; child < count; child++) {
baseLabels[group][child] = in.getU8();
baseLabels[group][child] = in.get1U();
}
}
}
+17 -17
View File
@@ -27,7 +27,7 @@ public class SeqType {
public static void method257(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("seq.dat", null));
anInt350 = buffer.getU16();
anInt350 = buffer.get2U();
if (aTypeArray351 == null) {
aTypeArray351 = new SeqType[anInt350];
}
@@ -55,50 +55,50 @@ public class SeqType {
public void method259(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
break;
}
if (i == 1) {
anInt352 = buffer.getU8();
anInt352 = buffer.get1U();
anIntArray353 = new int[anInt352];
anIntArray354 = new int[anInt352];
anIntArray355 = new int[anInt352];
for (int j = 0; j < anInt352; j++) {
anIntArray353[j] = buffer.getU16();
anIntArray354[j] = buffer.getU16();
anIntArray353[j] = buffer.get2U();
anIntArray354[j] = buffer.get2U();
if (anIntArray354[j] == 65535) {
anIntArray354[j] = -1;
}
anIntArray355[j] = buffer.getU16();
anIntArray355[j] = buffer.get2U();
}
} else if (i == 2) {
anInt356 = buffer.getU16();
anInt356 = buffer.get2U();
} else if (i == 3) {
int k = buffer.getU8();
int k = buffer.get1U();
anIntArray357 = new int[k + 1];
for (int l = 0; l < k; l++) {
anIntArray357[l] = buffer.getU8();
anIntArray357[l] = buffer.get1U();
}
anIntArray357[k] = 9999999;
} else if (i == 4) {
aBoolean358 = true;
} else if (i == 5) {
anInt359 = buffer.getU8();
anInt359 = buffer.get1U();
} else if (i == 6) {
anInt360 = buffer.getU16();
anInt360 = buffer.get2U();
} else if (i == 7) {
anInt361 = buffer.getU16();
anInt361 = buffer.get2U();
} else if (i == 8) {
anInt362 = buffer.getU8();
anInt362 = buffer.get1U();
} else if (i == 9) {
anInt363 = buffer.getU8();
anInt363 = buffer.get1U();
} else if (i == 10) {
anInt364 = buffer.getU8();
anInt364 = buffer.get1U();
} else if (i == 11) {
anInt365 = buffer.getU8();
anInt365 = buffer.get1U();
} else if (i == 12) {
unusedInt = buffer.get32();
unusedInt = buffer.get4();
} else {
System.out.println("Error unrecognised seq config code: " + i);
}
+6 -6
View File
@@ -20,19 +20,19 @@ public class SoundEnvelope {
}
public void method325(Buffer buffer) {
anInt540 = buffer.getU8();
anInt538 = buffer.get32();
anInt539 = buffer.get32();
anInt540 = buffer.get1U();
anInt538 = buffer.get4();
anInt539 = buffer.get4();
method326(buffer);
}
public void method326(Buffer buffer) {
anInt535 = buffer.getU8();
anInt535 = buffer.get1U();
anIntArray536 = new int[anInt535];
anIntArray537 = new int[anInt535];
for (int i = 0; i < anInt535; i++) {
anIntArray536[i] = buffer.getU16();
anIntArray537[i] = buffer.getU16();
anIntArray536[i] = buffer.get2U();
anIntArray537[i] = buffer.get2U();
}
}
+8 -8
View File
@@ -70,24 +70,24 @@ public class SoundFilter {
}
public void method545(Buffer buffer, SoundEnvelope envelope) {
int i = buffer.getU8();
int i = buffer.get1U();
anIntArray665[0] = i >> 4;
anIntArray665[1] = i & 0xf;
if (i != 0) {
anIntArray668[0] = buffer.getU16();
anIntArray668[1] = buffer.getU16();
int j = buffer.getU8();
anIntArray668[0] = buffer.get2U();
anIntArray668[1] = buffer.get2U();
int j = buffer.get1U();
for (int k = 0; k < 2; k++) {
for (int l = 0; l < anIntArray665[k]; l++) {
anIntArrayArrayArray666[k][0][l] = buffer.getU16();
anIntArrayArrayArray667[k][0][l] = buffer.getU16();
anIntArrayArrayArray666[k][0][l] = buffer.get2U();
anIntArrayArrayArray667[k][0][l] = buffer.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.getU16();
anIntArrayArrayArray667[i1][1][j1] = buffer.getU16();
anIntArrayArrayArray666[i1][1][j1] = buffer.get2U();
anIntArrayArrayArray667[i1][1][j1] = buffer.get2U();
} else {
anIntArrayArrayArray666[i1][1][j1] = anIntArrayArrayArray666[i1][0][j1];
anIntArrayArrayArray667[i1][1][j1] = anIntArrayArrayArray667[i1][0][j1];
+5 -5
View File
@@ -236,7 +236,7 @@ public class SoundTone {
aEnvelope_98.method325(buffer);
aEnvelope_99 = new SoundEnvelope();
aEnvelope_99.method325(buffer);
int i = buffer.getU8();
int i = buffer.get1U();
if (i != 0) {
buffer.position--;
aEnvelope_100 = new SoundEnvelope();
@@ -244,7 +244,7 @@ public class SoundTone {
aEnvelope_101 = new SoundEnvelope();
aEnvelope_101.method325(buffer);
}
i = buffer.getU8();
i = buffer.get1U();
if (i != 0) {
buffer.position--;
aEnvelope_102 = new SoundEnvelope();
@@ -252,7 +252,7 @@ public class SoundTone {
aEnvelope_103 = new SoundEnvelope();
aEnvelope_103.method325(buffer);
}
i = buffer.getU8();
i = buffer.get1U();
if (i != 0) {
buffer.position--;
aEnvelope_104 = new SoundEnvelope();
@@ -271,8 +271,8 @@ public class SoundTone {
}
anInt109 = buffer.getUSmart();
anInt110 = buffer.getUSmart();
anInt113 = buffer.getU16();
anInt114 = buffer.getU16();
anInt113 = buffer.get2U();
anInt114 = buffer.get2U();
aSoundFilter_111 = new SoundFilter();
aEnvelope_112 = new SoundEnvelope();
aSoundFilter_111.method545(buffer, aEnvelope_112);
+17 -17
View File
@@ -20,7 +20,7 @@ public class SoundTrack {
aBuffer_328 = new Buffer(aByteArray327);
SoundTone.method166();
do {
int j = buffer.getU16();
int j = buffer.get2U();
if (j == 65535) {
return;
}
@@ -41,15 +41,15 @@ public class SoundTrack {
public void method242(Buffer buffer) {
for (int i = 0; i < 10; i++) {
int j = buffer.getU8();
int j = buffer.get1U();
if (j != 0) {
buffer.position--;
aToneArray329[i] = new SoundTone();
aToneArray329[i].method169(buffer);
}
}
anInt330 = buffer.getU16();
anInt331 = buffer.getU16();
anInt330 = buffer.get2U();
anInt331 = buffer.get2U();
}
public int method243() {
@@ -80,19 +80,19 @@ public class SoundTrack {
public Buffer method244(int i) {
int k = method245(i);
aBuffer_328.position = 0;
aBuffer_328.put32(0x52494646);
aBuffer_328.put32LE(36 + k);
aBuffer_328.put32(0x57415645);
aBuffer_328.put32(0x666d7420);
aBuffer_328.put32LE(16);
aBuffer_328.put16LE(1);
aBuffer_328.put16LE(1);
aBuffer_328.put32LE(22050);
aBuffer_328.put32LE(22050);
aBuffer_328.put16LE(1);
aBuffer_328.put16LE(8);
aBuffer_328.put32(0x64617461);
aBuffer_328.put32LE(k);
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;
}
+11 -11
View File
@@ -24,7 +24,7 @@ public class SpotAnimType {
public static void method264(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("spotanim.dat", null));
anInt402 = buffer.getU16();
anInt402 = buffer.get2U();
if (aTypeArray403 == null) {
aTypeArray403 = new SpotAnimType[anInt402];
}
@@ -39,31 +39,31 @@ public class SpotAnimType {
public void method265(Buffer buffer) {
do {
int i = buffer.getU8();
int i = buffer.get1U();
if (i == 0) {
return;
}
if (i == 1) {
anInt405 = buffer.getU16();
anInt405 = buffer.get2U();
} else if (i == 2) {
anInt406 = buffer.getU16();
anInt406 = buffer.get2U();
if (SeqType.aTypeArray351 != null) {
aType_407 = SeqType.aTypeArray351[anInt406];
}
} else if (i == 4) {
anInt410 = buffer.getU16();
anInt410 = buffer.get2U();
} else if (i == 5) {
anInt411 = buffer.getU16();
anInt411 = buffer.get2U();
} else if (i == 6) {
anInt412 = buffer.getU16();
anInt412 = buffer.get2U();
} else if (i == 7) {
anInt413 = buffer.getU8();
anInt413 = buffer.get1U();
} else if (i == 8) {
anInt414 = buffer.getU8();
anInt414 = buffer.get1U();
} else if ((i >= 40) && (i < 50)) {
anIntArray408[i - 40] = buffer.getU16();
anIntArray408[i - 40] = buffer.get2U();
} else if ((i >= 50) && (i < 60)) {
anIntArray409[i - 50] = buffer.getU16();
anIntArray409[i - 50] = buffer.get2U();
} else {
System.out.println("Error unrecognised spotanim config code: " + i);
}
+7 -7
View File
@@ -19,7 +19,7 @@ public class VarbitType {
public static void method533(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varbit.dat", null));
anInt645 = buffer.getU16();
anInt645 = buffer.get2U();
if (aVarbitArray646 == null) {
aVarbitArray646 = new VarbitType[anInt645];
}
@@ -39,22 +39,22 @@ public class VarbitType {
public void method534(Buffer buffer) {
do {
int j = buffer.getU8();
int j = buffer.get1U();
if (j == 0) {
return;
}
if (j == 1) {
anInt648 = buffer.getU16();
anInt649 = buffer.getU8();
anInt650 = buffer.getU8();
anInt648 = buffer.get2U();
anInt649 = buffer.get1U();
anInt650 = buffer.get1U();
} else if (j == 10) {
unusedString = buffer.getString();
} else if (j == 2) {
aBoolean651 = true;
} else if (j == 3) {
unusedInt0 = buffer.get32();
unusedInt0 = buffer.get4();
} else if (j == 4) {
unusedInt1 = buffer.get32();
unusedInt1 = buffer.get4();
} else {
System.out.println("Error unrecognised config code: " + j);
}
+7 -7
View File
@@ -27,7 +27,7 @@ public class VarpType {
public static void method546(FileArchive archive) {
Buffer buffer = new Buffer(archive.read("varp.dat", null));
anInt702 = 0;
anInt700 = buffer.getU16();
anInt700 = buffer.get2U();
if (aVarpArray701 == null) {
aVarpArray701 = new VarpType[anInt700];
}
@@ -47,25 +47,25 @@ public class VarpType {
public void method547(Buffer buffer, int i) {
do {
int j = buffer.getU8();
int j = buffer.get1U();
if (j == 0) {
return;
}
if (j == 1) {
unusedInt0 = buffer.getU8();
unusedInt0 = buffer.get1U();
} else if (j == 2) {
unusedInt1 = buffer.getU8();
unusedInt1 = buffer.get1U();
} else if (j == 3) {
unusedBool0 = true;
anIntArray703[anInt702++] = i;
} else if (j == 4) {
unusedBool1 = false;
} else if (j == 5) {
anInt709 = buffer.getU16();
anInt709 = buffer.get2U();
} else if (j == 6) {
unusedBool2 = true;
} else if (j == 7) {
unusedInt2 = buffer.get32();
unusedInt2 = buffer.get4();
} else if (j == 8) {
unusedInt3 = 1;
unusedBool3 = true;
@@ -74,7 +74,7 @@ public class VarpType {
} else if (j == 11) {
unusedBool3 = true;
} else if (j == 12) {
unusedInt4 = buffer.get32();
unusedInt4 = buffer.get4();
} else if (j == 13) {
unusedInt3 = 2;
} else {