-
Notifications
You must be signed in to change notification settings - Fork 0
/
Animation.java
executable file
·157 lines (148 loc) · 4.22 KB
/
Animation.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
public final class Animation {
public static int FrameStart[] = new int[1950];
public static void unpackConfig(StreamLoader streamLoader) {
for(int j = 0; j < FrameStart.length; j++)
FrameStart[j] = 0;
Stream stream = new Stream(streamLoader.getDataForName("seq.dat"));
int length = stream.readUnsignedWord() + 3299;
if(anims == null)
anims = new Animation[length];
for(int j = 0; j < length; j++) {
if(anims[j] == null)
anims[j] = new Animation();
if(j < 3997) {
anims[j].readValues(stream);
} else {
setAnimBase(j);
}
try {
} catch (Exception e) {e.printStackTrace();}
}
}
public static void setAnimBase(int j) {
anims[j].anInt352 = anims[808].anInt352;
anims[j].anIntArray353 = anims[808].anIntArray353;
anims[j].anIntArray354 = anims[808].anIntArray354;
anims[j].anIntArray355 = anims[808].anIntArray355;
anims[j].anInt356 = anims[808].anInt356;
anims[j].anIntArray357 = anims[808].anIntArray357;
anims[j].anInt359 = anims[808].anInt359;
anims[j].anInt360 = anims[808].anInt360;
anims[j].anInt361 = anims[808].anInt361;
anims[j].anInt362 = anims[808].anInt362;
anims[j].anInt363 = anims[808].anInt363;
anims[j].anInt364 = anims[808].anInt364;
anims[j].anInt365 = anims[808].anInt365;
anims[j].anInt352 = anims[808].anInt352;
}
public int method258(int i) {
int j = anIntArray355[i];
if(j == 0) {
Class36 class36 = Class36.method531(anIntArray353[i]);
if(class36 != null)
j = anIntArray355[i] = class36.anInt636;
}
if(j == 0)
j = 1;
return j;
}
private void readValues(Stream stream) {
do {
int i = stream.readUnsignedByte();
if(i == 0)
break;
if(i == 1) {
anInt352 = stream.readUnsignedByte();
anIntArray353 = new int[anInt352];
anIntArray354 = new int[anInt352];
anIntArray355 = new int[anInt352];
for(int j = 0; j < anInt352; j++) {
anIntArray353[j] = stream.readUnsignedWord();
anIntArray354[j] = stream.readUnsignedWord();
if(anIntArray354[j] == 65535)
anIntArray354[j] = -1;
anIntArray355[j] = stream.readUnsignedWord();
}
} else if(i == 2)
anInt356 = stream.readUnsignedWord();
else if(i == 3) {
int k = stream.readUnsignedByte();
anIntArray357 = new int[k + 1];
for(int l = 0; l < k; l++)
anIntArray357[l] = stream.readUnsignedByte();
anIntArray357[k] = 0x98967f;
} else if(i == 4)
aBoolean358 = true;
else if(i == 5)
anInt359 = stream.readUnsignedByte();
else if(i == 6)
anInt360 = stream.readUnsignedWord();
else if(i == 7)
anInt361 = stream.readUnsignedWord();
else
if(i == 8)
anInt362 = stream.readUnsignedByte();
else if(i == 9)
anInt363 = stream.readUnsignedByte();
else if(i == 10)
anInt364 = stream.readUnsignedByte();
else if(i == 11)
anInt365 = stream.readUnsignedByte();
else if(i == 12)
stream.readDWord();
else
System.out.println("Error unrecognised seq config code: " + i);
} while(true);
if(anInt352 == 0) {
anInt352 = 1;
anIntArray353 = new int[1];
anIntArray353[0] = -1;
anIntArray354 = new int[1];
anIntArray354[0] = -1;
anIntArray355 = new int[1];
anIntArray355[0] = -1;
}
if(anInt363 == -1)
if(anIntArray357 != null)
anInt363 = 2;
else
anInt363 = 0;
if(anInt364 == -1) {
if(anIntArray357 != null) {
anInt364 = 2;
return;
}
anInt364 = 0;
}
}
private Animation() {
anInt356 = -1;
aBoolean358 = false;
anInt359 = 5;
anInt360 = -1;
anInt361 = -1;
anInt362 = 99;
anInt363 = -1;
anInt364 = -1;
anInt365 = 2;
}
public static Animation anims[];
public int anInt352;
public int anIntArray353[];
public int anIntArray354[];
public int[] anIntArray355;
public int anInt356;
public int anIntArray357[];
public boolean aBoolean358;
public int anInt359;
public int anInt360;
public int anInt361;
public int anInt362;
public int anInt363;
public int anInt364;
public int anInt365;
public static int anInt367;
}