-
Cache Packing Animations
Okay, I have a client that has 602 animations. It made my cache EXTREMELY huge. I did try the tutorial by Galkon 'index repacking' I failed miserably, not sure how but it fucked up all the animations. I'm requesting someone please do this for me (Preferably over TV, I don't want to upload a 200mb cache. -.-) Or can someone please lead me in the right direction to packing them properly. I'm not retarded, or an idiot I will understand the help you give me. Please & Thank you. :)
-
-
Make sure you use these animation files:
[Only registered and activated users can see links. Click Here To Register...]
Code:
public static void load(byte abyte0[], int file)
{
Stream stream = new Stream(abyte0);
Class18 class18 = new Class18(stream, 0);
int k1 = stream.readUnsignedWord();
animationlist[file] = new Class36[(int) (k1 * 3.0)];
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.readUnsignedWord();
Class36 class36 = animationlist[file][i2] = new Class36();
class36.aClass18_637 = class18;
int j2 = stream.readUnsignedByte();
int k2 = -1;
int l2 = 0;
for(int i3 = 0; i3 < j2; i3++)
{
int j3 = stream.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;
short c = 0;
if(class18.anIntArray342[i3] == 3)
c = (short)128;
if((j3 & 1) != 0)
ai1[l2] = (short)stream.readShort2();
else
ai1[l2] = c;
if((j3 & 2) != 0)
ai2[l2] = stream.readShort2();
else
ai2[l2] = c;
if((j3 & 4) != 0)
ai3[l2] = stream.readShort2();
else
ai3[l2] = c;
k2 = i3;
l2++;
}
}
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 Class36 method531(int j) {
try {
String hex = Integer.toHexString(j);
int file = Integer.parseInt(hex.substring(0,(hex.length()-4)), 16);
int frame = Integer.parseInt(hex.substring((hex.length()-4)), 16);
if (animationlist[file].length == 0) {
client.instance.onDemandFetcher.method558(2, file);
return null;
} else
return animationlist[file][frame];
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
-
Typing these now, thank you for the response.