Advertisement
Guest User

Untitled

a guest
May 27th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.03 KB | None | 0 0
  1. /* Class339_Sub43_Sub4 - Decompiled by JODE
  2.  * Visit http://jode.sourceforge.net/
  3.  */
  4.  
  5. public class AnimationFrameMap extends Node_Sub43 {
  6.  
  7.     static FileSystem animationFramesFileSystem;
  8.     int archiveId;
  9.     byte[][] aniamtionFramesData;
  10.     AnimationFrame[] frames;
  11.  
  12.     public boolean hasFrames() {
  13.         if (null != this.frames) {
  14.             return true;
  15.         }
  16.         if (null == this.aniamtionFramesData) {
  17.             synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
  18.                 if (!GraphicDefinitionLoader.animationFramesFileSystem.method4623(this.archiveId)) {
  19.                     boolean bool = false;
  20.                     return bool;
  21.                 }
  22.                 int[] animationFrameFileIds = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds(this.archiveId);
  23.                 this.aniamtionFramesData = new byte[animationFrameFileIds.length][];
  24.                 for (int i_0_ = 0; i_0_ < animationFrameFileIds.length; i_0_++) {
  25.                     this.aniamtionFramesData[i_0_] = (GraphicDefinitionLoader.animationFramesFileSystem.getData(this.archiveId, animationFrameFileIds[i_0_]));
  26.                 }
  27.             }
  28.         }
  29.         boolean bool = true;
  30.         for (int i_1_ = 0; i_1_ < this.aniamtionFramesData.length; i_1_++) {
  31.             byte[] is = this.aniamtionFramesData[i_1_];
  32.             JagexByteBuffer buffer = new JagexByteBuffer(is);
  33.             buffer.offset = 1;
  34.             int i_2_ = buffer.readUnsignedShort();
  35.             synchronized (animationFramesFileSystem) {
  36.                 bool &= animationFramesFileSystem.method4639(i_2_);
  37.             }
  38.         }
  39.         if (!bool) {
  40.             return false;
  41.         }
  42.         Class495 class495 = new Class495();
  43.         int[] is;
  44.         synchronized (GraphicDefinitionLoader.animationFramesFileSystem) {
  45.             int fileLength = GraphicDefinitionLoader.animationFramesFileSystem.getFileLength((this.archiveId));
  46.             this.frames = new AnimationFrame[fileLength];
  47.             is = GraphicDefinitionLoader.animationFramesFileSystem.getFileIds((this.archiveId));
  48.         }
  49.         for (int i_4_ = 0; i_4_ < is.length; i_4_++) {
  50.             byte[] data = this.aniamtionFramesData[i_4_];
  51.             JagexByteBuffer buffer = new JagexByteBuffer(data);
  52.             buffer.offset = 1;
  53.             int animationFrameId = buffer.readUnsignedShort();
  54.             AnimationFrameType1 animationFrame = null;
  55.             for (AnimationFrameType1 class339_sub9_7_ = (AnimationFrameType1) class495.method11099(); class339_sub9_7_ != null; class339_sub9_7_ = (AnimationFrameType1) class495.method11141()) {
  56.                 if (class339_sub9_7_.id == animationFrameId) {
  57.                     animationFrame = class339_sub9_7_;
  58.                     break;
  59.                 }
  60.             }
  61.             if (null == animationFrame) {
  62.                 synchronized (animationFramesFileSystem) {
  63.                     animationFrame = new AnimationFrameType1(animationFrameId, animationFramesFileSystem.getData(animationFrameId));
  64.                 }
  65.                 class495.addNode(animationFrame);
  66.             }
  67.             this.frames[is[i_4_]] = new AnimationFrame(data, animationFrame);
  68.         }
  69.         this.aniamtionFramesData = null;
  70.         return true;
  71.     }
  72.  
  73.     public boolean method15853(int i) {
  74.         return (this.frames[i].aBool1099);
  75.     }
  76.  
  77.     public boolean method15862(int i) {
  78.         return (this.frames[i].aBool1100);
  79.     }
  80.  
  81.     public boolean method15865(int i) {
  82.         return (this.frames[i].aBool1098);
  83.     }
  84.  
  85.     public AnimationFrameMap(int i) {
  86.         this.archiveId = i;
  87.     }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement