diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/DroneAnimator.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
Diffstat (limited to 'NET/worlds/scape/DroneAnimator.java')
| -rw-r--r-- | NET/worlds/scape/DroneAnimator.java | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/NET/worlds/scape/DroneAnimator.java b/NET/worlds/scape/DroneAnimator.java new file mode 100644 index 0000000..c50d926 --- /dev/null +++ b/NET/worlds/scape/DroneAnimator.java @@ -0,0 +1,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); +} |