summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/Shape.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/Shape.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/Shape.java')
-rw-r--r--NET/worlds/scape/Shape.java1508
1 files changed, 1508 insertions, 0 deletions
diff --git a/NET/worlds/scape/Shape.java b/NET/worlds/scape/Shape.java
new file mode 100644
index 0000000..ab994a1
--- /dev/null
+++ b/NET/worlds/scape/Shape.java
@@ -0,0 +1,1508 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.console.Console;
+/* */ import NET.worlds.console.DefaultConsole;
+/* */ import NET.worlds.console.Main;
+/* */ import NET.worlds.console.MainCallback;
+/* */ import NET.worlds.console.RenderCanvas;
+/* */ import NET.worlds.console.StatMemNode;
+/* */ import NET.worlds.core.Archive;
+/* */ import NET.worlds.core.IniFile;
+/* */ import NET.worlds.network.URL;
+/* */ import java.awt.PopupMenu;
+/* */ import java.io.IOException;
+/* */ import java.io.PrintStream;
+/* */ import java.net.MalformedURLException;
+/* */ import java.util.Enumeration;
+/* */ import java.util.StringTokenizer;
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class Shape
+/* */ extends WObject
+/* */ implements MainCallback, Animatable, MouseDownHandler
+/* */ {
+/* */ static int disableLOD;
+/* */ static int forceLODLevel;
+/* */
+/* */ public Shape()
+/* */ {
+/* 123 */ this.numDetailLevels = 0;
+/* 124 */ this.recomputeLODs = true;
+/* 125 */ this.currentLOD = (this.lastLOD = 0);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 161 */ Vector<ShapeLoaderListener> listeners = null;
+/* */ URL url;
+/* */
+/* 164 */ void addLoadListener(ShapeLoaderListener l) { if (this.listeners == null) {
+/* 165 */ this.listeners = new Vector();
+/* */ }
+/* 167 */ if (!this.listeners.contains(l))
+/* 168 */ this.listeners.addElement(l);
+/* */ }
+/* */
+/* */ private void notifyLoadListeners() {
+/* 172 */ if (this.listeners != null) {
+/* 173 */ Enumeration<ShapeLoaderListener> e = this.listeners.elements();
+/* 174 */ if (e != null) {
+/* 175 */ while (e.hasMoreElements()) {
+/* 176 */ ShapeLoaderListener l =
+/* 177 */ (ShapeLoaderListener)e.nextElement();
+/* 178 */ l.notifyShapeLoaded(this);
+/* */ }
+/* */ }
+/* 181 */ this.listeners.removeAllElements();
+/* */ }
+/* */ }
+/* */
+/* */ void removeLoadListener(ShapeLoaderListener l) {
+/* 186 */ if (this.listeners != null) {
+/* 187 */ this.listeners.removeElement(l);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ boolean mustReload;
+/* */
+/* */
+/* */
+/* */ boolean recomputeLODs;
+/* */
+/* */
+/* */
+/* */ int numDetailLevels;
+/* */
+/* */
+/* */
+/* */ int currentLOD;
+/* */
+/* */
+/* */
+/* */ int lastLOD;
+/* */
+/* */
+/* */
+/* */ URL[] lodURLs;
+/* */
+/* */
+/* */
+/* */ float[] lodDistanceTriggers;
+/* */
+/* */
+/* */
+/* */ float[] lodAreas;
+/* */
+/* */
+/* */
+/* */ protected static int NORMAL;
+/* */
+/* */
+/* */
+/* */ protected static int ERROR;
+/* */
+/* */
+/* */ protected static int LOADING;
+/* */
+/* */
+/* */ public void setBaseLODURL(URL baseURL)
+/* */ {
+/* 238 */ if ((disableLOD == 0) && (baseURL != null) &&
+/* 239 */ (baseURL.getAbsolute().startsWith("avatar:")))
+/* */ {
+/* 241 */ int colon = baseURL.toString().indexOf(':');
+/* 242 */ int dot = baseURL.toString().indexOf('.');
+/* 243 */ String avName = baseURL.toString().substring(colon + 1, dot);
+/* 244 */ String avURLName = "avatar:lod/" + avName + ".lod";
+/* */ try
+/* */ {
+/* 247 */ lodURL = new URL(avURLName);
+/* */ }
+/* */ catch (MalformedURLException e)
+/* */ {
+/* */ URL lodURL;
+/* */
+/* */
+/* */
+/* */ return;
+/* */ }
+/* */
+/* */
+/* */
+/* */ URL lodURL;
+/* */
+/* */
+/* 263 */ byte[] lodFile = Archive.readTextFile(lodURL
+/* 264 */ .unalias());
+/* 265 */ if (lodFile != null)
+/* */ {
+/* 267 */ String lodText = new String(lodFile);
+/* */
+/* 269 */ StringTokenizer tk = new StringTokenizer(lodText);
+/* */
+/* 271 */ this.numDetailLevels = Integer.parseInt(tk.nextToken());
+/* 272 */ this.lodURLs = new URL[this.numDetailLevels];
+/* 273 */ this.lodAreas = new float[this.numDetailLevels];
+/* 274 */ this.lodDistanceTriggers = new float[this.numDetailLevels];
+/* */
+/* 276 */ int x = 0;
+/* 277 */ this.lodURLs[x] = baseURL;
+/* 278 */ this.lodAreas[(x++)] = 0.0F;
+/* */
+/* 280 */ while (tk.hasMoreTokens()) {
+/* 281 */ String level = tk.nextToken();
+/* 282 */ String value = tk.nextToken();
+/* 283 */ Float f = new Float(value);
+/* */
+/* 285 */ this.lodAreas[x] = f.floatValue();
+/* */ try
+/* */ {
+/* 288 */ this.lodURLs[x] = new URL("avatar:lod/" + avName + level +
+/* 289 */ baseURL.toString().substring(dot));
+/* */ } catch (MalformedURLException e) {
+/* 291 */ System.out.println("Error creating lod URL!\n");
+/* 292 */ this.numDetailLevels = 0;
+/* 293 */ return;
+/* */ }
+/* */
+/* */
+/* 297 */ x++;
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* 302 */ this.recomputeLODs = true;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public synchronized boolean setLOD(float dist)
+/* */ {
+/* 317 */ boolean switched = false;
+/* */
+/* */
+/* 320 */ if (this.numDetailLevels > 0) {
+/* 321 */ if (forceLODLevel != -1) {
+/* 322 */ int realLOD = forceLODLevel > this.numDetailLevels - 1 ? this.numDetailLevels - 1 :
+/* 323 */ forceLODLevel;
+/* 324 */ if (realLOD != this.lastLOD) {
+/* 325 */ setURL(this.lodURLs[realLOD]);
+/* 326 */ this.currentLOD = (this.lastLOD = realLOD);
+/* 327 */ return true;
+/* */ }
+/* 329 */ return false;
+/* */ }
+/* */
+/* 332 */ if (this.recomputeLODs) {
+/* 333 */ for (int x = 0; x < this.numDetailLevels; x++) {
+/* 334 */ this.lodDistanceTriggers[x] = calcLODDistance(this.lodAreas[x]);
+/* */ }
+/* */
+/* */
+/* 338 */ this.recomputeLODs = false;
+/* */ }
+/* */
+/* */
+/* */
+/* 343 */ for (int lod = 0; lod < this.numDetailLevels; lod++) {
+/* 344 */ if (this.lodDistanceTriggers[lod] > dist) {
+/* 345 */ if (lod == this.lastLOD) break;
+/* 346 */ this.currentLOD = lod;
+/* 347 */ if ((this instanceof PosableShape)) {
+/* 348 */ ((PosableShape)this).removeSubparts();
+/* */ }
+/* */
+/* 351 */ if (isLoaded())
+/* 352 */ releasePendingShape();
+/* 353 */ setURL(this.lodURLs[lod]);
+/* */
+/* 355 */ break;
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 366 */ if (this.lastLOD != this.currentLOD) {
+/* 367 */ switched = true;
+/* */ }
+/* */
+/* 370 */ this.lastLOD = this.currentLOD;
+/* */
+/* 372 */ return switched;
+/* */ }
+/* */
+/* */ public URL getURL()
+/* */ {
+/* 377 */ return this.url;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 392 */ private int pendingShape = NORMAL;
+/* */
+/* */ synchronized boolean isLoaded()
+/* */ {
+/* 396 */ return (this.pendingShape < -2) || (this.pendingShape > 0);
+/* */ }
+/* */
+/* */ public boolean isFullyLoaded()
+/* */ {
+/* 401 */ return (this.pendingShape == NORMAL) && (hasClump());
+/* */ }
+/* */
+/* */ public boolean handle(MouseDownEvent e)
+/* */ {
+/* 406 */ SuperRoot ultimateOwner = this;
+/* 407 */ while (ultimateOwner.getOwner() != null) {
+/* 408 */ ultimateOwner = ultimateOwner.getOwner();
+/* 409 */ if (((ultimateOwner instanceof PosableShape)) &&
+/* 410 */ ((ultimateOwner.getOwner() instanceof PosableDrone))) {
+/* 411 */ return false;
+/* */ }
+/* */ }
+/* */
+/* 415 */ PopupMenu m = new PopupMenu();
+/* 416 */ if (AnimatedActionManager.get().buildActionMenu(m, this)) {
+/* 417 */ Console c = Console.getActive();
+/* 418 */ if ((c instanceof DefaultConsole)) {
+/* 419 */ DefaultConsole dc = (DefaultConsole)c;
+/* 420 */ if (dc.getRender() != null) {
+/* 421 */ dc.getRender().add(m);
+/* */
+/* 423 */ m.addActionListener(AnimatedActionManager.get());
+/* 424 */ m.show(dc.getRender(), e.x, e.y);
+/* 425 */ return true;
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* 430 */ m = WorldScriptManager.getInstance().shapeClicked(this);
+/* 431 */ if (m != null) {
+/* 432 */ Console c = Console.getActive();
+/* 433 */ if ((c instanceof DefaultConsole)) {
+/* 434 */ DefaultConsole dc = (DefaultConsole)c;
+/* 435 */ if (dc.getRender() != null) {
+/* 436 */ dc.getRender().add(m);
+/* 437 */ m.addActionListener(WorldScriptManager.getInstance());
+/* 438 */ m.show(dc.getRender(), e.x, e.y);
+/* 439 */ return true;
+/* */ }
+/* */ }
+/* */ }
+/* */
+/* 444 */ return false;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ void setState(int mode, Vector<Texture> texs)
+/* */ {
+/* 458 */ if (isLoaded()) {
+/* 459 */ releasePendingShape();
+/* */ }
+/* */
+/* 462 */ releaseTextures();
+/* */
+/* 464 */ this.pendingShape = mode;
+/* */
+/* 466 */ if (isLoaded()) {
+/* 467 */ shapeRedraw();
+/* */ }
+/* 469 */ this.textures = texs;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public synchronized void setURL(URL newName)
+/* */ {
+/* 482 */ if ((newName == this.url) || ((newName != null) && (newName.equals(this.url)))) {
+/* 483 */ return;
+/* */ }
+/* 485 */ this.url = newName;
+/* 486 */ this.realFile = null;
+/* 487 */ boolean mrWas = this.mustReload;
+/* 488 */ this.mustReload = true;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 498 */ setState(NORMAL, null);
+/* */
+/* 500 */ shapeRedraw();
+/* 501 */ this.mustReload = mrWas;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ void shapeRedraw()
+/* */ {
+/* 509 */ if (hasClump())
+/* */ {
+/* 511 */ reclump();
+/* */ }
+/* 513 */ notifyLoadListeners();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 523 */ boolean isDefault = false;
+/* */
+/* */ static URL xShape;
+/* */
+/* */ URL realFile;
+/* */
+/* */ private boolean prepareRoom;
+/* */
+/* */ private Material animatableMaterial;
+/* */ protected int animatableClumpID;
+/* */ Vector<Texture> textures;
+/* */
+/* */ boolean isAv()
+/* */ {
+/* 537 */ return (this.url != null) && (this.url.getAbsolute().startsWith("avatar:"));
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ static String getBodBase(URL u)
+/* */ {
+/* 545 */ String s = u.getBase();
+/* 546 */ int len = s.length();
+/* 547 */ if ((!s.endsWith(".bod")) || (len < 6)) {
+/* 548 */ return null;
+/* */ }
+/* 550 */ return s.substring(0, len - 6);
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ int getBodPartNum()
+/* */ {
+/* 559 */ String s = this.url.getInternal();
+/* 560 */ int len = s.length();
+/* 561 */ if ((!s.endsWith(".bod")) || (len < 6)) {
+/* 562 */ return 0;
+/* */ }
+/* 564 */ return (s.charAt(len - 6) - '0') * 10 + (s.charAt(len - 5) - '0');
+/* */ }
+/* */
+/* */ protected synchronized void addRwChildren(WObject container)
+/* */ {
+/* 569 */ assert (!hasClump());
+/* */
+/* */
+/* */
+/* 573 */ if ((this.pendingShape == NORMAL) && (this.url != null)) {
+/* */ String urlStr;
+/* 575 */ if ((urlStr = this.url.getAbsolute()).startsWith("system:subclump"))
+/* */ {
+/* */
+/* */
+/* 579 */ SuperRoot o = getOwner();
+/* 580 */ if ((o instanceof Shape))
+/* */ {
+/* */
+/* 583 */ int num = 0;
+/* */ try {
+/* 585 */ num = new Integer(urlStr.substring(15)).intValue();
+/* */ }
+/* */ catch (NumberFormatException localNumberFormatException) {}
+/* */
+/* 589 */ this.animatableClumpID = ((Shape)o).extractSubclump(num);
+/* 590 */ this.clumpID = addEmptyParentClump(this.animatableClumpID);
+/* 591 */ this.isDefault = false;
+/* 592 */ newRwClumpChildHelper(container);
+/* 593 */ return;
+/* */ }
+/* 595 */ this.pendingShape = ERROR;
+/* */ } else {
+/* 597 */ setState(-2, null);
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 603 */ this.isDefault = false;
+/* */
+/* */
+/* 606 */ this.realFile = (isAv() ? xShape : this.url);
+/* */
+/* */
+/* 609 */ if (this.url.endsWith(".bod"))
+/* */ {
+/* 611 */ String s = getBodBase(this.url);
+/* 612 */ this.realFile = URL.make(this.url, s + ".bod");
+/* */ }
+/* */
+/* 615 */ BackgroundLoader.get(new ShapeLoader(this), this.realFile);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 625 */ if (!isLoaded()) {
+/* 626 */ this.clumpID = makeDefaultShape();
+/* 627 */ this.isDefault = true;
+/* */ }
+/* */ else {
+/* 630 */ this.clumpID = this.pendingShape;
+/* 631 */ this.pendingShape = NORMAL;
+/* 632 */ this.isDefault = false;
+/* */ }
+/* */
+/* 635 */ newRwClumpChildHelper(container);
+/* */ }
+/* */
+/* */ public void recursiveAddRwChildren(WObject parent)
+/* */ {
+/* 640 */ if ((this.animatableMaterial != null) && (this.animatableClumpID == 0)) {
+/* 641 */ this.animatableMaterial.addRwChildren();
+/* */ }
+/* 643 */ super.recursiveAddRwChildren(parent);
+/* */
+/* */
+/* 646 */ if (this.animatableMaterial != null)
+/* 647 */ nativeSetMaterial(this.animatableMaterial);
+/* */ }
+/* */
+/* */ public Material getMaterial() {
+/* 651 */ return this.animatableMaterial;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ protected void voidClump()
+/* */ {
+/* 659 */ if ((!this.mustReload) && (!this.isDefault) && (this.pendingShape == NORMAL)) {
+/* 660 */ this.pendingShape = extractClump();
+/* */ }
+/* */ else {
+/* 663 */ if (isLoaded())
+/* 664 */ releasePendingShape();
+/* 665 */ releaseTextures();
+/* 666 */ super.voidClump();
+/* */
+/* 668 */ this.animatableClumpID = 0;
+/* 669 */ if (this.animatableMaterial != null)
+/* 670 */ this.animatableMaterial.markVoid();
+/* */ }
+/* */ }
+/* */
+/* */ public void discard() {
+/* 675 */ if (isLoaded())
+/* 676 */ releasePendingShape();
+/* 677 */ releaseTextures();
+/* */
+/* 679 */ super.discard();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public void makeSpecials()
+/* */ {
+/* 687 */ if (this.prepareRoom) {
+/* 688 */ return;
+/* */ }
+/* */
+/* 691 */ Vector<WObject> detachList = new Vector();
+/* 692 */ for (Enumeration<WObject> e = getRoom().getContents(); e.hasMoreElements();) {
+/* 693 */ WObject p = (WObject)e.nextElement();
+/* 694 */ if ((p instanceof WObject)) {
+/* 695 */ WObject w = p;
+/* 696 */ if (w.getAutobuilt())
+/* 697 */ detachList.addElement(w);
+/* */ }
+/* */ }
+/* 700 */ Enumeration<WObject> e = detachList.elements();
+/* 701 */ while (e.hasMoreElements()) {
+/* 702 */ ((WObject)e.nextElement()).detach();
+/* */ }
+/* 704 */ Main.register(this);
+/* 705 */ this.prepareRoom = true;
+/* */ }
+/* */
+/* */ public void mainCallback()
+/* */ {
+/* 710 */ if (hasClump())
+/* */ {
+/* */
+/* 713 */ convertSpecial(this.clumpID);
+/* */
+/* 715 */ this.prepareRoom = false;
+/* 716 */ Main.unregister(this);
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public void setMaterial(Material m)
+/* */ {
+/* 732 */ if (this.animatableMaterial != null)
+/* 733 */ this.animatableMaterial.detach();
+/* 734 */ add(m);
+/* 735 */ this.animatableMaterial = m;
+/* 736 */ nativeSetMaterial(m);
+/* */ }
+/* */
+/* */ static
+/* */ {
+/* 135 */ disableLOD = IniFile.gamma().getIniInt("DisableLOD", 1);
+/* 136 */ if (ProgressiveAdder.get().enabled()) {
+/* 137 */ disableLOD = 1;
+/* */ }
+/* 139 */ if (disableLOD == 1) {
+/* 140 */ System.out.println("Avatar dynamic LOD disabled.");
+/* */ } else
+/* 142 */ System.out.println("Using avatar dynamic LOD when available.");
+/* 143 */ StatMemNode smn = StatMemNode.getNode();
+/* 144 */ forceLODLevel = IniFile.gamma().getIniInt("LowResAvs",
+/* 145 */ -1);
+/* 146 */ if (forceLODLevel != -1) {
+/* 147 */ System.out.println("Avatar LOD's forced to level " + forceLODLevel);
+/* 148 */ disableLOD = 0;
+/* */ }
+/* 150 */ int lowResThreshold = IniFile.gamma().getIniInt(
+/* 151 */ "ForceLowResRAMLimit", 33554432);
+/* 152 */ smn.updateMemoryStatus();
+/* 153 */ if ((smn._totPhysMem <= lowResThreshold) && (smn._totPhysMem > 0)) {
+/* 154 */ System.out.println("Low memory detected, using LOD 2 for all avatars.");
+/* */
+/* 156 */ forceLODLevel = 2;
+/* 157 */ disableLOD = 0;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 380 */ NORMAL = 0;
+/* 381 */ ERROR = -1;
+/* 382 */ LOADING = -2;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 525 */ xShape = URL.make("home:avatar.rwg");
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 761 */ nativeInit();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void releaseTextures()
+/* */ {
+/* 785 */ if (this.textures != null) {
+/* 786 */ Enumeration<Texture> en = this.textures.elements();
+/* 787 */ while (en.hasMoreElements()) {
+/* 788 */ ((Texture)en.nextElement()).decRef();
+/* */ }
+/* 790 */ this.textures = null;
+/* */ }
+/* */ }
+/* */
+/* */
+/* */
+/* */ protected void finalize()
+/* */ {
+/* 798 */ if (isLoaded())
+/* 799 */ releasePendingShape();
+/* 800 */ releaseTextures();
+/* */
+/* 802 */ super.finalize();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public void setReload(boolean mustReload)
+/* */ {
+/* 810 */ this.mustReload = mustReload;
+/* */ }
+/* */
+/* */
+/* */
+/* */ public Object properties(int index, int offset, int mode, Object value)
+/* */ throws NoSuchPropertyException
+/* */ {
+/* 818 */ Object ret = null;
+/* 819 */ switch (index - offset) {
+/* */ case 0:
+/* 821 */ if (mode == 0) {
+/* 822 */ ret = URLPropertyEditor.make(new Property(this, index, "File"),
+/* 823 */ "rwx;rwg;bod");
+/* 824 */ } else if (mode == 1) {
+/* 825 */ ret = this.url;
+/* 826 */ } else if (mode == 2) {
+/* 827 */ URL newName = (URL)value;
+/* 828 */ if ((newName != null) && (newName.equals(this.url)))
+/* 829 */ setURL(null);
+/* 830 */ setURL(newName);
+/* */ }
+/* 832 */ break;
+/* */ case 1:
+/* 834 */ if (mode == 0) {
+/* 835 */ ret = BooleanPropertyEditor.make(new Property(this, index,
+/* 836 */ "PrepareRoom"), "No", "Yes");
+/* 837 */ } else if (mode == 1) {
+/* 838 */ ret = new Boolean(this.prepareRoom);
+/* 839 */ } else if ((mode == 2) &&
+/* 840 */ (((Boolean)value).booleanValue()))
+/* 841 */ makeSpecials();
+/* 842 */ break;
+/* */ default:
+/* 844 */ ret = super.properties(index, offset + 2, mode, value);
+/* */ }
+/* 846 */ return ret;
+/* */ }
+/* */
+/* 849 */ private static Object classCookie = new Object();
+/* */
+/* */
+/* */ public void saveState(Saver s)
+/* */ throws IOException
+/* */ {
+/* 855 */ s.saveVersion(1, classCookie);
+/* 856 */ super.saveState(s);
+/* 857 */ URL.save(s, this.url);
+/* */ }
+/* */
+/* */
+/* */ public void restoreState(Restorer r)
+/* */ throws IOException, TooNewException
+/* */ {
+/* 864 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 0:
+/* */ case 1:
+/* */ break;
+/* */ default:
+/* 869 */ throw new TooNewException();
+/* */ }
+/* 871 */ super.restoreState(r);
+/* 872 */ URL url = URL.restore(r);
+/* 873 */ if (url != null)
+/* 874 */ setURL(url);
+/* */ }
+/* */
+/* */ public String toString() {
+/* 878 */ return super.toString() + "[" + this.url + "]";
+/* */ }
+/* */
+/* */ public native float calcLODDistance(float paramFloat);
+/* */
+/* */ public native void nativeSetMaterial(Material paramMaterial);
+/* */
+/* */ protected native int extractSubclump(int paramInt);
+/* */
+/* */ protected static native int addEmptyParentClump(int paramInt);
+/* */
+/* */ private static native void convertSpecial(int paramInt);
+/* */
+/* */ public static native void nativeInit();
+/* */
+/* */ private static native int makeDefaultShape();
+/* */
+/* */ private native void releasePendingShape();
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Shape.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file