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
|
package NET.worlds.scape;
import NET.worlds.console.Gamma;
import NET.worlds.console.Main;
import NET.worlds.console.MainCallback;
import NET.worlds.core.Std;
import java.util.Vector;
public class DroneAnimator implements MainCallback {
public static final int INVALID_INDEX = -1;
private static Vector<Integer> deltypeList;
protected int _rep = 0;
static {
init(".");
if (Gamma.loadProgress != null) {
Gamma.loadProgress.setMessage("Loading avatar definitions...");
Gamma.loadProgress.advance();
}
loadconfig(PendingCacheDrone.getAvatarDatPath());
}
public static native void init(String var0);
public static native void loadconfig(String var0);
public static native int getnameindex(String var0);
public static native String getindexgeom(int var0);
public static native void prepFigure(WObject var0, boolean var1);
public static native void addtype(int var0);
public static native void deltype(int var0);
public void delayedDeltype(int type) {
if (deltypeList == null) {
deltypeList = new Vector<Integer>();
Main.register(this);
}
deltypeList.addElement(new Integer(type));
deltypeList.addElement(new Integer(Std.getFastTime()));
}
@Override
public void mainCallback() {
int eraseTime = Std.getFastTime() - 20000;
while (deltypeList.size() > 1) {
int nextTime = deltypeList.elementAt(1);
if (nextTime > eraseTime) {
break;
}
int type = deltypeList.elementAt(0);
deltype(type);
deltypeList.removeElementAt(0);
deltypeList.removeElementAt(0);
}
}
public DroneAnimator() {
this._rep = CreateRep();
}
@Override
public void finalize() throws Throwable {
DestroyRep(this._rep);
super.finalize();
}
public native void endanimations();
public native void moveto(int var1, short var2, short var3, short var4, short var5, int var6);
public native void moveby(int var1, short var2, short var3, short var4, int var5);
public native void update(WObject var1, WObject var2, int var3, float var4, boolean var5);
public native float animate(int var1, String var2, int var3);
public native float getAnimationTime(int var1, String var2);
public static synchronized native Vector<String> getActionList(int var0);
protected static native int CreateRep();
protected static native void DestroyRep(int var0);
}
|