Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. public final class SpotAnim {
  2.  
  3.  
  4. public static void unpackConfig(StreamLoader streamLoader) {
  5. Stream stream = new Stream(streamLoader.getDataForName("spotanim.dat"));
  6. int length = stream.readUnsignedWord();
  7. System.out.println("[667]GFX Amount:" + length);
  8. if(cache == null)
  9. cache = new SpotAnim[length];
  10. for(int j = 0; j < length; j++) {
  11. if(cache[j] == null)
  12. cache[j] = new SpotAnim();
  13. cache[j].anInt404 = j;
  14. cache[j].readValues(stream);
  15. }
  16. }
  17.  
  18. private void readValues(Stream stream) {
  19. do {
  20. int i = stream.readUnsignedByte();
  21. if (i == 0)
  22. return;
  23. if (i == 1)
  24. anInt405 = stream.readUnsignedWord();
  25. else if (i == 2) {
  26. anInt406 = stream.readUnsignedWord();
  27. if (Animation.anims != null)
  28. aAnimation_407 = Animation.anims[anInt406];
  29. } else if (i == 4)
  30. anInt410 = stream.readUnsignedWord();
  31. else if (i == 5)
  32. anInt411 = stream.readUnsignedWord();
  33. else if (i == 6)
  34. anInt412 = stream.readUnsignedWord();
  35. else if (i == 7)
  36. anInt413 = stream.readUnsignedByte();
  37. else if (i == 8)
  38. anInt414 = stream.readUnsignedByte();
  39. else if (i == 40) {
  40. int j = stream.readUnsignedByte();
  41. for (int k = 0; k < j; k++) {
  42. anIntArray408[k] = stream.readUnsignedWord();
  43. anIntArray409[k] = stream.readUnsignedWord();
  44. }
  45. } else
  46. System.out.println("Error unrecognised spotanim config code: "
  47. + i);
  48. } while (true);
  49. }
  50.  
  51. public Model getModel()
  52. {
  53. Model model = (Model) aMRUNodes_415.insertFromCache(anInt404);
  54. if(model != null)
  55. return model;
  56. model = Model.method462(anInt405);
  57. if(model == null)
  58. return null;
  59. for(int i = 0; i < 6; i++)
  60. if(anIntArray408[0] != 0)
  61. model.method476(anIntArray408[i], anIntArray409[i]);
  62.  
  63. aMRUNodes_415.removeFromCache(model, anInt404);
  64. return model;
  65. }
  66.  
  67. private SpotAnim()
  68. {
  69. anInt406 = -1;
  70. anIntArray408 = new int[6];
  71. anIntArray409 = new int[6];
  72. anInt410 = 128;
  73. anInt411 = 128;
  74. }
  75.  
  76. public static SpotAnim cache[];
  77. private int anInt404;
  78. private int anInt405;
  79. private int anInt406;
  80. public Animation aAnimation_407;
  81. private final int[] anIntArray408;
  82. private final int[] anIntArray409;
  83. public int anInt410;
  84. public int anInt411;
  85. public int anInt412;
  86. public int anInt413;
  87. public int anInt414;
  88. public static MRUNodes aMRUNodes_415 = new MRUNodes(30);
  89.  
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement