Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Class339_Sub43_Sub4 - Decompiled by JODE
- * Visit http://jode.sourceforge.net/
- */
- public class AnimationFrameMap extends Node_Sub43 {
- static FileSystem animationFramesFileSystem;
- int archiveId;
- byte[][] aniamtionFramesData;
- AnimationFrame[] frames;
- public boolean hasFrames() {
- if (null != this.frames) {
- return true;
- }
- if (null == this.aniamtionFramesData) {
- synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
- if (!GraphicDefinitionLoader.animationFramesFileSystem.method4623(this.archiveId)) {
- boolean bool = false;
- return bool;
- }
- int[] animationFrameFileIds = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds(this.archiveId);
- this.aniamtionFramesData = new byte[animationFrameFileIds.length][];
- for (int i_0_ = 0; i_0_ < animationFrameFileIds.length; i_0_++) {
- this.aniamtionFramesData[i_0_] = (GraphicDefinitionLoader.animationFramesFileSystem.getData(this.archiveId, animationFrameFileIds[i_0_]));
- }
- }
- }
- boolean bool = true;
- for (int i_1_ = 0; i_1_ < this.aniamtionFramesData.length; i_1_++) {
- byte[] is = this.aniamtionFramesData[i_1_];
- JagexByteBuffer buffer = new JagexByteBuffer(is);
- buffer.offset = 1;
- int i_2_ = buffer.readUnsignedShort();
- synchronized (animationFramesFileSystem) {
- bool &= animationFramesFileSystem.method4639(i_2_);
- }
- }
- if (!bool) {
- return false;
- }
- Class495 class495 = new Class495();
- int[] is;
- synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
- int fileLength = GraphicDefinitionLoader.animationFramesFileSystem.getFileLength((this.archiveId));
- this.frames = new AnimationFrame[fileLength];
- is = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds((this.archiveId));
- }
- for (int i_4_ = 0; i_4_ < is.length; i_4_++) {
- byte[] data = this.aniamtionFramesData[i_4_];
- JagexByteBuffer buffer = new JagexByteBuffer(data);
- buffer.offset = 1;
- int animationFrameId = buffer.readUnsignedShort();
- AnimationFrameType1 animationFrame = null;
- for (AnimationFrameType1 class339_sub9_7_ = (AnimationFrameType1) class495.method11099(); class339_sub9_7_ != null; class339_sub9_7_ = (AnimationFrameType1) class495.method11141()) {
- if (class339_sub9_7_.id == animationFrameId) {
- animationFrame = class339_sub9_7_;
- break;
- }
- }
- if (null == animationFrame) {
- synchronized (animationFramesFileSystem) {
- animationFrame = new AnimationFrameType1(animationFrameId, animationFramesFileSystem.getData(animationFrameId));
- }
- class495.addNode(animationFrame);
- }
- this.frames[is[i_4_]] = new AnimationFrame(data, animationFrame);
- }
- this.aniamtionFramesData = null;
- return true;
- }
- public boolean method15853(int i) {
- return (this.frames[i].aBool1099);
- }
- public boolean method15862(int i) {
- return (this.frames[i].aBool1100);
- }
- public boolean method15865(int i) {
- return (this.frames[i].aBool1098);
- }
- public AnimationFrameMap(int i) {
- this.archiveId = i;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement