Advertisement
Guest User

Untitled

a guest
May 27th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.46 KB | None | 0 0
  1. public boolean hasFrames() {
  2.         if (null != this.frames) {
  3.             return true;
  4.         }
  5.         if (null == this.aniamtionFramesData) {
  6.             synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
  7.                 if (!GraphicDefinitionLoader.animationFramesFileSystem.method4623(this.archiveId)) {
  8.                     boolean bool = false;
  9.                     return bool;
  10.                 }
  11.                 int[] animationFrameFileIds = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds(this.archiveId);
  12.                 this.aniamtionFramesData = new byte[animationFrameFileIds.length][];
  13.                 for (int i_0_ = 0; i_0_ < animationFrameFileIds.length; i_0_++) {
  14.                     this.aniamtionFramesData[i_0_] = (GraphicDefinitionLoader.animationFramesFileSystem.getData(this.archiveId, animationFrameFileIds[i_0_]));
  15.                 }
  16.             }
  17.         }
  18.         boolean bool = true;
  19.         for (int i_1_ = 0; i_1_ < this.aniamtionFramesData.length; i_1_++) {
  20.             byte[] is = this.aniamtionFramesData[i_1_];
  21.             JagexByteBuffer buffer = new JagexByteBuffer(is);
  22.             buffer.offset = 1;
  23.             int i_2_ = buffer.readUnsignedShort();
  24.             synchronized (animationFramesFileSystem) {
  25.                 bool &= animationFramesFileSystem.method4639(i_2_);
  26.             }
  27.         }
  28.         if (!bool) {
  29.             return false;
  30.         }
  31.         Class495 class495 = new Class495();
  32.         int[] is;
  33.         synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
  34.             int fileLength = GraphicDefinitionLoader.animationFramesFileSystem.getFileLength((this.archiveId));
  35.             this.frames = new AnimationFrame[fileLength];
  36.             is = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds((this.archiveId));
  37.         }
  38.         for (int i_4_ = 0; i_4_ < is.length; i_4_++) {
  39.             byte[] data = this.aniamtionFramesData[i_4_];
  40.             JagexByteBuffer buffer = new JagexByteBuffer(data);
  41.             buffer.offset = 1;
  42.             int animationFrameId = buffer.readUnsignedShort();
  43.             AnimationFrameType1 animationFrame = null;
  44.             for (AnimationFrameType1 class339_sub9_7_ = (AnimationFrameType1) class495.method11099(); class339_sub9_7_ != null; class339_sub9_7_ = (AnimationFrameType1) class495.method11141()) {
  45.                 if (class339_sub9_7_.id == animationFrameId) {
  46.                     animationFrame = class339_sub9_7_;
  47.                     break;
  48.                 }
  49.             }
  50.             if (null == animationFrame) {
  51.                 synchronized (animationFramesFileSystem) {
  52.                     animationFrame = new AnimationFrameType1(animationFrameId, animationFramesFileSystem.getData(animationFrameId));
  53.                 }
  54.                 class495.addNode(animationFrame);
  55.             }
  56.             this.frames[is[i_4_]] = new AnimationFrame(data, animationFrame);
  57.         }
  58.         this.aniamtionFramesData = null;
  59.         return true;
  60.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement