summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/ProgressiveAdder.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/ProgressiveAdder.java')
-rw-r--r--NET/worlds/scape/ProgressiveAdder.java76
1 files changed, 76 insertions, 0 deletions
diff --git a/NET/worlds/scape/ProgressiveAdder.java b/NET/worlds/scape/ProgressiveAdder.java
new file mode 100644
index 0000000..f84e133
--- /dev/null
+++ b/NET/worlds/scape/ProgressiveAdder.java
@@ -0,0 +1,76 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.core.IniFile;
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class ProgressiveAdder
+/* */ implements FrameHandler
+/* */ {
+/* */ Vector<WObject[]> addList;
+/* 15 */ static ProgressiveAdder theProgressiveAdder = null;
+/* */
+/* */ public static ProgressiveAdder get()
+/* */ {
+/* 19 */ if (theProgressiveAdder == null) {
+/* 20 */ theProgressiveAdder = new ProgressiveAdder();
+/* */ }
+/* 22 */ return theProgressiveAdder;
+/* */ }
+/* */
+/* */ ProgressiveAdder()
+/* */ {
+/* 27 */ this.addList = new Vector();
+/* */ }
+/* */
+/* */ public boolean enabled()
+/* */ {
+/* 32 */ return IniFile.gamma().getIniInt("ProgressiveAvLoading", 0) ==
+/* 33 */ 1;
+/* */ }
+/* */
+/* */ void scheduleForAdd(WObject parent, WObject child)
+/* */ {
+/* 38 */ synchronized (this.addList)
+/* */ {
+/* 40 */ WObject[] objs = new WObject[2];
+/* 41 */ objs[0] = parent;
+/* 42 */ objs[1] = child;
+/* */
+/* 44 */ this.addList.addElement(objs);
+/* */ }
+/* */ }
+/* */
+/* */ public boolean handle(FrameEvent fe)
+/* */ {
+/* 50 */ synchronized (this.addList)
+/* */ {
+/* 52 */ if (this.addList.size() > 0)
+/* */ {
+/* 54 */ WObject[] objs = (WObject[])this.addList.elementAt(0);
+/* 55 */ WObject parent = objs[0];
+/* 56 */ WObject child = objs[1];
+/* 57 */ if ((!parent.discarded) && (!child.discarded))
+/* */ {
+/* */
+/* 60 */ parent.add(child);
+/* */ }
+/* */
+/* */
+/* 64 */ this.addList.removeElementAt(0);
+/* */ }
+/* */ }
+/* */
+/* 68 */ return true;
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ProgressiveAdder.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file