My class36:
Code:
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public final class Class36
{
public static void method528(int i) {
i = 50000;
aClass36Array635 = new Class36[i + 1];
aBooleanArray643 = new boolean[i + 1];
for(int j = 0; j < i + 1; j++)
aBooleanArray643[j] = true;
}
public static int offset = 33600;
public static void methodCustomAnimations(boolean flag, int file)
{
byte abyte0[];
abyte0 = FileOperations.ReadFile("./cache/anims/"+file+".dat");
Animation.FrameStart[file] = offset;
Stream class30_sub2_sub2 = new Stream(abyte0);
class30_sub2_sub2.currentOffset = abyte0.length - 8;
int i = class30_sub2_sub2.readUnsignedWord();
int j = class30_sub2_sub2.readUnsignedWord();
int k = class30_sub2_sub2.readUnsignedWord();
int l = class30_sub2_sub2.readUnsignedWord();
int i1 = 0;
Stream class30_sub2_sub2_1 = new Stream(abyte0);
class30_sub2_sub2_1.currentOffset = i1;
i1 += i + 2;
Stream class30_sub2_sub2_2 = new Stream(abyte0);
class30_sub2_sub2_2.currentOffset = i1;
i1 += j;
Stream class30_sub2_sub2_3 = new Stream(abyte0);
class30_sub2_sub2_3.currentOffset = i1;
i1 += k;
Stream class30_sub2_sub2_4 = new Stream(abyte0);
class30_sub2_sub2_4.currentOffset = i1;
i1 += l;
Stream class30_sub2_sub2_5 = new Stream(abyte0);
class30_sub2_sub2_5.currentOffset = i1;
if(flag)
{
for(int j1 = 1; j1 > 0; j1++);
}
Class18 class18 = new Class18(class30_sub2_sub2_5);
int k1 = class30_sub2_sub2_1.readUnsignedWord();
int ai[] = new int[500];
int ai1[] = new int[500];
int ai2[] = new int[500];
int ai3[] = new int[500];
for(int l1 = 0; l1 < k1; l1++)
{
int i2 = class30_sub2_sub2_1.readUnsignedWord();
i2 = offset;
offset++;
Class36 class36 = aClass36Array635[i2] = new Class36();
class36.anInt636 = class30_sub2_sub2_4.readUnsignedByte();
class36.aClass18_637 = class18;
int j2 = class30_sub2_sub2_1.readUnsignedByte();
int k2 = -1;
int l2 = 0;
for(int i3 = 0; i3 < j2; i3++)
{
int j3 = class30_sub2_sub2_2.readUnsignedByte();
if(j3 > 0)
{
if(class18.anIntArray342[i3] != 0)
{
for(int l3 = i3 - 1; l3 > k2; l3--)
{
if(class18.anIntArray342[l3] != 0)
continue;
ai[l2] = l3;
ai1[l2] = 0;
ai2[l2] = 0;
ai3[l2] = 0;
l2++;
break;
}
}
ai[l2] = i3;
char c = '\0';
if(class18.anIntArray342[i3] == 3)
c = '\200';
if((j3 & 1) != 0)
ai1[l2] = class30_sub2_sub2_3.method421();
else
ai1[l2] = c;
if((j3 & 2) != 0)
ai2[l2] = class30_sub2_sub2_3.method421();
else
ai2[l2] = c;
if((j3 & 4) != 0)
ai3[l2] = class30_sub2_sub2_3.method421();
else
ai3[l2] = c;
k2 = i3;
l2++;
if(class18.anIntArray342[i3] == 5)
aBooleanArray643[i2] = false;
}
}
class36.anInt638 = l2;
class36.anIntArray639 = new int[l2];
class36.anIntArray640 = new int[l2];
class36.anIntArray641 = new int[l2];
class36.anIntArray642 = new int[l2];
for(int k3 = 0; k3 < l2; k3++)
{
class36.anIntArray639[k3] = ai[k3];
class36.anIntArray640[k3] = ai1[k3];
class36.anIntArray641[k3] = ai2[k3];
class36.anIntArray642[k3] = ai3[k3];
}
}
}
public static void method529(byte abyte0[])
{
Stream stream = new Stream(abyte0);
stream.currentOffset = abyte0.length - 8;
int i = stream.readUnsignedWord();
int j = stream.readUnsignedWord();
int k = stream.readUnsignedWord();
int l = stream.readUnsignedWord();
int i1 = 0;
Stream stream_1 = new Stream(abyte0);
stream_1.currentOffset = i1;
i1 += i + 2;
Stream stream_2 = new Stream(abyte0);
stream_2.currentOffset = i1;
i1 += j;
Stream stream_3 = new Stream(abyte0);
stream_3.currentOffset = i1;
i1 += k;
Stream stream_4 = new Stream(abyte0);
stream_4.currentOffset = i1;
i1 += l;
Stream stream_5 = new Stream(abyte0);
stream_5.currentOffset = i1;
Class18 class18 = new Class18(stream_5);
int k1 = stream_1.readUnsignedWord();
int ai[] = new int[500];
int ai1[] = new int[500];
int ai2[] = new int[500];
int ai3[] = new int[500];
for(int l1 = 0; l1 < k1; l1++)
{
int i2 = stream_1.readUnsignedWord();
Class36 class36 = aClass36Array635[i2] = new Class36();
class36.anInt636 = stream_4.readUnsignedByte();
class36.aClass18_637 = class18;
int j2 = stream_1.readUnsignedByte();
int k2 = -1;
int l2 = 0;
for(int i3 = 0; i3 < j2; i3++)
{
int j3 = stream_2.readUnsignedByte();
if(j3 > 0)
{
if(class18.anIntArray342[i3] != 0)
{
for(int l3 = i3 - 1; l3 > k2; l3--)
{
if(class18.anIntArray342[l3] != 0)
continue;
ai[l2] = l3;
ai1[l2] = 0;
ai2[l2] = 0;
ai3[l2] = 0;
l2++;
break;
}
}
ai[l2] = i3;
char c = '\0';
if(class18.anIntArray342[i3] == 3)
c = '\200';
if((j3 & 1) != 0)
ai1[l2] = stream_3.method421();
else
ai1[l2] = c;
if((j3 & 2) != 0)
ai2[l2] = stream_3.method421();
else
ai2[l2] = c;
if((j3 & 4) != 0)
ai3[l2] = stream_3.method421();
else
ai3[l2] = c;
k2 = i3;
l2++;
if(class18.anIntArray342[i3] == 5)
aBooleanArray643[i2] = false;
}
}
class36.anInt638 = l2;
class36.anIntArray639 = new int[l2];
class36.anIntArray640 = new int[l2];
class36.anIntArray641 = new int[l2];
class36.anIntArray642 = new int[l2];
for(int k3 = 0; k3 < l2; k3++)
{
class36.anIntArray639[k3] = ai[k3];
class36.anIntArray640[k3] = ai1[k3];
class36.anIntArray641[k3] = ai2[k3];
class36.anIntArray642[k3] = ai3[k3];
}
}
}
public static void nullLoader()
{
aClass36Array635 = null;
}
public static Class36 method531(int j)
{
if(aClass36Array635 == null)
return null;
else
return aClass36Array635[j];
}
public static boolean method532(int i)
{
return i == -1;
}
private Class36()
{
}
private static Class36[] aClass36Array635;
public int anInt636;
public Class18 aClass18_637;
public int anInt638;
public int anIntArray639[];
public int anIntArray640[];
public int anIntArray641[];
public int anIntArray642[];
private static boolean[] aBooleanArray643;
}
My Animation class:
Code:
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public final class Animation {
public static void unpackConfig(StreamLoader streamLoader)
{
for(int j = 0; j < FrameStart.length; j++) {
FrameStart[j] = 0;
}
Stream stream = new Stream(streamLoader.getDataForName("seq.dat"));
int length = stream.readUnsignedWord()+3299;
if(anims == null)
anims = new Animation[length];
for(int j = 0; j < length; j++)
{
if(anims[j] == null)
anims[j] = new Animation();
anims[j].readValues(stream);
if(j == 7047) { //2h Stand
int file = 1834;
if(FrameStart[file] < 1)
Class36.methodCustomAnimations(false, file);
int[] frames = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
anims[j].anInt352 = frames.length-1;
anims[j].anIntArray353 = new int[frames.length-1];
anims[j].anIntArray354 = new int[frames.length-1];
anims[j].anIntArray355 = new int[frames.length-1];
for(int i2 = 0; i2 < frames.length-1; i2++) {
anims[j].anIntArray353[i2] = frames[i2]+FrameStart[file];
anims[j].anIntArray354[i2] = -1;
anims[j].anIntArray355[i2] = 0;
}
}
}
}
public int method258(int i)
{
int j = anIntArray355[i];
if(j == 0)
{
Class36 class36 = Class36.method531(anIntArray353[i]);
if(class36 != null)
j = anIntArray355[i] = class36.anInt636;
}
if(j == 0)
j = 1;
return j;
}
private void readValues(Stream stream)
{
do
{
int i = stream.readUnsignedByte();
if(i == 0)
break;
if(i == 1)
{
anInt352 = stream.readUnsignedByte();
anIntArray353 = new int[anInt352];
anIntArray354 = new int[anInt352];
anIntArray355 = new int[anInt352];
for(int j = 0; j < anInt352; j++)
{
anIntArray353[j] = stream.readUnsignedWord();
anIntArray354[j] = stream.readUnsignedWord();
if(anIntArray354[j] == 65535)
anIntArray354[j] = -1;
anIntArray355[j] = stream.readUnsignedWord();
}
} else
if(i == 2)
anInt356 = stream.readUnsignedWord();
else
if(i == 3)
{
int k = stream.readUnsignedByte();
anIntArray357 = new int[k + 1];
for(int l = 0; l < k; l++)
anIntArray357[l] = stream.readUnsignedByte();
anIntArray357[k] = 0x98967f;
} else
if(i == 4)
aBoolean358 = true;
else
if(i == 5)
anInt359 = stream.readUnsignedByte();
else
if(i == 6)
anInt360 = stream.readUnsignedWord();
else
if(i == 7)
anInt361 = stream.readUnsignedWord();
else
if(i == 8)
anInt362 = stream.readUnsignedByte();
else
if(i == 9)
anInt363 = stream.readUnsignedByte();
else
if(i == 10)
anInt364 = stream.readUnsignedByte();
else
if(i == 11)
anInt365 = stream.readUnsignedByte();
else
if(i == 12)
stream.readDWord();
else
System.out.println("Error unrecognised seq config code: " + i);
} while(true);
if(anInt352 == 0)
{
anInt352 = 1;
anIntArray353 = new int[1];
anIntArray353[0] = -1;
anIntArray354 = new int[1];
anIntArray354[0] = -1;
anIntArray355 = new int[1];
anIntArray355[0] = -1;
}
if(anInt363 == -1)
if(anIntArray357 != null)
anInt363 = 2;
else
anInt363 = 0;
if(anInt364 == -1)
{
if(anIntArray357 != null)
{
anInt364 = 2;
return;
}
anInt364 = 0;
}
}
private Animation()
{
anInt356 = -1;
aBoolean358 = false;
anInt359 = 5;
anInt360 = -1;
anInt361 = -1;
anInt362 = 99;
anInt363 = -1;
anInt364 = -1;
anInt365 = 2;
}
public static int FrameStart[] = new int[2500];
public static Animation anims[];
public int anInt352;
public int anIntArray353[];
public int anIntArray354[];
private int[] anIntArray355;
public int anInt356;
public int anIntArray357[];
public boolean aBoolean358;
public int anInt359;
public int anInt360;
public int anInt361;
public int anInt362;
public int anInt363;
public int anInt364;
public int anInt365;
public static int anInt367;
}
I've been getting a 86 unpack error every time. Help plox