Originally Posted by
Kris
There are different namings floating around here, so I don't really know what to use. I guess the best way to explain what I mean is to say which indice(or index as some people refer) is which.
Frame - I also refer to it as skeleton occasionally, exists in indice 0.
Frame map - exists in indice 1.
Animation definitions(sequence as RS calls it) - In OSRS, they're in indice 2(config indice), archive/group 12.
Each frame starts off by writing the frame map id in a short(this is in OSRS, in RS3, there's an extra byte written before that). This effectively links all frames together to a single frame map. TL;DR: You loop all the frames and associate them to their respective maps - you cannot gather a list of fitting frames from the frame map itself.
Now, to find the matching animations, you need to loop the animation definitions. Each definition contains an array of frames. Since you previously mapped down all the frames to their respective maps - you can find out which map the animation belongs to based on that array of frames(all the frames will belong to the same frame map, so you can safely just map it based on the very first frame if you wanted to speed the process).
Effectively all it is, is just a shitton of looping. There are over 110k frame maps in OSRS, almost a million in RS3.
I'm sure you knew the latter block I just said but just in case there's some confusion about it, I explained the process of associating them all together.
basically youre talking about this class?
Code:
public final class FrameBase {
public final int count;
public final int[] transformationType;
public final int[][] groups;
public FrameBase(Buffer buffer) {
count = buffer.getUByte();
transformationType = new int[count];
groups = new int[count][];
for (int index = 0; index < count; index++) {
transformationType[index] = buffer.getUByte();
}
for (int group = 0; group < count; group++) {
int groupSize = buffer.getUByte();
groups[group] = new int[groupSize];
for (int index = 0; index < groupSize; index++) {
groups[group][index] = buffer.getUByte();
}
}
}
}
Edit: The 'group' local variable should really be called 'transformation'